How to calculate the remaining % of an alkaline or LiPo battery?

I don't want to buy any hardware, if possible. I want to calculate the remaining % of the battery. What should I do? I use alkaline right now but will move to LiPo ASAP. Thanks.

I think it is too difficult to calculate the % of charge left in a battery. Look at the battery discharge graphs for the battery chemistry you are interested in.

Without looking anything up myself, I believe you would need to come up with a formula to approximate the voltage at different discharge rates, and work from there. You never want to over drain a LiPo, so your effective zero percent left won't actually be when the battery is dead, but when you want it to cut off.

To make an accurate battery level gauge requires quite a bit of work, and is unique to every new project.

You need to continuously monitor both current draw and battery voltage, and compare those with experimentally determined discharge profiles to estimate remaining battery capacity (battery capacity is reduced by large current draw).

Since battery performance degrades with age, for a given battery, the profile has to be updated every so often.

So yeah... I think you'll have to "profile" the voltage by taking a voltage measurement every hour or every 10 minutes, etc. And that should be done with same load as you'll actually be using.

If you look at a discharge curve it's not a straight line. The voltage drops a little, rapidly, at the beginning, then it slopes-down, and when it's getting to the "end" it starts dropping more quickly.

The battery is generally considered "dead" when the voltage is down to about 80% of it's rated voltage. So as a simple approximation you could calculate a straight-line to 80% where half of the life/charge is when the voltage is at 90%, etc.

But if the voltage is regulated-down and you've got extra voltage to "play with", you can get more than the rated amp-hours out of it. For example, if you are running a 5V circuit from a 12V battery it will still be good way-past that 80% point.

Lipo cells in good condition are somewhat an exception: there's a good, usable correlation between state of charge and unloaded voltage.

But you should read all about it for youself at

which will take as much of your time as you give it.

Never… ignore the many rules for this chemistry. Overcharge, deep discharge, too fast, charge too fast, short circuit, use if damaged and so forth.

Literally playing with (potential) fire.

a7

1 Like

You will have better luck with a LiPo battery as you can test it before determining your constants.

Alkaline vary significantly among brands and somewhat between individual lots. You might get a little heads up if you watch the voltage curve and recognize when it starts to drop quickly.

Also watch out for temperature - effective capacity at reduced temperature is much less.

It never is like that. When a tesla says 0%, it actually is 20%, and so on and so forth.

Yes, because they are made to protect from over discharge. A bare lipo on it's own doesn't have that built in and can be drained to nearly a true 0%. Nothing in a lipo is going to tell you what % it is at, so you need to choose your own 0% point.

AKA, it's a rabbit hole. :smiley:

Alkaline tends to have a more predictable state-of-charge than Li-ion. A "1.5V" cell, for example, discharges fairly linearly from around 1.4V down to about 1.0 or 0.9V, at which point it's considered "dead" and good only in something like a Joule thief.

Using a Li-Ion battery now. Capacity is 3.7V, 3000mAH, 11.1Wh
Output is 5V at 1A (USB). Would it be possible to calculate battery percentage % accurately? E.g. 100, 99, 98, and so on.

It's possible, but not easy to do. The process has been explained in the thread. Basic idea is to pick your minimum voltage, say 3.2v, as 0%, and 4.2v as 100%. Unfortunately, 3.7 isn't going to be 50%. In fact, you may was 3.7v to be your 0% for increased lipo longevity. Lipo Voltage Chart: Show the Relationship of Voltage and Capacity - Ampow Blog gives you an idea, but your lipo and load will differ from theirs. Even temperature will affect it. It may be easier to just display the voltage and swap the battery out before you get to 3v.

Thanks, will check that out.

If you have some sort of converter provided 5V from your lithium cell, there is no way to determine charge state from THAT. You need the raw battery voltage, which will be relatively linear from 4.2V (fully charged) to ~3.4V (getting as fully discharged as you ought to go.) The converter should be able to maintain 5V output voltage over that entire range.
This means an extra connection directly to the battery.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.