Experiments with Renewable Energy The ADC0834 - A 4-Channel Analog to Digital C
celestino_galan
Posts: 44
Hi (Sorry about my english, I come from spain).
This·is a question about [font=Arial,Bold color=blue size=2]The ADC0834 - A 4-Channel Analog to Digital Converter and the batery charger.[/font]
[font=Arial,Bold size=2][/font]
[font=Arial,Bold size=2]As I've been folloed the instructions... [font=Arial,Bold size=2]
"Understanding Vref
[/font]The voltage applied to the reference input, Vref, defines the voltage span of the analog
input, over which the 256 possible output values apply. When Vref = V+ = +5V, the A/D
converter's maximum voltage is set to +5V. The minimum value is 0V or ground.
........."
what about if you try to measure the voltage of a battery that is higher than 5 V.?
Because, based on this subjet: "The ADC0834 - A 4-Channel Analog to Digital Converter and the batery charger."· I am trying to measure "check" the Battery level of my boebot wich is suplyed with 4x 1.5 V batteries...
What I have done is something similar to "[font=Arial,Bold]Page 50 · Experiments with Renewable Energy" but instead of an external battery I have put the resistor and the wires to the batteries of the boe bot... wich is higher then de Vref=5v (regulated...)
I am tryinh to measure the voltage of the BoeBot bateries in orther to know when they are to finish....
May·you help me?
Thank you very much.
[/font][/font]
Post Edited (celestino_galan) : 4/27/2005 4:12:40 PM GMT
This·is a question about [font=Arial,Bold color=blue size=2]The ADC0834 - A 4-Channel Analog to Digital Converter and the batery charger.[/font]
[font=Arial,Bold size=2][/font]
[font=Arial,Bold size=2]As I've been folloed the instructions... [font=Arial,Bold size=2]
"Understanding Vref
[/font]The voltage applied to the reference input, Vref, defines the voltage span of the analog
input, over which the 256 possible output values apply. When Vref = V+ = +5V, the A/D
converter's maximum voltage is set to +5V. The minimum value is 0V or ground.
........."
what about if you try to measure the voltage of a battery that is higher than 5 V.?
Because, based on this subjet: "The ADC0834 - A 4-Channel Analog to Digital Converter and the batery charger."· I am trying to measure "check" the Battery level of my boebot wich is suplyed with 4x 1.5 V batteries...
What I have done is something similar to "[font=Arial,Bold]Page 50 · Experiments with Renewable Energy" but instead of an external battery I have put the resistor and the wires to the batteries of the boe bot... wich is higher then de Vref=5v (regulated...)
I am tryinh to measure the voltage of the BoeBot bateries in orther to know when they are to finish....
May·you help me?
Thank you very much.
[/font][/font]
Post Edited (celestino_galan) : 4/27/2005 4:12:40 PM GMT
Comments
·· Using the ADC0834 you cannot have a Vref higher than the supply voltage for the chip.· Since your batteries are running at 6V, and your logic is running at 5V, the Vref would have to be 5V.· Probably the best/easiest thing to do if you just want to detect when the batteries are low, would be to create a voltage divider that is set just above the low threshold for an input pin, and monitor that pin for a low signal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
My name is John Gavlik and I am the author of "Experiments with Renewable Energy".
I agree with Chris Savage's answer regarding your desire to measure voltages higher than 5 volts. If you were to place a resistor divider circuit across the battery, you could measure the battery voltage withthe A/D converter. One suggestion is to use two 10K resistors in series - one resistor connected to the battery positive - the junction of the two resistors to the A/D converter input - and the other end of the second resistor to the battery negative. The voltage readings that you will get will be one-half of the real battery voltage; therefore you will need to double the readings to acquire the true battery voltage.
Examples:
If the A/D converter reads 3.00 volts, the real battery voltage is 6.00 volts.
If the A/D converter reads 2.00 volts, the real battery voltage is 4.00 volts...and so on.
Let us know if this is any help to you.
Regards,
John Gavlik
LearnOnLine, Inc.
www.learnonline.com
so when I detect that the voltage for the input pin is low... How to do it? Because I think you can only know if it is 5v or less... isn't it? Wich pbasic sentence, please?
And I put this voltage divider form the battery (parallel) with no problem with voltage feed to the board... (sorry for my english) ?
Thanks again
Thanks it is very interesting, and I think This question answer a lot of doubts of people en reading the voltage of the batteries of the bot.
Do you think this is the best way (accurated...) to know if the battery is low?
Thanks again
Post Edited (celestino_galan) : 4/27/2005 4:13:29 PM GMT
1) or 2) ?
Post Edited (celestino_galan) : 4/27/2005 4:21:55 PM GMT
·· To answer your question, a little math is required to find the values for a voltage divider.· It's actually been a little while for me so even I had to look the formula up.· Anyway, it's basically Vx = Rx / Tx X Vs.· Given a Source Voltage (Vs) of 6V, and a Total Resistance of 13.9K (Tx), and knowing we want about 1.7V at our Stamp pin, this gives us an Rx value of 3.9KOhms (Attempting to use common values).
·· This actually gives a voltage of about 1.68V, which is close enough.· So what will happen here is that while your batteries are at 6V, the Stamp I/O pin will see about 1.68V, which it will interpret as a HIGH.· As the battery voltage drops down, so will the voltage at the pin until it hits 1.4V, at which time the Stamp I/O pin will become LOW.· This is your Battery Low indicator.· This will happen when the battery voltage reaches around 4.9V - 5V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks
What about my imgs?
·· Sorry about the images...Overlooked those.· But that's not how you would need to connect the battery to a voltage divider.· Please see the image attached to my message.
·· As for the value of 13.9K, I was trying to use two fairly common values in the calculation.· If you used a 10K resistor and a 3.9K resistor, your total resistance is 13.9K.· The connection point between the two goes to your Stamp I/O pin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
____________________________________________________________
Dr. Michael R. Gustafson II (mrg@duke.edu)
Lieutenant Commander, Civil Engineer Corps, USNR
Thanks
·· These values were selected merely to make an example.· But your point is accurate, larger values would drop less current.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
There is a catch, though - if you are trying to measure a voltage, you need to know what kind of resistance the measuring device is using and make sure that your dividing resistors·are significantly below it (for voltage measurements).· If not, as Cecil Adams said in his poem "The story of Schroedinger's cat (an epic poem)", "The act of observing disturbs the observed"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
____________________________________________________________
Dr. Michael R. Gustafson II (mrg@duke.edu)
Lieutenant Commander, Civil Engineer Corps, USNR
Thank everybody