Also the sawtooth evolution of the voltage(s) is because the target voltage and the regulation voltage are not harmonized.
The code reads: charge_voltage = 52.5 - 30 * max(0, bms.maxcellvoltage-3.485)
You can see that the target is 52.5V, which is 3.5V per cell.
But the voltage is dragged down from when the cells are 3.485V, which is 52.27V.
Hence the continuous regulation/race of ups and downs after different voltages.
Here is how it is now:
Here is how it should look without any low-pass filter and the below formula.
Regulation at 15mV above the target voltage per cell.
battery_target_voltage = DESIRED_BATTERY_VOLTAGE - 15 * max(0, bms.maxcellvoltage - ((DESIRED_BATTERY_VOLTAGE/15)+0.015))
And another one from today.
See how the algorithm proposed here on Aug 27, last year, “pamper” the charging voltage in order for the battery to smoothly reach the desire voltage.
And how in the process, it caps the high cell voltage and wait for the low cell to get fully charged.


