All trademarks are the property of their respective owners.
A simple way to provide battery SOC in your product is through a static lookup table that correlates battery voltage to SOC. This lookup table can be generated by discharging the battery from full while measuring voltage and current.
The following steps must be taken to generate the voltage versus SOC table. This setup requires a voltmeter, ammeter, electronic load, and appropriate data logging equipment. Figure 2-1 shows a diagram of the test setup.
A C/10 value or less is ideal to minimize the effects of relaxation. Note this process takes a while (> 10 hours). There are more comments on this assumption in the Best Use Cases section.
A common method of calculating SOC takes the batteries remaining capacity (RemCap) and divides by the batteries maximum capacity, Qmax, where both of these parameters are measured in milliamp-hour (mAh).
First, calculate the total amount of passed charge (battery maximum capacity) over the course of the test.
i[k] is current at reading k, ∆t is the time difference between readings, and m is the total number of readings.
The remaining capacity can be computed at each reading n.
Graphing the battery voltage against SOC generates the typical SOC curve for one li-ion cell.
This method has been used to determine the accuracy of TI fuel gauges as seen here. The curve above represents the exact SOC for the given discharge.
Example code has been included in the Python Lookup Table Generator section that generates a polynomial regression based on the data generated from the SOC characterization. This data is then mapped to a 101-pt hexadecimal lookup table for easy import into an MCU application. Using 16-bit resolution, this table would only take up 202 bytes of memory.