How to measure Lipo voltage?

Hello

I got a project running and it would be nice to read with the Arduino the current Voltage of the Lipo which is powering the Arduino.

Is there any way I can do that?

Thx Geko

Use a voltage divider so that the voltage on an analog pin is no more than 5 volts when the battery is fully charged.

If you are using a 2S LiPo (8.4 volts max) then using two 10k resistors as a voltage divider will deliver 4.2 volts to the arduino when the battery is fully charged.

You should be able to find code posted in the forums for converting the analogRead value to a voltage value that can be displayed.

Great! Thx! So it looks now like that: Vbattery | R1 | -------------- Arduino analog pin | R2 | Ground

It does work great. So now I have to get the Voltage when the Arduino will switch off... Let's check this..

Geko

Depends on the regulator. If it's a standard 7805 its around 7 volts. If it's a low dropout type it could be well under 6 volts and that is lower than you ever want your LiPo battery to see!

Hmm got an other problem. As I said it does work I testet the 5v output of the Arduino so I got a stady Voltage. But as I tried a 7.4v (2s) Lipo the Value jumps! hmm what's the matter?

Geko

Sorrry does work a cable was in the wrong place :)

Geko

Good to hear its working. Be careful you don’t short out that LiPo :wink: