diy solar

diy solar

CAN and RS485 BMS Interface with multiple emulated Inverter protocols for JkBms Jbd BMS Daly 123Smart

mrconstantin

New Member
Joined
Jul 10, 2023
Messages
102
Location
Romania
Hi,

I will present my DIY CAN BMS emulator project , I work from some time to make this interface for integration of DIY battery with different brands of invertors with supported CAN or RS485 communication.

Interface use an esp32 with one or tow CAN ports and RS485 support, can handle multiple JK as inputs for data, and also cand handle LV or HV.

I use in this project all the data i can find online, i know am not the first on this road if u have documents of other BMS protocols u can share it with me.

If u want u can support my work to add more protocols to this project and buy the hardware components kit from my ebay or fallow on Patreon!

Hardware:

Esp32 DevKit 1
CAN : SN65HVD230
RS485: Max485
DC-DC: XL7015
RJ45 Breakout
Optional: Indicator LEDs

IMG-20230409-WA0004.jpg

20230606_114051.jpg
Connectivity:

WIFI Web Portal with Cell Info Data on local IP

Screenshot_20230606_092124_Samsung Internet.jpg
Screenshot_20230606_092200_Samsung Internet.jpg


Input BMS supported:

Screenshot_20230606_092310_Samsung Internet.jpg
JK BMS - TTL, BT , CAN
JBD BMS - BT connection
Daly - work in progress


Protocol Emulated:
Screenshot_20230606_092255_Samsung Internet.jpg
General BMS LV
Document V1.4 - 07.09.2020
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

Pylonthech LV
Document V1.2 - 08.04.2018
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

Seplos LV
Document V1.0 - 08.04.2018
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

LG Resu LV
Document
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

Growatt LV
Document V1.04 22,02,2019
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Big Endian

SMA LV
Document V1.0 - 07.09.2020
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

Li LV
Document V1.0 06.01.2020
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian


Victron Nemea200
Document V1.0 06.01.2020
CAN: 250Kbps
Transmission Cycle: 1s
Data Mode: Little Endian


Pylon HV
Document V1.18 30.05.2019
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian


GoodWee HV
Document V1.3 31.03.2021
CAN: 250Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

BYD HV
Document
CAN: 500Kbps
Transmission Cycle: 1s
Data Mode: Little Endian

Pylontec RS485
Document V2.0 15.10.2019
RS485: 9600bps MODUBUS ASCII
Transmission Cycle: 0.5s Timeout
Data Mode: Little Endian

Seplos RS485
Document V3.3 21.08.2018
RS485: 9600bps MODUBUS ASCII
Transmission Cycle: 0.5s Timeout
Inverter Replay:
Data Mode: Little Endian

Growatt RS485
Document V2.02 24.07.2019
RS485: 9600bps MODUBUS ASCII
Transmission Cycle: 0.5s Timeout
Data Mode: Little Endian

BYD RS485
Document
RS485: 9600bps MODUBUS RTU
Transmission Cycle: 1s Timeout
Data Mode: Little Endian

Inverter Tested LV

Victron: Gx Family - General LV have the most information displayed, this is an combination of more registry i find.
Growatt SPF 5000 ES - Pylon LV, Seplos LV, Li LV
Growatt SPH 5000 TL - Pylon Lv, Seplos LV, Li LV, Growatt LV
Solis S5-EH1P6k - Semplos LV, LI LV
Deye SUN12K-SG04 - Pylon LV, LI LV

Inverter Tested HV

Fronius Primo 6.0 Gen24 - BYD HV
SunGrow SH10RT - BYD HV
GoodWE GW10K - GoodWee HV, Pylon HV
ThinkPower S100TL - Pylon HV


MultiPack:

If u have 2 packs with 2 JkBms u can combine data by connected 1 to Serial Port and one on BT Port
If u have more then 2 u need to use more interfaces. The Rs485 will be use to communicate between interfaces and Master CAN port will rapport to bms.


Know Issue:

1 - When u use BT connection u can not connect with the phone app to the JkBMS.
U need to stop the interface power and after connect and make settings with ur phone app.

2 - Pylontech LV - if u use this protocol some inverter limit max charge voltage under 54V for 15S LFP battery.
Use Seplos LV or LI LV protocol is same as pylon with few data changed.

3 - From RS485 Protocols i tested only Fronius Gen24, The Pylon RS485 LV and Semplos RS485 LV are write from documentation for PC App -> Battery communication protocol.

Warranties:

The project is under develop NO WARRANTIES are provided ! USE on ur own RISK!

Software:

In this moment GitHub Repo under construction!

Download & Install:

U can download the bin file from my Google Drive Link and write it on ESP32.
For first install u need to be done with cable an pc, after that u can update the firmware OTA.
i will provide new update as soon i can!

JkBMSCan - Google Drive


drive.google.com

Support my Work:

If u like this project and want to support my work to add more protocols u can invest ur time and also if u can spare some $ will be great too!

Invest Time:

Test the interface on ur inverter and confirm what protocols are compatible to increase invertor compatibility list.
Provide documentation or data communication logs from ur Inverter and OEM battery for reverse engineering new protocols.
Share data if u all ready make some progress on reverse engineering new protocols.

Invest $:

Donate by PayPal and U will receive tech support for ur project : paypal.me/diyenergy
Fallow on Patreon for last updates.
Buy components kit from my ebay for ur projects.

Documentation:

I share my protocols documentation folder if u want to make ur own software.
if u have any other document of interest share it also with me.

JkBMSCan - Google Drive


drive.google.com

Other Projects :

WifiManager https://github.com/tzapu/WiFiManager
TeslaBMS https://github.com/collin80/TeslaBMS
JKEnuPylon https://github.com/botaneta/JKbms_Emu_Pylon
JKBmsToPylonCAN https://github.com/ArminJo/JK-BMSToPylontechCAN
VictronLibCan https://github.com/jmibk/BMS-LIB-CAN-Victron


Implementation of this interface on battery:

LV 14S 180A Li from Kona with JKBms 150A and Can interface

20230331_171422.jpg

HV 23S / module 60A from Kona with JK Activ Balancer and Can interface

20230619_150955.jpg

JK - Victron

IMG-20230629-WA0018.jpg

JK - Growatt

IMG-20230711-WA0000.jpg

JK - Sungrow

ONLY 10 Pics for post SORRY!

IF U WANT TECH SUPPORT JUST WRITE TO ME, OR WHATUP!
 
Last edited:
Hello,

i'm looking for the answer and can't find it.


I've bought JK BMS and got confused, and nobody can answer me. When buying i have chosen CANBUS version, because in the manual i found this line:

"3.All models can support the following interfaces and functions:RS485 interface/CANbus interface/Heating interface,The price of each function is increased by 3.5USD on the basis of the above."

I understood that ALL BMS have RS485, but if i add extra 3,5USD, i will get RS485 + CANBUS. So i added extra 3,5USD.

But now i got confused, do i really have as well RS485?

So my question if i bought CANBUS, is it still possible to use RS485 if needed? Ir my BMS does not have RS485 anymore and ONLY have CANBUS?

Thank you.
 
Hi MrConstantin,
do you just read parameters from the JK BMSes or can also operate the switches or modify parameters?
 
Hi, very nice project, I would love to be a tester as well. DO you have a link to your project for the community ?

thx , Daniel
 
Nice to know your work.
In my case I have a Goodwe EM5048 with DIY battery and DALY BMS.

So far there is no communication between them.


The bad part of this is that when Goodwe thinks the battery reaches 100%, it stops charging, even though it really is at a different SOC in DALY.

Do you think it would be feasible to emulate a fictional SOC of 60%? so that it does not limit upload or download?
Thanks
 
In LV case you can go for Seplos or JBD BMS with CAN, that is better.
 
Nice work.
How about multiple JBD bms ?
U can connect one interface with 2 jk. First take data from Serial and for second BT, combine the soc and other parameters and send it to invertor.
If u have more then 2 jk u need to use more interfaces. For example if ur inverter support CAN u can use the RS485 for multiple interface communication.
for JBD i tested o BT connections, and is same ideea
 
Last edited:
Hello,

i'm looking for the answer and can't find it.


I've bought JK BMS and got confused, and nobody can answer me. When buying i have chosen CANBUS version, because in the manual i found this line:

"3.All models can support the following interfaces and functions:RS485 interface/CANbus interface/Heating interface,The price of each function is increased by 3.5USD on the basis of the above."

I understood that ALL BMS have RS485, but if i add extra 3,5USD, i will get RS485 + CANBUS. So i added extra 3,5USD.

But now i got confused, do i really have as well RS485?

So my question if i bought CANBUS, is it still possible to use RS485 if needed? Ir my BMS does not have RS485 anymore and ONLY have CANBUS?

Thank you.
JK dont have an embedded RS485, u will use an adaptor, the signal is take it from TTL port with the adaptor. so all jk support rs485
 

Attachments

  • IMG_4143.jpeg
    IMG_4143.jpeg
    150.4 KB · Views: 38
  • IMG_4144.jpeg
    IMG_4144.jpeg
    160.7 KB · Views: 40
purchase link?
is free, install and give me the chipid, and i give u key,
if u want to donate is ur free options.
if u want to teste on different invertor jest tell me and send to me some photo after if all is ok for ur system

if ur inverter is not supported just write to me and if i have time i can make some custom registry for u if u want to test the interface.
Also if u have a can sniff dump from different battery or other can protocol just share the information to make bigger protocol database.

The only payment will be to use some mqqt platform if u want to see all data in cloud, is the platform fees not my!

Best regards
 
Last edited:
This is the simple way to build it DIY , only with CAN port because most of invertors support CAN protocols!

BOM:
Proto PCB 5x7cm
Esp32 DevKit 1
CAN : SN65HVD230
DC-DC: XL7015
RJ45 Breakout with leds
2 x 220R or 330R resistors
1 4 Pin JST 1mm pitch cable


In my Google Drive find Stl file for 3d Printing

The SN65HVD230 is under the ESP board!

20230801_182451.jpg

Few Soldering
20230801_182457.jpg

3d Printed Case
20230801_182522.jpg

Final assembly
20230606_114051.jpg


JK - Sungrow HV

20230706_121951.jpg20230706_121956.jpg
 
Yes Chip ID, this is ur key, just put it and confirm it is work!

f43fbd689705fa8d81719a8cf43e4e44

also can u tell me what is ur invertor and the hardware configuration?
Thx the key works.
all fine with the connection.
IMG_4146.jpegIMG_4147.png
have three wishes:
- display also the cell resistance at the web ui, possible to get over BT.
- let’s change this parameters
CANParameters
Charge Voltage28.00 V
Charge Current55.00 Ah
Discharge Current50.00 Ah
Discharge Voltage21.60 V
- lest send all infos over MQTT

itˋs a lot but the it´s perfect ???

this are my fast build
IMG_4149.jpegIMG_4148.jpeg
 
Last edited:
Thx the key works.
all fine with the connection.
View attachment 160566View attachment 160573
have three wishes:
- display also the cell resistance at the web ui, possible to get over BT.
- let’s change this parameters
CANParameters
Charge Voltage28.00 V
Charge Current55.00 Ah
Discharge Current50.00 Ah
Discharge Voltage21.60 V
- lest send all infos over MQTT

itˋs a lot but the it´s perfect ???

this are my fast build
View attachment 160574View attachment 160575
The value ar not a fix value to be inserted manual. They are calculated by ur jkbms settings.

Charge Voltage is calculated OVPR * No Cells
Charge Current is Charge Current from settings
Discharge Volatge is UVPR * No Cells
Discharge Current is Discarge Current from settings

Limits activated per cel value:

Charge Current is limited from OVPR -> OVP 100%-0%
Discharge Current is limited from UVPR -> UVP 100%-0%

Same on temps


What is ur inverter?
Can verify the data received by inverter from the CAN?
 
Last edited:
Nice to know your work.
In my case I have a Goodwe EM5048 with DIY battery and DALY BMS.

So far there is no communication between them.


The bad part of this is that when Goodwe thinks the battery reaches 100%, it stops charging, even though it really is at a different SOC in DALY.

Do you think it would be feasible to emulate a fictional SOC of 60%? so that it does not limit upload or download?
Thanks
Can u give me the daily model of bms? i can take the data from daly if u need to send it to Goodwee
 
For Hv Systems series i use Jk Active Balancer with can port, and for that i need 2 can ports one for jk on 250kbps and other for inverter with 500kbps, in this version i use a second can port on i2c

mcp2551-mcp2515-seri-can-bus-modulu-en-arduino-modules-seeedstudio-32440-11-B.jpg

U can try also on SPI, but the MCP2515 will not work with 3.3V, but u can use MCP2517

Also if u want to use it with HV u need to change the XL705 step down with :

DC-9V-12V-24V-36V-48V-72V-84V-120V-to-5V-3A-Step-Down-Module-Power.jpg

If someone make this setup for HV invertor, contact me for more details.
 

diy solar

diy solar
Back
Top