Louisvdw / dbus-serialbattery

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

Max Charge Current not working #1096

Closed wetty closed 4 months ago

wetty commented 4 months ago

Describe the bug

I have to JKBMS with 18S Batteries. Charge Current is limited via the cell voltage.

CELL_VOLTAGES_WHILE_CHARGING = 3.48, 3.45, 3.42, 3.40 MAX_CHARGE_CURRENT_CV_FRACTION = 0, 0.1, 0.4, 1

Bildschirmfoto 2024-07-10 um 16 18 28 Bildschirmfoto 2024-07-10 um 16 18 42 Bildschirmfoto 2024-07-10 um 16 19 37

How to reproduce

Limit the Charge current by cell Voltage

Expected behavior

The charge current should be reduced to the Value according to the settings

Driver version

v1.2.20240408

Venus OS device type

Raspberry Pi 3

Venus OS version

v3.40 - 36

BMS type

JKBMS / Heltec BMS

Cell count

18

Battery count

2

Connection type

Serial USB adapter to RS485

Config file

CELL_VOLTAGES_WHILE_CHARGING   = 3.48, 3.45, 3.42, 3.40
MAX_CHARGE_CURRENT_CV_FRACTION =    0, 0.1,  0.4,    1

Relevant log output

2024-07-09 18:22:08.862771500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:09.865963500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:10.764065500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:11.862241500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:12.863924500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:13.765874500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:14.868511500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:15.865916500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:16.867346500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:17.873887500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:18.873845500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:19.875845500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:20.877497500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:21.879958500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:22.779765500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:23.779872500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:24.781998500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:25.782041500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:26.885761500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:27.786063500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:28.889368500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:29.789970500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:30.791683500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:31.893472500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:32.894010500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:33.895916500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:34.798003500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:35.901208500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:36.901691500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:37.899519500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:38.800620500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:39.904103500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:40.904233500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:41.805021500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:42.909211500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:43.909443500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:44.909533500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:45.912337500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:46.814363500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:47.914351500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:48.811809500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:49.813121500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:50.914933500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:51.814897500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:52.923328500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:53.920764500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:54.923681500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:55.919975500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:56.924051500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:57.822448500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:58.823815500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:22:59.924311500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:23:00.927449500 INFO:SerialBattery:SOC set to 100%
2024-07-09 18:23:01.930372500 INFO:SerialBattery:SOC set to 100%
2024-07-10 06:20:03.849691500 *** CCGX booted (0) ***
2024-07-10 06:20:15.037644500 INFO:SerialBattery:
2024-07-10 06:20:15.038049500 INFO:SerialBattery:Starting dbus-serialbattery
2024-07-10 06:20:15.039542500 INFO:SerialBattery:Venus OS v3.40~36
2024-07-10 06:20:15.043788500 INFO:SerialBattery:dbus-serialbattery v1.2.20240408
2024-07-10 06:20:33.546493500 INFO:SerialBattery:
2024-07-10 06:20:33.547319500 INFO:SerialBattery:Starting dbus-serialbattery
2024-07-10 06:20:33.549069500 INFO:SerialBattery:Venus OS v3.40~36
2024-07-10 06:20:33.549798500 INFO:SerialBattery:dbus-serialbattery v1.2.20240408
2024-07-10 06:20:49.561966500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-07-10 06:20:49.561975500 INFO:SerialBattery:Testing Jkbms
2024-07-10 06:21:05.587698500 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:105/44293]
2024-07-10 06:21:06.090499500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-07-10 06:21:06.090971500 INFO:SerialBattery:Testing Jkbms
2024-07-10 06:21:06.236963500 INFO:SerialBattery:Connection established to Jkbms
2024-07-10 06:21:06.688493500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-07-10 06:21:06.971420500 INFO:SerialBattery:DeviceInstance = 2
2024-07-10 06:21:06.972775500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-07-10 06:21:06.973223500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-07-10 06:21:06.973812500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
2024-07-10 06:21:07.003361500 INFO:SerialBattery:publish config values = True
2024-07-10 06:21:07.030171500 INFO:SerialBattery:Battery Jkbms connected to dbus from /dev/ttyUSB0
2024-07-10 06:21:07.031296500 INFO:SerialBattery:========== Settings ==========
2024-07-10 06:21:07.031846500 INFO:SerialBattery:> Connection voltage: 59.33V | Current: -1.25A | SoC: 60.57%
2024-07-10 06:21:07.032319500 INFO:SerialBattery:> Cell count: 18 | Cells populated: 18
2024-07-10 06:21:07.032776500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-07-10 06:21:07.033266500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.99V | MAX CELL VOLTAGE: 3.45V
2024-07-10 06:21:07.033730500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 60.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2024-07-10 06:21:07.034193500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0A | MAX BATTERY DISCHARGE CURRENT: 120.0A (read from BMS)
2024-07-10 06:21:07.034647500 INFO:SerialBattery:> CVCM:     True
2024-07-10 06:21:07.036111500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-07-10 06:21:07.036744500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-07-10 06:21:07.037328500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-07-10 06:21:07.037807500 INFO:SerialBattery:Serial Number/Unique Identifier: JK_B2A24S15P
2024-07-10 06:21:08.180527500 INFO:SerialBattery:SOC initialized from dbus and set to 60.57%
2024-07-10 06:21:09.396400500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:10.442058500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:11.395038500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:12.393789500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:13.388771500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:14.391952500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:15.442775500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:16.409030500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:24.410976500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:25.433100500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-07-10 06:21:26.421007500 ERROR:SerialBattery:>>> ERROR: No reply - returning

Any other information that may be helpful

No response

mr-manuel commented 4 months ago

Please read the documentation: 🚨 NB! Before you begin 🚨

wetty commented 4 months ago

Sorry, but i currently dont see the point. Can you give me a hint? I use Battery Aggregator as Battery Monitor.

Or should i switch back to dbus-aggregate-batteries from Dr. Gigavolt?

mr-manuel commented 4 months ago

If you are using a battery aggregator and selected it under DVCC, as per documentation, then the aggregator has to limit the CCL which is combined from the batteries. Check the parameter settings of the aggregator.

wetty commented 4 months ago

It seems that the battery aggregator adds the two CCL of the batteries. If one is 7A and the other 13A, then the resulting is 20A. Might make more sense when in this case the lowest value is used. I have to double check that. Or maybe change some parameter for the aggregator :-)