# Feasability of 12v battery 'fuel gauge'

Discussion in 'The Projects Forum' started by poopscoop, Dec 22, 2014.

1. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
For my next project, I want to make a 'fuel gauge' for a trolling motor battery in a boat. My intent is to use an arduino, a Hall Effect sensor, a temperature probe, and the analog port to read voltage and estimate battery life remaining.

After some googling, I see that such algorithms are usually in the realm of proprietary technology, which makes me think its harder than I've planned for.

Is this a reasonable thing to attempt? And if so, where can I start looking for reliable battery information regarding discharge rates, temperature, voltage, and state of charge?

2. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
The parameters of the discharge change cycle-by-cycle, temperature, rate of discharge, and are specific to one battery. Even if you come up with an algorithm for one actual battery that works for the next several discharge cycles, it is not likely that it would work for a new battery of the same type, let alone a battery from a different vendor.

3. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,971
1,135
Googling 'lead acid gas gauge IC' brings up several hits for ICs aimed at this. How well they work I wouldn't know, considering Mike's observations.

Jul 18, 2013
10,836
2,510
If you go to the TI site, they have these type of IC's and will send you a sample of each type.
Max.

5. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
I'll have to try the TI samples. The intent was for this to be a learning excercise, and I wanted to test my ability to implement some sort of learning algorithm. I was hoping that the hard part of developing a function expressing SoC as a function of voltage, current, temp, and some correction factor is already solved and freely available.

I don't want to start on something like this with the assumption that its just going to be some clever coding and research if the reality is much different.

6. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
I have studied quite a bit about lead-acid batteries. As they age, their cells become unbalanced. Terminating the discharge means knowing something about the individual cells.

The best way to do this is to devise a means of checking the state-of-charge cell-by-cell, either by sampling the Specific Gravity of each cell, or as a minimum, measure each cell's voltage under load. The first option involves pumps, plumbing, acid, and is exceedingly difficult to implement. The second option requires access to the straps that connect cell-to-cell, which modern batteries with sealed tops do not make easy...

Any scheme that only looks at the total voltage for all six cells is always going to be compromised from the get-go.

7. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
Would +/- 10% be achievable at a hobbyist level?

8. ### #12 Expert

Nov 30, 2010
16,671
7,314
I don't know any answers here, but I can say I just met a car battery that has about 20% of its original capacity left. (Yes, I told the owner to buy a new battery.) Point is, consider how you are going to display a realistic result when your battery ages to near death.

Oct 2, 2009
5,451
1,066

10. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
I looked at the battery university info, but I'm not quite yet convinced I can't do it.

The idea was to incorporate a coloumb counting method, using the declining voltage to correct the counted estimate, and a few other corrections for rate of discharge and temp.

98% of the time the battery will start fully charged. If I know the particular battery has x amp hours, and monitor outflow to adjust remaining capacity. At checkpoints based on voltage under load and open circuit, i can correct (and store the correction value).

11. ### Lestraveled Well-Known Member

May 19, 2014
1,957
1,217
It is questionable that any battery monitoring system can consistently measure/predict/divine the state of charge to within 10%. Part of your education could be to plot the discharge curve of a battery and see how consistently (or inconsistently) it repeats.

12. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
I should clarify that this set up is designed for 1 battery. It would include a reset button before being used to gauge any other battery. Also, I want to clarify that I do understand that batteries age and would ideally have the program adjust for that.

What I absolutely cannot do is conclusively test a battery. Hopefully there exists and general curve for SoC with voltage,temp, and draw, which I can design an equation for, and then fit to my particular battery over a few cycles.

Nov 12, 2008
3,393
1,454
14. ### poopscoop Thread Starter Member

Dec 12, 2012
139
16
Thanks, RonV, and everyone else for the advice. I might rig up a data capture device first and see what the discharge looks like.

Somebody spent a bunch of money teaching me MATLAB, so I could always use that to analyze the data and find a fit.