Algorithm
See diagram here:
https://miro.com/app/board/uXjVPfj8OGU=/
Diagram is not up to date since V3 as I don’t have miro accesses. It will be in the code anyway.
V1
V2
Updated with charge entry (12/08/22):
Little needed modifications:
Discharge detection = idle detection + CHG fet off
Charger Detection: only modifies the CHG fet
V3
Problem faced:
Previous versions had measurement protection that made wait at least 1s in each
balance only
or charge and balance
state. We faced cases where states where quite volatile and were entered and exited each 1s due to high voltage difference. Knowing this case, with
a charging current of 2A and a balancing current of 50mA, it means the most unbalanced cell spent 1s at 2A and 1s at -50mA. Over time, as the charging current was a way higher than the balancing current, this cell went over voltage with 4.3V and would have kept charging for a much longer time if we didn’t unplug charger ! Dangerous thing is: as CellOverVoltage
BQ error need 4s to be detected, it would never have been triggered as cell voltage were bouncing every 1s.Fix:
We define a minimal ratio of time to spend in charge and balancing. With:
- 4.0A the maximum current charge
- 0.04A the minimum current balancing
For 1 sec in discharge, we stay 100s (
(4.0A * 1s) / 0.04A
) balancing.💡
With this fix, we have lot better results, no cells goes too high in voltage.
But it’s loooooong ! Do some calculations, and optimize it !
V4
This new version fixes 1 bugs.
COV never triggered
With strongly unbalanced cells, actual algorithm would spend a lot of time in
balance-only
state until highest cell is below 4.18V
, transit in charge-and-balance
which opens the FETS and bumps cell voltage, especially the highest ones to higher than 4.22V
and so transits back to balance-only
.The time spent in
charge-and-balance
is frequently 1s, but with the BQ configuration, COV needs 4s to get detected.In consequence, we could have never trigger COV protection in
charge-and-balance
state with high voltage and unbalanced cells.💡
COV protection is now triggered after 1s and
MIN_TIME_TO_CHARGE
is now 2s.V5
This new version fixes 1 bugs.
Leave charge with unbalanced cells and still a charger
There is a flaw in the algorithm where when cells are unbalanced and charger stop giving current, we leave the charge state.
We see this behavior in this test.
Simple fix:
💡
We transit to
balance-only
state when charger has no more current.V6
This new version fixes 1 bugs.
balance-only
state was exited when BQ stopped balancing cellsLast condition to leave properly
balance-only
state was:Is BatteryIC currently balancing ?
Problem is, what if it stops for any reason and rebalance few seconds later ?
That happened a lot with COV alerts with false measurements when cells were high voltage, and when IC temp was too high (above 70°C).
Simple fix:
💡
We instead check if Battery IC should be balancing the cells.
Simple code behind this is:
Is BatteryIC balancing ? Or
Is delta max cell voltage ≥ balancingConfig.cellImbalanceDeltaStart ?
V7
This new version fixes 1 bugs.
charge-and-balance
state was wrongly detecting charger Last condition was poorly to detect if current drop was higher than 0.05A.
💡
We basically now use the
ChargerDetector
. Simple fix.V8
This new version adds the following changes:
- In
Charge And Balance State
, charger current condition has changed: - Main difficulty of this condition is to detect whether the charger has stopped giving current (some chargers cut power when their current is < a threshold), or if the charger has manually been unplugged.
- Now, when the current goes down a certain threshold, we wait for any current for 2s.
If there is no current for 2s, we say charger has been unplugged and quit charge.
Else, we are about the end of charge, and we go to
Finale Balance State
.
- A new state
Final Balance State
has been added. The point of this state is to do a last balance before leaving the charge. It won’t come back inCharge And Balance State
and so doesn’t need theMIN_TIME_TO_BALANCE
delay.
Balance Only State
has been renamed toRebalance State
asFinal Balance
also does only balancing.
V9
This new version fixes:
- Bad charger detection in
Charge And Balance
. InCharge And Balance State
, charger current condition has changed: - Last detection lasted 2s in worth case, which make UX very long, and unplugging/replugging the charger in triggered a end of charge. (By transitioning to
Final Balance
. - Now, after the current drop a certain threshold, we watch for 0.5s the current.
If it drops below a lower threshold, we say the charger is unplugged, we leave charge.
Else, we are about the end of charge, and we go to
Finale Balance State
. - It instantly leaves the charge whenever a charger is unplugged. But as before, it doesn’t support charger with PWM CV phase that start at higher voltage than our 100mV per cell in P threshold.
- Unbalanced cells with charger over voltage might trigger COCV.
- In
Rebalance
, we first check if cells are all balanced, and leave if true. It will avoid a infinite dangerous loop betweenRebalance
andCharge And Balance
where battery never balance, and only charges up.
V10
Charge is interrupted / EOC 3s after plugging charger:
Issue:
The charger might take some times to enter CC phase after entering the charge. We then can detect either charger unplug or end of charge.
Solutions
Solution 1:
We add more delay measurements after entering the charge to let more time to charger to start giving current.
Easy fix.
But doesn’t totally fix the issue: plug charger, enter charge, unplug charger. The battery is in charge. Wait about the measurement delay. Plug back charger. Charger starts giving a low current. EOC is detected. TO TRY.
Solution 2:
We wait until stable current.
If no stable current is detected until timeout, exit charge.
How do we compute we have a stable current ?
- Current high enough for enough time.
- Use average of current windowed by time. This is the solution implemented.
- Convolution fonction ?
Solution 3:
We handle precharge with a new chargeFSM state. Precharge is responsible of waiting that charger is giving enough current to start charging.
I need more info about precharge tho.
Essayer brancher charger dans l’autre sens
Questions and specifications
Where to save the lowest cell charging voltage ?
RTC_NO_INIT | EEPROM | |
👍 | Easy to implement
Lifetime variable is until OTA or HARDWARE RESET
If hardware is changed, RTC variable is reset and charge will not be blocked. | Easy to implement
Infinite lifetime variable |
👎 | If RTC variable is reset, and a damaged cell won’t go upper 4.2V, we will need to wait until charge timeout. | Another write in EEPROM while the battery is running
If hardware is changed, variable must be flashed by hand |
When to save the lowest cell charging voltage ?
This seems not enough specified for me in the diagram upper.
Charge State | Balance - Charge | Balance - Charge | Balance Only | Balance Only |
Event | Charger disconnected | Not enough current from charger (charge ended) | Balancing ended | Charger disconnected |
Should save | No | No | Yes | No |
Detect when charger is disconnected:
Whenever the current is < 100mA and last frame was +120mA above
No hysteresis
23/11 meeting
Issues to talk about:
Unplug detection has false positive.
Some observations show End Of Charge has been.
https://admin.gouach.com/batteries/items/view-history/0000000262
SoC wrongly set to 100% at end of charge with a wrong charger
Updated Dec 1, 2022
Tester cet aprem avec gaya charger. OTS + Gaya.
Mesurer oscillo Pack+ & SHUNT. (demander hardwr)
Voir avec julien pour le charger 48V 4A.
On end of charge, send event that resets SoC even with a low voltage charge.
We must determine a way to tells if the battery has done a proper end of charge with a good charger or not.
Solution 1:
After
FinalBalance
of Rebalance
exited ChargeState
with an end of charge, verify if BAT+ ≥ (4.18 * S).But what will happen with damaged cells ?
Solution 2:
Do OCV calibration uppon end of charge. Thread safe ? Document.
Some thoughts:
In
ChargeAndBalance
, all FETS
are ON
. As so, BAT+ V ~= PACK+ V and so we can’t just look at voltages at one timepoint without closing fets.But I think we don’t want to close FETS for
AlwaysOn
+ regen bikes.Won't work with regen.
If the battery is on a bike that does regeneration, while someone is on a bike (and so discharging the battery), if the bike regenerate, the battery may enter the charge.
In charge (
ChargeAndBalance
state), if the bike stop regen and draw current again, the ChargeFSM
can transit to FinalBalance
and close fets until the battery is fully balanced.Solution 1:
In
ChargeAndBalance
, whenever a current above 100mA is detected, exit the ChargeState
to DischargeState
.This is not a regen implementation, this is to avoid blocking the battery.
Solution 2:
Battery tells bike to stop engine.
Charge Event should update SoC.
Make sure SoC.compute is thread safe. Document it.
Regen implementation
ChargeState is not responsible of handling regen. It will be done in discharge with different Voltage inputs.
Precharge
Tests
- Charger connected on a scooter that is ON. We accelerate intermittently. What happens?
- Unbalanced cell with 42V charger
- Charger at 40V, 44V
- Disconnecting charger in Charge And Balance State is well detected. (And cell voltage last charge is not saved). Do it with 40, 42 and 44V charger.
- Full discharge at 15A then full charge
- Charger detection is not working with charger above 20% expected voltage
- Good current detection.
Test #1 🟢
Environment:
Assembly | BMS | Cells | Charger | Bike |
Devkit V1.0 | V 4.1.0 | 10s3p 18650 | 42V 2A | Gaya |
Protocol:
#1. Only power supply ON.
- Plug load and power supply to battery.
- Turn ON power supply with 2A 42V.
#2. Current of Power supply > Load
- Plug load and power supply to battery.
- Turn ON power supply with 2A 42V.
- Wait 60s.
- Turn ON load with 1A 42V.
#3. Current of Power supply > Load. Reverse order
- Plug load and power supply to battery.
- Turn ON load with 1A 42V.
- Wait 60s.
- Turn ON power supply with 2A 42V.
#4. Current of Power supply < Load
- Plug load and power supply to battery.
- Turn ON power supply with 2A 42V.
- Wait 60s.
- Turn ON load with 4A 42V.
#5. Current of Power supply < Load. Reverse order
- Plug load and power supply to battery.
- Turn ON load with 4A 42V.
- Wait 60s.
- Turn ON power supply with 2A 42V.
#6. Slowly increasing load current
- Plug load and power supply to battery.
- Turn ON power supply with 2A 42V.
- Wait 60s.
- Turn ON load with 1A 42V.
- Progressively increase how the load current of 0.1A each ~15s.
#7. Quickly increasing load current
- Plug load and power supply to battery.
- Turn ON power supply with 2A 42V.
- Wait 60s.
- Turn ON load with 1A 42V.
- Wait a bit and turn it to 3A.
#8. On a bike
- Plug the charger
- The bms should transit to charge mode
- Try to accelerate
- Does it go in discharge ?
- If the bike draw more A than the chg, it should go in discharge. Stop the bike draw and it goes back to charge.
- Test to turn on the light. It should stay in charge.
Results:
Test #2 🔴
Purpose:
We want to see the flow between
charge-and-balance
and balance-only
.What we expect:
The battery balancing should slowly bounce between
charge-and-balance
and balance-only
until it’s fully charged between charge-and-balance and balance-only until it’s fully charged.Environment:
Assembly | BMS | Cells | Charger |
Devkit V1.0 | V 4.1.0 | 10s3p 18650
| 42V 2A |
- 1serie with +100mV over other cells && 1serie with -100mV below other cells
Results:
Test #3 🟢
Purpose:
- Chargers are very cheap and some can be quite off in voltage. What happens then?
What we expect:
- The charge should stop when battery is fully charged and balanced.
- The battery balancing should slowly bounce between
charge-and-balance
andbalance-only
if the battery is unbalanced.
- The battery should not bounce between FSM state (Idle to charge to idle) after the charge is ended
Environment:
Assembly | BMS | Cells | Generator |
Devkit V1.0 | V 4.1.0 | 10s3p 18650 | 40V/42V/44V &
2A |
Protocol:
- For 44V:
- Start with a battery at ~70%
- Plug the charger
- What happens near the end of charge?
- Check the cells voltage. Is the FSM flow respected ?
- Repeat with a cell that is 100mV (?) higher than the others
- Repeat with a cell that is 100mV (?) lower than the others
- For 42V:
- Start with a battery at ~70%
- Plug the charger
- What happens near the end of charge?
- For 40V:
- Start with a battery at ~50%
- Plug the charger
- What happens near the end of charge? Does it stop charging at 4.0V on all cells because of the current decrease?
- Repeat with a cell that is 100mV (?) higher than the others
- Repeat with a cell that is 100mV (?) lower than the others
Results:
Test #4 🟢
Purpose:
Ensure robustness of the charger unplugged detection in the Charge And Balance ChargeFSM State.
Environment:
Assembly | BMS | Cells | Charger |
Devkit V1.0 | V 4.1.0 | 10s3p 18650 | 40/42/44V 2A |
Protocol:
- Charge the battery
- Unplug the charge
- The battery should transit from Charge to Idle, and back to Charge when charger plugged.
- Repeat until end of charge
Results:
Test #5 🟢
Purpose:
Ensure the battery handles well a full cycle.
Get an idea about how a 15A full discharge can unbalance cells.
See how well the Charge state will re-balance back all cells.
Environment:
Assembly | BMS | Cells | Load | Charger |
Devkit V1.0 | V 4.1.0 | 10s3p 18650 | 15A | 42 2A |
Protocol:
- Get a fully charged battery (>41V)
- Put battery in discharge mode. Or use always-on.
- With a load, discharge the battery at 15A until you get a CUV error.
- Once battery throw CUV and is fully discharged, plug charger.
- Battery should transit to Charge state.
- Wait until the Charge state ends.
Results:
Test #6 🟢
Purpose:
Ensure the battery doesn’t go in charge with a too high voltage charger.
Acceptance criteria
Battery should not accept charge and stay in IDLE FSM (disabling MOSFET)
Environment:
Assembly | BMS | Cells | Charger |
Devkit V1.0 | V 4.1.0 | 10s3p 18650
13s4p 18650 | 50.5V 2A/13s charger
65.5V 2A |
Protocol:
Test is performed on 21/10/2022 at Ruat.
- Setup a power supply to 50.5V 2A
- Start battery.
- Wait 1mn.
- Plug charger.
- Battery should not go in charge.
- Wait 1mn.
- Unplug charger.
- Wait 1mn.
Results:
Test #7 🟢
Purpose:
Ensure the battery detects a good current when entering the charge.
Acceptance criteria
Battery should not detect charge interrupted while the charger is plugged in.
Environment:
Assembly | BMS | Cells | Charger |
13s3p | V 4.1.0 | 10s3p 18650 | 48V 2A gaya
48V 4A |
Protocol:
Tests are done with specific firmware to log more data & exit charge after 5s.
- Discharge battery to 5%.
- Wait enough to relax the battery.
- Plug charger 1 to sector, then battery.
- Monitor & Graph data.
- Wait 5s.
- Unplug charger from sector & battery.
- Plug charger 1 to battery then sector.
- Monitor & Graph data.
- Wait 5s.
- Repeat steps with charger 2.
- Repeat steps with both charger each 5% of SoC to 100%
Results:
🔌
Charge tests data
ID
Test name
State
TAG
Algorithm Version
2
10s4p unbalanced
Success
Test #7
V10
1
13s3p current detection
Success
Test #7
V10
10
40V Charger. 1 Cell above 100-50mV
Won't do
Test #3
V9
9
Cell x with 500mV above others.
Failure
Test #2
V9
6
44V Charger. 1 Cell below 100-50mV
Success
Test #3
V9
7
44V Charger. 1 Cell above 100-50mV
Success
Test #3
V9
9
40V Charger. 1 Cell below 100-50mV
Success
Test #3
V9
8
44V Charger. Balanced cells.
Success
Test #3
V9
11
40V Charger. Balanced cells.
Success
Test #3
V9
10
Charger 44V 2A
Success
Test #4
V9
9
Charger 40V 2A
Success
Test #4
V9
8
Charger 42V 2A
Success
Test #4
V9
8
13s4p, OTS
Success
Test #6
V9
6
13s4p, Always On
Success
Test #6
V9
7
10s4p, OTS
Success
Test #6
V9
5
10s4p, Always On
Success
Test #6
V9
10
10s4p, OTS, 13s charger
Success
Test #6
V9
9
10s4p, Always On, 13s charger
Success
Test #6
V9
44V Charger. 1 Cell below xmV
Won't do
Test #3
V8
40V Charger. 1 Cell below xmV
Won't do
Test #3
V8
6
Charger 44V 2A
Won't do
Test #4
V8
4
13s4p, OTS
Won't do
Test #6
V8
3
13s4p, Always On
Won't do
Test #6
V8
3
44V Charger. 1 Cell above xmV
Failure
Test #3
V8
8
Cell 9 with 50mV above others
Success
Test #2
V8
1
40V Charger. 1 Cell above 80mV
Success
Test #3
V8
4
44V Charger. Balanced cells.
Success
Test #3
V8
2
40V Charger. Balanced cells.
Success
Test #3
V8
5
42V Charger. Balanced cells.
Success
Test #3
V8
7
Charger 40V 2A
Success
Test #4
V8
5
Charger 42V 2A
Success
Test #4
V8
1
10s3p, Always On
Success
Test #6
V8
2
10s3p, OTS
Success
Test #6
V8
4
Charger 42V 2A
Success
Test #4
V7
4
Full cycle. With little unbalancing.
Success
Test #5
V7
7
Cell 2 with 100mV below others
Not enough data
Test #2
V6
2
Full cycle: Hard discharge. Full Charge
Not enough data
Test #5
V6
3
Full cycle. With little unbalancing.
Failure
Test #5
V6
6
Cell 2 with 50mV below others
Success
Test #2
V6
3
Charger 42V 2A, with current delta threshold for unplug charger at 0.05A
Success
Test #4
V6
5
Cell 2 with 50mV above others
Failure
Test #2
V4
1
Full cycle: Hard discharge. Full Charge
Failure
Test #5
V4
4
Cell 4 with 50mV above others
Failure
Test #2
V3
1
Cell 4 with -50mV than the others
Failure
Test #2
V2
2
Cell 4 with -20mV than the others
Failure
Test #2
V2
3
Cell 4 with -35mV than the others
Failure
Test #2
V2
2
Charger 42V 2A, with current delta threshold for unplug charger at 0.05A
Success
Test #4
V2
1
Charger 42V 2A, with current delta threshold for unplug charger at 0.02A
Failure
Test #4
V1
1
OTS
Test #1
327
Old tests
Observed behavior #1
Battery state is discharge
Cell 0 | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | Cell 7 | Cell 8 | Cell 9 | Battery | Load | |
Voltage | 4.077 | 4.072 | 4.082 | 4.075 | 4.075 | 4.072 | 4.075 | 4.070 | 4.079 | 4.071 | 40.570 | 39.990 |
Current | 0.000 | |||||||||||
Balance | No | No | No | No | No | No | No | No | No | No |
A charger is plugged. It switches to state charge (charge-and-balance)
Cell 0 | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | Cell 7 | Cell 8 | Cell 9 | Battery | Load | |
Voltage | 4.170 | 4.185 | 4.189 | 4.208 | 4.211 | 4.203 | 4.194 | 4.185 | 4.188 | 4.185 | 41.720 | 41.139 |
Current | -1.170 | |||||||||||
Balance | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No |
Then at least one cell is > than 4.22 V and it transits to stage charge (balance-only)
Cell 0 | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | Cell 7 | Cell 8 | Cell 9 | Battery | Load | |
Voltage | 4.194 | 4.186 | 4.230 | 4.206 | 4.192 | 4.196 | 4.182 | 4.208 | 4.181 | 4.181 | 41.790 | 41.189 |
Current | -0.570 | |||||||||||
Balance | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
All values above match expectations. 👍
Observed behavior #2
With always-on
- Plug charger.
- Entering Charge state (charge-and-balance)
- One cell is higher than 4.22V
- Leave Charge state (charge-and-balance)
- Enters Charge state (balance-only)
- Leaves charge state
- Battery is balanced
- Leaves charge state
- Enter discharge state
- Detects current
- Enters charge state (charge-and-balance)
- Loops to step 1 (charger already plugged)
The loop is due to bad charge entry. Code has been updated since. Need new tests.
Observed behavior #3
With OTS, Idle State is default.
Using a 42V charger.
Battery is plugged to the charger. It charges from 4.05 to V4.20 [4.193V, 4.202V] for 107 minutes.
It stayed in Charge And Balance mode until the charger provides not enough current.
Battery and Load measurement just before leaving Charge And Balance Mode and entering Idle mode.
Battery | Load |
41.790 V | 41.209 V |
-0.170A | ? |
Battery doesn’t seems to switch back to Charge State even with the charger plugged in.
With a slowly unbalanced cell, and a 80% charged battery, we have a big voltage spike when opening the FETs. This triggers an COV, which puts battery in ERROR. The FETs are closed, it goes back in CHARGE, FETs are opened back but current doesn’t seems to be drained (Last 3 columns).
Notes
- We only do passive balancing with discharge through resistances
- Balancing current is 50mA
- Idle state should NEVER open DSG fets.
Questions & Investigations
❌: Not fixed
✅: Fixed
❓: In progress
BQ CHARGER wake up bug ✅
BQ CHARGER wake up doesn’t seems to work with the battery I’m using:
- ots
- devkit
- 10s3p
- 40.91V
- 93.36 % SoC
💡
This bug is HARDWARE and is FIXED !
A diode is inverted on the V4.1.0 I used. It simply needs a known rework, as all V4.1.0 gets.
How works CB_ACTIVE_CELLS
IC command ? ✅
With get those voltages and this balancing mask:
Problems are:
- Cell 0 to 3 should not be balanced are they are lower in Voltage
- When probing, Cells 0 to 3 are not getting balanced, but it says the opposite
- When probing, Cell 5 is balanced whereas it’s not written
💡
There was a software bug when transforming the
CB_ACTIVE_CELLS
uint16_t into an std::array<bool, 16>
.Why BQ stops balancing cells while it shouldn’t ? ✅
We observe BQ sometimes stop balancing cells, and might restart or not after few seconds.
First of all, BQ can stop balancing for many reasons:
- 🔥 IC internal temperature over 70°C
The device includes an internal die temperature check, to disable balancing if the die temperature exceeds a programmable threshold.
- ⚡ BQ alert
An enabled protection alert from Settings:Protections:Enabled Protections A occurs.
- ⚠️ BQ fault
An enabled protection fault from Settings:Protections:Enabled Protections A occurs except for a COV fault.
- BQ enters CONFIG_UPDATE. Should not happen.
- BQ enters DEEPSLEEP. Should not happen.
- BQ enters SHUTDOWN. Should not happen.
- Permanent fail fault. Should not happen.
Here is some logs where BQ stops balancing:
Observation #3
STOP #1
Stop from 3520 to 3524s. Stop last 4s
c++[DEBUG] 3520615 <MAIN> Balancing since 3546.000000 seconds [DEBUG] 3520620 <MAIN> Cell 0 is balancing [DEBUG] 3520625 <MAIN> Cell 1 is balancing [DEBUG] 3520631 <MAIN> Cell 2 is balancing [DEBUG] 3520635 <MAIN> Cell 3 is balancing [DEBUG] 3520640 <MAIN> Cell 4 is balancing [DEBUG] 3520646 <MAIN> Cell 5 is balancing [WARNING] 3520650 <BQ769x2> Failed to read command 76 [DEBUG] 3520657 <MAIN> Cell 6 is balancing [DEBUG] 3520661 <MAIN> Cell 7 is balancing [DEBUG] 3520666 <MAIN> Cell 8 is balancing [DEBUG] 3520671 <MAIN> Cell 9 is balancing [DEBUG] 3520676 <MAIN> Time since hard reboot: 3520675 [DEBUG] 3520684 <MAIN> Internal heap: 34231 bytes available [DEBUG] 3520689 <MAIN> SPIRAM heap: 3657259 bytes available [DEBUG] 3520784 <Battery FSM> Battery is fully charged [INFO] 3520785 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 3520786 <Battery FSM> Charge enters balance-only mode [DEBUG] 3522697 <MAIN> Alert pin: 0 [DEBUG] 3522699 <MAIN> Cell 0: 4.092000 V [DEBUG] 3522699 <MAIN> Cell 1: 4.094000 V [DEBUG] 3522701 <MAIN> Cell 2: 4.095000 V [DEBUG] 3522707 <MAIN> Cell 3: 4.093000 V [DEBUG] 3522712 <MAIN> Cell 4: 4.161000 V [DEBUG] 3522718 <MAIN> Cell 5: 4.145000 V [DEBUG] 3522721 <MAIN> Cell 6: 4.094000 V [DEBUG] 3522726 <MAIN> Cell 7: 4.096000 V [DEBUG] 3522732 <MAIN> Cell 8: 4.095000 V [DEBUG] 3522736 <MAIN> Cell 9: 4.096000 V [DEBUG] 3522741 <MAIN> Battery: 40.860001 V [DEBUG] 3522746 <MAIN> Battery: 0.000000 A [DEBUG] 3522752 <MAIN> Load: 34.529999 V [DEBUG] 3522756 <MAIN> SoC: 89.68 % [DEBUG] 3522761 <MAIN> SoH: 100.00 % [DEBUG] 3522765 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 3522785 <MAIN> BMS temperatures: IC = 40.849998, MOS = 30.850000, SHUNT = 33.849998 [DEBUG] 3522788 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 3522792 <MAIN> Time since hard reboot: 3522791 [DEBUG] 3522798 <MAIN> Internal heap: 34279 bytes available [DEBUG] 3522804 <MAIN> SPIRAM heap: 3657259 bytes available [WARNING] 3522911 <BQ769x2> Failed to read command 85 [DEBUG] 3523924 <Load Detector> Charger potentially detected: Got 41.2 V, expected 42.0 V [DEBUG] 3524868 <MAIN> Alert pin: 0 [DEBUG] 3524870 <MAIN> Cell 0: 4.092000 V [DEBUG] 3524870 <MAIN> Cell 1: 4.094000 V [DEBUG] 3524872 <MAIN> Cell 2: 4.095000 V [DEBUG] 3524877 <MAIN> Cell 3: 4.094000 V [DEBUG] 3524882 <MAIN> Cell 4: 4.161000 V [DEBUG] 3524887 <MAIN> Cell 5: 4.145000 V [DEBUG] 3524893 <MAIN> Cell 6: 4.094000 V [DEBUG] 3524897 <MAIN> Cell 7: 4.096000 V [DEBUG] 3524902 <MAIN> Cell 8: 4.094000 V [DEBUG] 3524907 <MAIN> Cell 9: 4.095000 V [DEBUG] 3524912 <MAIN> Battery: 40.860001 V [DEBUG] 3524917 <MAIN> Battery: 0.000000 A [DEBUG] 3524922 <MAIN> Load: 41.240002 V [DEBUG] 3524927 <MAIN> SoC: 89.68 % [DEBUG] 3524931 <MAIN> SoH: 100.00 % [DEBUG] 3524936 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 3524947 <MAIN> BMS temperatures: IC = 42.849998, MOS = 30.850000, SHUNT = 33.849998 [DEBUG] 3524957 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 3524961 <MAIN> Balancing since 1.000000 seconds
STOP #2
Stop from 6651s to 6658s. Stop last 7s
c++[DEBUG] 6651613 <MAIN> Balancing since 3153.000000 seconds [DEBUG] 6651620 <MAIN> Cell 0 is balancing [DEBUG] 6651624 <MAIN> Cell 1 is balancing [DEBUG] 6651629 <MAIN> Cell 2 is balancing [DEBUG] 6651634 <MAIN> Cell 3 is balancing [DEBUG] 6651639 <MAIN> Cell 4 is balancing [DEBUG] 6651645 <MAIN> Time since hard reboot: 6651644 [DEBUG] 6651651 <MAIN> Internal heap: 34279 bytes available [DEBUG] 6651657 <MAIN> SPIRAM heap: 3655915 bytes available [DEBUG] 6652571 <Battery FSM> Battery is fully charged [INFO] 6652573 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 6652574 <Battery FSM> Charge enters balance-only mode [DEBUG] 6653693 <MAIN> Alert pin: 0 [DEBUG] 6653694 <MAIN> Cell 0: 4.094000 V [DEBUG] 6653695 <MAIN> Cell 1: 4.096000 V [DEBUG] 6653697 <MAIN> Cell 2: 4.097000 V [DEBUG] 6653702 <MAIN> Cell 3: 4.095000 V [DEBUG] 6653707 <MAIN> Cell 4: 4.162000 V [DEBUG] 6653712 <MAIN> Cell 5: 4.152000 V [DEBUG] 6653718 <MAIN> Cell 6: 4.096000 V [DEBUG] 6653722 <MAIN> Cell 7: 4.098000 V [DEBUG] 6653727 <MAIN> Cell 8: 4.096000 V [DEBUG] 6653732 <MAIN> Cell 9: 4.098000 V [DEBUG] 6653737 <MAIN> Battery: 40.900002 V [DEBUG] 6653742 <MAIN> Battery: -0.020000 A [DEBUG] 6653747 <MAIN> Load: 41.230000 V [DEBUG] 6653752 <MAIN> SoC: 90.58 % [DEBUG] 6653756 <MAIN> SoH: 100.00 % [DEBUG] 6653761 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 6653771 <MAIN> BMS temperatures: IC = 40.849998, MOS = 30.850000, SHUNT = 33.849998 [DEBUG] 6653780 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 6653785 <MAIN> Time since hard reboot: 6653785 [DEBUG] 6653791 <MAIN> Internal heap: 34231 bytes available [DEBUG] 6653799 <MAIN> SPIRAM heap: 3655915 bytes available [DEBUG] 6654220 <wifi manager> Scanning done. Found 40 networks [DEBUG] 6654221 <wifi manager> Leaving SCANNING state [DEBUG] 6654222 <wifi manager> Entering CONNECTING state [DEBUG] 6654686 <wifi manager> Leaving CONNECTING state [DEBUG] 6654686 <wifi manager> Entering IDLE state [DEBUG] 6655711 <Load Detector> Charger potentially detected: Got 41.3 V, expected 42.0 V [DEBUG] 6655807 <MAIN> Alert pin: 0 [DEBUG] 6655808 <MAIN> Cell 0: 4.093000 V [DEBUG] 6655809 <MAIN> Cell 1: 4.095000 V [DEBUG] 6655811 <MAIN> Cell 2: 4.096000 V [DEBUG] 6655817 <MAIN> Cell 3: 4.094000 V [DEBUG] 6655821 <MAIN> Cell 4: 4.161000 V [DEBUG] 6655827 <MAIN> Cell 5: 4.151000 V [DEBUG] 6655831 <MAIN> Cell 6: 4.096000 V [DEBUG] 6655836 <MAIN> Cell 7: 4.098000 V [DEBUG] 6655841 <MAIN> Cell 8: 4.096000 V [DEBUG] 6655846 <MAIN> Cell 9: 4.098000 V [DEBUG] 6655851 <MAIN> Battery: 40.880001 V [DEBUG] 6655856 <MAIN> Battery: -0.020000 A [DEBUG] 6655861 <MAIN> Load: 41.259998 V [DEBUG] 6655866 <MAIN> SoC: 90.58 % [DEBUG] 6655870 <MAIN> SoH: 100.00 % [DEBUG] 6655875 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 6655886 <MAIN> BMS temperatures: IC = 39.849998, MOS = 30.850000, SHUNT = 34.849998 [DEBUG] 6655963 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 6655964 <MAIN> Time since hard reboot: 6655963 [DEBUG] 6655966 <MAIN> Internal heap: 34279 bytes available [DEBUG] 6655973 <MAIN> SPIRAM heap: 3657171 bytes available [DEBUG] 6658054 <MAIN> Alert pin: 0 [DEBUG] 6658055 <MAIN> Cell 0: 4.093000 V [DEBUG] 6658057 <MAIN> Cell 1: 4.095000 V [DEBUG] 6658058 <MAIN> Cell 2: 4.096000 V [DEBUG] 6658063 <MAIN> Cell 3: 4.095000 V [DEBUG] 6658068 <MAIN> Cell 4: 4.161000 V [DEBUG] 6658073 <MAIN> Cell 5: 4.151000 V [DEBUG] 6658078 <MAIN> Cell 6: 4.096000 V [DEBUG] 6658083 <MAIN> Cell 7: 4.098000 V [DEBUG] 6658088 <MAIN> Cell 8: 4.095000 V [DEBUG] 6658093 <MAIN> Cell 9: 4.097000 V [DEBUG] 6658098 <MAIN> Battery: 40.880001 V [DEBUG] 6658103 <MAIN> Battery: -0.020000 A [DEBUG] 6658108 <MAIN> Load: 41.250000 V [DEBUG] 6658113 <MAIN> SoC: 90.58 % [DEBUG] 6658117 <MAIN> SoH: 100.00 % [DEBUG] 6658122 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 6658132 <MAIN> BMS temperatures: IC = 41.849998, MOS = 30.850000, SHUNT = 34.849998 [DEBUG] 6658141 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 6658146 <MAIN> Balancing since 1.000000 seconds
STOP #3
Stop from 14084s to 14091s. Stop last 7s
c++[DEBUG] 14084853 <MAIN> Balancing since 7486.000000 seconds [DEBUG] 14084860 <MAIN> Cell 0 is balancing [DEBUG] 14084866 <MAIN> Cell 1 is balancing [DEBUG] 14084870 <MAIN> Cell 2 is balancing [DEBUG] 14084875 <MAIN> Cell 3 is balancing [DEBUG] 14084880 <MAIN> Cell 4 is balancing [DEBUG] 14084885 <MAIN> Cell 5 is balancing [DEBUG] 14084890 <MAIN> Time since hard reboot: 14084890 [DEBUG] 14084897 <MAIN> Internal heap: 34231 bytes available [DEBUG] 14084904 <MAIN> SPIRAM heap: 3656851 bytes available [DEBUG] 14085204 <Battery FSM> Battery is fully charged [INFO] 14085205 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 14085206 <Battery FSM> Charge enters balance-only mode [DEBUG] 14086914 <MAIN> Alert pin: 0 [DEBUG] 14086915 <MAIN> Cell 0: 4.095000 V [DEBUG] 14086916 <MAIN> Cell 1: 4.098000 V [DEBUG] 14086918 <MAIN> Cell 2: 4.099000 V [DEBUG] 14086923 <MAIN> Cell 3: 4.097000 V [DEBUG] 14086928 <MAIN> Cell 4: 4.161000 V [DEBUG] 14086933 <MAIN> Cell 5: 4.161000 V [DEBUG] 14086938 <MAIN> Cell 6: 4.099000 V [DEBUG] 14086943 <MAIN> Cell 7: 4.101000 V [DEBUG] 14086948 <MAIN> Cell 8: 4.098000 V [DEBUG] 14086955 <MAIN> Cell 9: 4.100000 V [DEBUG] 14086959 <MAIN> Battery: 40.910000 V [DEBUG] 14086964 <MAIN> Battery: -0.010000 A [DEBUG] 14086969 <MAIN> Load: 34.369999 V [DEBUG] 14086975 <MAIN> SoC: 92.32 % [DEBUG] 14086979 <MAIN> SoH: 100.00 % [DEBUG] 14086983 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 14087038 <MAIN> BMS temperatures: IC = 39.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 14087042 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 14087045 <MAIN> Time since hard reboot: 14087044 [DEBUG] 14087051 <MAIN> Internal heap: 34279 bytes available [DEBUG] 14087058 <MAIN> SPIRAM heap: 3658931 bytes available [DEBUG] 14088372 <Load Detector> Charger potentially detected: Got 41.3 V, expected 42.0 V [DEBUG] 14089067 <MAIN> Alert pin: 0 [DEBUG] 14089068 <MAIN> Cell 0: 4.095000 V [DEBUG] 14089068 <MAIN> Cell 1: 4.098000 V [DEBUG] 14089072 <MAIN> Cell 2: 4.099000 V [DEBUG] 14089076 <MAIN> Cell 3: 4.097000 V [DEBUG] 14089082 <MAIN> Cell 4: 4.161000 V [DEBUG] 14089086 <MAIN> Cell 5: 4.161000 V [DEBUG] 14089093 <MAIN> Cell 6: 4.099000 V [DEBUG] 14089097 <MAIN> Cell 7: 4.101000 V [DEBUG] 14089103 <MAIN> Cell 8: 4.098000 V [DEBUG] 14089106 <MAIN> Cell 9: 4.100000 V [DEBUG] 14089112 <MAIN> Battery: 40.919998 V [DEBUG] 14089116 <MAIN> Battery: -0.030000 A [DEBUG] 14089122 <MAIN> Load: 41.259998 V [DEBUG] 14089128 <MAIN> SoC: 92.32 % [DEBUG] 14089131 <MAIN> SoH: 100.00 % [DEBUG] 14089136 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 14089167 <MAIN> BMS temperatures: IC = 39.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 14089171 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 14089175 <MAIN> Time since hard reboot: 14089174 [DEBUG] 14089181 <MAIN> Internal heap: 34279 bytes available [DEBUG] 14089188 <MAIN> SPIRAM heap: 3656587 bytes available [DEBUG] 14091263 <MAIN> Alert pin: 0 [DEBUG] 14091264 <MAIN> Cell 0: 4.095000 V [DEBUG] 14091265 <MAIN> Cell 1: 4.098000 V [DEBUG] 14091267 <MAIN> Cell 2: 4.099000 V [DEBUG] 14091272 <MAIN> Cell 3: 4.097000 V [DEBUG] 14091277 <MAIN> Cell 4: 4.161000 V [DEBUG] 14091282 <MAIN> Cell 5: 4.161000 V [DEBUG] 14091287 <MAIN> Cell 6: 4.099000 V [DEBUG] 14091292 <MAIN> Cell 7: 4.101000 V [DEBUG] 14091297 <MAIN> Cell 8: 4.098000 V [DEBUG] 14091302 <MAIN> Cell 9: 4.100000 V [DEBUG] 14091307 <MAIN> Battery: 40.910000 V [DEBUG] 14091312 <MAIN> Battery: -0.040000 A [DEBUG] 14091318 <MAIN> Load: 41.250000 V [DEBUG] 14091323 <MAIN> SoC: 92.32 % [DEBUG] 14091327 <MAIN> SoH: 100.00 % [DEBUG] 14091332 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 14091343 <MAIN> BMS temperatures: IC = 41.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 14091350 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 28.850000 [DEBUG] 14091357 <MAIN> Balancing since 1.000000 seconds
Observation #5
STOP #1
Stop from 2225s to 2231s. Stop last 6s
c++[DEBUG] 2225302 <MAIN> Balancing since 2240.000000 seconds [DEBUG] 2225309 <MAIN> Cell 0 is balancing [DEBUG] 2225314 <MAIN> Cell 1 is balancing [DEBUG] 2225320 <MAIN> Cell 2 is balancing [DEBUG] 2225324 <MAIN> Cell 3 is balancing [DEBUG] 2225329 <MAIN> Cell 4 is balancing [DEBUG] 2225335 <MAIN> Time since hard reboot: 2225334 [DEBUG] 2225341 <MAIN> Internal heap: 34255 bytes available [DEBUG] 2225347 <MAIN> SPIRAM heap: 3657175 bytes available [DEBUG] 2226007 <Load Detector> Charger potentially detected: Got 41.3 V, expected 42.0 V [CRITICAL] 2226532 <Battery FSM> Battery IC detected under voltage [DEBUG] 2227356 <MAIN> Alert pin: 1 [WARNING] 2227356 <MAIN> BQ Alerts: uvlo [DEBUG] 2227359 <MAIN> Cell 0: 4.117000 V [DEBUG] 2227360 <MAIN> Cell 1: 4.122000 V [DEBUG] 2227364 <MAIN> Cell 2: 4.125000 V [DEBUG] 2227369 <MAIN> Cell 3: 4.121000 V [DEBUG] 2227374 <MAIN> Cell 4: 4.175000 V [DEBUG] 2227379 <MAIN> Cell 5: 4.177000 V [DEBUG] 2227384 <MAIN> Cell 6: 4.125000 V [DEBUG] 2227389 <MAIN> Cell 7: 4.130000 V [DEBUG] 2227394 <MAIN> Cell 8: 4.122000 V [DEBUG] 2227399 <MAIN> Cell 9: 4.125000 V [DEBUG] 2227404 <MAIN> Battery: 41.139999 V [DEBUG] 2227410 <MAIN> Battery: -0.010000 A [DEBUG] 2227415 <MAIN> Load: 41.259998 V [DEBUG] 2227420 <MAIN> SoC: 95.59 % [DEBUG] 2227424 <MAIN> SoH: 100.00 % [DEBUG] 2227429 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 2227486 <MAIN> BMS temperatures: IC = 40.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 2227490 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 27.850000 [DEBUG] 2227494 <MAIN> Time since hard reboot: 2227493 [DEBUG] 2227500 <MAIN> Internal heap: 34291 bytes available [DEBUG] 2227506 <MAIN> SPIRAM heap: 3657175 bytes available [DEBUG] 2227836 <wifi manager> Leaving IDLE state [DEBUG] 2227836 <wifi manager> Entering SCANNING state [DEBUG] 2229034 <Load Detector> Charger potentially detected: Got 41.2 V, expected 42.0 V [DEBUG] 2229515 <MAIN> Alert pin: 0 [DEBUG] 2229516 <MAIN> Cell 0: 4.117000 V [DEBUG] 2229516 <MAIN> Cell 1: 4.123000 V [DEBUG] 2229518 <MAIN> Cell 2: 4.125000 V [DEBUG] 2229523 <MAIN> Cell 3: 4.121000 V [DEBUG] 2229529 <MAIN> Cell 4: 4.175000 V [DEBUG] 2229534 <MAIN> Cell 5: 4.176000 V [DEBUG] 2229539 <MAIN> Cell 6: 4.125000 V [DEBUG] 2229544 <MAIN> Cell 7: 4.129000 V [DEBUG] 2229550 <MAIN> Cell 8: 4.122000 V [DEBUG] 2229553 <MAIN> Cell 9: 4.124000 V [DEBUG] 2229558 <MAIN> Battery: 41.130001 V [DEBUG] 2229564 <MAIN> Battery: -0.030000 A [DEBUG] 2229569 <MAIN> Load: 41.250000 V [DEBUG] 2229573 <MAIN> SoC: 95.59 % [DEBUG] 2229578 <MAIN> SoH: 100.00 % [DEBUG] 2229582 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 2229607 <MAIN> BMS temperatures: IC = 41.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 2229610 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 27.850000 [DEBUG] 2229614 <MAIN> Cell 0 is balancing [DEBUG] 2229619 <MAIN> Cell 1 is balancing [DEBUG] 2229624 <MAIN> Cell 2 is balancing [DEBUG] 2229629 <MAIN> Cell 3 is balancing [DEBUG] 2229635 <MAIN> Cell 4 is balancing [DEBUG] 2229639 <MAIN> Cell 5 is balancing [DEBUG] 2229644 <MAIN> Time since hard reboot: 2229644 [DEBUG] 2229651 <MAIN> Internal heap: 34291 bytes available [DEBUG] 2229657 <MAIN> SPIRAM heap: 3658591 bytes available [DEBUG] 2231696 <MAIN> Alert pin: 0 [DEBUG] 2231697 <MAIN> Cell 0: 4.117000 V [DEBUG] 2231698 <MAIN> Cell 1: 4.123000 V [DEBUG] 2231700 <MAIN> Cell 2: 4.125000 V [DEBUG] 2231705 <MAIN> Cell 3: 4.121000 V [DEBUG] 2231710 <MAIN> Cell 4: 4.176000 V [DEBUG] 2231716 <MAIN> Cell 5: 4.176000 V [DEBUG] 2231720 <MAIN> Cell 6: 4.125000 V [DEBUG] 2231725 <MAIN> Cell 7: 4.129000 V [DEBUG] 2231730 <MAIN> Cell 8: 4.122000 V [DEBUG] 2231735 <MAIN> Cell 9: 4.125000 V [DEBUG] 2231740 <MAIN> Battery: 41.150002 V [DEBUG] 2231745 <MAIN> Battery: -0.040000 A [DEBUG] 2231750 <MAIN> Load: 41.250000 V [DEBUG] 2231755 <MAIN> SoC: 95.59 % [DEBUG] 2231759 <MAIN> SoH: 100.00 % [DEBUG] 2231763 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 2231774 <MAIN> BMS temperatures: IC = 42.849998, MOS = 29.850000, SHUNT = 33.849998 [DEBUG] 2231783 <MAIN> Cells temperatures: FRONT = 26.850000, BACK = 27.850000 [DEBUG] 2231788 <MAIN> Balancing since 2.000000 seconds [DEBUG] 2231795 <MAIN> Cell 0 is balancing [DEBUG] 2231799 <MAIN> Cell 1 is balancing [DEBUG] 2231805 <MAIN> Cell 2 is balancing [DEBUG] 2231809 <MAIN> Cell 3 is balancing [DEBUG] 2231814 <MAIN> Cell 4 is balancing [DEBUG] 2231820 <MAIN> Cell 5 is balancing
STOP #2
Stop from 4949s to 6726s. Stop last 1777s.
We unfortunately don’t have the logs here.
STOP #3
Stop from 16882s to 17594s. Stop last 712s.
c++[INFO] 16882109 <Battery FSM> Charge enters charge-and-balance mode [DEBUG] 16882158 <MAIN> Alert pin: 0 [DEBUG] 16882160 <MAIN> Cell 0: 4.125000 V [DEBUG] 16882160 <MAIN> Cell 1: 4.132000 V [DEBUG] 16882163 <MAIN> Cell 2: 4.136000 V [DEBUG] 16882168 <MAIN> Cell 3: 4.131000 V [DEBUG] 16882173 <MAIN> Cell 4: 4.172000 V [DEBUG] 16882178 <MAIN> Cell 5: 4.172000 V [DEBUG] 16882183 <MAIN> Cell 6: 4.136000 V [DEBUG] 16882188 <MAIN> Cell 7: 4.141000 V [DEBUG] 16882193 <MAIN> Cell 8: 4.132000 V [DEBUG] 16882198 <MAIN> Cell 9: 4.135000 V [DEBUG] 16882203 <MAIN> Battery: 41.200001 V [DEBUG] 16882210 <MAIN> Battery: -0.020000 A [DEBUG] 16882213 <MAIN> Load: 41.250000 V [DEBUG] 16882220 <MAIN> SoC: 97.87 % [DEBUG] 16882223 <MAIN> SoH: 100.00 % [DEBUG] 16882228 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 16882287 <MAIN> BMS temperatures: IC = 45.849998, MOS = 31.850000, SHUNT = 35.849998 [DEBUG] 16882290 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 16882294 <MAIN> Balancing since 10237.000000 seconds [DEBUG] 16882301 <MAIN> Cell 0 is balancing [DEBUG] 16882305 <MAIN> Cell 1 is balancing [DEBUG] 16882311 <MAIN> Cell 2 is balancing [DEBUG] 16882316 <MAIN> Cell 3 is balancing [DEBUG] 16882321 <MAIN> Cell 4 is balancing [DEBUG] 16882326 <MAIN> Time since hard reboot: 16882325 [DEBUG] 16882332 <MAIN> Internal heap: 34291 bytes available [DEBUG] 16882339 <MAIN> SPIRAM heap: 3656463 bytes available [DEBUG] 16883255 <Battery FSM> Battery is fully charged [INFO] 16883256 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 16883258 <Battery FSM> Charge enters balance-only mode [DEBUG] 16884386 <MAIN> Alert pin: 0 [DEBUG] 16884387 <MAIN> Cell 0: 4.126000 V [DEBUG] 16884388 <MAIN> Cell 1: 4.133000 V [DEBUG] 16884391 <MAIN> Cell 2: 4.137000 V [DEBUG] 16884396 <MAIN> Cell 3: 4.132000 V [DEBUG] 16884401 <MAIN> Cell 4: 4.173000 V [DEBUG] 16884406 <MAIN> Cell 5: 4.174000 V [DEBUG] 16884411 <MAIN> Cell 6: 4.137000 V [DEBUG] 16884416 <MAIN> Cell 7: 4.141000 V [DEBUG] 16884421 <MAIN> Cell 8: 4.133000 V [DEBUG] 16884426 <MAIN> Cell 9: 4.136000 V [DEBUG] 16884431 <MAIN> Battery: 41.209999 V [DEBUG] 16884436 <MAIN> Battery: -0.040000 A [DEBUG] 16884441 <MAIN> Load: 41.259998 V [DEBUG] 16884446 <MAIN> SoC: 97.88 % [DEBUG] 16884450 <MAIN> SoH: 100.00 % [DEBUG] 16884455 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 16884465 <MAIN> BMS temperatures: IC = 42.849998, MOS = 31.850000, SHUNT = 35.849998 [DEBUG] 16884474 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 16884480 <MAIN> Time since hard reboot: 16884479 [DEBUG] 16884487 <MAIN> Internal heap: 34255 bytes available [DEBUG] 16884493 <MAIN> SPIRAM heap: 3657575 bytes available [DEBUG] 16886403 <Load Detector> Charger potentially detected: Got 41.3 V, expected 42.0 V
STOP #4
Stop from 25517s to 25524s. Stop last 7s.
c++[INFO] 25517269 <Battery FSM> Charge enters charge-and-balance mode [DEBUG] 25517613 <MAIN> Alert pin: 0 [DEBUG] 25517615 <MAIN> Cell 0: 4.155000 V [DEBUG] 25517616 <MAIN> Cell 1: 4.171000 V [DEBUG] 25517617 <MAIN> Cell 2: 4.176000 V [DEBUG] 25517623 <MAIN> Cell 3: 4.174000 V [DEBUG] 25517628 <MAIN> Cell 4: 4.217000 V [DEBUG] 25517633 <MAIN> Cell 5: 4.217000 V [DEBUG] 25517638 <MAIN> Cell 6: 4.177000 V [DEBUG] 25517643 <MAIN> Cell 7: 4.180000 V [DEBUG] 25517648 <MAIN> Cell 8: 4.175000 V [DEBUG] 25517653 <MAIN> Cell 9: 4.183000 V [DEBUG] 25517658 <MAIN> Battery: 41.349998 V [DEBUG] 25517663 <MAIN> Battery: -1.530000 A [DEBUG] 25517668 <MAIN> Load: 41.080002 V [DEBUG] 25517673 <MAIN> SoC: 99.50 % [DEBUG] 25517678 <MAIN> SoH: 100.00 % [DEBUG] 25517682 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 25517693 <MAIN> BMS temperatures: IC = 45.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 25517702 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 25517707 <MAIN> Balancing since 7989.000000 seconds [DEBUG] 25517714 <MAIN> Cell 0 is balancing [DEBUG] 25517720 <MAIN> Cell 1 is balancing [DEBUG] 25517724 <MAIN> Cell 2 is balancing [DEBUG] 25517729 <MAIN> Cell 3 is balancing [DEBUG] 25517734 <MAIN> Cell 4 is balancing [DEBUG] 25517739 <MAIN> Time since hard reboot: 25517738 [DEBUG] 25517746 <MAIN> Internal heap: 34255 bytes available [DEBUG] 25517752 <MAIN> SPIRAM heap: 3657655 bytes available [DEBUG] 25519760 <MAIN> Alert pin: 0 [DEBUG] 25519762 <MAIN> Cell 0: 4.156000 V [DEBUG] 25519762 <MAIN> Cell 1: 4.171000 V [DEBUG] 25519765 <MAIN> Cell 2: 4.177000 V [DEBUG] 25519770 <MAIN> Cell 3: 4.174000 V [DEBUG] 25519775 <MAIN> Cell 4: 4.219000 V [DEBUG] 25519780 <MAIN> Cell 5: 4.219000 V [DEBUG] 25519785 <MAIN> Cell 6: 4.178000 V [DEBUG] 25519790 <MAIN> Cell 7: 4.181000 V [DEBUG] 25519795 <MAIN> Cell 8: 4.176000 V [DEBUG] 25519800 <MAIN> Cell 9: 4.184000 V [DEBUG] 25519806 <MAIN> Battery: 41.619999 V [DEBUG] 25519811 <MAIN> Battery: -1.460000 A [DEBUG] 25519816 <MAIN> Load: 41.080002 V [DEBUG] 25519821 <MAIN> SoC: 99.52 % [DEBUG] 25519825 <MAIN> SoH: 100.00 % [DEBUG] 25519831 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 25519874 <MAIN> BMS temperatures: IC = 44.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 25519878 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 25519882 <MAIN> Balancing since 7991.000000 seconds [DEBUG] 25519888 <MAIN> Time since hard reboot: 25519887 [DEBUG] 25519894 <MAIN> Internal heap: 34291 bytes available [DEBUG] 25519901 <MAIN> SPIRAM heap: 3657655 bytes available [DEBUG] 25521489 <wifi manager> Leaving IDLE state [DEBUG] 25521490 <wifi manager> Entering SCANNING state [DEBUG] 25521978 <MAIN> Alert pin: 0 [DEBUG] 25521979 <MAIN> Cell 0: 4.156000 V [DEBUG] 25521980 <MAIN> Cell 1: 4.172000 V [DEBUG] 25521982 <MAIN> Cell 2: 4.177000 V [DEBUG] 25521987 <MAIN> Cell 3: 4.174000 V [DEBUG] 25521993 <MAIN> Cell 4: 4.219000 V [DEBUG] 25521998 <MAIN> Cell 5: 4.219000 V [DEBUG] 25522002 <MAIN> Cell 6: 4.178000 V [DEBUG] 25522008 <MAIN> Cell 7: 4.182000 V [DEBUG] 25522012 <MAIN> Cell 8: 4.176000 V [DEBUG] 25522018 <MAIN> Cell 9: 4.184000 V [DEBUG] 25522022 <MAIN> Battery: 41.639999 V [DEBUG] 25522028 <MAIN> Battery: -1.420000 A [DEBUG] 25522033 <MAIN> Load: 41.090000 V [DEBUG] 25522038 <MAIN> SoC: 99.52 % [DEBUG] 25522042 <MAIN> SoH: 100.00 % [DEBUG] 25522047 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 25522057 <MAIN> BMS temperatures: IC = 43.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 25522066 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 25522072 <MAIN> Time since hard reboot: 25522071 [DEBUG] 25522078 <MAIN> Internal heap: 34243 bytes available [DEBUG] 25522084 <MAIN> SPIRAM heap: 3659383 bytes available [DEBUG] 25522250 <Battery FSM> Battery is fully charged [INFO] 25522252 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 25522253 <Battery FSM> Charge enters balance-only mode [DEBUG] 25524094 <MAIN> Alert pin: 0 [DEBUG] 25524095 <MAIN> Cell 0: 4.138000 V [DEBUG] 25524096 <MAIN> Cell 1: 4.147000 V [DEBUG] 25524098 <MAIN> Cell 2: 4.152000 V [DEBUG] 25524103 <MAIN> Cell 3: 4.146000 V [DEBUG] 25524108 <MAIN> Cell 4: 4.183000 V [DEBUG] 25524113 <MAIN> Cell 5: 4.185000 V [DEBUG] 25524118 <MAIN> Cell 6: 4.152000 V [DEBUG] 25524123 <MAIN> Cell 7: 4.157000 V [DEBUG] 25524128 <MAIN> Cell 8: 4.148000 V [DEBUG] 25524133 <MAIN> Cell 9: 4.147000 V [DEBUG] 25524138 <MAIN> Battery: 41.340000 V [DEBUG] 25524143 <MAIN> Battery: 0.000000 A [DEBUG] 25524148 <MAIN> Load: 29.680000 V [DEBUG] 25524154 <MAIN> SoC: 99.53 % [DEBUG] 25524158 <MAIN> SoH: 100.00 % [DEBUG] 25524162 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [WARNING] 25524197 <BQ769x2> Failed to read command 85 [DEBUG] 25524243 <MAIN> BMS temperatures: IC = 52.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 25524249 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 25524251 <MAIN> Balancing since 1.000000 seconds
STOP #5
Stop from 27744s to 27751s. Stop last 7s.
c++[INFO] 27740321 <Battery FSM> Charge enters charge-and-balance mode [DEBUG] 27740495 <MAIN> Alert pin: 0 [DEBUG] 27740497 <MAIN> Cell 0: 4.138000 V [DEBUG] 27740498 <MAIN> Cell 1: 4.147000 V [DEBUG] 27740499 <MAIN> Cell 2: 4.153000 V [DEBUG] 27740504 <MAIN> Cell 3: 4.146000 V [DEBUG] 27740509 <MAIN> Cell 4: 4.181000 V [DEBUG] 27740514 <MAIN> Cell 5: 4.181000 V [DEBUG] 27740520 <MAIN> Cell 6: 4.153000 V [DEBUG] 27740525 <MAIN> Cell 7: 4.158000 V [DEBUG] 27740529 <MAIN> Cell 8: 4.148000 V [DEBUG] 27740535 <MAIN> Cell 9: 4.149000 V [DEBUG] 27740540 <MAIN> Battery: 41.360001 V [DEBUG] 27740545 <MAIN> Battery: -0.030000 A [DEBUG] 27740550 <MAIN> Load: 41.250000 V [DEBUG] 27740555 <MAIN> SoC: 99.88 % [DEBUG] 27740559 <MAIN> SoH: 100.00 % [DEBUG] 27740564 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 27740575 <MAIN> BMS temperatures: IC = 44.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 27740583 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27740589 <MAIN> Balancing since 2236.000000 seconds [DEBUG] 27740595 <MAIN> Cell 0 is balancing [DEBUG] 27740601 <MAIN> Cell 1 is balancing [DEBUG] 27740606 <MAIN> Cell 2 is balancing [DEBUG] 27740611 <MAIN> Cell 3 is balancing [DEBUG] 27740616 <MAIN> Cell 4 is balancing [DEBUG] 27740622 <MAIN> Cell 5 is balancing [DEBUG] 27740626 <MAIN> Time since hard reboot: 27740626 [DEBUG] 27740632 <MAIN> Internal heap: 34255 bytes available [DEBUG] 27740639 <MAIN> SPIRAM heap: 3657815 bytes available [DEBUG] 27742648 <MAIN> Alert pin: 0 [DEBUG] 27742649 <MAIN> Cell 0: 4.157000 V [DEBUG] 27742649 <MAIN> Cell 1: 4.173000 V [DEBUG] 27742652 <MAIN> Cell 2: 4.178000 V [DEBUG] 27742657 <MAIN> Cell 3: 4.175000 V [DEBUG] 27742662 <MAIN> Cell 4: 4.217000 V [DEBUG] 27742667 <MAIN> Cell 5: 4.217000 V [DEBUG] 27742672 <MAIN> Cell 6: 4.180000 V [DEBUG] 27742680 <MAIN> Cell 7: 4.183000 V [DEBUG] 27742682 <MAIN> Cell 8: 4.177000 V [DEBUG] 27742689 <MAIN> Cell 9: 4.184000 V [DEBUG] 27742692 <MAIN> Battery: 41.639999 V [DEBUG] 27742699 <MAIN> Battery: -1.390000 A [DEBUG] 27742703 <MAIN> Load: 41.090000 V [DEBUG] 27742709 <MAIN> SoC: 99.89 % [DEBUG] 27742712 <MAIN> SoH: 100.00 % [DEBUG] 27742716 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 27742756 <MAIN> BMS temperatures: IC = 45.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 27742760 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27742763 <MAIN> Balancing since 2238.000000 seconds [DEBUG] 27742770 <MAIN> Cell 0 is balancing [DEBUG] 27742774 <MAIN> Cell 1 is balancing [DEBUG] 27742780 <MAIN> Cell 2 is balancing [DEBUG] 27742785 <MAIN> Cell 3 is balancing [DEBUG] 27742790 <MAIN> Cell 4 is balancing [DEBUG] 27742795 <MAIN> Cell 5 is balancing [DEBUG] 27742800 <MAIN> Time since hard reboot: 27742799 [DEBUG] 27742806 <MAIN> Internal heap: 34291 bytes available [DEBUG] 27742813 <MAIN> SPIRAM heap: 3657815 bytes available [DEBUG] 27744837 <MAIN> Alert pin: 0 [DEBUG] 27744838 <MAIN> Cell 0: 4.158000 V [DEBUG] 27744838 <MAIN> Cell 1: 4.174000 V [DEBUG] 27744841 <MAIN> Cell 2: 4.179000 V [DEBUG] 27744846 <MAIN> Cell 3: 4.176000 V [DEBUG] 27744851 <MAIN> Cell 4: 4.218000 V [DEBUG] 27744857 <MAIN> Cell 5: 4.218000 V [DEBUG] 27744861 <MAIN> Cell 6: 4.180000 V [DEBUG] 27744866 <MAIN> Cell 7: 4.184000 V [DEBUG] 27744871 <MAIN> Cell 8: 4.178000 V [DEBUG] 27744877 <MAIN> Cell 9: 4.183000 V [DEBUG] 27744881 <MAIN> Battery: 41.639999 V [DEBUG] 27744886 <MAIN> Battery: -1.360000 A [DEBUG] 27744891 <MAIN> Load: 41.090000 V [DEBUG] 27744896 <MAIN> SoC: 99.90 % [DEBUG] 27744901 <MAIN> SoH: 100.00 % [DEBUG] 27744905 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 27744916 <MAIN> BMS temperatures: IC = 48.849998, MOS = 33.849998, SHUNT = 36.849998 [DEBUG] 27744925 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27744930 <MAIN> Balancing since 2240.000000 seconds [DEBUG] 27744937 <MAIN> Cell 0 is balancing [DEBUG] 27744942 <MAIN> Cell 1 is balancing [DEBUG] 27744947 <MAIN> Cell 2 is balancing [DEBUG] 27744952 <MAIN> Cell 3 is balancing [DEBUG] 27744957 <MAIN> Cell 4 is balancing [DEBUG] 27744963 <MAIN> Cell 5 is balancing [DEBUG] 27744967 <MAIN> Cell 6 is balancing [DEBUG] 27744973 <MAIN> Cell 7 is balancing [DEBUG] 27744978 <MAIN> Cell 8 is balancing [DEBUG] 27744983 <MAIN> Cell 9 is balancing [DEBUG] 27744988 <MAIN> Time since hard reboot: 27744987 [DEBUG] 27744995 <MAIN> Internal heap: 34255 bytes available [DEBUG] 27745003 <MAIN> SPIRAM heap: 3657815 bytes available [WARNING] 27746722 <BQ769x2> Failed to read command 86 [DEBUG] 27747011 <MAIN> Alert pin: 0 [DEBUG] 27747012 <MAIN> Cell 0: 4.158000 V [DEBUG] 27747012 <MAIN> Cell 1: 4.174000 V [DEBUG] 27747015 <MAIN> Cell 2: 4.179000 V [DEBUG] 27747020 <MAIN> Cell 3: 4.176000 V [DEBUG] 27747026 <MAIN> Cell 4: 4.218000 V [DEBUG] 27747030 <MAIN> Cell 5: 4.219000 V [DEBUG] 27747036 <MAIN> Cell 6: 4.180000 V [DEBUG] 27747041 <MAIN> Cell 7: 4.184000 V [DEBUG] 27747046 <MAIN> Cell 8: 4.178000 V [DEBUG] 27747051 <MAIN> Cell 9: 4.185000 V [DEBUG] 27747056 <MAIN> Battery: 41.630001 V [DEBUG] 27747060 <MAIN> Battery: -1.300000 A [DEBUG] 27747066 <MAIN> Load: 41.099998 V [DEBUG] 27747071 <MAIN> SoC: 99.91 % [DEBUG] 27747076 <MAIN> SoH: 100.00 % [DEBUG] 27747080 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 27747098 <MAIN> BMS temperatures: IC = 45.849998, MOS = 33.849998, SHUNT = 36.849998 [DEBUG] 27747101 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27747105 <MAIN> Time since hard reboot: 27747104 [DEBUG] 27747111 <MAIN> Internal heap: 34291 bytes available [DEBUG] 27747118 <MAIN> SPIRAM heap: 3657815 bytes available [DEBUG] 27749189 <MAIN> Alert pin: 0 [DEBUG] 27749190 <MAIN> Cell 0: 4.158000 V [DEBUG] 27749190 <MAIN> Cell 1: 4.173000 V [DEBUG] 27749193 <MAIN> Cell 2: 4.179000 V [DEBUG] 27749198 <MAIN> Cell 3: 4.176000 V [DEBUG] 27749203 <MAIN> Cell 4: 4.218000 V [DEBUG] 27749209 <MAIN> Cell 5: 4.219000 V [DEBUG] 27749213 <MAIN> Cell 6: 4.181000 V [DEBUG] 27749218 <MAIN> Cell 7: 4.184000 V [DEBUG] 27749223 <MAIN> Cell 8: 4.178000 V [DEBUG] 27749229 <MAIN> Cell 9: 4.185000 V [DEBUG] 27749233 <MAIN> Battery: 41.660000 V [DEBUG] 27749238 <MAIN> Battery: -1.300000 A [DEBUG] 27749243 <MAIN> Load: 41.099998 V [DEBUG] 27749249 <MAIN> SoC: 99.92 % [DEBUG] 27749253 <MAIN> SoH: 100.00 % [DEBUG] 27749257 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 27749268 <MAIN> BMS temperatures: IC = 43.849998, MOS = 32.849998, SHUNT = 36.849998 [DEBUG] 27749276 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27749282 <MAIN> Time since hard reboot: 27749282 [DEBUG] 27749289 <MAIN> Internal heap: 34255 bytes available [DEBUG] 27749295 <MAIN> SPIRAM heap: 3657815 bytes available [DEBUG] 27749637 <Battery FSM> Battery is fully charged [INFO] 27749639 <Battery FSM> Charge leaves charge-and-balance mode [INFO] 27749640 <Battery FSM> Charge enters balance-only mode [DEBUG] 27750101 <wifi manager> Leaving IDLE state [DEBUG] 27750102 <wifi manager> Entering SCANNING state [WARNING] 27751057 <BQ769x2> Failed to read command 83 [DEBUG] 27751305 <MAIN> Alert pin: 0 [DEBUG] 27751306 <MAIN> Cell 0: 4.141000 V [DEBUG] 27751306 <MAIN> Cell 1: 4.151000 V [DEBUG] 27751309 <MAIN> Cell 2: 4.156000 V [DEBUG] 27751314 <MAIN> Cell 3: 4.149000 V [DEBUG] 27751319 <MAIN> Cell 4: 4.185000 V [DEBUG] 27751324 <MAIN> Cell 5: 4.186000 V [DEBUG] 27751329 <MAIN> Cell 6: 4.156000 V [DEBUG] 27751334 <MAIN> Cell 7: 4.161000 V [DEBUG] 27751339 <MAIN> Cell 8: 4.152000 V [DEBUG] 27751344 <MAIN> Cell 9: 4.151000 V [DEBUG] 27751349 <MAIN> Battery: 41.380001 V [DEBUG] 27751354 <MAIN> Battery: 0.010000 A [DEBUG] 27751359 <MAIN> Load: 29.670000 V [DEBUG] 27751364 <MAIN> SoC: 99.92 % [DEBUG] 27751369 <MAIN> SoH: 100.00 % [DEBUG] 27751373 <MAIN> Fets: CHG = 0, DSG = 0, PCHG = 0, PDSG = 0 [DEBUG] 27751457 <MAIN> BMS temperatures: IC = 52.849998, MOS = 33.849998, SHUNT = 36.849998 [DEBUG] 27751461 <MAIN> Cells temperatures: FRONT = 29.850000, BACK = 31.850000 [DEBUG] 27751465 <MAIN> Balancing since 2.000000 seconds
Observation #6 with debugs !
This code adds 2 following logs:
- BQ alerts are logged from main
- CC1 current is logged from BQ
STOP #1 ⚡COV
Stop from 258s to 263s. Stop last 5s.
c++[DEBUG] 256587 <MAIN> Balancing since 255.000000 seconds [DEBUG] 256593 <MAIN> Cell 0 is balancing [DEBUG] 256598 <MAIN> Cell 1 is balancing [DEBUG] 256603 <MAIN> Cell 2 is balancing [DEBUG] 256608 <MAIN> Cell 3 is balancing [DEBUG] 256613 <MAIN> Cell 4 is balancing [DEBUG] 256619 <MAIN> Cell 5 is balancing [DEBUG] 256623 <MAIN> Cell 6 is balancing [DEBUG] 256628 <MAIN> CC1 current: 55.000000 [DEBUG] 256634 <MAIN> Time since hard reboot: 256633 [DEBUG] 256640 <MAIN> Internal heap: 34315 bytes available [DEBUG] 256645 <MAIN> SPIRAM heap: 3658387 bytes available [DEBUG] 256652 <BQ769x2> CC1 current: 55.000000 [DEBUG] 256846 <BQ769x2> CC1 current: 56.000000 [DEBUG] 257035 <BQ769x2> CC1 current: 54.000000 [DEBUG] 257225 <BQ769x2> CC1 current: 54.000000 [DEBUG] 257414 <BQ769x2> CC1 current: 55.000000 [DEBUG] 257606 <BQ769x2> CC1 current: 56.000000 [DEBUG] 257795 <BQ769x2> CC1 current: 55.000000 [DEBUG] 257986 <BQ769x2> CC1 current: 55.000000 [DEBUG] 258174 <BQ769x2> CC1 current: 55.000000 [DEBUG] 258366 <BQ769x2> CC1 current: 55.000000 [DEBUG] 258555 <BQ769x2> CC1 current: 55.000000 [DEBUG] 258662 <MAIN> Alert pin: 0 [DEBUG] 258663 <MAIN> Cell 0: 4.174000 V [DEBUG] 258664 <MAIN> Cell 1: 4.188000 V [DEBUG] 258666 <MAIN> Cell 2: 4.195000 V [DEBUG] 258671 <MAIN> Cell 3: 4.187000 V [DEBUG] 258675 <MAIN> Cell 4: 4.218000 V [DEBUG] 258680 <MAIN> Cell 5: 4.218000 V [DEBUG] 258686 <MAIN> Cell 6: 4.196000 V [DEBUG] 258691 <MAIN> Cell 7: 4.198000 V [DEBUG] 258695 <MAIN> Cell 8: 4.191000 V [DEBUG] 258701 <MAIN> Cell 9: 4.191000 V [DEBUG] 258706 <MAIN> Battery: 41.750000 V [DEBUG] 258710 <MAIN> Battery: -0.530000 A [DEBUG] 258715 <MAIN> Load: 41.189999 V [DEBUG] 258720 <MAIN> SoC: 97.32 % [DEBUG] 258725 <MAIN> SoH: 100.00 % [DEBUG] 258728 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 258742 <BQ769x2> CC1 current: 54.000000 [DEBUG] 258776 <MAIN> BMS temperatures: IC = 52.849998, MOS = 33.849998, SHUNT = 39.849998 [DEBUG] 258780 <MAIN> Cells temperatures: FRONT = 31.850000, BACK = 32.849998 [WARNING] 258783 <MAIN> BQ Safety Alert: cellOverVoltage [DEBUG] 258789 <MAIN> Balancing since 257.000000 seconds [DEBUG] 258795 <MAIN> CC1 current: 54.000000 [DEBUG] 258800 <MAIN> Time since hard reboot: 258800 [DEBUG] 258806 <MAIN> Internal heap: 34351 bytes available [DEBUG] 258813 <MAIN> SPIRAM heap: 3658387 bytes available [DEBUG] 258932 <BQ769x2> CC1 current: 54.000000 [DEBUG] 259125 <BQ769x2> CC1 current: 54.000000 [DEBUG] 259315 <BQ769x2> CC1 current: 55.000000 [DEBUG] 259505 <BQ769x2> CC1 current: 54.000000 [DEBUG] 259695 <BQ769x2> CC1 current: 54.000000 [DEBUG] 259883 <BQ769x2> CC1 current: 54.000000 [WARNING] 259899 <BQ769x2> Failed to read command 87 [DEBUG] 260066 <BQ769x2> CC1 current: 54.000000 [DEBUG] 260257 <BQ769x2> CC1 current: 54.000000 [DEBUG] 260448 <BQ769x2> CC1 current: 54.000000 [DEBUG] 260638 <BQ769x2> CC1 current: 55.000000 [DEBUG] 260826 <BQ769x2> CC1 current: 54.000000 [DEBUG] 260857 <MAIN> Alert pin: 0 [DEBUG] 260858 <MAIN> Cell 0: 4.174000 V [DEBUG] 260859 <MAIN> Cell 1: 4.188000 V [DEBUG] 260861 <MAIN> Cell 2: 4.195000 V [DEBUG] 260866 <MAIN> Cell 3: 4.187000 V [DEBUG] 260872 <MAIN> Cell 4: 4.218000 V [DEBUG] 260876 <MAIN> Cell 5: 4.218000 V [DEBUG] 260880 <MAIN> Cell 6: 4.195000 V [DEBUG] 260885 <MAIN> Cell 7: 4.198000 V [DEBUG] 260890 <MAIN> Cell 8: 4.190000 V [DEBUG] 260895 <MAIN> Cell 9: 4.188000 V [DEBUG] 260900 <MAIN> Battery: 41.740002 V [DEBUG] 260905 <MAIN> Battery: -0.550000 A [DEBUG] 260910 <MAIN> Load: 41.209999 V [DEBUG] 260915 <MAIN> SoC: 97.33 % [DEBUG] 260919 <MAIN> SoH: 100.00 % [DEBUG] 260923 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 260934 <MAIN> BMS temperatures: IC = 48.849998, MOS = 33.849998, SHUNT = 39.849998 [DEBUG] 260942 <MAIN> Cells temperatures: FRONT = 31.850000, BACK = 32.849998 [DEBUG] 260948 <MAIN> Cell 0 is balancing [DEBUG] 260952 <MAIN> Cell 1 is balancing [DEBUG] 260958 <MAIN> Cell 2 is balancing [DEBUG] 260962 <MAIN> Cell 3 is balancing [DEBUG] 260967 <MAIN> Cell 4 is balancing [DEBUG] 260972 <MAIN> Cell 5 is balancing [DEBUG] 260978 <MAIN> Cell 6 is balancing [DEBUG] 260983 <MAIN> CC1 current: 54.000000 [DEBUG] 260987 <MAIN> Time since hard reboot: 260987 [DEBUG] 260994 <MAIN> Internal heap: 34315 bytes available [DEBUG] 261000 <MAIN> SPIRAM heap: 3658387 bytes available [DEBUG] 261015 <BQ769x2> CC1 current: 55.000000 [DEBUG] 261203 <BQ769x2> CC1 current: 54.000000 [DEBUG] 261393 <BQ769x2> CC1 current: 54.000000 [DEBUG] 261586 <BQ769x2> CC1 current: 55.000000 [DEBUG] 261777 <BQ769x2> CC1 current: 55.000000 [DEBUG] 261967 <BQ769x2> CC1 current: 55.000000 [DEBUG] 262155 <BQ769x2> CC1 current: 55.000000 [DEBUG] 262343 <BQ769x2> CC1 current: 54.000000 [DEBUG] 262534 <BQ769x2> CC1 current: 55.000000 [DEBUG] 262719 <BQ769x2> CC1 current: 55.000000 [DEBUG] 262912 <BQ769x2> CC1 current: 55.000000 [DEBUG] 263010 <MAIN> Alert pin: 0 [DEBUG] 263011 <MAIN> Cell 0: 4.174000 V [DEBUG] 263011 <MAIN> Cell 1: 4.189000 V [DEBUG] 263013 <MAIN> Cell 2: 4.196000 V [DEBUG] 263018 <MAIN> Cell 3: 4.188000 V [DEBUG] 263023 <MAIN> Cell 4: 4.218000 V [DEBUG] 263029 <MAIN> Cell 5: 4.218000 V [DEBUG] 263033 <MAIN> Cell 6: 4.195000 V [DEBUG] 263038 <MAIN> Cell 7: 4.199000 V [DEBUG] 263043 <MAIN> Cell 8: 4.191000 V [DEBUG] 263048 <MAIN> Cell 9: 4.189000 V [DEBUG] 263053 <MAIN> Battery: 41.750000 V [DEBUG] 263058 <MAIN> Battery: -0.550000 A [DEBUG] 263063 <MAIN> Load: 41.209999 V [DEBUG] 263067 <MAIN> SoC: 97.33 % [DEBUG] 263072 <MAIN> SoH: 100.00 % [DEBUG] 263078 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 263102 <BQ769x2> CC1 current: 54.000000 [DEBUG] 263137 <MAIN> BMS temperatures: IC = 54.849998, MOS = 34.849998, SHUNT = 39.849998 [DEBUG] 263140 <MAIN> Cells temperatures: FRONT = 31.850000, BACK = 32.849998 [DEBUG] 263144 <MAIN> Balancing since 2.000000 seconds
Observation #8 with debugs !
STOP #1 ⚡COV
Stop from 49s to 53s. Stop last 4s.
c++[DEBUG] 49221 <MAIN> Balancing since 46.000000 seconds [DEBUG] 49228 <MAIN> Cell 2 is balancing [DEBUG] 49232 <MAIN> Cell 4 is balancing [DEBUG] 49237 <MAIN> Cell 6 is balancing [DEBUG] 49242 <MAIN> Cell 8 is balancing [DEBUG] 49247 <MAIN> Time since hard reboot: 49246 [DEBUG] 49253 <MAIN> Internal heap: 34307 bytes available [DEBUG] 49259 <MAIN> SPIRAM heap: 3657655 bytes available [DEBUG] 50033 <wifi manager> Leaving IDLE state [DEBUG] 50035 <wifi manager> Entering SCANNING state [DEBUG] 51268 <MAIN> Alert pin: 0 [DEBUG] 51269 <MAIN> Cell 0: 4.168000 V [DEBUG] 51270 <MAIN> Cell 1: 4.186000 V [DEBUG] 51272 <MAIN> Cell 2: 4.186000 V [DEBUG] 51277 <MAIN> Cell 3: 4.184000 V [DEBUG] 51281 <MAIN> Cell 4: 4.216000 V [DEBUG] 51286 <MAIN> Cell 5: 4.211000 V [DEBUG] 51291 <MAIN> Cell 6: 4.182000 V [DEBUG] 51298 <MAIN> Cell 7: 4.189000 V [DEBUG] 51301 <MAIN> Cell 8: 4.191000 V [DEBUG] 51306 <MAIN> Cell 9: 4.194000 V [DEBUG] 51311 <MAIN> Battery: 41.709999 V [DEBUG] 51315 <MAIN> Battery: -0.820000 A [DEBUG] 51322 <MAIN> Load: 41.150002 V [DEBUG] 51326 <MAIN> SoC: 96.80 % [DEBUG] 51330 <MAIN> SoH: 100.00 % [DEBUG] 51333 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 51386 <MAIN> BMS temperatures: IC = 49.849998, MOS = 30.850000, SHUNT = 36.849998 [DEBUG] 51390 <MAIN> Cells temperatures: FRONT = 27.850000, BACK = 28.850000 [WARNING] 51393 <MAIN> BQ Safety Alert: cellOverVoltage [DEBUG] 51399 <MAIN> Balancing since 48.000000 seconds [DEBUG] 51405 <MAIN> Time since hard reboot: 51404 [DEBUG] 51411 <MAIN> Internal heap: 34307 bytes available [DEBUG] 51417 <MAIN> SPIRAM heap: 3658551 bytes available [DEBUG] 53426 <MAIN> Alert pin: 0 [DEBUG] 53427 <MAIN> Cell 0: 4.169000 V [DEBUG] 53428 <MAIN> Cell 1: 4.187000 V [DEBUG] 53429 <MAIN> Cell 2: 4.187000 V [DEBUG] 53434 <MAIN> Cell 3: 4.185000 V [DEBUG] 53439 <MAIN> Cell 4: 4.216000 V [DEBUG] 53444 <MAIN> Cell 5: 4.212000 V [DEBUG] 53448 <MAIN> Cell 6: 4.182000 V [DEBUG] 53453 <MAIN> Cell 7: 4.189000 V [DEBUG] 53458 <MAIN> Cell 8: 4.192000 V [DEBUG] 53464 <MAIN> Cell 9: 4.192000 V [DEBUG] 53468 <MAIN> Battery: 41.689999 V [DEBUG] 53473 <MAIN> Battery: -0.810000 A [DEBUG] 53479 <MAIN> Load: 41.160000 V [DEBUG] 53482 <MAIN> SoC: 96.81 % [DEBUG] 53487 <MAIN> SoH: 100.00 % [DEBUG] 53491 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 53561 <MAIN> BMS temperatures: IC = 53.849998, MOS = 30.850000, SHUNT = 36.849998 [DEBUG] 53565 <MAIN> Cells temperatures: FRONT = 27.850000, BACK = 28.850000 [DEBUG] 53568 <MAIN> Balancing since 1.000000 seconds
Observation #10 with more debugs !
With this code, we are 100% certain to log Alerts errors from the BQ, as it’s checked every +~100ms
STOP #1 🔥
Stop from 4161s to 53s. Stop last 4s.
c++[DEBUG] 4161687 <MAIN> Balancing since 4184.000000 seconds [DEBUG] 4161693 <MAIN> Cell 0 is balancing [DEBUG] 4161698 <MAIN> Cell 2 is balancing [DEBUG] 4161703 <MAIN> Cell 4 is balancing [DEBUG] 4161708 <MAIN> Cell 7 is balancing [DEBUG] 4161713 <MAIN> Cell 9 is balancing [DEBUG] 4161718 <MAIN> Time since hard reboot: 4161717 [DEBUG] 4161724 <MAIN> Internal heap: 41819 bytes available [DEBUG] 4161731 <MAIN> SPIRAM heap: 3655719 bytes available [DEBUG] 4163801 <MAIN> Alert pin: 0 [DEBUG] 4163802 <MAIN> Cell 0: 4.099000 V [DEBUG] 4163803 <MAIN> Cell 1: 4.129000 V [DEBUG] 4163805 <MAIN> Cell 2: 4.123000 V [DEBUG] 4163810 <MAIN> Cell 3: 4.140000 V [DEBUG] 4163815 <MAIN> Cell 4: 4.118000 V [DEBUG] 4163819 <MAIN> Cell 5: 4.024000 V [DEBUG] 4163824 <MAIN> Cell 6: 4.131000 V [DEBUG] 4163829 <MAIN> Cell 7: 4.125000 V [DEBUG] 4163834 <MAIN> Cell 8: 4.124000 V [DEBUG] 4163839 <MAIN> Cell 9: 4.142000 V [DEBUG] 4163844 <MAIN> Battery: 40.950001 V [DEBUG] 4163849 <MAIN> Battery: -1.940000 A [DEBUG] 4163854 <MAIN> Pack+ (bq): 40.419998 V [DEBUG] 4163867 <MAIN> Pack+ (adc): 41.628468 V [DEBUG] 4163868 <MAIN> SoC: 75.59 % [DEBUG] 4163870 <MAIN> SoH: 100.00 % [DEBUG] 4163874 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 4163885 <MAIN> BMS temperatures: IC = 69.849998, MOS = 34.849998, SHUNT = 42.849998 [DEBUG] 4163893 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 4163900 <MAIN> Balancing since 4186.000000 seconds [DEBUG] 4163906 <MAIN> Cell 0 is balancing [DEBUG] 4163910 <MAIN> Cell 2 is balancing [DEBUG] 4163915 <MAIN> Cell 4 is balancing [DEBUG] 4163920 <MAIN> Cell 7 is balancing [DEBUG] 4163925 <MAIN> Cell 9 is balancing [DEBUG] 4163930 <MAIN> Time since hard reboot: 4163929 [DEBUG] 4163938 <MAIN> Internal heap: 41819 bytes available [DEBUG] 4163943 <MAIN> SPIRAM heap: 3655719 bytes available [WARNING] 4165553 <BQ769x2> Failed to read command 86 [DEBUG] 4165952 <MAIN> Alert pin: 0 [DEBUG] 4165953 <MAIN> Cell 0: 4.099000 V [DEBUG] 4165954 <MAIN> Cell 1: 4.128000 V [DEBUG] 4165956 <MAIN> Cell 2: 4.123000 V [DEBUG] 4165961 <MAIN> Cell 3: 4.140000 V [DEBUG] 4165966 <MAIN> Cell 4: 4.118000 V [DEBUG] 4165971 <MAIN> Cell 5: 4.024000 V [DEBUG] 4165976 <MAIN> Cell 6: 4.130000 V [DEBUG] 4165981 <MAIN> Cell 7: 4.125000 V [DEBUG] 4165986 <MAIN> Cell 8: 4.124000 V [DEBUG] 4165991 <MAIN> Cell 9: 4.144000 V [DEBUG] 4165996 <MAIN> Battery: 40.950001 V [DEBUG] 4166001 <MAIN> Battery: -1.950000 A [DEBUG] 4166006 <MAIN> Pack+ (bq): 40.430000 V [DEBUG] 4166019 <MAIN> Pack+ (adc): 41.644619 V [DEBUG] 4166019 <MAIN> SoC: 75.61 % [DEBUG] 4166021 <MAIN> SoH: 100.00 % [DEBUG] 4166025 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 4166112 <MAIN> BMS temperatures: IC = 54.849998, MOS = 33.849998, SHUNT = 41.849998 [DEBUG] 4166115 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 4166119 <MAIN> Time since hard reboot: 4166119 [DEBUG] 4166125 <MAIN> Internal heap: 41819 bytes available [DEBUG] 4166132 <MAIN> SPIRAM heap: 3655719 bytes available [DEBUG] 4168141 <MAIN> Alert pin: 0 [DEBUG] 4168142 <MAIN> Cell 0: 4.100000 V [DEBUG] 4168143 <MAIN> Cell 1: 4.129000 V [DEBUG] 4168145 <MAIN> Cell 2: 4.123000 V [DEBUG] 4168150 <MAIN> Cell 3: 4.140000 V [DEBUG] 4168155 <MAIN> Cell 4: 4.118000 V [DEBUG] 4168160 <MAIN> Cell 5: 4.025000 V [DEBUG] 4168165 <MAIN> Cell 6: 4.131000 V [DEBUG] 4168170 <MAIN> Cell 7: 4.126000 V [DEBUG] 4168175 <MAIN> Cell 8: 4.124000 V [DEBUG] 4168180 <MAIN> Cell 9: 4.142000 V [DEBUG] 4168185 <MAIN> Battery: 40.939999 V [DEBUG] 4168190 <MAIN> Battery: -1.910000 A [DEBUG] 4168195 <MAIN> Pack+ (bq): 40.439999 V [DEBUG] 4168211 <MAIN> Pack+ (adc): 41.629982 V [DEBUG] 4168212 <MAIN> SoC: 75.62 % [DEBUG] 4168213 <MAIN> SoH: 100.00 % [DEBUG] 4168215 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 4168239 <MAIN> BMS temperatures: IC = 60.849998, MOS = 34.849998, SHUNT = 41.849998 [DEBUG] 4168242 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 4168246 <MAIN> Balancing since 1.000000 seconds
STOP #2 ⚡
Stop from 7540s to 7544s. Stop last 4s.
c++[DEBUG] 7540030 <MAIN> Balancing since 1267.000000 seconds [DEBUG] 7540035 <MAIN> Cell 1 is balancing [DEBUG] 7540040 <MAIN> Cell 3 is balancing [DEBUG] 7540045 <MAIN> Cell 6 is balancing [DEBUG] 7540051 <MAIN> Cell 8 is balancing [DEBUG] 7540055 <MAIN> Time since hard reboot: 7540054 [DEBUG] 7540061 <MAIN> Internal heap: 41783 bytes available [DEBUG] 7540068 <MAIN> SPIRAM heap: 3655719 bytes available [WARNING] 7540276 <BQ769x2> BQ Safety Alert: cellOverVoltage [DEBUG] 7542076 <MAIN> Alert pin: 0 [DEBUG] 7542078 <MAIN> Cell 0: 4.172000 V [DEBUG] 7542078 <MAIN> Cell 1: 4.202000 V [DEBUG] 7542080 <MAIN> Cell 2: 4.193000 V [DEBUG] 7542085 <MAIN> Cell 3: 4.208000 V [DEBUG] 7542090 <MAIN> Cell 4: 4.190000 V [DEBUG] 7542095 <MAIN> Cell 5: 4.129000 V [DEBUG] 7542100 <MAIN> Cell 6: 4.198000 V [DEBUG] 7542105 <MAIN> Cell 7: 4.195000 V [DEBUG] 7542110 <MAIN> Cell 8: 4.193000 V [DEBUG] 7542115 <MAIN> Cell 9: 4.205000 V [DEBUG] 7542120 <MAIN> Battery: 41.669998 V [DEBUG] 7542125 <MAIN> Battery: -1.050000 A [DEBUG] 7542130 <MAIN> Pack+ (bq): 41.130001 V [DEBUG] 7542143 <MAIN> Pack+ (adc): 42.382542 V [DEBUG] 7542144 <MAIN> SoC: 92.46 % [DEBUG] 7542145 <MAIN> SoH: 100.00 % [DEBUG] 7542150 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 7542161 <MAIN> BMS temperatures: IC = 58.849998, MOS = 32.849998, SHUNT = 39.849998 [DEBUG] 7542171 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 7542175 <MAIN> Cell 1 is balancing [DEBUG] 7542180 <MAIN> Cell 3 is balancing [DEBUG] 7542185 <MAIN> Cell 6 is balancing [DEBUG] 7542190 <MAIN> Cell 8 is balancing [DEBUG] 7542195 <MAIN> Time since hard reboot: 7542194 [DEBUG] 7542201 <MAIN> Internal heap: 41783 bytes available [DEBUG] 7542211 <MAIN> SPIRAM heap: 3655719 bytes available [WARNING] 7543803 <BQ769x2> Failed to read command 76 [DEBUG] 7544216 <MAIN> Alert pin: 0 [DEBUG] 7544219 <MAIN> Cell 0: 4.172000 V [DEBUG] 7544219 <MAIN> Cell 1: 4.202000 V [DEBUG] 7544220 <MAIN> Cell 2: 4.192000 V [DEBUG] 7544225 <MAIN> Cell 3: 4.208000 V [DEBUG] 7544230 <MAIN> Cell 4: 4.190000 V [DEBUG] 7544234 <MAIN> Cell 5: 4.129000 V [DEBUG] 7544239 <MAIN> Cell 6: 4.199000 V [DEBUG] 7544244 <MAIN> Cell 7: 4.196000 V [DEBUG] 7544249 <MAIN> Cell 8: 4.193000 V [DEBUG] 7544254 <MAIN> Cell 9: 4.205000 V [DEBUG] 7544259 <MAIN> Battery: 41.669998 V [DEBUG] 7544264 <MAIN> Battery: -1.040000 A [DEBUG] 7544269 <MAIN> Pack+ (bq): 41.160000 V [DEBUG] 7544283 <MAIN> Pack+ (adc): 42.376991 V [DEBUG] 7544284 <MAIN> SoC: 92.47 % [DEBUG] 7544285 <MAIN> SoH: 100.00 % [DEBUG] 7544290 <MAIN> Fets: CHG = 1, DSG = 1, PCHG = 0, PDSG = 0 [DEBUG] 7544370 <MAIN> BMS temperatures: IC = 62.849998, MOS = 32.849998, SHUNT = 39.849998 [DEBUG] 7544374 <MAIN> Cells temperatures: FRONT = 28.850000, BACK = 30.850000 [DEBUG] 7544377 <MAIN> Balancing since 3.000000 seconds
The solution I come with is:
💡
We let BQ stop balancing. If it’s overheating, we can’t make it keep balancing. Instead, we change our condition in
balance-only
state.
We do not expect anymore that Battery IC is balancing, but that Battery IC should balance.Old.
From the documentation, BQ immediately stops balancing when.
- An enabled protection alert from Settings:Protections:Enabled Protections A occurs.
- CC1 voltage spike may cancel the balancing.
Problem is: in our observations, BQ shouldn’t stop balancing, as cells voltage delta is still to high.
From this logs, we notice:
- CC1 has a valid current.
- We detect a COV alert then the balancing restarts. The alert is triggered once, then disappear, it looks like a false measurement.
💡
From our observations, BQ balancing seems to be stopped by an false alert, especially an OCV (More frequent to trigger as we are at the end of the charge process, with high voltage).
COV can’t be triggered in charge-and-balance
state ✅
The COV protection has a 4s trigger before throwing an error. As we can stay at least 1s in
charge-and-balance
state, we might never trigger this protection.💡
Reduce COV protection to 1s.
Increase
MIN_TIME_TO_CHARGE
to 2s.Ratio charge/balancing question: ✅
In the new V3 algorithm, we do the following:
(MAX_CHARGER_CURRENT * MIN_TIME_TO_CHARGE) / MIN_BALANCING_CURRENT = MIN_TIME_TO_BALANCE
It means given MAX_CHARGER_CURRENT
and MIN_BALANCING_CURRENT
, we have to wait MIN_TIME_TO_BALANCE
for the cell to not overcharge but balance. But should we divide the MAX_CHARGER_CURRENT
per the number of cells ?💡
No.
Both
MAX_CHARGER_CURRENT
and MIN_BALANCING_CURRENT
are current per block of cells.
Also, graphs show the relation is perfect 👌Balancing configuration: ✅
Old configuration was:
c++{ .maxDischargeCurrent = 1, .balancingCheckInterval = 5, .minimumCellVoltage = 3.5, .cellImbalanceDeltaStart = 0.050, .cellImbalanceDeltaStop = 0.020, .simultaneousCells = 5 };
Having a low
cellImbalanceDeltaStop
makes less cells voltage difference, and so allow us to have a higher voltage average at end of charge.
By example, the worse case we can have is 9 cells at 4.13
and 1 other at 4.18
at end of charge which makes a 4.135
average which is about 95.7%
SoC (3160mAh
).Having the following configuration will have a worse case is 9 cells
4.16
and 1 at 4.18
. Which makes an average of 4.162
, so 97.6%
SoC (3221mAh
).c++{ .maxDischargeCurrent = 1, .balancingCheckInterval = 5, .minimumCellVoltage = 3.5, .cellImbalanceDeltaStart = 0.020, .cellImbalanceDeltaStop = 0.010, .simultaneousCells = 5 };
Is it safe ? How unhealthy cells will react ? Can we do a test with unhealthy cells and see if balancing bounce too much between start & stop threshold ?
💡
It’s safe.
New config:
c++{ .maxDischargeCurrent = 1, .balancingCheckInterval = 5, .minimumCellVoltage = 3.9, .cellImbalanceDeltaStart = 0.020, .cellImbalanceDeltaStop = 0.010, .simultaneousCells = 4 or 3 };
Charger detection inaccuracy: ✅
Charger detection algorithm fails to detect charger when a non always-on battery.
At least with a 10s3p.
Charger detection stops working whenever the battery voltage is higher than 41.3.
Having a longer time to detect BQ current on detection doesn’t influence the result.
Battery just doesn’t succeed to draw current with only CHG FET ON.
💡
Don’t rework for now. See later.
Charger end of CV phase: ❓
We leave
charge-and-balance
state whenever given current is below 100mA * Cells in series. We need to ensure charger stop charge threshold is below this.Data tooling
Monitor and save data
I use this command redirect
stdout
and stderr
to a file (named data.dat
)doit monitor 2>&1 | tee charge_data.dat
Use
tee
with -a
to append to the end of the file.
You must manually remove some logs at the start of the file which are not from our bms code logger (doesn’t start with [<PRIORITY>] <MS SINCE START> [<THREAD NAME>] <LOGS>
. You must also clean the file from color syntax such as: [30;1m
, [0m
and [33m
.
(\[30;1m)|(\[0m)|(\[33m)
This is the regex to catch them.Parse data into CSV
Here is a little parser made in rust : <insert link or zip> (Ask Mathéo or Max for now)
Use
cargo run data.dat core > data.csv
to run the program and redirect its stdout
into a new .csv
fileHere is more details about arguments you can pass to this binary:
- First argument is mandatory. It’s the file path to the log file
- Second argument is optional.
- Use
core
to only display battery core values. - Use
fsm
to only display FSM events and logs. - Use nothing or other value to display a more human readable versions of all parsed value.
Graph with gnuplot
cd
where your .csv
file named data.csv
is located.
Execute gnuplot
. (Make sure it’s installed first, ofc).c++set multiplot set grid set title 'SoC over Time' set size 0.5, 0.5 set origin 0.5,0.5 set xlabel 'Time (s)' set ylabel 'State of Charge (%)' set autoscale x set autoscale y set yrange [0:100] plot 'data.csv' u 1:15 w l title 'SoC' axes x1y1 set title 'Battery and Load over Time' set size 0.5, 0.5 set origin 0.5,0.0 set xlabel 'Time (s)' set ylabel 'Voltage (V)' set y2label 'Ampere (A)' set autoscale x set autoscale y set autoscale y2 set y2tics set y2range reverse plot 'data.csv' u 1:12 w l title 'Battery Voltage' axes x1y1 , 'data.csv' u 1:13 w l title 'Battery Amperes' lt rgb 'red' axes x1y2, 'data.csv' u 1:14 w l title 'Load Voltage' axes x1y1 set title 'Cells over Time' set size 1,1 set origin 0.0,0.0 set xlabel 'Time (s)' set ylabel 'Cell voltage (V)' set autoscale x set autoscale y plot 'data.csv' u 1:2 w l title 'Cell0', \ 'data.csv' u 1:3 w l title 'Cell1', \ 'data.csv' u 1:4 w l title 'Cell2', \ 'data.csv' u 1:5 w l title 'Cell3', \ 'data.csv' u 1:6 w l title 'Cell4', \ 'data.csv' u 1:7 w l title 'Cell5', \ 'data.csv' u 1:8 w l title 'Cell6', \ 'data.csv' u 1:9 w l title 'Cell7', \ 'data.csv' u 1:10 w l title 'Cell8', \ 'data.csv' u 1:11 w l title 'Cell9' unset multiplot
Copy paste this into
gnuplot
CLI and tadaaa. Graph !OCV graph
From this data file you should rename
ocv_curve.csv
which is basically in order: mAh, SoC, Voltagec++0 0 2.754 165 5 3.161 330 10 3.294 495 15 3.381 660 20 3.466 825 25 3.516 990 30 3.570 1155 35 3.612 1320 40 3.650 1485 45 3.693 1650 50 3.743 1815 55 3.793 1980 60 3.839 2145 65 3.884 2310 70 3.927 2475 75 3.977 2640 80 4.041 2805 85 4.079 2970 90 4.094 3135 95 4.123 3300 100 4.197
Execute
gnuplot
.c++set grid set title 'Soc' set xlabel 'State of Charge (%)' set x2label 'Capacity (mA/H)' set ylabel 'Voltage' set xrange [0 : 100] set x2range [0 : 3300] set autoscale y set x2tics plot 'ocv_curve.csv' u 2:3 w l title 'Voltage over SoC %' axes x1y1, \ 'ocv_curve.csv' u 1:3 w l title 'Voltage over mA/H' axes x2y1
Copy paste that. And tadaa ! Fresh OCV curve with 2 axes 😎
Next steps
New config: max cells at 4.
New config: minimum cell voltage at 3.9
Rework Charge algo: new Final Balance State
Do test 3 Charger 40V / 44V
Do test 1
Rework time spend in balancing per cell
- Redo tests with unbalanced cells. (4 then 3 max cells)
Rework DetectCharger (to work with precharge + doc)
Implement Precharge algo
Charger unplug detection is not robust enough:
Unplug, replug a charger within 2s, and you get final-balance well end of charge.
Pain points (OLD)
Charger unplug detection can be tricked
Issue:
Proper end of charge can be manually triggered.
(A proper end of charge, is when the ChargeFSM ends up it’s flow in
Final Balance
or Rebalance
and saves the lowest cell voltage in charge.)
How to trigger:In charge, unplug and replug a charger within 2s. The algorithm for charger detection in
Charge And Balance
state will detect the charger has not enough current
(see ChargeFSM graph to understand why) and will transit to Final Balance
then will end its charge properly after leaving this state.Consequence:
Triggering this issue will save the last cell voltage in charge and prevent battery going back to charge until it gets discharged.
Solutions:
- Reduce this 2s delay. But I need more different charger to try with. I’m trying to reduce this delay and see.
- I don’t think this is a very good solution as the problem will still exists but in a shorter time frame.
- Voltage based charger detection ? I need to develop more this solution.
- I’m doing some tests to have some data on voltage drop whenever we unplug charger from the battery. (I’m ofc doing it with all FETs OFF to only get the charger voltage, not the battery.)
- Reworked current based detection:
- Watch current for 500ms
- if current drop too much, charger is unplugged
- Simple as that.
- But it means, charger should NOT start PWM around whenever charger unplug detection start in
Charge And Balance
(On current drop). - This is my favorite solution.
- I’ve implemented this solution, and it’s now getting tested.
44V Charger and small cell unbalancing might trigger COVC
Issue:
Observations of this issue comes from this test.
With 44V charger and slightly unbalanced cells, voltage drop is really significant from
Charge And Balance
to Rebalance
state. It goes from 4.22
to 4.13V
. I still don’t know why. I’m investigating.
Problem is: there is no balancing, but battery still goes to Charge And Balance
. It might overcharge the highest cells.
How to trigger:
With 10sXp, 44V charger (or power supply). Manually unbalance cells to ~100mAh.
Plug the charger, wait until it’s around the end of charge.
Consequence:
COCV might get triggered.
Solutions:
- Reduce accepted charger range to
[42 * 0.975; 42 * 1.025]
=[40.95; 43.05]
- And redo tests with
43V
charger. - ⚠️This will only reduce the probability to have a bad charger, a
43V
charger in the same situation will do the same issue ⚠️ - We can’t reduce this range that much, as voltage measurements can be imprecise at some point, depending on the hardware.
- Add a
Rebalance
limit. - Increment a counter each time we enter & leave
Rebalance
state without balancing at all. - Don’t transit back to
Rebalance
if this counter reaches a certain limit, end the charge instead. - This limit can be set to 12. It equals to a minimum
60mn
of balancing &20s
of charge. Pretty safe, cells will never COCV with20s
of charge. - This is my favorite solution.
- I’ve implemented this solution, and it’s now getting tested.
- Check Balancing Before Cell Voltage.
- Actually,
Rebalance
first check if Cell Voltage is too low, THEN check if balancing is still needed. - If we swap those 2 conditions,
Rebalance
will end charge, first time all cells are balanced. - It’s an easy fix but
- Add another ChargeFSM state which analyse plugged in charger.
- It would turn off all FETs, wait a bit, save charger voltage and transit to charge.
- It could alert the user with IO shield the plugged charger is too low or high in voltage.
- Then, in
Charge And Balance
mode, whenever cell voltage exceed4.22V
, it would transits toFinal Balance
if the plugged charger is too high voltage, instead of going toRebalance
.
plain textCharge enters charge-and-balance mode [DEBUG] 83407 <Battery FSM> transitioning from IDLE to CHARGE [DEBUG] 83518 <MQTTMgr> Published message 43993 (231 bytes) on topic "v2/lD6xjjX9ZWLxj4B4TjOc/batch"! [DEBUG] 83552 <MQTTMgr> Received MQTT ACK for message 43993