diy solar

diy solar

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

If you have only one battery bank and inverter, I would definitely say yes!

here screenshot of my Deye inverter configured as "Pylon"

View attachment 187795

I followed the instructions to compile it on EspHome, connected the two cables, and it's working perfectly (along with Home Assistant monitoring).

The only 'limitation' is that to power the M5stack Atom, you currently need to connect a USB-C cable to a 5V power supply. I'm in the process of developing a simple DC-DC converter PCB to directly draw 5V from the Vbat of the JK-BMS port. This way, it will become a plug-and-play autonomous solution
Thank you!!! Assume only one JK/Battery pack though. Can't combine/monitor multiple?

Also great work @Sleeper85 and @arzaman !!!
 
Can't buy the kit, marked EOL but These seem to be the correct parts, correct?
1704814083816.png
 
Thank you!!! Assume only one JK/Battery pack though. Can't combine/monitor multiple?

Also great work @Sleeper85 and @arzaman !!!

No, this YAML only supports a single BMS connection and I have not planned a multi-BMS version.
Other solutions are the Uksa007 boards or the new JK-BMS for inverter.

Regarding the new JK-BMS for inverter, the memory loss problem is fixed with the latest version V14.17.

Info coming from Andy.
 
Can't buy the kit, marked EOL but These seem to be the correct parts, correct?
View attachment 187799


Suggesto also to add some accessories to make the connections easy (are not included with Atome and Base)

Short "grove" patch cable (4 pin)
Grove to PIN adatper where you can connect/solder the JST cable from JK BMS

1704815368903.png

1704815473434.png
 
Regarding the new JK-BMS for inverter, the memory loss problem is fixed with the latest version V14.17.
You could also use a Seplos V3 which I believe Andy recommends now, just need to add an active balancer if needed.
 
Try some global (Digikey, Mouser) distributor or local one

@arzaman Thanks, I can get all pretty quickly except for the 4-pin connector. Guess I can just wire directly/solder from the JK to the unbuckled wire. What type of connector is needed on the JK BMS itself?
 
@arzaman Thanks, I can get all pretty quickly except for the 4-pin connector. Guess I can just wire directly/solder from the JK to the unbuckled wire. What type of connector is needed on the JK BMS itself?

As written in the readme, JST 1.25mm pitch.

Code:
# RS485-TTL jack on JK-BMS (4 Pin, JST 1.25mm pitch)
┌─── ─────── ────┐
│                │
│ O   O   O   O  │
│GND  RX  TX VBAT│
└────────────────┘
  │   │   │   | VBAT is full battery volatge eg 51.2V (No connect)
  │   │   └──── ESP32 GPIO16 (`rx_pin`)
  │   └──────── ESP32 GPIO17 (`tx_pin`)
  └──────────── GND
 
As written in the readme, JST 1.25mm pitch.

Code:
# RS485-TTL jack on JK-BMS (4 Pin, JST 1.25mm pitch)
┌─── ─────── ────┐
│                │
│ O   O   O   O  │
│GND  RX  TX VBAT│
└────────────────┘
  │   │   │   | VBAT is full battery volatge eg 51.2V (No connect)
  │   │   └──── ESP32 GPIO16 (`rx_pin`)
  │   └──────── ESP32 GPIO17 (`tx_pin`)
  └──────────── GND
Thanks, have everything ordered, should have all parts by end of month. Can't wait to give this a shot, just bought some of the older JKs.
 
Thanks, have everything ordered, should have all parts by end of month. Can't wait to give this a shot, just bought some of the older JKs.

You have a Victron system, right?

Pay double attention to the VBAT on the JST JK connector. This is the full voltage of your pack, handle with caution.
 
Thanks, have everything ordered, should have all parts by end of month. Can't wait to give this a shot, just bought some of the older JKs.

You have a Victron system, right?

Pay double attention to the VBAT on the JST JK connector. This is the full voltage of your pack, handle with caution.
Yes, have one Victron system, also a Growatt and more than likely a EG4 6000XP in my future. Interested in figuring out how they can all talk Pylon. Thanks for the VBAT warning, saw that earlier.
 
Yes, have one Victron system, also a Growatt and more than likely a EG4 6000XP in my future. Interested in figuring out how they can all talk Pylon. Thanks for the VBAT warning, saw that earlier.

So you will probably be the first to test my YAML with Victron, I will make improvements for Victron before your tests start. I will send you a YAML privately so you can validate that everything is working correctly.

Do you use Home Assistant?

Have you ordered the equipment below?

1704838462890.png
 
So you will probably be the first to test my YAML with Victron, I will make improvements for Victron before your tests start. I will send you a YAML privately so you can validate that everything is working correctly.

Do you use Home Assistant?

Have you ordered the equipment below?

View attachment 187903
Don't rush on the code, won't have the parts till end of month. I ordered the JST 4 pin 1.25 pitch connectors/wires on amazon and I already have a 5v power block with usbC cable. I'll just solder the jst cable out of JDK to the Unbuckled groove cable. I'll then need the specific pins for the out of the CanBus to the inverter...will look into that later. Here is my order:

1704838830317.png
 
Don't rush on the code, won't have the parts till end of month. I ordered the JST 4 pin 1.25 pitch connectors/wires on amazon and I already have a 5v power block with usbC cable. I'll just solder the jst cable out of JDK to the Unbuckled groove cable. I'll then need the specific pins for the out of the CanBus to the inverter...will look into that later. Here is my order:

Why did you choose this model which does not fit directly onto the pins of the ESP32 Atom Lite?

1704840655095.png



The base used by @arzaman is this one, I find it more beautiful and cleaner.


1704840804633.png

Additionally you will need the input port on the Atom Lite to connect the 5V, GND, RX and TX coming from JK-BMS.

Atom Lite ESP32 Pico JK-BMS-CAN pins.png


Code:
# GPIO pins your CAN bus transceiver ATOMIC CANBus Base (CA-IS3050G)
  can_tx_pin: GPIO22
  can_rx_pin: GPIO19
# GPIO pins your JK-BMS RS485(TTL) is connected to the grove port of ATOM lite
  tx_pin: GPIO32
  rx_pin: GPIO26
 
  esp32:
  board: m5stack-atom
  framework:
    type: arduino
 
Last edited:
Why did you choose this model which does not fit directly onto the pins of the ESP32 Atom Lite?

View attachment 187909



The base used by @arzaman is this one, I find it more beautiful and cleaner.


View attachment 187910

Additionally you will need the input port on the Atom Lite to connect the 5V, GND, RX and TX coming from JK-BMS.

View attachment 187916


Code:
# GPIO pins your CAN bus transceiver ATOMIC CANBus Base (CA-IS3050G)
  can_tx_pin: GPIO22
  can_rx_pin: GPIO19
# GPIO pins your JK-BMS RS485(TTL) is connected to the grove port of ATOM lite
  tx_pin: GPIO32
  rx_pin: GPIO26
 
  esp32:
  board: m5stack-atom
  framework:
    type: arduino
Hmm. It’s the exact same part number. CAIS3050G. Did I order wrong?

Edit: I had to cancel the entire order. Odd the part numbers are identical anyway reordered from M5. Should be here in 30-60 days.
 

Attachments

  • IMG_4401.jpeg
    IMG_4401.jpeg
    227.2 KB · Views: 12
Last edited:
Hmm. It’s the exact same part number. CAIS3050G. Did I order wrong?

Edit: I had to cancel the entire order. Odd the part numbers are identical anyway reordered from M5. Should be here in 30-60 days.

You can't use this module becouse if you use the grove port to connect to Atom (ESP32) yuo don't have any more a socket to conenct JK-BMS RS485 port...unless you use the GPIO on the bottom...so basically the opposite of my implementation ;)

1704896580269.png

1704896709417.png
 
V1.15.5 on GitHub

I decided to deactivate the API reboot every 15 minutes if there is no connection with HA, I think we should prevent the ESP32 from rebooting which could happen during a Bulk charge. I also adapted the default discharge current to 120A therefore 6000W.

In addition, as I received a lot of questions regarding the operation of the charging logic I created the diagram below to make it clear.

View attachment 187443
Recheck the alarm implementation.
Low voltage alarm should not stop charging.
High voltage alarm should not stop discharging.
Temperature alarm - is ok as it is.

Else if you stop charging at low votge alarm, how will the battery regain charge?
 
Recheck the alarm implementation.
Low voltage alarm should not stop charging.
High voltage alarm should not stop discharging.
Temperature alarm - is ok as it is.

Else if you stop charging at low votge alarm, how will the battery regain charge?

OK, I'm preparing version 1.16, I'll add that to my to do list.
 
You can also check out this application. Its well maintained and supported.
https://github.com/ai-republic/bms-to-inverter

You can connect most of the common BMSes like JK, Seplos, Pylon, Daly, etc. via CAN, RS485, RS232 and UART and it supports a wide range of inverters like SMA, Growatt, SolArk and any inverters using the Pylontec CAN protocol.
It also supports multiple BMSes and aggregates the values. WebServer and MQTT messaging are also included.

It runs on a PI or any Unix.

I've been running it on my 8 Daly BMSes and SMA SI for months now....
 
V1.16.1 on GitHub
  • Improved Alarm/Charging/Discharging Logic
  • Improved CAN protocol and Victron support (adding IDs : 0x372, 0x374, 0x375, 0x376, 0x377 and 0x382)
  • Fix : Slider charging_current max value = ${charge_a}
There are big changes in this YAML due to the implementation of the new logic regarding alarms. The tests are OK for me but if you encounter a bug, let me know.
 

diy solar

diy solar
Back
Top