-
Is there any plans to add JK BMS serial communication to this app? |
Beta Was this translation helpful? Give feedback.
Replies: 28 comments 38 replies
-
Sure, will be the next to be implemented :) |
Beta Was this translation helpful? Give feedback.
-
@gfjardim I have implemented the initial JK BMS RS485 support. If you could test it and see if it reads the SOC correctly I could go forward to implement the rest |
Beta Was this translation helpful? Give feedback.
-
Just a quick question. Is it possible to connect directly from the JK 'RS485' interface to the PI RXD and TXD pins (not using the HAT RS485 interface)? |
Beta Was this translation helpful? Give feedback.
-
Yes, you can do that. You can use the PI's serial IO pins 6 (GND), 8 (TX) and 10 (RX) as seen here: |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help. One problem I've been having though, is that no matter what port or ID I enter for the BMS (JK_RS485), it always seems to be stuck at trying to open it.
For direct connection between Pi TXD and RXD with TTL, I've tried serial0, AMA0, AMA10, ttyS0, 0x000 etc |
Beta Was this translation helpful? Give feedback.
-
Thanks. I have a Pi5 running Bookworm and thought
I tried with these at first and also tried after removing the RS485/CAN Hat unsuccessfully. I'll keep trying some other different things, but think I'm almost at the end of everything i know to try. |
Beta Was this translation helpful? Give feedback.
-
Hmm, could you try using your RS485/CAN hat again? And can you tell me which hat exactly that is? Then I could try and figure out the installation on that and guide you through that. I guess you'll need the CAN anyway later to connect your Goodwe inverter. I just got my PI 5 a few day ago but haven't had the chance to run any tests on it :) |
Beta Was this translation helpful? Give feedback.
-
I don't seem to have any issues with CAN. The RS485/CAN Hat I'm using is Waveshare RS485/CAN HAT One thing with this Hat is that it needs a riser so the tracks and through-hole soldered leads of its PCB clear the Pi 5 heatsink. Pi 5 seems to have some obscure differences to earlier types. It's been a bit of a learning adventure :) |
Beta Was this translation helpful? Give feedback.
-
Ok, good I have the same for testing. So you did the following:
go to Interface Options -> SPI enable
and add the lines depending on the oscillator (the silver oval shaped component) if it says 12MHz:
or 8MHz:
then
-> should see can0
-> should see can and can_raw
-> you should see can0 |
Beta Was this translation helpful? Give feedback.
-
Yep, basically that, however...instead of
I just used |
Beta Was this translation helpful? Give feedback.
-
ok, yeah that's the CAN related setup that seems to work properly. |
Beta Was this translation helpful? Give feedback.
-
Thank you, good luck with it. :) I'll also keep playing around as well to hopefully get it working. Your BMS solution has a lot of good potential. Edit: Sorry I missed that question about python libraries. I didn't install them. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update. I removed the Waveshare RS485/CAN HAT completely and still had the same problem, however didn't try every config variation with it removed. |
Beta Was this translation helpful? Give feedback.
-
@DezR |
Beta Was this translation helpful? Give feedback.
-
Thanks for testing this. I've also tried setting the rate at 115200, 9600 etc with no luck, also ttyAMA10 and ttyS0 The BMS(s) connect fine when I try with a ESP32 board (using this emulator ) and can see all of the battery and cell info. It might be possible I have a dodgy Pi. |
Beta Was this translation helpful? Give feedback.
-
I haven't yet, but will order the connector and definitely try it. Hopefully it will get here in a few days. :) |
Beta Was this translation helpful? Give feedback.
-
Maybe just wait for the debug/serial port connector.It's strange. Maybe the port on the BMS is not working?On 18/3/24, 17:40 DezR ***@***.***> wrote:
I tried with another microsd and fresh installation of bookworm. Unfortunately it still has the same problem.
The weirdest thing is that i can connect a jumper between pins 8 and 10 and get minicom to work correctly, just not connect to the BMS. Even when trying 4 different BD4A17S4P's
Maybe my Pi 5 is cursed and I should get a Pi 4 :)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you google Bookworm and UART there are lot of posts saying its broken in late 23. This was one issue Which was fixed sept 7th 23 but did not make it into the main release until Nov 6th. So maybe go back to Bullseye to see if it works. |
Beta Was this translation helpful? Give feedback.
-
@DezR "The serial port configuration of Raspberry Pi 5 and Raspberry Pi 4 is different, Please refer to the following steps to configure the serial port: Edit the config.txt file
Add the following and statement at the end
After restarting, ttyS0 can be seen" I have not yet tested it but might do later today if I have time. |
Beta Was this translation helpful? Give feedback.
-
Hey Torsten,
Is it expected that there is the error (in bold) that increments the error counter between frames? So far looking a lot better than with the Pi 5 :) |
Beta Was this translation helpful? Give feedback.
-
Great! You're receiving data now. But something is not right with the implementation because its not finding any valid frames. I will go through your log and find out what the problem is. I have starting to figure out the returned data. Its different than expected but I can change the code. Oh, and next time please just attach the log, otherwise the thread gets to overloaded and everything is hard to find ;) |
Beta Was this translation helpful? Give feedback.
-
Ok, could you please do a Clean install and test again. I hope that now the binding can process the JK response data properly. If the log file is too big, then just attach a file with the relevant part from the start or the end (but at least including one complete BMS reading cycle) |
Beta Was this translation helpful? Give feedback.
-
No problem, done. Let me know of anything you want to try. |
Beta Was this translation helpful? Give feedback.
-
Hmm OK, there is still something wrong with the data processing.I'll do a test case tomorrow. Then I have more time ;)
|
Beta Was this translation helpful? Give feedback.
-
Ok, ready to test again :) |
Beta Was this translation helpful? Give feedback.
-
No problem, its always step-by-step since I don't have the hardware (JK) to test on. But its good - we are already getting valid data. Could you please update the application and attach the log again? |
Beta Was this translation helpful? Give feedback.
-
The cell voltages are now fixed also min/max. |
Beta Was this translation helpful? Give feedback.
-
That's great :) I'm just reverse engineering the JK TTL-RS485 adapter to be able to use something far cheaper, quicker and easier to get, then will try to get all 10 BMS's hooked up in parallel. It's basically just a DC-DC converter and MAX485 clone. |
Beta Was this translation helpful? Give feedback.
I'll try it out.
The inverter I have is relatively new, but supposed to be compatible with a bunch of different battery manufacturers and one of the newest LV hybrid inverters that are approved for grid connection here in Australia.
I'll switch over to here while trying it out.
I think you've nailed JK BMS compatibility now :)