diy solar

diy solar

Chargery rs232 interface

Hi Tobi, on Raspian (or any Linux) pipe the data thro ‘od -x’
By default, its output in ASCII, but you want hexidecimal,
then the data looks like it does in the protocol document. ie
# cat /dev/ttyUSB0 | od -x

You will have to wait a few seconds for data as its heavily buffered. To fix that, you can temporarily disable buffering like this:

# cat /dev/ttyUSB0 | stdbuf -i0 -o0 -e0 od -x
0000000 2424 0f57 420e 0000 000c 01dd 641a 2466
0000020 5624 0e16 0d17 0d0f 0d0d 100d 1c0d 2f0d
0000040 b50d d764 2424 0f57 420e 0000 0014 01dd
0000060 641a 246e 5724 0e0f 0042 1900 dd00 1a01
0000100 7364 2424 1656 170e 100d 0d0d 0d0d 0d12
0000120 0d1a 0d32 64b4 68d8 3a3a 0d33 240a 5724
0000140 0e0f 0042 0c00 dd00 1a01 6664 2424 0f57
0000160 420e 0000 000f 01dd 641a 2469 5624 0e16
0000200 0d14 0d10 0d0d 0d10 0d12 0d1a 0d2e 64b4
0000220 24d0 5724 0e0f 0042 1700 dd00 1a01 7164
0000240 2424 0f57 420e 0000 0017 01dd 641a 6871
0000260 3a3a 0d33 240a 5624 0e16 0d14 0d10 0d0d
0000300 0d10 0d0f 0d1c 0d31 64b4 24d2 5724 0e0f
Hello, I'm using the interface DSD TECH 2PCS USB to TTL on a PI. I get a response, but not such as you. Please see screenshot, attached.
reboot, reset usb, other usb port does not result in any change. do you have an idea why my data is not received in the same way as yours in the example? Baud 115200.
 

Attachments

  • bms_usb_native.JPG
    bms_usb_native.JPG
    179 KB · Views: 9
Last edited:
Make sure your using an RS232 cable and not a TTL.
TTL voltages can permanently damage the chargery board. Beware!
Hope that helps...
Hi and thank you for the information. I'm using this:
Is it wrong for reading the BMS?
I made the connection well shielded.
 
Hi and thank you for the information. I'm using this:
Is it wrong for reading the BMS?
I made the connection well shielded.
Use something like this - https://www.amazon.de/Akozon-Konver...=Rs232+usb&qid=1622231633&s=computers&sr=1-25

Only use a true quality RS232 USB cable that ends in a DB9 and use a DB9 breakout connector to access the wires.


Beware of fake RS232 cables that are really TTL, they will break your Chargery!
 
Use something like this - https://www.amazon.de/Akozon-Konver...=Rs232+usb&qid=1622231633&s=computers&sr=1-25

Only use a true quality RS232 USB cable that ends in a DB9 and use a DB9 breakout connector to access the wires.


Beware of fake RS232 cables that are really TTL, they will break your Chargery!
I have now also used your suggestion, it remains so. The cable is ok, 5v level is ok, MAX232 level converter to 3.3V is ok. I get data, but it doesn't contain e.B. 2424....I can't do anything with the data, they don't make sense. I am familiar with hex numbers. If I change e.B. the baud rate, the data also changes. It's not because of the hardware. idea?
 
I would suggest using the software i wrote for the Pi on my github site. I'm pretty sure you have everything else working ok. It may be a big/small endian issue with your linux box.

See this thread ... https://diysolarforum.com/threads/o...itoring-and-control-freeware.6662/#post-69886


 
Use something like this - https://www.amazon.de/Akozon-Konver...=Rs232+usb&qid=1622231633&s=computers&sr=1-25

Only use a true quality RS232 USB cable that ends in a DB9 and use a DB9 breakout connector to access the wires.


Beware of fake RS232 cables that are really TTL, they will break your Chargery!
I’m very confused.... in post #9 of this thread you recommend buying a USB to TTL converter, and later you say /not/ to use TTL, and use RS232 instead. Thing is, RS232 is -12 to +12v..... TTL is 0-5v or 0-3v. So I would think RS232 would harm a 3.3v TTL before TTL would harm RS232..... Can you clarify? I have just ordered the USB TTL adapter from amazon.
 
Why can’t this be easier. I don’t understand half of what’s being said. It would be nice if something like a WiFi dongle could just be plugged into the chargery and it sends that info to an app...
 
Why can’t this be easier. I don’t understand half of what’s being said. It would be nice if something like a WiFi dongle could just be plugged into the chargery and it sends that info to an app...
Maybe I can work toward that in future. It would be very cool to have a wifi dongle based on esp32 that would spew data into a Mqtt server.
 
Last edited:
Maybe I can work toward that in future. It would be very cool to have a wife dongle based on esp32 that would spew data into a Mqtt server.
I am using TTL 5v(3v). Sorry, I don't now the exactly diff to rs232. My interfaces are working, I get data. But wrong. And the cable ist also not the problem.
 
I’m very confused.... in post #9 of this thread you recommend buying a USB to TTL converter, and later you say /not/ to use TTL, and use RS232 instead. Thing is, RS232 is -12 to +12v..... TTL is 0-5v or 0-3v. So I would think RS232 would harm a 3.3v TTL before TTL would harm RS232..... Can you clarify? I have just ordered the USB TTL adapter from amazon.
Initially, i used the TTL cable and it's fried my Chargery, then I found out from the manufacturer that only RS232 can be used. It's been running without problems for over a year now. Get a good quality item with LED indicators if possible, its worth it.
 
Initially, i used the TTL cable and it's fried my Chargery, then I found out from the manufacturer that only RS232 can be used. It's been running without problems for over a year now. Get a good quality item with LED indicators if possible, its worth it.
Well I already have a RS232 dongle, I’ll try it.... but you have to tie the TX and RX together because its one wire, right? Not sure how that will work with RS232... it is not a tri-state scheme like RS485 is. Can you say the model of the adapter you are using or send a picture?
 
I just dug an old burned up chargery out of hte trash to look at com3. It seems com3 is output only. One pin is grounded and the other goes to the other end of the board toward the processor. Looks like pin 1 is grounded to the backplane and pin 2 is data out. It even says data out on the board. So it must just be spewing everything all the time. I'll have to make up a cable and take a look.


1625945303243.png
 
I just dug an old burned up chargery out of hte trash to look at com3. It seems com3 is output only. One pin is grounded and the other goes to the other end of the board toward the processor. Looks like pin 1 is grounded to the backplane and pin 2 is data out. It even says data out on the board. So it must just be spewing everything all the time. I'll have to make up a cable and take a look.


View attachment 55712
Sorry for the old thread dig up, but I'm struggling to connect the Chargery COM3 to a RS232 adapter. Could you please elaborate on how to plug which wire colour (red or black) coming out for the COM3, into which serial pin for RS232?
I've already fried one 8S BMS I had by simply trying different combinations...
Thank you
 
An
I just dug an old burned up chargery out of hte trash to look at com3. It seems com3 is output only. One pin is grounded and the other goes to the other end of the board toward the processor. Looks like pin 1 is grounded to the backplane and pin 2 is data out. It even says data out on the board. So it must just be spewing everything all the time. I'll have to make up a cable and take a look.


View attachment 55712
Any luck?
 
Back
Top