I'm building an autonomous boat which contains a li-ion battery pack and I want to know how much charge it still left in it. To do this I measure the voltage of the battery pack. I let it run for about 14 hours and let it deplete and I get a nice discharge curve. So far so good.

But when I'm running this when the boat operates on the water, the voltage suddenly drops when the motor is switched on and jumps back up when the motor is switched off. And those changes also differ depending on how much throttle I give to the motor. The result is that the discharge curve is a total mess and it leaves me more or less guessing what the actual charge of the battery is in percentages.

The behaviour which I observe is also shown in this example I found of li-ion discharge curves:

enter image description here

So the behaviour I see is that my measurements switch between these various discharge curves. I guess I could make the percentage calculation dependent on whether the motor is powered. This method will be quite messy though. I also have to take into account how much I power the motor and when I change the motor, the battery or other parts of the electrical setup (which I do fairly often since I'm working on it) I guess I would have to manually recalibrate this whole calculation.

Does anybody know a good way to get a representative battery charge as a percentage when having changing power usage?

  • \$\begingroup\$ Do you know Peukert's Law? Can you both measure and control load current? What accuracy do you expect? What load range do you expect? \$\endgroup\$ Apr 19, 2020 at 21:11
  • \$\begingroup\$ Sounds like you need to do some integration... Or rough estimates as you suggested. \$\endgroup\$
    – MadHatter
    Apr 19, 2020 at 23:12
  • 2
    \$\begingroup\$ You would perhaps be better with a battery monitoring IC that measures the total power used. Search for “Coulomb Counting Circuit”. \$\endgroup\$
    – David
    Apr 20, 2020 at 18:44

3 Answers 3


You need to measure the output current and determine what the charge is with that current.

You could use a look up table with the curves you posted. You could also try to make a fit for each curve. There is a part that can be seen as "internal resistance", so you might do a fit for the low current curve and try to add a "resistance" factor to it depending on measured output current. Charging should be cut during the operation.

Other option is to measure charging current and output current and calculate how much energy should be left (coulomb counter). That will drift into one direction, so you need to force it to full battery once full battery cell voltage is detected. And you might need to add some calibration points.


I see 2 options how you could estimate the state :

  1. you can use a "Coulomb Counter" : it is a device that measures (rather accuratly) the current, and integrates it over time. Basically, it gives you the number of Ah flowing in/out the battery (more precisely, the difference between the Ah flowing in and those flowing out).

  2. you can measure the current you are currently pulling from you battery. Then, if you have the calibration curve for this current, you get your state of charge. If you don't have it, you interpolate beween the nearest 2 curves you have


Every battery is built to drop the voltage when you draw a larger current, this is why automotive batteries have a nominal voltage of 12V under high load current and normal voltage of 14.4V.

In order to check the battery voltage you have to stop the load and charging circuits, wait until the battery voltage settles and then measure it.

Measuring by current is not good, your load can drain different amounts of current, which will give you false results. You need to measure the charging current. The battery will drain a different charging current, depending on its state of discharge, but you have to disconnect the load first.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.