diy solar

diy solar

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

Hello! Can the RS485 signal be sent to for example Solar Assistant as well or is just only for comms between BMS-s? If yes, would the wiring be the same as on the first page and on the Google Drive pictures?

the connection between jkbms and interface is uart u dont need to use rs485 port.
if u have a device to take data from jk to Solar assistant conected on jk bms u can connect this on BT.

the mqqt service will be available so u can send data interface directly.

u can make the small interface only with can port. What is ur inverter?
 
hello i will use JK bms with 1A active balancer and 150A continious discharge to use with Growatt SPF5000-ES. so one question about the protocol to set on the Growatt there is 1 to 50 i thing for Rs485 and 51 to 99 so which one should us use?
 
hello i will use JK bms with 1A active balancer and 150A continious discharge to use with Growatt SPF5000-ES. so one question about the protocol to set on the Growatt there is 1 to 50 i thing for Rs485 and 51 to 99 so which one should us use?
Use can Connection and Protocol 52
 
the connection between jkbms and interface is uart u dont need to use rs485 port.
if u have a device to take data from jk to Solar assistant conected on jk bms u can connect this on BT.

the mqqt service will be available so u can send data interface directly.

u can make the small interface only with can port. What is ur inverter?
Hey, can you send me the app key, my chip id is 2432a7b0.
I have a Deye SUN-12K-SG04LP3 with 2 JK BMS B1A20S15P I'm trying to connect with UART and BT. Which BT protocol should I choose for my BMSs?
 
Last edited:
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

View attachment 156678

View attachment 156679
Connectivity:

WIFI Web Portal with Cell Info Data on local IP

View attachment 156673
View attachment 156676


Input BMS supported:

View attachment 156674
JK BMS - TTL, BT , CAN
JBD BMS - BT connection
Daly - work in progress


Protocol Emulated:
View attachment 156675
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!
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

View attachment 160382

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

View attachment 160383

JK - Victron

View attachment 160384

JK - Growatt

View attachment 160385

JK - Sungrow

ONLY 10 Pics for post SORRY!

IF U WANT TECH SUPPORT JUST WRITE TO ME, OR WHATUP!
How to write the bin file on the esp32? I see on the drive there is three or four file.
Can you make some detail on the flash download tool please?
 
How to write the bin file on the esp32? I see on the drive there is three or four file.
Can you make some detail on the flash download tool please?
need to use uart 2 pins for serial connection

If u want to flesh only the bin file
flash1.jpg

if u want with boot and partition table

Serial Settings2.jpg
 
Hey, can you send me the app key, my chip id is 2432a7b0.
I have a Deye SUN-12K-SG04LP3 with 2 JK BMS B1A20S15P I'm trying to connect with UART and BT. Which BT protocol should I choose for my BMSs?
Key: f1c9093fb9d732b3211703dc5806e5de

Connect first the serial on bms put bt on off

Test the connection with the invertor pls, Other person with Deye 12k tell me some time appears w31 warning.
Can u confirm that issue?
 
need to use uart 2 pins for serial connection

If u want to flesh only the bin file
View attachment 166088

if u want with boot and partition table

View attachment 166089
So we can not use the USB to flesh the bin? caus ei connect to usb and flash it and it finish but i don't know if now it work or not, and how to chech if it is working? I don't see any wifi appear.
which pin is it the UART?
 
Last edited:
So we can not use the USB to flesh the bin? caus ei connect to usb and flash it and it finish but i don't know if now it work or not, and how to chech if it is working? I don't see any wifi appear.
which pin is it the UART?
Use the usb to flash the esp. USB is Serial Uart0
After flash , on USB 115200 u will have lot of info their, if no info something not flash ok.

JkBMS will connect on Uart2 - Serial2, and the ap will be JKBms ip for portal 192.168.4.1.
Connect after on ur local Network.
 
Use the usb to flash the esp. USB is Serial Uart0
After flash , on USB 115200 u will have lot of info their, if no info something not flash ok.

JkBMS will connect on Uart2 - Serial2, and the ap will be JKBms ip for portal 192.168.4.1.
Connect after on ur local Network.
Is the JK BMS need to plug on the Esp32 before the AP appear cause it finish download but the AP doesn't appear.
1693941503564.png
1693941682803.png
 
Is the JK BMS need to plug on the Esp32 before the AP appear cause it finish download but the AP doesn't appear.
View attachment 166096
View attachment 166097
No, u dont need any jkbms, just plug esp32 on computer and flash it, after open an Console on USB port 8N1 115200, u need to receive:
I will upload an compile with Wroom board

Code:
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
modeIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
BMS Watchdog V 4.0
Booting
Mounting FS...
Mounted file system
Reading config file
Opened config file, size = 142
Serial Protocol 1
BT Protocol 0
Can Protocol 1
Device ID OK
*wm:AutoConnect
*wm:Connecting to SAVED AP: STF
*wm:connectTimeout not set, ESP waitForConnectResult...
*wm:AutoConnect: FAILED
*wm:StartAP with SSID:  JkBMS
*wm:AP IP address: 192.168.4.1
*wm:Starting Web Portal
Configportal running
CAN Driver installation success...
CAN Driver start success...
Serial Jk Config
 
No, u dont need any jkbms, just plug esp32 on computer and flash it, after open an Console on USB port 8N1 115200, u need to receive:
I will upload an compile with Wroom board

Code:
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
modeIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
BMS Watchdog V 4.0
Booting
Mounting FS...
Mounted file system
Reading config file
Opened config file, size = 142
Serial Protocol 1
BT Protocol 0
Can Protocol 1
Device ID OK
*wm:AutoConnect
*wm:Connecting to SAVED AP: STF
*wm:connectTimeout not set, ESP waitForConnectResult...
*wm:AutoConnect: FAILED
*wm:StartAP with SSID:  JkBMS
*wm:AP IP address: 192.168.4.1
*wm:Starting Web Portal
Configportal running
CAN Driver installation success...
CAN Driver start success...
Serial Jk Config
I am really sorry I am new on esp32. how to open the console to get does message?
 
After using this bin the esp blinking but still not wifi appear. it seems stock or i don't know. I really gratful for you help.
View attachment 166103
It is working now A activate the RTS/CTS. I got the ip so I log with the IP and then it work.
How the esp connect automaticaly to my network wifi it is amazing.
So for the my Chip ID: 76842178. is the app key need to match to the Chip ID everytime?
 
It is working now A activate the RTS/CTS. I got the ip so I log with the IP and then it work.
How the esp connect automaticaly to my network wifi it is amazing.
So for the my Chip ID: 76842178. is the app key need to match to the Chip ID everytime?
Chip id is unique for eaxh board u save it one time.

U need a key for each board u use. U go to Setup.
For bt connection with jk use same name like in ur app
Ur key is:

6231c68c371cd7d7c132aa58559304ef
 
I write the name of the bluetooth same as in the jk app which is "TSWS48V200-6" and it said BT Disconnected. Can you guide me?
What is the CAN Interfacee: UART CAN, BT CAN, RS485, DUAL means?
And also what is the difference between the BT protocol : JK02 JK02S, JK4?
also i don't have the SN65HVD230 to use can on my set up so i can only use rs485 i guess on my SPF5000ES so what is th protocol on the growatt should i set and with which pin and on the software what should i set?
 
Last edited:
Back
Top