Shop OBEX P1 Docs P2 Docs Learn Events
Experiments with Renewable Energy The ADC0834 - A 4-Channel Analog to Digital C — Parallax Forums

Experiments with Renewable Energy The ADC0834 - A 4-Channel Analog to Digital C

celestino_galancelestino_galan Posts: 44
edited 2005-06-16 20:37 in Learn with BlocklyProp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-27 15:29
    Hello,

    ·· 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
  • John GavlikJohn Gavlik Posts: 5
    edited 2005-04-27 15:44
    Hello celestino_galan,

    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
  • celestino_galancelestino_galan Posts: 44
    edited 2005-04-27 15:47
    Thank you very much for the answer but like I am not an "expert..." I would like if you explain it a little bit more ("...that is set just above the low threshold for an input pin..."

    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
  • celestino_galancelestino_galan Posts: 44
    edited 2005-04-27 15:58
    Sorry, John, I didn't read your answer.

    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
  • celestino_galancelestino_galan Posts: 44
    edited 2005-04-27 16:07
    Dou you say something like this (see the picture)?

    1) or 2) ?

    Post Edited (celestino_galan) : 4/27/2005 4:21:55 PM GMT
    359 x 327 - 30K
    359 x 327 - 31K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-27 16:44
    Hello,

    ·· 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
  • celestino_galancelestino_galan Posts: 44
    edited 2005-04-27 16:57
    Please where did you get Tx = 13.9k?

    Thanks

    What about my imgs?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-27 18:41
    Hello,

    ·· 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
    359 x 327 - 6K
  • DukeEgr93DukeEgr93 Posts: 10
    edited 2005-06-03 04:12
    Just to throw this out there - I would use resistors that are·three orders of magnitude larger just to limit the current drain off the batteries as much as possible.· Not that ~430 uA is huge, really.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ____________________________________________________________
    Dr. Michael R. Gustafson II (mrg@duke.edu)
    Lieutenant Commander, Civil Engineer Corps, USNR
  • celestino_galancelestino_galan Posts: 44
    edited 2005-06-03 12:27
    Could you, DukeEgr93, explain it a bit more. I don't understand.

    Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-03 15:04
    DukeEgr93 said...
    Just to throw this out there - I would use resistors that are·three orders of magnitude larger just to limit the current drain off the batteries as much as possible.· Not that ~430 uA is huge, really.·
    Michael,

    ·· 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
  • DukeEgr93DukeEgr93 Posts: 10
    edited 2005-06-05 03:19
    C_G: What I was getting at is that you do not want your voltage divider to put a load on your batteries.· Since power in a resistor (or set of series resistors) is V^2/R and since it is only the relative values of the resistors that matter, not the total of the two, you can choose larger R values that will divide your voltage the same way but reduce the power consumption of the divider itself.

    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
  • celestino_galancelestino_galan Posts: 44
    edited 2005-06-16 20:37
    Ok, If I understand If I choose large valuers (big) of resistors, the current drain because of them is lower than with small values of tesistors ???

    Thank everybody
Sign In or Register to comment.