luna-cycle / vesc_bms_fw

The VESC BMS Firmware
GNU General Public License v3.0
0 stars 0 forks source link

Always bleed a cell if its above 4.2V #10

Closed nitrousnrg closed 1 year ago

nitrousnrg commented 1 year ago

No matter the balance mode selected, if a cell exceeded the overvoltage threshold (4.25V) the BMS should disconnect the pack (it does) and bleed down that cell, at least until the overvoltage fault is cleared. By default the fault would clear when it goes below the 50mV hysteresis, ie 4.2V.

Without this, some modes and settings could result in a pack that reaches an overvoltage fault and the code will do nothing to discharge the cell so the pack will be unusable until the cell discharges on its own, that's a long time

diegosarli commented 1 year ago

Added a condition where the balance is forced if the max cell is above 4.2V, also the balance start and limit are set to 10mV because user could set this values big enough that it won't balance. Once the 4.2V or OV condition is no longer present, the balance end and start returns to the user settings. The balance is forced only if there is no temps faults. This feature is to be tested once the hardware is available.

https://github.com/luna-cycle/vesc_bms_fw/commit/f4fff46ea48cbecd0274498ad7507c953f82133e

diegosarli commented 1 year ago

Test: The pack was charged with a low current (300mA), balance mode disable, OV threshold is 4,25V. When a cell reach 4.2V the pack is forced to balance mode but the charging continues until the OV is reached. image

image

If temp fault trips, the charging and the balance is interrupted until the temp is acceptable

https://github.com/luna-cycle/vesc_bms_fw/commit/70709def6b935a4d4a996ae135f53be2bd4465fd