Inverter: Deye - dalathegreat/Battery-Emulator GitHub Wiki

[!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 Deye inverters

  • Deye SUN 5-25K-SG01HP3-EU-AM2 ✅
  • Deye SUN 29.9-50K SG01HP3-EU-BM3 ✅
  • Deye SUN 8/10/12/15K-SG01HP2-US-AM2 ✅ī¸

[!WARNING] Sol-Ark manufacturer has turned on location validation in recent firmwares. This in turn disabled the inverters if they are used in the UK, US, Canada and Pakistan. Be careful with connecting your Deye inverter to the internet!

Picture of remotely disabled unit in the US:

image

Communication wiring

The Deye 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 Deye inverters

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

#define CAN_BYD //Enable this line to emulate a "BYD Battery-Box Premium HVS" over CAN Bus

Needs to be uncommented for the software to emulate the BYD protocol over CAN. 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!

Connecting the low voltage wiring

  • Use the BMS1 (or BMS2) port on the Deye
    • Pin 4 CAN-H , and Pin 5 CAN-L (See Deye manual for RJ45 pinout)

bild

Set the Deye to Lithium Mode, 01

bild

If you connected everything correctly, you will see data on the display:

bild

Installation examples

bild

Special notes

[!NOTE]
If you intend on using BYD-CAN with the BMW i3, the battery needs to be on a separate CAN bus. The BMW i3 is using the same CAN IDs as BYD do, so if you try to run them both on the same bus the IDs will collide and values get interpreted wrong. There are a few ways to solve this: