CAN and RS485 BMS Emulated Protocols for DIY Battery to work with LV and HV Invertors - JK BMS JBD Daly 123Smart - OEM Battery

ESP32 - SN65HVD230 - INVERTER
GPIO4 - CRX
GPIO5 - CTX
GND - GND
3.3V - 3.3V

SN65HVD230 - INVERTER
CANH - CAN H
CANL - CAN L

Try invers CANH with CANL

I found some very cheap SN65HVD230 broken from factory
I also think the part is defective. Will try when I get new ones. I will contact you. Thank you.
 
I also think the part is defective. Will try when I get new ones. I will contact you. Thank you.
  • Check the CAN Device configuration. Make sure the baud rate of the CAN communications is the same as all other devices on the CAN bus.
  • Check the CAN bus termination resistance. A CAN bus has to be terminated on both ends with a 120-ohm resistor to prevent reflections from interfering with the data transmissions. In some cases, the termination resistor may be located inside the CAN device.
    • Turn Power off
    • Measure resistance between CAN Hi and CAN Low. Should be around 60 ohms.
  • Check the CAN bus voltages and ground connection.
    • Disconnect all CAN devices from the CAN bus except for the device being tested.
    • Power on the CAN device to be tested.
    • Measure voltage between CAN HI and Ground. The voltage should be between 2.5 and 3.0Vdc.
    • Measure voltage between CAN LOW and Ground. The voltage should be between 2.5 and 2.0Vdc
  • Check / Verify ground connection
    • Turn Power off
    • With the meter on the lowest resistance scale, measure the ground wire to earth ground. The meter should read less than the minimum 0.1 ohm that most meters can read.
  • CAN Transceiver Resistance Test – you can test the CAN port on a device to see if it is damaged by measuring resistance to ground. Damage from lightning or transients typically causes a short to ground on one or both CAN lines.
    • To test, disconnect the device (under test) from the CAN bus.
    • Make sure power is off to the CAN device under test.
    • Measure resistance from CAN HI to Ground and from CAN LOW to Ground. The result should be Mega ohms or open. If it is lower than this range, the CAN transceiver is probably faulty.
 
  • Check the CAN Device configuration. Make sure the baud rate of the CAN communications is the same as all other devices on the CAN bus.
  • Check the CAN bus termination resistance. A CAN bus has to be terminated on both ends with a 120-ohm resistor to prevent reflections from interfering with the data transmissions. In some cases, the termination resistor may be located inside the CAN device.
    • Turn Power off
    • Measure resistance between CAN Hi and CAN Low. Should be around 60 ohms.
  • Check the CAN bus voltages and ground connection.
    • Disconnect all CAN devices from the CAN bus except for the device being tested.
    • Power on the CAN device to be tested.
    • Measure voltage between CAN HI and Ground. The voltage should be between 2.5 and 3.0Vdc.
    • Measure voltage between CAN LOW and Ground. The voltage should be between 2.5 and 2.0Vdc
  • Check / Verify ground connection
    • Turn Power off
    • With the meter on the lowest resistance scale, measure the ground wire to earth ground. The meter should read less than the minimum 0.1 ohm that most meters can read.
  • CAN Transceiver Resistance Test – you can test the CAN port on a device to see if it is damaged by measuring resistance to ground. Damage from lightning or transients typically causes a short to ground on one or both CAN lines.
    • To test, disconnect the device (under test) from the CAN bus.
    • Make sure power is off to the CAN device under test.
    • Measure resistance from CAN HI to Ground and from CAN LOW to Ground. The result should be Mega ohms or open. If it is lower than this range, the CAN transceiver is probably faulty.
Thank you for the information. Today I ordered new sn65hvd230. Should come by Wednesday.
 
Thanks for all the information. I have plans to use 96 prismatic 50ah cells or more in series and that will ramp up the voltage over 300v. If I understood right as the jk BMS can handle maximum 24 cells in series so I will need four slave BMS and one master that's connected to the CAN itnterface?

My application is going to be used with a Sungrow Sh10rt inverter.
 
Last edited:
Thanks for all the information. I have plans to use 96 prismatic 50ah cells or more in series and that will ramp up the voltage over 300v. If I understood right as the jk BMS can handle maximum 24 cells in series so I will need four slave BMS and one master that's connected to the CAN itnterface?

My application is going to be used with a Sungrow Sh10rt inverter.

In ur case u need to use 1 jkbms and the rest jk balancer with can port communication

figure7.jpg

If u dont connect like that the cells will not be all balanced at same value, and bms will stop with cell inbalance error
 
Last edited:
Hi @mrconstantin84 - great work for putting all this information together. I noticed that you did not list the CAN protocol for the "BYD Battery-Box Premium LVS". As I could not find any official documentation on this either, I decoded and documented the data and flow of the CAN protocol in conjunction with a Venus OS. If interested, here is a link to the documentation.
Here are the block charge / discharge parameters from reg 0x372
 

Attachments

  • 20230829_122143.jpg
    20230829_122143.jpg
    4.8 MB · Views: 27
Thank you for the information. Today I ordered new sn65hvd230. Should come by Wednesday.
I add on Info page the last MSG received from invertor for easy debug the connection

If u dont receive any CAN MSG that mean is a hardware problem in ur setup.
If u receive msg there and invertor tell CAN comm error that means the protocol is not ok.

canmsg inverter.jpg
 
Last edited:
In ur case u need to use 1 jkbms and the rest jk balancer with can port communication

View attachment 30521

If u dont connect like that the cells will not be all balanced at same value, and bms will stop with cell inbalance error
If I understand it correctly, serial connection of BMS and/or balancers (for HV batteries) will decrease a number of cell inputs by one per each added BMS.

According to the picture, the battery cell B24 is balanced by Balancer 1 and also Balancer 2.

As a result of this, for battery cell B48 there won’t be free balancing input on the Balancer 2 and must be assured by Balancer 3.

The total number of balanced cells with several balancers is:

No. of cells = (24 x N) - N + 1 ; where N is a number of balancers.

So, for 96 cell battery five balancers (24S) would be needed.



Am I right?
 
Last edited:
Hi ,
Congratulations for this project and Thankyou for sharing . I would like to try and implement your solution with my Solax x3 HV inverter.

The solution you provided , with the jk balancers and one jk Bms is most suitable in my case as far as I see.
Can you please elaborate a bit how it all comes connected . The jk Bms will be cascade connected with the balancers or just talk Can bus with the balancers and the inverter ?
I’m starting to build your device, what program do you use for the firmware upload?
Thanks
 
If I understand it correctly, serial connection of BMS and/or balancers (for HV batteries) will decrease a number of cell inputs by one per each added BMS.

According to the picture, the battery cell B24 is balanced by Balancer 1 and also Balancer 2.

As a result of this, for battery cell B48 there won’t be free balancing input on the Balancer 2 and must be assured by Balancer 3.

The total number of balanced cells with several balancers is:

No. of cells = (24 x N) - N + 1 ; where N is a number of balancers.

So, for 96 cell battery five balancers (24S) would be needed.



Am I right?
U can not use jkbms in series, because jk bms can work with max 24 cells and u can not cascade it. For that reason each 24 cell will be equalized like an independent module battery foe example firt 24 will have 3.7 avg cell value and the next 24 can have 3.5 cell avg value.

U need to use jk Active Balancer, that one like i send u in pics can be cascade, first one will have 24 cell next will have max only 23 cells, because the first cell is used to equalize with the last cell from the previous jk balancer, in this model all the cells will be balanced at same value.

Communication:

Because u put the pack on series u dont have the NEGATIVE port common for all the battery like in Parallel mode so u cant use uart port to read it so u need can function to read data from balancers.

In conclusion u can make ur pack using only jk balancer + 1 contactor if u want to disconnect the pack in case o emergency or use 1 jkbms and the rest jk balancer.

for 96 cell u will need 1 jkbms and 4 jk active balancers with can port!.
 
Hi ,
Congratulations for this project and Thankyou for sharing . I would like to try and implement your solution with my Solax x3 HV inverter.

The solution you provided , with the jk balancers and one jk Bms is most suitable in my case as far as I see.
Can you please elaborate a bit how it all comes connected . The jk Bms will be cascade connected with the balancers or just talk Can bus with the balancers and the inverter ?
I’m starting to build your device, what program do you use for the firmware upload?
Thanks

The interface will communicate with balancers thru can port, and with the jkbms thru uart , and the interface will send data to inverter
i describe the connection in previous message
 
A good thing would be to include Mqtt so that you can also get the values from JK eg. could use in iobroker. The parts came today. Will test it at the weekend.
 
A good thing would be to include Mqtt so that you can also get the values from JK eg. could use in iobroker. The parts came today. Will test it at the weekend.
the mqqt will be aviable soon, u can test small amount of data if u want now in 4.3

Do u manage to make the can connection?
 
the mqqt will be aviable soon, u can test small amount of data if u want now in 4.3

Do u manage to make the can connection?
Hi. I've just finished. With new Can module it works properly. I can. test soon. My wife is driving me crazy right now. greeting
 
Hi. I've just finished. With new Can module it works properly. I can. test soon. My wife is driving me crazy right now. greeting
after u make the test pls add some pics with the display of the inverter, what data do u receive and what protocol u use.

best regards
 
Hi

I just asemblied a esp32 with dc-dc, rs485 and can module as described in first post. I get wrong app key in BMS page and no data from jkbms. Cannot connect to Bluetooth or serial jkbms.

Perhaps I connected tx/rx the wrong way? But this should not affect bt connection?

I see other have problem with app key also.

My chip id is: 99c3dc24
 
Last edited:
Hi

I just asemblied a esp32 with dc-dc, rs485 and can module as described in first post. I get wrong app key in BMS page and no data from jkbms. Cannot connect to Bluetooth or serial jkbms.

Perhaps I connected tx/rx the wrong way? But this should not affect bt connection?

I see other have problem with app key also.

My chip id is: 99c3dc24
App Key for u is:

a0b570e8ab1f42992c612585fa2fa8da

Install 4.2 , and select RS485 CAN interface

If u want to take data from rs485 u need also rs485 adaptor on jk, second option is to connect direct the serial2 to jk without any RS485 adaptor.
 
App Key for u is:

a0b570e8ab1f42992c612585fa2fa8da

Install 4.2 , and select RS485 CAN interface

If u want to take data from rs485 u need also rs485 adaptor on jk, second option is to connect direct the serial2 to jk without any RS485 adaptor.
Thanks.

Do I need the jk rs485 adapter? Or just the one you recommend?
 
Thanks.

Do I need the jk rs485 adapter? Or just the one you recommend?
This is the communication diagram

JKBMS < -> UART to RS485(ik adaptor) <======> RS485 to UART (max485) <- >interface

As u see u have JK RS485 adaptor on the bms side , and on interface side u have an other Max485 to convert back to UART , that why u can connect directly without any adaptor

JKBMS UART<======> UART interface

and for Deye use CAN
 
This is the communication diagram

JKBMS < -> UART to RS485(ik adaptor) <======> RS485 to UART (max485) <- >interface

As u see u have JK RS485 adaptor on the bms side , and on interface side u have an other Max485 to convert back to UART , that why u can connect directly without any adaptor

JKBMS UART<======> UART interface

and for Deye use CAN
Ok.

So I it is like this. Jkbms -> jk rs485 -> esp32 to connect to your device ?

Why can’t I connect to bt then?
 
Back
Top