Skip to content
Manos1966 edited this page Nov 18, 2023 · 39 revisions

Tools for Pylontech US2000c/US3000c/US5000

Pylontech Battery BMS can communicate through a RS232 serial communication connection at the "Console" port. Please note that this connection needs regular old-school RS232 levels - +/- 3-12V. If you use a USB to serial adapter, those with TTL (5V) or 3,3V levels DO NOT WORK.

You need a special crafted cable with RJ45 connector at the BMS side. You find USB-to-serial cables to buy for Cisco routers and other network equipment with a RJ45 connector, you can use these cables but must change the pinout! This is shown in this (lenghty) video.

grafik grafik

BatteryView Tool

https://www.panda-solar.de/Pylontech-US5000-Energiespeicher.html

look at "Produktdatenblatt / Downloads" beside the description ("Beschreibung")

Deep link: https://www.panda-solar.de/images/BatteryView_us2000b_series_3-0-2-28_2.zip

Firmware

Information about firmware problems: https://community.victronenergy.com/questions/182659/pylontech-us3000c-us5000-internal-failure-problem.html

Important! Use at your own risk! Read before flash anything!

Update-Program and Firmware: https://www.effekta.com/download/firmwareupdate-for-us2000c-3000c/

CAN-Bus connection

OpenDTUonBattery can connect with the Pylontech batteries using CANbus. You need a simple module that can receive data (no transmition required). Following modules have been found to be working well:

CAN Bus Shield with TJA1050 CAN Bus Shield with TJA1050 successfully tested with Pylontech battery

SN65HVD230 CAN-Board SN65HVD230 CAN-Board 1

Connections to the RJ45 Port Pin:

  1. CAN L goes to PIN5
  2. CAN H goes to PIN4
  3. CAN Ground goes to PIN6 Pin Layout and Pylontech - - Copy

Warning! On some SN65HVD230 boards without termination jumper (pictured below), the terminating resistor between CANH and CANL (R2) must be removed in order to allow communication with the Pylontech battery (see https://github.com/helgeerbe/OpenDTU-OnBattery/discussions/245)

kloppy1984 Bei meinen Test hat es gestern nur ohne den R2 Widerstand funktioniert.

Cheap SN65HVD230 shield

The need for terminating resistor between CANH and CANL (R2) depends on the kind of cable you are using (shielded vs unshielded twisted-pair) Here is some technical information: Diagnosing CANBUS Communication Problems

There must be exactly two (2) termination resistors of 120 ohms each at the physical ends of the CANBUS. Both termination resistors must be on the physical ends of the CANBUS (ends of the main trunk). If they are not at the physical ends of the network, then the effectiveness of the termination filtering resistors will be negated. Always use termination resistors. Even if the network appears to operate without termination resistors in quiet environments, it may not operate correctly when noise is introduced!

All CANBUS wire must be twisted pair cable, even short lengths (longer than 1 inch / 2 cm). The twisted pair wire is an essential part of how the differential mode filtering works on CANBUS, and without it, the signal can be easily distorted.

If the CANBUS wire being used is a shielded (twisted pair) cable, the shield should be grounded on one end only. If both ends of the CANBUS wire shield are grounded then ground loops may be formed which can cause interference.


Pylontech Emulator

Python script to emulate the outgoing CAN bus from Pylontech

If you do not have a Pylontech battery yet, you can still test your OpenDTU CANbus installation with an Emulator:

PYLON_EMU Python script to emulate the outgoing CAN bus traffic from a Pylontech LFP battery pack (48V)

https://github.com/juamiso/PYLON_EMU

It requires a raspberry pi (or a linux machine) plus extra hardware (Waveshare RS485 CAN HAT) to communicate via CAN. 71S-zVRmy1L AC_SL1500 - Copy

See a short screen capture video showing the function of it. https://www.youtube.com/watch?v=CiFts8KZV6k Currently only the keep alive message is being modified every second (incremented by one). The rest of the values are static (but can be modified in the script to be set on-the-fly) https://www.youtube.com/watch?v=CiFts8KZV6k

Required CANtools package, install it using: python3 -m pip install cantools

https://www.waveshare.com/wiki/RS485_CAN_HAT

Install the Waveshare RS485 CAN HAT Your Waveshare RS485 CAN HAT version will probably have a 12M crystal so the config.txt lines should be

dtparam=spi=on

dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000

WICHTIG! YOU MUST CHANGE THE CAN0 bitrate before starting the program. Type following command:

sudo ip link set can0 up type can bitrate 500000

Then change to the directory where you have the two files pylon_can.py & pylon_CAN_210124.dbc

UPDATE: You need to edit the pylon_cyc.py and change

Lines 140-141:

for interface, channel in [

('socketcan', 'vcan0'),

into:

for interface, channel in [

('socketcan', 'can0'),

After that run the pylon_can.py script with the command:

python pylon_can.py

which will look like this:

temp

Clone this wiki locally