-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RS485 on new JK inverter BMS JKPB2A16SXXP #517
Comments
Hi!!
You could try this one:
https://github.com/txubelaxu/esphome-jk-bms
Regards
|
Thank you guys. This one from txubelaxu is about connection via RS485. Thats a viable way to do it. Thanks for that. |
It's hard to explain but I will give it a try. :-) If you disassemble the initial/old hardware model and trace the wires of the RS485 port you will find an optical isolator + the microcontroller. Let's ignore the optical isolator. In other words: The RS485 port is labeled "RS485" but it's directly connected to the UART port of the microcontroller. The logic level is 3.3V this is why we are talking about UART-TTL here. If you want to interface the BMS with another RS485 device you have to convert the signal first using the Dongle of the manufacturer: https://github.com/syssi/esphome-jk-bms/blob/main/images/rs485-adapter/001.jpg Interfacing the old BMS would look like this:
Let's talk about your BMS model now. And be careful there is a important difference between RS232 & RS485. |
If we disassemble your BMS model there will be a RS485 converter on the mainboard of the BMS. The microcontroller will be attached the this RS485 converter and the converter is attached to the RS485 port. The RS485 transforms the UART-TTL signal of the microcontroller to an differential signal with a new voltage level (-7V / +12V). The ESP cannot handle RS485 signals directly. A RS485 converter is needed to transform the signal back to the 3.3V logic level (UART-TTL). The same applies for RS232. A RS232 (MAX3232) converter board is needed if you want to talk devices using RS232. Did this answer your question? |
Another important thing is that in RS232 can be only one (slave) BMS. In a
RS485 network can be multiple (slave) BMSs connected.
RS232 has a length limit of about 12m. RS485 has a higher limit.
I tried with RS232 multiple times and I got nothing from that port.
|
Good question. I don't know it. This is how it looks like at the windows application: May be @txubelaxu is able to answer the question. This is my guess: UART2 is attached to the RS485 port and cannot be changed because the Modbus Protocol is expected here (always!). |
i would be interested too in a clarification. But it seems the RS232 port won´t give any advantages in using instead of RS485. |
It depends what you try to achieve and on the complexity of your setup. Where are you from? |
The solar plant (Studer innotec) is in italy. Small test plant 2.4kwp|7KWh battery| 24V ... i´m planning on a bigger one and thats why i got into LiFePo and the technical challenges around. After a lot of initial hickups making the plant talk to the battery and especially working well together (switched a first tried seplos to the JK) now i´m at a point where i can start to optimize. Last little problem is Current reduction when end of charge is around the corner. When i can read the cell voltages (especially max cell voltage) i can set charge current via fhem on the solar charger. |
If you have multiply battery banks they will communicate via RS485 probably. One BMS will be the Modbus master and it will collect periodically data from the slaves. @txubelaxu solution is able to sniff this communication and expose the data as sensor entities. Because the ESP isn't the Modbus Master in this setup listening only is allowed/possible here. If you want to change the settings of your BMS remotely some day you will attach an ESP to the RS232 port probably because you are allowed to act as Modbus Master here. |
Ok, RS232 became interesting again ;) |
I was flashing the BT way in the meantime. Finding out the MAC address of the BMS was a bit complicated but i found information in one of the threads here how to do it. This works pretty well. I´m amazed. Now i have to make the ESP talk to MQTT in fhem. There are some (minor) warning messages in ESPHome:
and some information (temperature_sensor_3, temperature_sensor_4) is missing. But hey, who´s interested in that. |
The warning can be ignored. |
Wow, MQTT autodetect in fhem works pretty fine. Now i have all info in fhem. This was a fast one. Let the game begin ;) |
sensor_heating | ON is reported wrongly. |
How many temperature probes are attached to your BMS? |
Which |
... to be more precise there are 4 temperature probes attached to the bms and reported accurately in the APP |
Could you create an issue per finding? I would like to track each issue properly. |
yes. see you there |
Lets close this issue because the initial question is resolved. |
Hi, in regards to
#409
and
#390
it seems to be (also) about converting a RS485 signal to read data from the new JK inverter bms (JKPB2A16SXXP). The old JK-BMS, as in the readme, using "The UART-TTL (labeled as RS485) socket of the BMS can be attached to any UART pins of the ESP" DIRECTLY.
I´m just wondering why the RS232 Port on the new BMS is not possible to use for a configuration without a RS485 converter module?
I would also be very keen to find a detailed description which parts need to be connected in which way for the new bms and what are the UART settings of the bms are helpfull for (if not to connect something to the RS232 port).
Spent the last 10 hours to follow the description in the readme to find out in the end that attaching my new JK bms needs to happen in a different way ;)
thank you for any insights
The text was updated successfully, but these errors were encountered: