Go Down

Topic: Measuring battery life remaining with just an analogue in pin (Read 2 times) previous topic - next topic


simple idea, unlikely to work.

When i test a battery with a multi-meter i measure its voltage, as the battery dies this decreases.

if i connect the battery that is powering my arduino into an analogue in pin as well as vin and ground can i not then estimated battery life remaining for the arduino with this read in value?



I don't know if your method would work, but the Arduino can measure its own working voltage with this code: https://code.google.com/p/tinkerit/wiki/SecretVoltmeter.


That should work just as well as a multimeter.   (If it's over 5V, of course, you'll need a voltage divider.)

Batteries don't discharge linearly, but once you get a feel for the discharge pattern of your particular battery in your particular application, you should get useful results.

:D My laptop usually thinks there's 3 hours left right before it dies!


simple idea, unlikely to work.


Measuring battery life accurately is difficult, every battery is different.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)


Battery life remaining isn't overly simple to determine, but it's still a good idea to monitor
battery voltage so you know when the system is about ready to crash. If you're using an
LDO regulator that's known to dropout when Vin gets down to 6V, then when it reads
6.25V, you know it's time to make peace with the world. Save the data to EEPROM,
shutdown activities, and go to sleep.

Go Up