How can we make a capacity meter for a LiPo battery using arduino ?

Hello,
I would like please to know if it is possible to make a capacity meter like the one on our phones for a LiPo 11.1V battery pack using arduino ? i was searching and found many ways but i am not sure if it is like the phone meter. The most way i found is a voltage meter using analog pin.
My solution so far which I don't find versatile for all batteries but for a specific well defined value in the code which is :
Using a current sensor ACS712 then make the program calculation and in which we define its value in the code lets say 2200mAh, so the current sensor will sense the current and we calculate the amphour then when the arduino lose power and we add a circuit with a capacitor to an analog pin which gives time the EEPROM to record the final value which is 2200 - the value reached at the power loss. But this method which i came up with will not work if the battery is lets say a 3800mAh ! and we have to use a push button and we click it every time we need to connect a fully charged 2200mAh battery

I appreciate all your help in advance :slight_smile:

But this method which i came up with will not work if the battery is lets say a 3800mAh !

The same overall method should work but you have to know some things about the specific battery no-matter what. *

The voltage should be useful but the voltage changes depending on what you're doing. If the phone or computer is "sleeping" the voltage will go-up slightly and the battery will last longer the less you use it. You also have to know something about the discharge curve. ...It's not linear and by the time you're down to half-voltage the battery is considered "dead".

* P.S.
You'll also get a "false result" if the battery is old or out-of-spec. When my laptop battery was going bad the indicator would say I had a half-hour left and the computer would shut-down 5 minutes later... And the program wasn't smart enough to figure-out what happened last time.

What are you trying to measure with your hypothetical 'capacity meter' ?
(remaining charge or full charge ?)
LIPO chargers have a menu to select battery capacity (2200, 3300 etc)
Then by measuring the voltage and current while charging it can tell how much energy it put in the battery in
mAh.
Is that what you want or are you trying to measure the capacity of a partially charged battery ?
What exactly ARE you trying to do ?

raschemmel:
What are you trying to measure with your hypothetical 'capacity meter' ?
(remaining charge or full charge ?)
LIPO chargers have a menu to select battery capacity (2200, 3300 etc)
Then by measuring the voltage and current while charging it can tell how much energy it put in the battery in
mAh.
Is that what you want or are you trying to measure the capacity of a partially charged battery ?
What exactly ARE you trying to do ?

I am trying to make a meter in which when I plug the battery whether it is 2200 or 3800 or 5000mAh the meter should give a value of the capacity accordingly in %, it doesn't matter if the battery is full or not i want the meter to tell me if the battery is full or half or quarter or empty

DVDdoug:
The same overall method should work but you have to know some things about the specific battery no-matter what.

The voltage should be useful but the voltage changes depending on what you're doing. If the phone or computer is "sleeping" the voltage will go-up slightly and the battery will last longer the less you use it. You also have to know something about the discharge curve. ...It's not linear and by the time you're down to half-voltage the battery is considered "dead".

yes exactly that is the thing with batteries that the voltage is around half when it is empty

I used LIPO batteries for 10 years for fixed wing RC aircraft and I just never let them get below 3.2V/per cell.
(4.3V charged)
Anyone with experience knows you have to know the load current of what your powering and how long the
battery can power it and never go past that many minutes. Trying to just measure batteries is a very risky
approach to using LIPO batteries. Just calculate your load current and do the math to find out how many
mAhs you need.

raschemmel:
I used LIPO batteries for 10 years for fixed wing RC aircraft and I just never let them get below 3.2V/per cell.
(4.3V charged)
Anyone with experience knows you have to know the load current of what your powering and how long the
battery can power it and never go past that many minutes. Trying to just measure batteries is a very risky
approach to using LIPO batteries. Just calculate your load current and do the math to find out how many
mAhs you need.

yes sure I am recording each component current consumption I have them in my documentation of course not going blind, but I want to make a visual option that tells the battery has let's say 50% if I run for lets say 20min and my battery still have 75% of its capacity so I want to know that for next time

This probably isn't going to help you but I never met an experienced RC pilot who would think of using a battery
that he didn't just charge. Using partially charged or 'unkown' batteries is ok for cars but we don't do that with
aircraft. We only use fully charged batteries so your meter isn't something we would ever consider using.

raschemmel:
This probably isn't going to help you but I never met an experienced RC pilot who would think of using a battery
that he didn't just charge. Using partially charged or 'unkown' batteries is ok for cars but we don't do that with
aircraft. We only use fully charged batteries so your meter isn't something we would ever consider using.

yes i can understand that because the risk of losing an aircraft would be higher and an rc car would just stop working and maybe crash but very rare, and when you go for a flight you would consider hours of flights and maybe have many packs of batteries. But for my application having this meter would be a good thing. I have the solution i have mentioned in the original post but as i said it wont work if you change battery capacity for a bigger or smaller

The open cell battery voltage is considered a very poor measure on remaining battery capacity, to the extent that it's useless.

To know the remaining capacity of a battery you need a coulomb counter attached to it as it is used. Just like how your phone and laptop try to give a somewhat usable estimate of your current battery level.

Enter into your internet search thingy the following words, "lipo fuel gauge" and you may find something.

The best way is to measure the energy going in as it's charged, as almost all modern Lipo chargers do, and then measure the energy coming out as it's discharged but that's a lot of effort.

Despite what some people claim the off-load voltage of a Lithium-ion/Lipo battery (but NOT other battery types) is a pretty reasonable indication of the state of charge. Unless you really need a precise charge measurement I'd be happy to use that with this table.

Steve

Idahowalker:
Enter into your internet search thingy the following words, "lipo fuel gauge" and you may find something.

the problem with this that the search give for only single cell

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