diy solar

diy solar

Monitor JK BMS with Solar Assistant?

I have to correct this. There is no RS485 inside the BMS. It's a TTL signal coming from the one of the micro controller UARTs. RS485 uses three pins:A, B and GND. A and B are a balanced, differential signal whereas TTL uses Rx/Tx lines and GND. Rx and Tx are receive/transmit lines and are independent, non-differential and more akin to RS-232.

Thus, the converter that they sell turns the TTL signal from the UART into an actual A/B RS-485 signal (the module contains a microcontroller etc. to do this). Then, you typically connect a RS-485 to USB converter (which turns this into a kind of RS-232 again, simplified). It's therefor much easier to just take the existing TTL signal from the UART and convert that with a TTL to USB converter.

I don't believe (unless I miss a version) that any of the BMS has RS-485 by default even through that's what @Nami indicates in the pictures of the BMS. In reality, this is a misnomer: it should be TTL, which can be converted to RS-485, but which would be easier for us if they would just provide a TTL to USB converter that plugs in there instead of going TTL -> RS485 -> TTL -> USB...
Does the hardware protocol change/convert the code also or does it just change the signal and path? I’m so confused as to why JK decided to change the code so much. It seems to not help developers like Pierre simplify connection.
 
Does the hardware protocol change/convert the code also or does it just change the signal and path? I’m so confused as to why JK decided to change the code so much. It seems to not help developers like Pierre simplify connection.

As far as I know, nothing changed except the baudrate. At some point, it was 9600, now it's 115200. Everything else, including the protocol, should be the same. That said, I don't have one of the newer 4s versions or other open case style versions so I can't double check...
 
As far as I know, nothing changed except the baudrate. At some point, it was 9600, now it's 115200. Everything else, including the protocol, should be the same. That said, I don't have one of the newer 4s versions or other open case style versions so I can't double check...
So why is it you think that I’m able to use the “USB to JBD RS485” protocol/code and the newer versions (I think hardware 6 up) use the “USB to JK RS485”? Is it that baudrate effecting it (I can’t imagine so)?
 
So why is it you think that I’m able to use the “USB to JBD RS485” protocol/code and the newer versions (I think hardware 6 up) use the “USB to JK RS485”? Is it that baudrate effecting it (I can’t imagine so)?

I have no idea - I don't know what the driver code looks like. All I know is that my code on my repo works with all the JKs I have, except the older ones (and you can go to the first commit on my github to find that driver). The older ones I have (two years old or so?) have a completely different protocol, and run at 9600 Baud. I have no idea if the protocol changed after January 2022 (the last JK I bought in December 2021); I guess I will have to buy a new one, cause now I want to know :)
 
I have no idea - I don't know what the driver code looks like. All I know is that my code on my repo works with all the JKs I have, except the older ones (and you can go to the first commit on my github to find that driver). The older ones I have (two years old or so?) have a completely different protocol, and run at 9600 Baud. I have no idea if the protocol changed after January 2022 (the last JK I bought in December 2021); I guess I will have to buy a new one, cause now I want to know :)
I have two HW Ver. 3 ‘s with SW Ver. 4.2.5 and one with SW Ver. 4.2.1 and one HW Ver. 6.X with SW Ver. 6.1.0S. I only have one hooked up at the moment (HWV3/SWV4.2.1) and have plans soon to get the others connected. I will have updates on this.
 
I have to correct this. There is no RS485 inside the BMS. It's a TTL signal coming from the one of the micro controller UARTs. RS485 uses three pins:A, B and GND. A and B are a balanced, differential signal whereas TTL uses Rx/Tx lines and GND. Rx and Tx are receive/transmit lines and are independent, non-differential and more akin to RS-232.

Thus, the converter that they sell turns the TTL signal from the UART into an actual A/B RS-485 signal (the module contains a microcontroller etc. to do this). Then, you typically connect a RS-485 to USB converter (which turns this into a kind of RS-232 again, simplified). It's therefor much easier to just take the existing TTL signal from the UART and convert that with a TTL to USB converter.

I don't believe (unless I miss a version) that any of the BMS has RS-485 by default even through that's what @Nami indicates in the pictures of the BMS. In reality, this is a misnomer: it should be TTL, which can be converted to RS-485, but which would be easier for us if they would just provide a TTL to USB converter that plugs in there instead of going TTL -> RS485 -> TTL -> USB...
A simple point to note. Look at all the BMS Images that Nami, which are also same on the new batch I got. NOT ONE says anything remotely like TTL but rather Can/RS485 etc. So by using a different name like TTL rather than what an end-user actually sees as Can/RS485 (on the port) will only further add confusion.

I would have loved to use Solar Assistant but it does not address Solar Charge Controllers (IE MIdnite Solar SCCs) which have fully published and useable ModBus + as well as many others, including "Stand Alone" Inverters as it is focused on limited AIO's only. It's really a shame as it limits (hog ties) Solar Assistant.
 
I have two HW Ver. 3 ‘s with SW Ver. 4.2.5 and one with SW Ver. 4.2.1 and one HW Ver. 6.X with SW Ver. 6.1.0S. I only have one hooked up at the moment (HWV3/SWV4.2.1) and have plans soon to get the others connected. I will have updates on this.
Take a screen shot of your ABOUT panel for the BMS, that carries more information, including prod date & model rev. You can XXXX out the last 4 digits of the SN if you're skiddish.
 
A simple point to note. Look at all the BMS Images that Nami, which are also same on the new batch I got. NOT ONE says anything remotely like TTL but rather Can/RS485 etc. So by using a different name like TTL rather than what an end-user actually sees as Can/RS485 (on the port) will only further add confusion.

Yep, I noted that and informed them about this. The text on the BMS is a misnomer and should be made clear; using RS485 on the port can lead to confusion as people think there is actually a RS485 protocol present, while in reality it's not the case at all. People think they need to buy the module they sell... @Nami : please clarify this in your documentation/pictures, and on the BMS itself. Maybe build a simple TTL/USB converter with the appropriate connector to allow direct USB connection without this hassle.
 
I have the pinout of that connector here in the readme:


Works fine at 115200 Baud with a generic TTL/USB converter for use with Grafana, and should be the same with Solar Assistant. In the end I just cut out the JK RS485 converter from the equation since it just consumes power to convert TTL to RS485 to only then convert it back to USB.
I had tested your code a few weeks ago and it worked great! I actually modified it a bit and added the battery voltage, current and SOC. After a few hours tho it stop working same as it's doing now with solar assistant and I figured it has something to do with the JK USB to RS485 adapter. Can't wait to try TTL/USB.
 
I figured it has something to do with the JK USB to RS485 adapter

That might very well be the case. One way to test this:
- First unplug the USB cable, then plug it back in. If that works again, something is wrong on the PC side of things.
- If that doesn't fix it, unplug the module from the BMS side and plug it back in (without powering off the BMS). If it works after that, the reset of the adapter module fixed it, and there is an issue with the adapter.
- If this last step didn't make it work again, it might be something on the BMS
 
This is the one I have (link to power adapter above ☝️) . Says 3 amp. I’m not sure what the power consumption or requirements are. I have three USB’s plugged in and works great.
To add, I’m not entirely sure that micro usb is capable of more than 3 amp. So with that in mind, developers would of thought of some other power input solution if it were necessary. But I don’t know this as a fact, so check on that, or maybe someone else can chime in.
One more thing. Are you making sure you are selecting one device to read from in the drop down menu on the solar assistant settings page (“USB Ports”)?
So I ordered a argon one power supply that is a 3 amp and did not help.
 
I had tested your code a few weeks ago and it worked great! I actually modified it a bit and added the battery voltage, current and SOC. After a few hours tho it stop working same as it's doing now with solar assistant and I figured it has something to do with the JK USB to RS485 adapter. Can't wait to try TTL/USB.
I am using ttl/usb and it stops working to after awhile to.
 
So I ordered a argon one power supply that is a 3 amp and did not help.
I ran into a small snag last night. I had disconnected one of my inverters (changing location on the wall) also unplugged the usb cable from RPi. After leaving it for awhile, I had checked the Solar assistant page and saw that some data was skewed. I found that if you do not go to settings, disconnect, reconfigure your hardware (usb adapters to where), and then save, it will mess it all up. I’m just curious if you have the same thing going on?
If you’re not certain, I would disconnect all usb from RPi and just plug one at a time and reconfigure one at a time , that way you know for sure you have the correct usb connected to the correct device, also make sure if you disconnect any of them, put the usb back in the same usb slot ( only if you don’t change the configuration). You also need to make sure you save it. It doesn’t allow you to reconnect the devices until you do. But I had an instance that it didn’t save it but some how connected.
 
Last edited:
That might very well be the case. One way to test this:
- First unplug the USB cable, then plug it back in. If that works again, something is wrong on the PC side of things.
- If that doesn't fix it, unplug the module from the BMS side and plug it back in (without powering off the BMS). If it works after that, the reset of the adapter module fixed it, and there is an issue with the adapter.
- If this last step didn't make it work again, it might be something on the BMS
I’ll give this a test soon.
 
I’ll give this a test soon.
I ran into a small snag last night. I had disconnected one of my inverters (changing location on the wall) also unplugged the usb cable from RPi. After leaving it for awhile, I had checked the Solar assistant page and saw that some data was skewed. I found that if you do not go to settings, disconnect, reconfigure your hardware (usb adapters to where), and then save, it will mess it all up. I’m just curious if you have the same thing going on?
If you’re not certain, I would disconnect all usb from RPi and just plug one at a time and reconfigure one at a time , that way you know for sure you have the correct usb connected to the correct device, also make sure if you disconnect any of them, put the usb back in the same usb slot ( only if you don’t change the configuration). You also need to make sure you save it. It doesn’t allow you to reconnect the devices until you do. But I had an instance that it didn’t save it but some how connected.
Before I do anything I always disconnect in the settings.
 
I wonder what’s causing this issue and for now I’m using a Victron smart shunt until it’s sorted out.
I just ordered a higher quality ttl/usb converter but it won't be in till next week. We will see what that does.
 
Back
Top