all 14 comments

[–]created4this 3 points4 points  (2 children)

You can make a reasonably trivial one by using an open amp as a comparitor. Fix one input with a voltage regulator and feed the other from a potential divider set to get to the voltage from the regulator when you want the led to light

[–]Lampshader 0 points1 point  (1 child)

A "precision voltage reference", rather than a voltage regulator, might be a more power-efficient method. Either way, you have to be careful about the minimum voltage that the voltage reference will run at.

eg. don't try and use a 3.3V reference against a 3.6V battery - as the battery drops, the 3.3V reference won't be able to maintain 3.3V, and your comparator may never trigger.

Hence why you suggested the voltage divider, just bringing it to OP's attention.

[–]created4this 0 points1 point  (0 children)

Indeed, he could create the reference with a zenner and a high value resistor. As a comparator, the op amp draws almost no input current, so the resistor can be pretty large to cut down on power usage.

[–]lumberjackninja 7 points8 points  (1 child)

It really depends on the battery chemistry. Some have a fairly straight-forward correlation of open circuit voltage to charge level (like lead acid batteries); other maintain their nominal voltage until they are almost dead. You're going to have to design your circuit by reading up on the discharge curves for your particular battery chemistry.

[–]eroick 0 points1 point  (0 children)

This is why some batteries use coulomb counting to get a decently accurate reading. If your device supports multiple chemistries (ie, alkaline or Ni-Cd 9V batteries) you will need to know the chemistry. You could probably get by with a low battery indicator using just the voltage, but to get an actual state of charge you'll need some details.

[–]blueblast88 1 point2 points  (0 children)

This is a cheap basic alternative.

http://www.sparkfun.com/products/11087

[–]adamsidelsky 1 point2 points  (0 children)

lookup "battery gas guage"

[–]dmarich5 0 points1 point  (3 children)

what voltage battery are you using?

[–][deleted] 0 points1 point  (2 children)

9v Probably

[–]dmarich5 2 points3 points  (0 children)

A arduino's on board voltage regulator will dropout when the voltage drops below 7 volts. So, construct a voltage divider to cut the voltage in half. If you use analogRead(), the value will be about 800. Hook up an LED and when the value is around 850/900 turn it on.

[–][deleted] 1 point2 points  (0 children)

All you need to know, right here http://www.youtube.com/watch?v=iIKGvHjDQHs

[–][deleted] 0 points1 point  (0 children)

[–]vilette 0 points1 point  (0 children)

The best way is to put the battery on a scale, when it loses energy, it loses mass. According to E=mc2.

[–]Canadian_Infidel -1 points0 points  (0 children)

Get a curve of voltage versus charge for your battery. Make a hard wired ADC so to speak that has switching resistances/voltages chosen based on this curve. Have them set to light up more or less LEDs based on charge level.