With the charge of 0,5067 hour, and an average voltage during discharge of 3.504 V and
With mAh = 1000 × Wh / V, we can calculate the capacity dissipated in heat.
c++
C2(Q)=1000*0.55090*0.5067/3.504=79.663 mAh
Ca(Q)=1000*0.54650*0.5067/3.504=79.027 mAh
Δ(Q)=|79.663-79.027|=0.636
At 3.496V, a 0.0636mAh delta is about 0.00051V delta, or 0.0188% SoC.
💡
Not a big deal. It mustn't be that.
This result seems wrong.
3.504V used is an average. It’s a probable cause of miscalculation.
Another grey point is internal resistance vary depending on the temperature. It makes it hard to compute all this with that many parameters.
I suppose internal resistance is the cause of the rebalancing, but it’s hard to verify by calculation due to small measurement values & various parameters.
Event
Highest Cell ID
Highest Cell V
Lowest Cell ID
Lowest Cell V
Diff V
Before discharge
C7
4.161
C1
4.134
0.027
After discharge
C7
3.360
C1
3.287
0.073
After discharge & relax time (5mn)
C7
3.496
C1
3.480
0.016
Detailed logs
c++
1"Entered state INIT"1"Log: 'Initializing environment...'"1"Log: 'Environment initialized !'"1"Log: 'Initializing battery IC...'"1"Log: 'Battery IC initialized !'"1"Log: 'Configuring battery IC...'"2"Log: 'Configuring battery IC...'"2"Log: 'Battery IC configured !'"3"Log: 'Initializing SoH...'"3"Log: 'SoH initialized !'"3"Log: 'Waiting for BQ cells readings...'"3"Log: 'SoC initialized !'"3"Log: 'State fields initialized!'"3"Log: 'Battery initialization complete!'"3"Left state INIT"3"Entered state DISCHARGE"3"Log: 'transitioning from INIT to DISCHARGE'"1824"Left state DISCHARGE"1824"Entered state ERROR"1824"Log: 'transitioning from DISCHARGE to ERROR'"1861"Left state ERROR"1861"Entered state DISCHARGE"1861"Log: 'transitioning from ERROR to DISCHARGE'"
[DEBUG]18594878<Battery FSM> Charger unplugged. Current drop:0.210000[INFO]18594955<Battery FSM> Leaving Charge state
[INFO]18594955<Battery FSM> Entering Discharge state
[DEBUG]18594959<Battery FSM> transitioning fromCHARGE to DISCHARGE
Problem here, algorithm detects charger unplugged, but it was a bad measurement (or natural oscillation). (During the test, charger didn’t get unplugged).
Charger unplug detection is not robust enough.
Detailed logs
c++
2551"Left state DISCHARGE"2551"Entered state CHARGE"2551"Log: 'Charge enters charge-and-balance mode'"2551"Log: 'transitioning from DISCHARGE to CHARGE'"18594"Log: 'Charger unplugged. Current drop: 0.210000'"18594"Left state CHARGE"18594"Entered state DISCHARGE"18594"Log: 'transitioning from CHARGE to DISCHARGE'"22195"Left state DISCHARGE"22195"Entered state SHUTDOWN"22195"Log: 'transitioning from DISCHARGE to SHUTDOWN'"22195"Log: 'Always-ON: nothing to do!'"22195"Log: 'Always-ON: nothing to do!'"22195"Log: 'Always-ON: nothing to do!'"22196"Log: 'Always-ON: nothing to do!'"22196"Log: 'Always-ON: nothing to do!'"