Whats the best way to make a voltage monitor?

$10 digital voltage meter at home depot?

no no no, i mean make the atom monitor it self so it can act on how high or low the battery is

Just a thought here, why not post a useful thread subject so that others know what it is you need help with.

[Note: I edited the help help help hlpe to a real problem… Jim]

i need reading all the commands over and over and i try many things but iam left doing what i did before R/Ctime
angelfire.com/droid/blueappl … nsors.html you its the bettom picture made in paint next to the word rctimer
i put this in a little box and i get a number that i can rate bewteen high and low but i haven’t got my robot to work with this number and react to it

if you dont know the R/C time command i will post it

I have never used the Atom, so I spent a few minutes with Google and found several things that might be useful to you, and that you might have found yourself if you had looked.

Such as:

This forum thread, which discusses displaying the Atom’s input voltage on an LCD screen.

Or, you might have found the Atom programming manual, which, if you were to do a search for “voltage”, you would find numerous mentions of it. In fact, at the bottom of page 153 may be exactly what you are trying to do.

There were, of course, quite a few other results turned up by a quick Google search, but I’m not going to take the time to read, sort, and list them here. There are a few reasons for that. First, I have never worked with the Atom, so I know nothing about it. Secondly, you did a very poor job of describing your problem, which makes it extremely difficult for us to help you solve it. Most importantly, however, you have shown that you were too lazy to spend a few minutes with Google attempting to find your own solution.

This hobby is about figuring things out for yourself. With poor spelling, grammar, punctuation, and a bad attitude (whining and complaining when people don’t do your work for you), your chances of getting a response are limited. By not explaining your problem well, your chances of getting an appropriate response are even more remote. By not taking the time to try to figure it out yourself, you’ll never understand what is going on inside the code, and ultimately, your enjoyment of the hobby will be hindered, because you’ll always be relying on others to do it for you, rather than creating something yourself.

Mike

uh huh?
now let me get this. you dont work with an atom? so i could you dont have an atom nor it manual? you say page 153 in the manual?

Good luck finding your answer then. I doubt you’ll find it here.

Mike

Edit: I see you edited your post from a fairly rude reply (“who asked you?”) to something a bit more polite. Unfortunately, your edited reply is still painfully difficult to read. If you’d bothered reading my last post, you would have known that I found the manual online by using Google. Try it. You might learn something. I recommend searches such as basic grammar instruction and learning to use punctuation for starters.

Mike

Sorry, Gundam, but I agree with Mike.
Your posts are difficult to read.

Capital letters and periods help to tell us where your writen thought begins and ends.

If google didn’t do it for you, you might want to try

As to Mike’s so-called lack of credentials… well, he has more programming credentials than most on these forums.
Perhaps he doesn’t have direct experience with the Atom, but the Atom’s language is very compatible with so many other languages, anyhow.

It’s very difficult to find the time to help others.
To begin with, this is the week before finals for most people who are in college (that would include both Mike and I).
And, on top of the cramming, there’s always our own robotics projects that we all are trying to work with.

Yes, not knowing what you need to know is very frustrating.
I experience that frequently.
:stuck_out_tongue:
But, being mean won’t help your frustration.

Please keep it civil, and we’ll all try to do what we can to help.

iam sorry to ghear your both are still in college, i can understand.
i been doing alot of helping my friend who have a hard time with college myself.

iam trying to reword my search in google now. i alway search under basic stamp battery mointor or basic atom battery mointor.

nick your right, i didnt not mean to take it out on you mike, iam sorry,

if you could not guess type is not my fav thing in the world,

Using the link provided above, the first link presented in the body of the page is that for “NEW! BasicATOM Manual 3.0”. On page 153 of the PDF document (page 143 of the manual contained therein), at the bottom of the page, are the words:

…and it continues on the next page, including a coding example.

Learning this stuff is hard. If it was easy, everybody would be doing it. It’s frustrating not having a step-by-step example for every possible application, but that’s the nature of the beast. Every application is different, thus every situation requires a slightly different approach.

Ever since I was a kid, working on an Ohio Scientific computer with an old TV for a monitor (the Atom could probably compute rings around it), I have found that studying existing code and reverse engineering it to fit my task, or learning to use snippets of existing code to build up a program, is far more beneficial in terms of learning and future useability than to simply have a pre-built program that does what you want. I think this is probably why most of the sample code found in texts is inherently limited in what it does in the exercises; it provides a foundation for you to build your own knowledge upon.

I myself am just beginning to transition to the Atom, with my current project. In fact, I received my Atom and ABB via UPS this afternoon. I will be learning how to re-use and adapt what I have learned before, and what I can find on the Internet, in order to get it to do what I want. I will not succeed on my first try; there will be many failures and frustrations. I will learn though, and every time I pull apart a snippet of code, and figure out how to apply it to my own project, I will be learning, and becoming more proficient in programming the Atom processor.

By working with one small rock at a time, you learn to build a wall.
By working with code in small chunks, you learn to build a program.

This solution doesn’t use ADIN at all. It uses a simple resistor/capacitor circuit and the RCTime command:

emesystems.com/BS2rct.htm#B_voltage

You will need to port the code from the STAMP to the ATOM. This should be easy, as the program is short, the languages are almost identical, and both manuals are available for free on the 'net.

The circuit should work just as shown with your bot board. I used a very similar circuit years ago to sense light levels. Its only disadvantage to this method is that (depending on the Resistor and Capacitor you use) the voltage test may take a second or two to complete.

I tried googling for BASIC ATOM BATTERY MONITOR, but the Atom is not popular, so I switched to “BASIC STAMP BATTERY MONITOR” and this was the 16th result. The stamp is an older (and more popular) micro, and so there are bound to be more web sites with info on it. When your searches don’t succeed, you have to play with the wording.

You might have been getting poor google results because you spelled monitor “moinitor” in your post…

yes yes yes yes yes yes
This is what i need looking for i had in favorites, and lost when i got a new computer. thanks Tyson

No problem. Good luck with your project!

Thanks Tyson, I might use this as well.

Why on earth would you want to go through the trouble of soldering up the R and C to use a slow command, when you have a real A to D in the Atom? Furthermore the Bot Board has the ability to route logic and or servo voltage to the A to D with a simple shorting bar jumper. Then it is as simple as doing an ADIN command.

The Atom may not be as popular as the BS2, but it IS better in every way as far as it’s performance.

Chris, crack the manual, and try the ADIN command. If you have trouble, post the code you tried, and the results you obtained and we will help you. Ok?.. :wink:

Why? Because no one could tell him how to use ADIN to measure the voltage- yourself included.

But I did know of a way to use a R-C circuit, so I shared that information. See, I don’t post on forums to prove how smart I am, I post to seek, and provide, assistance.

If you know a method to detect voltage using ADIN that doesn’t involve any additional hardware, why don’t you** tell us **instead of critizing the solution that I was able to come up with? I’d love to see that solution, and learn from it.

Also, I never said the STAMP was better. I said it was older, and thus more popular (ie. it has had more exposure). I know the ATOM Is better than the STAMP, that’s why I bought two of them.

The fact that I didn’t tell him how to do it doesn’t mean I couldn’t. The fact is, it’s a really simple command, and by itself doesn’t do much. This should get him started.

temp      var  Word
battlval   con  500     'this needs to be changed to the correct val for your bat.

start:
  adin AX0,2,AD_RON,temp
if temp < battval then battlow
goto start

battlow:
  'code to do if battery is low...
goto start

Tyson, dude relax… :open_mouth:

Oh here is some more information. It’s in the Bot Board manual…

The AX0 and AX1 inputs (analog) can be connected to the VS (Servo) or VL (Logic) supplies, respectively, by installing a shorting bar jumper on each one. The voltage is reduced by a 4 to 1 voltage divider to protect the inputs from a voltage over 5vdc. So if you connect a 9vdc battery, for simplicity sake lets assume the battery measured 9vdc exactly. The actual voltage on the AX input will be 2.25vdc.

This information is not in the manual. A voltage of 2.25 will provide a value of 460 in the variable used in the ADIN command. So my guess of 500 in the previous post was off a little. :slight_smile:

You can increase the resolution by adding a reference voltage, but hey, I’m trying to keep it simple…

::Nick takes out a cross, a bottle of holy water, a sack of garlic, raises them, and backs slowly away.::

:laughing:

Tyson, I understand your point, and you have the right attitude in regards to helping others and sharing ideas, however, Jim can’t give solutions to every specific idea that people come up with. Jim would have to LIVE on these forms in order to provide detailed help to every question. Instead, Jim is doing the right thing by steering us in the right direction. It’s up to use to guide ourselves down the path that Jim puts us on.