diy solar

diy solar

JK BMS CAN bus comms now possible for inverters that support Goodwe and Pylontech batteries

Thanks for the reply. I really hope one day you will be able to make/release it as all of the voltronic inverters don’t support pylontech over CAN.

Some support by the community would really help this project come to life one day.
Unfortunately there is a small minority of inverters that don't support CAN, poor design by the manufacturer if you ask me, as most of the batteries on the market use CAN.
 
Unfortunately there is a small minority of inverters that don't support CAN, poor design by the manufacturer if you ask me, as most of the batteries on the market use CAN.
That’s true unfortunately for us having these kind of inverters. I am hoping to find a solution in the future
 
Hi and thanks for the great project you done.
A quick question. Can I set up a kvaser can dongle to send and emulate the inverters can msg to the esp32 to see if everything works and so it doesn reboot?
What are the canmsg that needs to be sent and how often?
 
Hi and thanks for the great project you done.
A quick question. Can I set up a kvaser can dongle to send and emulate the inverters can msg to the esp32 to see if everything works and so it doesn reboot?
What are the canmsg that needs to be sent and how often?

It works great, myself and many others have been using it for year, with many different inverters.

You would need to send a empty(all 0x00) standard CAN ID 0x305 every second.
 
Starting to put some thought into support for Pylon RS485 protocol, does anyone have their inverter connected via RS485 and can log and send me some data?

Have progressed with creating code that produces the responses as per the Protocol, let me know if you have a data from the inverter.

eg what the inverter is asking it should be something like one of these:

rx_fixed {0x7E,0x32,0x30,0x30,0x32,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x30,0x32,0x46,0x44,0x33,0x33,0x0D}
rx_fixed_FF {0x7E,0x32,0x30,0x30,0x32,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x46,0x46,0x46,0x44,0x30,0x39,0x0D}
 
Last edited:
Hi, I like your project and had been meaning to provide some feedback for a while now on my use and experience.

Up until yesterday I had connected this up to my JK-B2A20S20P BMS and 2 Growatt SPF5000ES inverters. Inverter setting 5 to "LI" and setting 36 to "52".

I'm now using a slightly older JK-BMS as the former let all the smoke out in an impressive way I still don't understand.
If I manage to attach photo's they will show the carnage. It's interesting to note the failure point being around the GPS port which is used to connect to the ESP32. I used the correct JST plug but unnecessarily connected the +ve to my cable. It goes nowhere at the other end and should not be the cause but it's hard to tell.
I've had this connected for nearly 6 months now.

I don't know if this was caused by something I had control over or just a BMS fault. It looks like heat has melted the JST socket to the point the solder melted and the socket moved. I'm not sure if this is the cause or result.

Anyway something to be aware of and maybe keep a look out for heat around this part of the BMS. I've now taped one of my temperature probes to the back of the BMS to keep an eye on it.
I'm glad I built a fire resistant cabinet for my battery and BMS.


As far as this projects goes I did find that the ESP rebooting due to no CAN response from the inverter to be a pain initially. I understand the need for a watchdog arrangement but the growatt interter will kill all output very quickly if it doesn't get a CAN message.
I stupidly connected my TJA1050 to 3.3v and not 5v initially which resulted in intermittent CAN communication and lots of inverter output shutdowns but once figured out it has been quite reliable.
I also updated the config to 300sec instead of 30 and that seems to have helped for just being able to monitor the BMS via home assistant if I do not have the CAN communication enabled.


I've changed the inverter to use manual settings (setting 5 to "US2") and not "LI" (ie no CAN comms) a couple of times (I'm trying to balance a cell I replaced recently and setting the inverter to "LI" (CAN enabled) causes problems as 100% is not 100%) but with the cables still connected between the ESP32 and the inverter
CAN ports the ESP32 still seems to send messages to the inverter to stop charging when it sees 100% on the BMS.

I haven't actually logged this yet but keep finding that the inverter max charging current setting (setting 2) is being set to 0 when I had previously manually set it to 50 or 60A.
Probably no big deal as I should have the battery type set to "LI" not "US2" but as my BMS capacity is inaccurate at the moment I need the inverter to just charge based on voltage not % so I have to unplug the CAN RJ45 cables.


Anyway great project. you saved me a lot of time trying to develop something similar myself.



IMG_20230609_122000_hdr.jpg

IMG_20230610_124440_hdr.jpg


IMG_20230610_124402_hdr.jpg
 
Starting to put some thought into support for Pylon RS485 protocol, does anyone have their inverter connected via RS485 and can log and send me some data?

Have progressed with creating code that produces the responses as per the Protocol, let me know if you have a data from the inverter.

eg what the inverter is asking it should be something like one of these:

rx_fixed {0x7E,0x32,0x30,0x30,0x32,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x30,0x32,0x46,0x44,0x33,0x33,0x0D}
rx_fixed_FF {0x7E,0x32,0x30,0x30,0x32,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x46,0x46,0x46,0x44,0x30,0x39,0x0D}
Hello, I have an inverter with pylon rs485 protocol, and I would like to test it.
I can log inverter requests, so I can send you next days
 
Hi,
Can I connect BMS via BLE and make CAN BUS connect to inverter, because I cant open case to connect UART
No, BLE is not supported.
The connector is on the bottom of the JK-BMS, you don’t need to open the case.
My interface kit has all the needed hardware and cable for the BMS.
 
Good morning

I am using the code from uksa007 on a SofarSolar HYD5000EP inverter and it works perfectly.
I just have a problem for the number of battery cycles. The value transmitted to the inverter corresponds to the current value.
What modification can I make to correct the information?
Thank you for your work it's great.
 

Attachments

  • onduleur.jpg
    onduleur.jpg
    77.6 KB · Views: 26
  • jkbms.jpg
    jkbms.jpg
    250.4 KB · Views: 26
@uksa007
Hello, I just stumbled upon your project and I think it is fantastic. Will this work with 3 x Overkill (JBD) BMSs connected to 3 separate battery banks connected to a Sol-Ark 12K or a Sol-Ark 15K? Has anybody tested this multi-BMS configuration with Sol-Ark protocols? My banks are not identical, 2 are 16s 272 ah Lishen cells and 1 16s 280ah EVE bank. Currently all are working well on their own and paralleled to the Sol-Ark. Thanks much!
 
I just have a problem for the number of battery cycles. The value transmitted to the inverter corresponds to the current value.
What modification can I make to correct the information?
The number of cycles are not sent to the inverter from my code, so I'm thinking this must be something that the inverter is calculating, is there anything in inverter manual that might suggest how it calculates it?
 
The number of cycles are not sent to the inverter from my code, so I'm thinking this must be something that the inverter is calculating, is there anything in inverter manual that might suggest how it calculates it?
Good morning
No, no information on this.
It's curious, the value of the cycles on the inverter corresponds exactly to the value of the current.
 
Good morning
No, no information on this.
It's curious, the value of the cycles on the inverter corresponds exactly to the value of the current.

Cycles is a value that the battery generates, not the inverter. For my BYD as an example, it monitors all charge and discharge energy and then ups the cycle count when the cumulative energy match's the rated kWh of the unit.
 
Cycles is a value that the battery generates, not the inverter
The JK-BMS keeps track of the cycles.
As advised it is not part of the Pylon CAN protocol to send the number of cycles to the inverter.
My code DOES NOT SEND IT to the inverter!

If it's using the current as the cycles that's something the inverter is doing, it maybe using some other battery protocol, similar but not Pylon.
 
Hi uksa007...I have a JK BMS model B2A20S20P, I bought RS485 module and USB to RS485 to connect JK BMS to Raspberry/Solar Assistant.
I have Voltronic Inverter Max7200...can I connect my JK BMS to my inverter?
What I would like to understand...if I pay you $107 as requested..will I get everything needed (plug and play) to connect the JK BMS to my inverter? Sorry, just to understand..
 
We are currently attempting to extract CAN data from the CAN port of the JK BMS with Model No. JK_BD4A20S4P. We tried to use CAN Analyzer tool to understand the baud rate of the BMS as it mentioned in the support documentation that baud rate should be 250kbps.

1693641836857.png
However, we are not able to detect 250 kbps baud rate in our CAN analyzer tool.

1693641836929.png

We also tried to get the message from the BMS through our IoT device by setting its baud rate 250kbps. We given the request ID as per mention in below screenshot.
But still we are not getting any response from the BMS.

1693641836975.png
...............................
CAN type: Standard
CAN ID: 2F4
Data: 00 00 00 00 00 00 00 00

Thank you for your support, and we eagerly await your prompt response.
 
Back
Top