Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

10s lipo fuel guage.

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
I see you get get Ic's and modules with an i2c interface to tell you how much capacity a lipo has.
I want to do this but with a 10s battery, 8s seems to be the highest they make them for.
Before I go an use 2 modules with one of them opto isolated due to the ground issues, I thought I'd see if anyone has any better ideas.
I spose one way would be to sense voltage & current and do the maths, the chip seemed an easier way, plus it calculates capacity from a cold start and doesnt need to be connected and powered all the time.
 
I see you get get Ic's and modules with an i2c interface to tell you how much capacity a lipo has.
I want to do this but with a 10s battery, 8s seems to be the highest they make them for.
Before I go an use 2 modules with one of them opto isolated due to the ground issues, I thought I'd see if anyone has any better ideas.
I spose one way would be to sense voltage & current and do the maths, the chip seemed an easier way, plus it calculates capacity from a cold start and doesnt need to be connected and powered all the time.


I did it with an RC car, we amplified the voltage drop across a 1" piece of 22 gauge wire (which is a surrogate for current since resistance is essentially constant). Then we sampled the voltage approximately 10x per second to make an integration and totalize the energy delivered by the battery.
 
I see you get get Ic's and modules with an i2c interface to tell you how much capacity a lipo has.
I want to do this but with a 10s battery, 8s seems to be the highest they make them for.
Before I go an use 2 modules with one of them opto isolated due to the ground issues, I thought I'd see if anyone has any better ideas.
I spose one way would be to sense voltage & current and do the maths, the chip seemed an easier way, plus it calculates capacity from a cold start and doesnt need to be connected and powered all the time.
I couldn't find any more than 6S and was just going to go with the sampling+math route. Which one did you find which was 8S?
 
I see you get get Ic's and modules with an i2c interface to tell you how much capacity a lipo has.
I want to do this but with a 10s battery, 8s seems to be the highest they make them for.
Before I go an use 2 modules with one of them opto isolated due to the ground issues, I thought I'd see if anyone has any better ideas.
I spose one way would be to sense voltage & current and do the maths, the chip seemed an easier way, plus it calculates capacity from a cold start and doesnt need to be connected and powered all the time.

As far as I'm aware they basically monitor the battery voltage, more than anything else - if it's going to work from a cold start, that's pretty well all you can do.

For my 4S Li-Ion based project I monitor voltage and current using an INA219, to 'calibrate' battery life (and charging level) I plotted both current and voltage during charging, and again during discharge - from that I split the readings in ten equal parts. For battery life you only need to monitor the voltage, but for charging you need to monitor battery voltage, and then falling current once it gets to the constant voltage stage. Using the calibration data I display under 10%, 10-20%, 20-30% etc.
 
  • Like
Reactions: jjw
If the monitor uses just voltage then a 5s with a voltage divider would work.

Mike.
Edit assuming power and sense are different connections.
 
I have a gizmo for testing lead acids on mobile plant, car batteries basically.
It tells me the cold cranking amps & resistance of the battery, & if I tell it the Ah it will tell me % charge, and all this is done in a few seconds.
It seems like its working out the state of the battery from its resistance.
I wondered if there was a chip or something that did this with lipo's, maybe not.
 
I have a gizmo for testing lead acids on mobile plant, car batteries basically.
It tells me the cold cranking amps & resistance of the battery, & if I tell it the Ah it will tell me % charge, and all this is done in a few seconds.
It seems like its working out the state of the battery from its resistance.

It's only a rough 'guesstimate' - the important part of the test is showing if it has the power to run the starter motor in the vehicle.

You obviously can't do that in a chip, as you need some way of dissipating the heat generated - massive resistors in the case of vehicle battery testers.

I wondered if there was a chip or something that did this with lipo's, maybe not.

There's plenty of voltmeter type testers, as the voltage falls off fairly linearly as it discharges - enough for battery testing purposes anyway.
 
Theres no dock off resistors in my tester, of course I had the lid off, just looks like a 5 watter.
Your right though it will be a estimate, however I find it a usefull tool, it has predicted failure accurately a few times.
If the voltage on the lipo drops linearly that would make voltage an easy way to measure its charge, some other forums say lipos hold their voltage till the last minute then drop off, as per usual the only way to get this right is to work it out myself.
 
Theres no dock off resistors in my tester, of course I had the lid off, just looks like a 5 watter.
Your right though it will be a estimate, however I find it a usefull tool, it has predicted failure accurately a few times.
If the voltage on the lipo drops linearly that would make voltage an easy way to measure its charge, some other forums say lipos hold their voltage till the last minute then drop off, as per usual the only way to get this right is to work it out myself.


You are right, LiPo hold their voltage. You need to measure the voltage through a fixed resistor (current sensing resistor). Measure at a regular interval (0.1seconds) to see the total energy delivered by the battery (effectively measuring the area under the current vs time curve).
 
I've only got figures here from a charging run, this is for four cells in series, here's the graph:

Charging.png
 
Wow charging current falls off a cliff doesnt it.
I noticed that internal resistance starts to increase as the cells run out, voltage drops under load.
Looking at the chart theres probably a fairly simple function I could come up with based on volt drop over time.
So far though the best method seems to be measure the volts & amps then calculate energy.
Might bung something like a Asc712 current sensor inline with the battery & use a couple of channels on a attiny, then I could calc charge & discharge.
What would be a typical overcharge for a lipo 1.2 x C?
 
Might bung something like a Asc712 current sensor inline with the battery & use a couple of channels on a attiny, then I could calc charge & discharge.
What would be a typical overcharge for a lipo 1.2 x C?

I used an INA219 I2C sensor, and initially a MAX 471 - I was very excited with the MAX471 as the datasheet shows an 8 pin through hole version, which would have been great - then I found out the chip is discontinued, and while you can still find the SM versions from China, through hole versions are more difficult. So I switched to the INA219, which we can buy from RS Components, unfortunately only as SM though.

As for charging LiIon, it's basically down to how fast you want it, and how fully charged you want it - I charge at 0.2C as it gives 100% charge, you can fast charge at 2C but that only gives 80% charge, and I would advise temperature monitoring at high charge rates. I built LM35's in my battery packs (we have a battery spot welder! :D), and have monitored the temperature during charging and discharging, with the result that I decided no temperature control was needed for 0.2C - but the sensor is there (and is already read along with voltage and current) if I ever feel the need to do a software update to do something with it. Currently all the data is 'squirted' out of a serial port for debugging purposes (comma delimited), with a socket on the board where you plug an FDTI lead in. This is where the graphs came from.
 
Wow charging current falls off a cliff doesnt it.
I noticed that internal resistance starts to increase as the cells run out, voltage drops under load.
Looking at the chart theres probably a fairly simple function I could come up with based on volt drop over time.
So far though the best method seems to be measure the volts & amps then calculate energy.
Might bung something like a Asc712 current sensor inline with the battery & use a couple of channels on a attiny, then I could calc charge & discharge.
What would be a typical overcharge for a lipo 1.2 x C?

You can buy a simple lipo charging chip from TI.
 
I charge at 0.15 C, but discharge can be 0.8 C.
Temp monitoring might be good for the discharge cycle.
I have a Acs712 analogue out current sensor, I'm going to throw something together with a attiny85, Lcd & this.
Out of 6 pins 2 will be i2c, 1 for current, 1 for voltage, 1 for a pushbutton leaving 1 spare so I could either have 1 Lm35 or as many ds18b20's as I like.
 
I charge at 0.15 C, but discharge can be 0.8 C.
Temp monitoring might be good for the discharge cycle.
I have a Acs712 analogue out current sensor, I'm going to throw something together with a attiny85, Lcd & this.
Out of 6 pins 2 will be i2c, 1 for current, 1 for voltage, 1 for a pushbutton leaving 1 spare so I could either have 1 Lm35 or as many ds18b20's as I like.

As you've got I2C why not use an INA219 instead of the ACS712, save wasting two pins.
 
I guess I could, not bothered about pin count though.
The bonus with the ina is that you get bus voltage as well, not so good series resistance is 10x the Acs.
 
I guess I could, not bothered about pin count though.
The bonus with the ina is that you get bus voltage as well, not so good series resistance is 10x the Acs.

You can pick your own resistance :D

The ACS712 has the other disadvantage that it's affected by magnetic fields, which could be an issue at times.
 
I thought about it, the ina219 is nifty and I would have used it however my suppyl is 36v the ina goes to 26, and I want to use a attiny, the standard arduino libs for this device use the wire i2c lib, the attiny uses tinywire so I'd have to do a load of mods to the code.
I found a code example for the Lcd so thats no problem.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top