Shop OBEX P1 Docs P2 Docs Learn Events
Measuring voltage > 5 volts — Parallax Forums

Measuring voltage > 5 volts

RichardFRichardF Posts: 168
edited 2008-04-03 02:42 in BASIC Stamp
My application uses a 12 volt NiMh battery pack. I run the brain (BS2) through a 5V regulator from 12 volts. I want to monitor the voltage of the battery pack to alert me to a discharged condition. An ADC seems the way to go but I obviously need to interface with the 5v BS2 input. I haven't seen any ADC's that will measure up to·12 volts and send a 5 volt digital signal out. Any suggestions?
Thanks,
Richard

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-03 01:45
    Use a simple voltage divider. An ADC draws very little current (microAmps or less) so you can use a high resistance "ideal" voltage divider. For example, you could use 3 x 100K resistors across the 12V battery leads and there would be 4V between the battery ground and the other lead of the 100K resistor connected to ground.
  • metron9metron9 Posts: 1,100
    edited 2008-04-03 02:42
    Another way to do it with just a stamp pin if you want to just know when a specific low level is reached.

    The stamp pin uses about 2.5V as it's threshold for an input pin to read high or low. (find the specs on its actual voltage high/low levels)

    Using a 77k and 22k resistor divider at 11.3V and higher the input pin would read high and 11V and under it would read low.

    Using a pot to adjust the 22k side of the divider you can dial it in to the voltage you want to shut down at.

    Use a small capacitorfrom the input pin to ground to make the voltage more stable. Take a reading when the high amp draw components are on to get a reading of how much battery voltage you have as a reading on a NiMi with no load won't tell you much. You can set up a load resistor as well with a fet to make a known load draw on the battery, turn that load on then test the input pin.

    So I would fiddle with a volt meter and a known load with a battery you know is at the discharged level you want to shut down at. That will tell you what you need for a load and resistor divider.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
Sign In or Register to comment.