Go Down

Topic: Battery life indicator (Read 859 times) previous topic - next topic


Hi guys,

I need to implement a battery life indicator for my project. What I have in mind is a very simple battery life indicator for a 9V battery, using just 1 red LED. So what happens is that when the voltage reaches around 7.8V and below, the red LED lights up. If it is higher than 7.8V, the red LED does not light up. And when the red LED lights up, it sends a signal to the arduino which then displays a warning sign on the LCD display.

Can anyone help me with how the schematic should look like and connections for the battery life indicator should look like? Am totally clueless (New to arduino  :smiley-red:)


Many people have asked and done that very same thing, MANY times. Try to do a search in the forums, for reading a battery voltage.
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID


Make a voltage divider from two 100K resistors, connect it between +9V and ground, and connect the midpoint to an analog input pin of the Arduino. Also connect a 10nF or 100nF capacitor between the midpoint and ground. When you do an analogRead from that pin, 7.8V will correspond to (7.8/2) * (1024/5) = 799. If you get a reading less than that, drive an output pin high to light the LED. How you display the battery state on the LCD is up to you - I normally display the battery voltage to 1 decimal place if there is enough space.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


OP, I hope you're not trying to power an Arduino using one of those measly little 9V batteries.


Go with a 9.6V rechargeable battery pack
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Go Up