Skip to content
lenvm edited this page Dec 14, 2024 · 1 revision

Caution

Working with high voltage is dangerous. Always follow local laws and regulations regarding high voltage work. If you are unsure about the rules in your country, consult a licensed electrician for more information.

Compatible Sofar inverters

  • HYD 5KTL
  • HYD 6KTL
  • HYD 8KTL
  • HYD 10KTL
  • HYD 15KTL
  • HYD 20KTL

Communication wiring

The Sofar inverter works via CAN. The LilyGo board can have both a CAN battery and a CAN inverter connected on the same pins. When the board is used with two CAN devices at the same time that have termination resistors in all ends, the terminating resistor needs to be removed from the board. Please measure CAN termination if you have issues. This is explained in CAN-troubleshooting

ℹ️ Always check the termination resistance of the system! That way you know if resistor needs to be removed or not.

ℹ️ Grounding is extremely important. Make sure the battery case is connected to protective earth, and the shield part of the twisted pair CAN is connected to PE also! Failing to do this will result in CAN errors.

Compiling the software for Sofar inverters

  • Set the basics parameters of your battery in USER_SETTINGS.cpp

  • In USER_SETTINGS.h uncomment battery type which you’re going to use

  • Make sure that the settings in the "USER_SETTINGS.h" file are correct. The line:

#define PYLON_CAN //Enable this line to emulate a "Pylontech battery" over CAN bus

Needs to be uncommented for the software to emulate the Pylon protocol over CAN.

Important

The Pylon protocol is very versatile. By default we emulate a 4x96V Force H2 battery. Not all inverters like this setup, so please adjust the configuration if needed. Pylon options are located in the file /Battery-Emulator/Software/src/inverter/PYLON-CAN.cpp

Note also that Sofar inverters need to have some special flags set in the PYLON-CAN.cpp file. Uncomment both #define SEND_1 and #define INVERT_LOW_HIGH_BYTES and #define SET_30K_OFFSET

image

Next step is then to select the battery that you intend to use, for instance if you use LEAF battery, make sure the following line is uncommented:

#define BATTERY_TYPE_LEAF // See NISSAN-LEAF-BATTERY.h for more LEAF battery settings

After setting this up, flash the board!

Inverter Wiring

Connect HV cables to battery terminals using OEM connectors. Highly advised to add ~32A DC fuse between. bild

Connect CAN H and CAN L from Lilygo to socket no.8. CAN-H - PIN 7 CAN-L - PIN 8 bild

Inverter Configuration

In "Advanced Settings/Battery Parameters" choose Pylontech as battery type and set 01 as battery address (00 is default), save your settings. Check all fuses and everything else twice, then turn on Lilygo, and voila!

Sofar CAN

Sofar CAN is under development. Please use Pylon CAN in the meantime. See the attached .zip file for more info on this protocol SofarDocuments.zip

Clone this wiki locally