LTC 4150 coulomb counter property
1Ah = 3600 • GVF • RSENSE Interrupts (8)

RSENSE= Imax* 50mV

Software can choose value for empty or full.

Using suitable up-down counter.  Initialize Count = 100% then count down with ratio to indicate capacity and count up to full .

Calibration check

Reinitialize after CC to CV to 10% CC cutoff = 100%

Cutoff use if capacity is &lt;=10% or Vbat&lt;=3V

But some calibration error checking is needed, something like...


then if count down = 10% is reached but Vbat > 3.4 add count correction factor
if Vbat &lt;=3V and count is > 10% reset to 0% and report error difference.