Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pylontech vs Raspberry, Arduino, PLC

Featured Replies

Hey guys,

I switched to the Pylontech batteries and they are running fine, withnout any data communication between them and the inverter.

Now, I'd like to readout the operational values from Pylons using a CAN or RS-485 and my PLC. I know that couple of you were able to achieve this, so can you help me with the start, please?

  • What's working the best for you? RS-485 or CAN?
  • Do you have the BUS terminators in your wiring?
  • Are you terminating both ends of the BUS, or is there a built-in terminator in the batteries?
  • What protocol/library did you use as a template for your code?
  • It there anything to take a special care of?

Any directions greatly appreciated!

Thanks,

Youda

Edited by Youda

5 hours ago, Youda said:

Hey guys,

I switched to the Pylontech batteries and they are running fine, withnout any data communication between them and the inverter.

Now, I'd like to readout the operational values from Pylons using a CAN or RS-485 and my PLC. I know that couple of you were able to achieve this, so can you help me with the start, please?

  • What's working the best for you? RS-485 or CAN?
  • Do you have the BUS terminators in your wiring?
  • Are you terminating both ends of the BUS, or is there a built-in terminator in the batteries?
  • What protocol/library did you use as a template for your code?
  • It there anything to take a special care of?

Any directions greatly appreciated!

Thanks,

Youda

Hi,

I’m using RS485.  I didn’t put terminators on but no doubt I should.  I found a project on Github and modified it to publish to mqtt. If that makes sense to you i’m happy to share the code.

  • Author

Hi @Elbow that would be great!

I've checked both, the CAN and RS485 Pylon docs and they are quite messy (chinese-english mix, hexadecimal values transferred as ascii, etc...) therefore I'm pretty sure that I won't be able to write the procotol decoder from the scratch by myself.

By the way, do you have a physical RS485 wire to the master battery only, or do you have a separate RS485 wire leading to every Pylon brick?

Thanks!

 

4 hours ago, Youda said:

By the way, do you have a physical RS485 wire to the master battery only, or do you have a separate RS485 wire leading to every Pylon brick?

One cable only. The batteries chain themselves. The one is at address 2, the other is at 3.

  • Author

Looks good,  I've been able to make a DB9 to RJ-11 cable and connect to the stack via BatteryView:Pbat1.thumb.png.944c6c09034ddbe513428c2f79f119bf.png

Even the serial console looks promising:Pbat4.thumb.png.6e80d825194691af2b25e2a8d5f3d9b0.png

Looking at the available docs, it looks like the serial console will accept not only the text CLI, but also the same commands like RS485 interface. That will be great tool for debug, as I can connect laptop directly and try to send couple of commands and then examine the response codes.

On the other hand, the protocol itself is terrible. SOI and EOI are fixed 1-byte characters 0x7E and 0x0D, while the other fields of the frame are ASCII characters that have to be grouped, then converted to the HEX and then converting again to DEC for display. And there are two recursive checksums! One 4bit checksum of 12bit LENID and then another 16bit checksum of the whole dataframe.

What the hell is that!? A battery for the space shuttle?

image.thumb.png.7c04c5d1b950ff4beddc1d4452aab7c3.png

image.png.214b5ef53545670d083302f3e4ce0932.png

  • Author

Hi @Elbow

I played with the batteries today, but had no luck:

Connected to the RS485 port on the "master" battery and sent the command that is mentioned in the PDF as an example:

HEX: 0x7E,0x32,0x30,0x30,0x31,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x30,0x31,0x46,0x44,0x33,0x35,0x0D

ASCII: ~20024642E00202FD33 + 0x0D

But the battery did not reply, not even a byte.

How come that your battery is talking to you, while mine is silent? Is the RS485 port disabled by default and has to be enabled via some CLI command?

 

2 hours ago, Youda said:

Hi @Elbow

I played with the batteries today, but had no luck:

Connected to the RS485 port on the "master" battery and sent the command that is mentioned in the PDF as an example:

HEX: 0x7E,0x32,0x30,0x30,0x31,0x34,0x36,0x34,0x32,0x45,0x30,0x30,0x32,0x30,0x31,0x46,0x44,0x33,0x35,0x0D

ASCII: ~20024642E00202FD33 + 0x0D

But the battery did not reply, not even a byte.

How come that your battery is talking to you, while mine is silent? Is the RS485 port disabled by default and has to be enabled via some CLI command?

 

Hi @Youda,

I’ll PM you the program I’m using in the morning.

You need to get the right baud rate (mine use 115200) and get the wires the right way round...

I note at least 3 discrepancies between the hex and ascii (e.g. ascii should end 35 not 33, depending on which one is correct). That would presumably cause a CRC error, but I would expect some sort of negative acknowledge rather than nothing.

 

Edited by Coulomb
More details

  • Author

Hi @Coulomb you're right, I messed-up two different HEX a and ASCII commands!

This one is correct for the RS485 interface, to query analog values:

HEX: 7E 32 30 30 32 34 36 34 32 45 30 30 32 30 32 46 44 33 33 0D

ASCII: ~20024642E00202FD33 +0x0D

But, it's not working for me, the RS485 interface is silent, not replying. I've set the port to 115200, 8 bit, no parity.

Also, the strange is, that there's a voltage around 2-3V between the RS485 A/B pins on the PLC, while A/B pins on the battery are without any voltage.

7 hours ago, Youda said:

Hi @Coulomb you're right, I messed-up two different HEX a and ASCII commands!

This one is correct for the RS485 interface, to query analog values:

HEX: 7E 32 30 30 32 34 36 34 32 45 30 30 32 30 32 46 44 33 33 0D

ASCII: ~20024642E00202FD33 +0x0D

But, it's not working for me, the RS485 interface is silent, not replying. I've set the port to 115200, 8 bit, no parity.

Also, the strange is, that there's a voltage around 2-3V between the RS485 A/B pins on the PLC, while A/B pins on the battery are without any voltage.

I used a cat5 ethernet cable.  On the battery side the A/B pins are pins 7 and 8, the brown pair.

What works for me is solid brown to the TX- pin on my adapter, striped brown to TX+.  115200 baud rate.

 

  • Author

Yep. I used ethernet CAT5 cable too, since I'm keeping a box of Belden in my workshop ;)

In the US3000 manual, there's a nice pinout drawing included, so I crimped RS485 cable according to it. Excatly like @Elbow is saying:

  • pin 6 GND
  • pin 7 RS485 A
  • pin 8 RS485 B

Screenshot of the manual page included bellow.

  1. Anyway, I really had no luck talking to the batteries via RS485. Maybe that I'm missing terminator on one side of the bus, I don't know...
  2. So, I tried the RS232 serial console and RJ-11 port too. It was working, but still not really convinient for automatic parsing of the values.
  3. In the end, I connected Pylons to my PLC via CAN Bus and it worked like a charm. Pylons are broadcasting the most important values over CAN, so you don't have to actively "talk" to them. With just listening on the CAN interface I can now read SoC, SoH, Voltage, Amps and Temperature of the battery stack. The CAN protocol implementation in Pylons is not so rich as RS485 implementation is, but for me it's okay, as I don't really need to see individual cell's values in my home automation. (For this, I can still use the BatteryView.exe.)

 

image.png.47cf590448c2fda24adfc8ed74d513e7.png

image.png.d616cf3fb549b56c969a82b2ad659429.png

 

A complete manual with wiring of the other cables for Pylontech is here: https://solaradvice.co.za/wp-content/uploads/2018/12/US3000B-Plus-Product-Manual-20180717.pdf

 

 

  • 2 weeks later...

I didn't use any termination. Elbow's program gives me output.

The program does give me some funny values though on the uS3000s

"BatterySOC":0.0, "RemainingAh":0.0, "RemainingWh":0, "MinutesToRun":9999. The other values seem OK.

I'm not able to get the cable working with ICC though, the Pylon battery option is not select-able.

Edited by 1Hallux
ICC question

1 hour ago, 1Hallux said:

I didn't use any termination. Elbow's program gives me output.

The program does give me some funny values though on the uS3000s

"BatterySOC":0.0, "RemainingAh":0.0, "RemainingWh":0, "MinutesToRun":9999. The other values seem OK.

I'm not able to get the cable working with ICC though, the Pylon battery option is not select-able.

Hi,

The "minutes to run" only works when the battery is discharging, otherwise it says 9999.

The others should work, i’ll look at the code when i’m home tomorrow and maybe we can see which output is different and fix it.

 

ICC only supports RS232 communications. You'll need Manie or Riaan to configure ICC for the Pylontech battery RS232 comms. Mainly i think they specify the baud rate. They actually sell a dedicated lead that forces baud rate for the Pylon batteries...

 

As a bypass on ICC though, connect your laptop up via rs232 to the pylontech (this sets the batteries baud rate to the right one) then unplug without disconnecting from battery view, then try rs232 comms to ICC... Should work.

4 hours ago, TenaciousTech said:

ICC only supports RS232 communications. You'll need Manie or Riaan to configure ICC for the Pylontech battery RS232 comms. Mainly i think they specify the baud rate. They actually sell a dedicated lead that forces baud rate for the Pylon batteries...

 

As a bypass on ICC though, connect your laptop up via rs232 to the pylontech (this sets the batteries baud rate to the right one) then unplug without disconnecting from battery view, then try rs232 comms to ICC... Should work.

Thanks. Will make up a cable - if I can find my serial to USB converter..

9 hours ago, TenaciousTech said:

i'm just getting nothing out of my pylons over RS-485, even with your Pylon script. Have you guys found them temperamental with usb to rs285 adapters? I've tried 3 different units. No luck. 

Hi,

I had no trouble with my Pylon’s, but couldn’t come right with the Carlo Gavazzi ET112 until I got the Victron USB/RS485 adapter and then it was fine.

Usually 115200 bps for the Pylon.  You can try your A/B the other way around?

RS485 adapters often have a FTDI chip in them and cheap ones have clones and they don’t always work, especially because the maker of the original FTDI put something in the windows driver that can “kill” the clone chips.

Hope you can come right.

 

Is the following a typical response when pressing <enter> using the console/RS232 cable?

~200146060000FDAD
~200146060000FDAD
~200146060000FDAD
~200146060000FDAD
~200146060000FDAD

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.