Battery capacity look-up table implementation

  1. How to get look-up table ?
  2. How to implement OCV(open circuit voltage) method for battery using Look-up table?Li-ion battery

I have gone through a ocv method using look-up table in some datasheet,they have given below steps.can anyone suggest how to implement using any controller or circuits?

1.Charge the cell to the full point.
2 Discharge the cell to the 0% point to learn the capacity of the cell, which should be recorded in mAh. Page 1 of 5
3 Charge the cell to the full point.
4 Allow the cell to relax for 60 minutes.
5 Record the open-circuit voltage for the 100% point.
6 Discharge the cell 5% (based on the capacity of the cell from Step 2) at a rate of approximately 0.2C.
7 Allow the cell to relax for 60 minutes.
8 Record the open-circuit voltage for the 95% point.
9 Repeat Steps 6–8 19 times until the capacity reaches 0%.


You have any idea to implement this?

Of curiosity, what does this get you?

What data is needed in the look up table? How many variables are input and output?

You have presented a very succinct method including steps. Use a state machine to manage the steps, and subroutines for each step to control what happens in each step.

Where is the data being recorded? What are you using to charge the cell? What are you using to discharge the cell?

By cell do you mean a single cell (ie., less than 5V) or do you mean a battery pack that may be greater than 5V?

I am working on something similar, so the first question is very interesting.


Basically ,i need a capacity(state of charge )of battery, i have voltage and current from the battery,but how to get SOC ?,for this i want to use OCV method (look-up table).

the data should be in look-up table is voltage and corresponding soc(%).

I want implement this in firmware,so, i will store in data in eeprom.

i have li-ion 4.2 cell,

but how to get look table first of all or what need to done to get that ?

Where is the look up table data being derived from? Website, formula? To have a look up table in a program, the data for the table must come from somewhere. Where is the data coming from?

There are many such tables around already. There’s no harm you doing some testing to make your own but I don’t think you’ll discover anything very different from all the existing tables.

Also you have to be very careful about discharge to 0% because too low a discharge can cause immediate damage. The recommendation is usually a minimum of 2.8V per cell but it does depend on the exact battery type.


I am assuming the OP realizes (or knows) that 0% soc <> 0V, hence part of the necessity for the lookup table.

I am assuming the OP realizes (or knows) that 0% soc <> 0V, hence part of the necessity for the lookup table.

You may well be right but I have become wary of assuming knowledge on the part of the people asking questions here. Telling them things they already know is so much less dangerous than not bothering to tell them things they need to know but don’t.



but how do i get that table ? what are things i have to look?

Discharging a Li-ion cell to 0V will destroy it.

Study this comprehensive guide to charging and this one for discharging.

@ jremington

yeah you are right it will destroy battery reaches 0v ,in the code we can program,we can alert user when it reaches 10 % or 5% rite.

i just asking ,how to make that look-up table based on voltage,current?

im reading that article now.

Look up table is nothing more than an “excel” table. something is input, and something is output. In your case input=battery V, output = SOC %.

Once you have the data to go in the table. We can help you get it in the processor. We will be hard pressed to get the data for you.

@adwsystems thank you answering

i cannot external fuel gauge .
so please suggest me, how can we map that voltage to soc% ? using graph or curves we can ?

I don't know. This is your project. @jremington and others have posted links to some stuff.

Where did you get the information to formulate your first post?


this is the link,i got that information ,this open circuit voltage FG ,they have mentioned some steps.

Why not just 'make' a look up table from math? 100% = 4.2 volts, 0% = 10% of 4.2.

Connect the cell to a circuit to discharge it, like a relay and some 10 or 20 watt LEDS, don't forget the resistors, and read the cell voltage via the A:D converter.

Initially, connect your own volt meter to the cell, as the Arduino discharges the cell, and take comparative readings. You may find you will need to add in a correction factor to make the Arduino A:D match the meter readings. Also, you may find linearity issues that can be compensated for with your percentage formulas.

Use 1% resistors, use the meter to read the resistance readings and use those resistance readings in the formula to read A:D / convert voltages.

Pretty straight forward.

Of course this all goes out the window if the LI batteries have a built in circuit to maintain voltage output, till their is no longer enough current to maintain the voltage at a set level and shuts the battery off.


but how do i get that table ? what are things i have to look?

I just Googled "lipo discharge table" and I found hundreds of them, mostly agreeing to within a percent or two.


A coulomb counter might be more suitable if you also want to keep track of SOC during charging/discharging.
Simple LiPo voltage to SOC, with a correction table, only works when the batttery is not used and has rested for some time.