dbus-serialbattery
dbus-serialbattery copied to clipboard
Read BMS charge/discharge limits
Read charge/discharge limits from the BMS settings instead of using a hard coded value. This command is not in the LTT protocol document, but the app does set these so it should be possible to read.
Does this also mean the ability to change these?
This is to read the value that is set in the BMS. You can change them in the BMS using the bluetooth software, and then the updated values will pull through. Is that what you mean by changing them?
I was hoping we could somehow set the values via VenusOS. I'm noticing the voltage limit on mine is now set at 13.8v or so, I was running 14v before.
Are you aware if it's possible to run both BT and UART? or split the serial signal and use both BT and UART adapters?
That 13.8V is coming from the driver and not the BMS. That is what this ticket is about, but reading it from the BMS and not the settings in the code. https://github.com/Louisvdw/dbus-serialbattery/wiki/How-to-install#how-to-increase-the-default-limits If you want to change that, you can edit the cell min/max voltage in the utils.py file.
You can't run both BT and UART->USB at the same time. UART works on a single master <--> slave comms concept. If your BMS have RS485, that can have multiple slaves, but then you have more ports that just the UART already. One user did wire in a small transfer switch, so he can switch between BT and the USB-UART connection with the switch. You need a 2 pole Y switch and switch the RX/TX wires.
Ok, thanks.
I have three 230a lithium batteries with three 150a JBD BMSs. I have edited the min/max voltages to 2.5 and 3.65 in utils.py, however, I have not been able to get the batteries to charge up to 14.6. The BMS is set for 3.65. The battery does not seem to want to charge over 13.5volts or 3.375 volts. The smarthsunt shows the battery as only 75% full. There are no current error in the logs.
@coca7 check in your Remote Console -> SerialBattery -> Parameters -> CVL. This should be 3.65V x amount of cells (14.6V in your case). If it is (which I expect it is) then the driver is doing what it should.
Most likely what is happening is that your cells in your battery is not perfectly balanced. The JBD will raise an alert and stop the charging when a cell reach 3.65V on it's default settings and there is always one cell reaching that sooner than the others (even on well balanced cells). That is why for normal opperation I suggest you use 3.45V per cell and not 3.65V.
100% SOC is not on the cell voltage but on the capacity. You don't want the cells to reach 3.65V.
If your battery charge to 13.5V, look at the Min/Max cell voltage graph in VRM. I expect you will see one cell reaching 3.65V while the rest are still at 3.3V. The min and max should be close to each other on a well balanced battery.
What did you set your capacity for the smartshunt? If this is a new battery then you will have to give it a few cycles to balance everything and get the SOC up correct.
@Louisvdw The battery is new, but I’ve had it for a few weeks. All the cells were within .5-1v of each other when I started. I set the capacity on the smartshunt to 690 AH, which is sum of my 3 230AH batteries in parallel. I think you have a point about the individual cells getting full. I did notice that the cells do not all discharge at an equal rate.
Leave your cell voltages on their defaults (3.1V and 3.45V) in utils.py and run them like that for a week or two. You should see that you can reach your battery capacity much easier. After that if you still feel the need to increase the voltages, increment them slowly (0.1V) at a time and cycle the battery. If they do not give issues increase them again.
In Lithium batteries there is very little energy beteen 3.45V and 3.65V that gets stored extra, but hole lots of problems :)
The edges has a logarithmic peak and drop on the edges, but in the middle the voltage stay very constant.
3.65V is the voltage where your BMS wants to protect your cells. As soon as a cell reach that voltage the protection kicks in and the battery will open the FETs to stop any charge coming in. So for a battery this is an abnormal state. A normal state would be to charge to capacity and replate to what it can handle. By telling your battery to charge to 3.65V x 4 you are aiming for this abnormal state which will give you issues on each cycle even if the cells are balanced.
@smagicld can you help here? We need the registers for "max charge current" and "max discharge current". Many thanks.
Hi The JBD FW supports something like max discharge and charge current. but JBD is very cheap made (at least the BMS board's I've tested) - it will not limit the current to max value - it will disable charging / discharging port for certain time (release time set in seconds) whenever the current is over the set limit.
you cen set it here:
@smagicld Many thanks for your response, we would to read this fields over TTL/RS232/UART. Can you help us with the registers we have to read?
BMSconfigParam(
name: "Charge overcurrent",
unitType: "10mA",
valueType: Int(0),
commandCode: BMScommandCode.CHGOC_val,
checkFunctions: [FilterFunction(function: checkIfValueGreaterThan, parameter: 0)],
lastValueReadTimestamp: nil, valueHasBeenModified: false, value: nil, newValue: nil,
exampleRealReadResponse: [0xDD, 0x28, 0x00, 0x02, 0x1B, 0x58, 0xFF, 0x8B, 0x77], // (7000 + 0)
supportedFromVersion: 0
),
BMSconfigParam(
name: "Discharge overcurrent",
unitType: "10mA",
valueType: Int(0),
commandCode: BMScommandCode.DSGOC_val,
checkFunctions: [FilterFunction(function: checkIfValueGreaterThan, parameter: 0)],
lastValueReadTimestamp: nil, valueHasBeenModified: false, value: nil, newValue: nil,
exampleRealReadResponse: [0xDD, 0x29, 0x00, 0x02, 0xE4, 0xA8, 0xFE, 0x72, 0x77], // (negative value. displayed 7000. written: 58536. callculation: 65536 - 7000 = 58536)
supportedFromVersion: 0
),
case CHGOC_val = 0x28
case DSGOC_val = 0x29
@Louisvdw Does it help you ?
It should, yes. Thank you.
Hi All,
Can you have any advise on making JK-BMS to request the Inverter to apply a linear charging scheme like in the image below?
Mine with PYLON CAN bus protocol will always be imposed with a stressful charging scheme like in the image below:
Please advise with thanks!
Best regards,
Ngoc
@paulsteigel I don't see any correlation of your request with this topic. Please open a discussion. Additionally it's not fully understandable what you mean.
@paulsteigel I don't see any correlation of your request with this topic. Please open a discussion. Additionally it's not fully understandable what you mean.
Many thanks Mr. Manuel, Please be sorry for the wrong posting, please delete or remove with thanks. I tried to find a way to ask the inverter (Dye, LuxPower) to apply a linear charging to the battery rather than applying a fixed charging scheme with constant power. If you can, please advice me on this with thanks. Best regards Ngoc
@paulsteigel that is implemented by the Pylontech battery. You cannot change it on your side, they will have to code that as part of the Pylontech CANbus implementation.
@paulsteigel that is implemented by the Pylontech battery. You cannot change it on your side, they will have to code that as part of the Pylontech CANbus implementation.
If you can, please advice me on the routine to inform the Inverter (via PYLON Can bus protocol) to apply a proper charge scheme to the battery. For example (I assume the routine as below): Microcontroller will monitor the SOC when is reach 80%, it will start informing the inverter about new Current limit (x A) instead of the limit set by the BMS (y A)
Please ask your questions in the discussion section
This was implemented for most BMS where the intel was given.