Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
541 stars 165 forks source link

JK BMS BLE vs CAN/RS485 max/min voltage calculation #1121

Closed piomark closed 2 months ago

piomark commented 2 months ago

Describe the bug

Hi,

I was wondering why my JKBMS batt was reporting MaxChargeVoltage of 54V although I've configured 52,4V (15x3,493).

I've started to investigate the driver itself and what I found is that Ble version calculates the value based on JK BMS settings:

        self.max_battery_voltage = st["cell_ovp"] * self.cell_count
        self.min_battery_voltage = st["cell_uvp"] * self.cell_count

whereas all other JK BMS drivers use config values:

        self.max_battery_voltage = utils.MAX_CELL_VOLTAGE * self.cell_count
        self.min_battery_voltage = utils.MIN_CELL_VOLTAGE * self.cell_count

was there any reason why it was configured differently? Also charging to OVP voltage is not really good idea imho.

Thanks,

How to reproduce

OOTB BLE JKBMS connection

Expected behavior

Settings should be iso in between different drivers

Driver version

1.3.20240705

Venus OS device type

Cerbo GX

Venus OS version

3.41

BMS type

JKBMS / Heltec BMS

Cell count

15

Battery count

1

Connection type

Bluetooth

Config file

[DEFAULT]

; If you want to add custom values/settings, then check the values/settings you want to change in "config.default.ini"
; and insert them below to persist future driver updates.

; Example (remove the semicolon ";" to uncomment and activate the value/setting):
MAX_BATTERY_CHARGE_CURRENT = 150.0
MAX_BATTERY_DISCHARGE_CURRENT = 200.0

BLUETOOTH_BMS = Jkbms_Ble C8:47:80:11:C0:96

PUBLISH_CONFIG_VALUES = True

;CAN_PORT = can0

MIN_CELL_VOLTAGE   = 2.900
; Max voltage (can seen as absorption voltage)
MAX_CELL_VOLTAGE   = 3.493
; Float voltage (can be seen as resting voltage)
FLOAT_CELL_VOLTAGE = 3.35

;LINEAR_LIMITATION_ENABLE = True

Relevant log output

@4000000066d5b4ab08f4f60c INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478011c096
@4000000066d5b4ab09008314 INFO:SerialBattery:========== Settings ==========
@4000000066d5b4ab090b9aec INFO:SerialBattery:> Connection voltage: 49.74 V | Current: 4.5 A | SoC: 48%
@4000000066d5b4ab0914f95c INFO:SerialBattery:> Cell count: 15 | Cells populated: 30
@4000000066d5b4ab091f8c64 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
@4000000066d5b4ab092a69a4 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.900 V | MAX CELL VOLTAGE: 3.493 V| FLOAT CELL VOLTAGE: 3.350 V
@4000000066d5b4ab093425d4 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 150.0 A | MAX BATTERY DISCHARGE CURRENT: 200.0 A
@4000000066d5b4ab093e4b7c INFO:SerialBattery:> CVCM:     True
@4000000066d5b4ab095f7b94 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
@4000000066d5b4ab096b0c84 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
@4000000066d5b4ab097edebc INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
@4000000066d5b4ab098b2f14 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True

Any other information that may be helpful

No response

mr-manuel commented 2 months ago

Please read the instructions when opening a new issue. Here again:

🚨 IMPORTANT 🚨

Duplicate of https://github.com/Louisvdw/dbus-serialbattery/issues/1094 and already fixed.