Louisvdw/dbus-serialbattery

JK-BMS Soc Reset general solution

salami738 opened this issue · 5 comments

Is your feature request related to a problem? Please describe.

Hi, thanks for creating this great software.

I have a JK-BMS. This has a relatively strong SoC drift. Within one month it loses approx. 15%.
After that, the battery is only displayed as 85% full, for example.

As the JK-BMS has various software errors, you can't really achieve an automatic reset even with the 100% SoC setting in the BMS.

Describe the solution you'd like

How about calculating and updating the SoC in Python? Then we could work completely independently of the BMS
and you would have a universal fix for all BMS that have SoC problems.

Describe alternatives you've considered

I have seen that there is a new feature that forces the BMS to perform an SoC reset via a workaround when a Bluetooth connection is established.
forces an SoC reset. The disadvantage is the unstable Bluetooth connection. Also i don't like having a wireless connection for security related features.

Additional context

No response

Nice idea, just enable it ;-)

; --------- SOC calculation ---------
; Description:
; Calculate the SOC in the driver. Do not use the SOC reported by the BMS
; SOC_CALCULATION:
; True: Calc SOC in the driver, do not use SOC reported from BMS
; - The SOC is calculated by integration of the current reported by the BMS
; - The current reported from the BMS can be corrected by
; the map (SOC_CALC_CURRENT_REPORTED_BY_BMS, SOC_CALC_CURRENT_MEASURED_BY_USER)
; - The SOC is set to 100% if the following conditions apply for at least SOC_RESET_TIME seconds:
; * Current is lower than SOC_RESET_CURRENT amps
; * Sum of cell voltages >= self.max_battery_voltage - VOLTAGE_DROP
; - The calculated SOC is stored in dbus to persist a driver restart
; False: Use SOC reported from BMS (none of the other parameters apply)
; More info: https://github.com/Louisvdw/dbus-serialbattery/pull/868
SOC_CALCULATION = False
SOC_RESET_CURRENT = 7
SOC_RESET_TIME = 60
SOC_CALC_CURRENT_REPORTED_BY_BMS = -300, 300
SOC_CALC_CURRENT_MEASURED_BY_USER = -300, 300
; Example to set small currents to zero
; SOC_CALC_CURRENT_REPORTED_BY_BMS = -300, -0.5, 0.5, 300
; SOC_CALC_CURRENT_MEASURED_BY_USER = -300, 0, 0, 300

Else you could also use this to reset the SOC.

; --------- SOC reset voltage ---------
; Description:
; May be needed to reset the SoC to 100% once in a while for some BMS, because of SoC drift.
; Specify the cell voltage where the SoC should be reset to 100% by the BMS.
; - JKBMS: SoC is reset to 100% if one cell reaches OVP (over voltage protection) voltage
; As you have to adopt this value to your system, I reccomend to start with
; OVP voltage - 0.030 (see Example).
; - Try to increase (add) by 0.005 in steps, if the system does not switch to float mode, even if
; the target voltage SOC_RESET_VOLTAGE * CELL_COUNT is reached.
; - Try to decrease (lower) by 0.005 in steps, if the system hits the OVP too fast, before all
; cells could be balanced and the system goes into protection mode multiple times.
; Example:
; If OVP is 3.650, then start with 3.620 and increase/decrease by 0.005
; Note:
; The value has to be higher as the MAX_CELL_VOLTAGE
; You also have to set CELL_VOLTAGES_WHILE_CHARGING accordingly, if you set CCCM_CV_ENABLE to true
; else the charging current will be reduced to 0 before the target voltage is reached and the
; battery will never switch to float
SOC_RESET_VOLTAGE = 3.650
; Specify after how many days the soc reset voltage should be reached again
; The timer is reset when the soc reset voltage is reached
; Leave empty if you don't want to use this
; Example:
; Value is set to 15
; day 1: soc reset reached once
; day 16: soc reset reached twice
; day 31: soc reset not reached since it's very cloudy
; day 34: soc reset reached since the sun came out
; day 49: soc reset reached again, since last time it took 3 days to reach soc reset voltage
SOC_RESET_AFTER_DAYS =

Thanks for the fast reply, will checkout the first possible solution. The documentation in the second config is wrong. The JK_BMS does not reset the SoC reliable, when the OVP is reached for one cell. Also this will throw a error in the victron vrm, every time this is reached.

It should not, since the warning is supressed from the driver in this special case. Could be, that the warning comes from another device. In that case you can reduce OVP or increase the setting on the MultiPlus for example.

Thank you for your support. I didn't had the latest version. I updated to latest and will now check again.