Louisvdw / dbus-serialbattery

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

MAX_VOLTAGE_TIME_SEC Ignored #858

Closed majic79 closed 1 year ago

majic79 commented 1 year ago

Describe the problem

In my config.ini I've set MAX_VOLTAGE_TIME_SEC to 7200 (2 hours) - this is to allow time at max voltage for the balancer to work. As the curves are not uniform, top balancing (balancing while at max charge voltage) between cells is recommended.

After setting the value and observing a charge cycle, I notice that the Max Charge voltage level drops after a few minutes (significantly less than the 2 hour target, and less than the 15 minute default)

Charge Curve w VMax

Driver version

v1.0.20230531

Venus OS device type

Raspberry Pi

Venus OS version

v3.11

BMS type

JKBMS / Heltec BMS

Cell count

16

Connection type

Serial USB adapter to RS485

Config file

[DEFAULT]

BMS_TYPE = Jkbms
BATTERY_CAPACITY = 230

MAX_BATTERY_CHARGE_CURRENT = 115.0
MAX_BATTERY_DISCHARGE_CURRENT = 115.0
MAX_VOLTAGE_TIME_SEC = 7200
LINEAR_LIMITATION_ENABLE = True
CCCM_CV_ENABLE = True
DCCM_CV_ENABLE = True
CCCM_T_ENABLE = True
DCCM_T_ENABLE = True
CCCM_SOC_ENABLE = False
DCCM_SOC_ENABLE = False

CELL_VOLTAGES_WHILE_CHARGING   = 3.65, 3.60, 3.55, 3.40
MAX_CHARGE_CURRENT_CV_FRACTION = 0.02, 0.50, 1.00, 1.00
CELL_VOLTAGES_WHILE_DISCHARGING   = 2.60, 2.70, 2.80, 3.0
MAX_DISCHARGE_CURRENT_CV_FRACTION =    0,  0.1,  0.5,   1
CVCM_ENABLE = True

MIN_CELL_VOLTAGE   = 2.750
MAX_CELL_VOLTAGE   = 3.550
FLOAT_CELL_VOLTAGE = 3.450

TEMPERATURE_LIMITS_WHILE_CHARGING = 0,  10, 40, 55
MAX_CHARGE_CURRENT_T_FRACTION     = 0,   1,  1,  0

TEMPERATURE_LIMITS_WHILE_DISCHARGING = -20,    0,   10, 20, 45, 55
MAX_DISCHARGE_CURRENT_T_FRACTION     =   0, 0.95, 0.97,  1,  1,  0

Relevant log output

2023-11-08 16:33:27.164196500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-08 16:33:27.164789500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-11-08 16:33:27.165080500 INFO:SerialBattery:Testing Jkbms
2023-11-08 16:33:27.299013500 INFO:SerialBattery:Connection established to Jkbms
2023-11-08 16:33:27.299398500 INFO:SerialBattery:Battery Jkbms connected to dbus from /dev/ttyACM0
2023-11-08 16:33:27.299812500 INFO:SerialBattery:========== Settings ==========
2023-11-08 16:33:27.300252500 INFO:SerialBattery:> Connection voltage: 52.41V | Current: 0.85A | SoC: 49%
2023-11-08 16:33:27.300533500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 0
2023-11-08 16:33:27.300892500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-11-08 16:33:27.301193500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 115.0A | MAX BATTERY DISCHARGE CURRENT: 115.0A
2023-11-08 16:33:27.301458500 INFO:SerialBattery:> CVCM:     True
2023-11-08 16:33:27.301742500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.75V | MAX CELL VOLTAGE: 3.55V
2023-11-08 16:33:27.302006500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2023-11-08 16:33:27.302271500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2023-11-08 16:33:27.302541500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2023-11-08 16:33:27.302799500 INFO:SerialBattery:Serial Number/Unique Identifier: JK_B2A20S20P
2023-11-08 16:33:27.327197500 INFO:SerialBattery:DeviceInstance = 1
2023-11-08 16:33:27.327721500 INFO:SerialBattery:com.victronenergy.battery.ttyACM0
2023-11-08 16:33:27.343522500 INFO:SerialBattery:publish config values = 1

Any other information that may be helpful

No response

mr-manuel commented 1 year ago

In the version you are using this is not enabled for linear mode. This since that release.

To fix it you have two possibilities:

  1. Install the nightly from the dev branch
  2. Uncomment line 243 and comment line 254. This is already changed in the nightly since a few months.

    https://github.com/Louisvdw/dbus-serialbattery/blob/368174813bbdbc091f644f9e8fa401e8fd4cfe9f/etc/dbus-serialbattery/battery.py#L243-L245