Inverter: GoodWe - 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 Goodwe inverters

  • ET/BT
  • EH/BH
  • EHB

Communication wiring

The GoodWe inverter works via CAN. The LilyGo board can have both a CAN battery and a CAN inverter connected on the same pins.

ℹī¸ If communication is not working, you might have to temporarily uncomment "//InitialDataSent = 1" in function send_can_byd(). Start the LilyGo communication with the Inverter first, then battery BMS.

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

ℹī¸ Grounding is extremely important for GoodWe inverters. 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.

Installation instructions

  1. Follow the GoodWe inverter installation manual up to the point when you plug the comms and battery connector terminals in
  2. Unsolder (If needed!) the canbus terminating resistor on the Lilygo board (as per above)
  3. Connect both the inverter canbus and battery canbus to the board
  4. Double check your code to make sure the contactors will isolate under the required fault conditions
  5. Plug in the battery connector (make sure the terminals are not live)
  6. Double double check all your wiring.
  7. Switch your battery breaker on
  8. Enable the contactors and the inverter will configure and connect if all has gone well.
  9. Configure the inverter with the battery connected
  10. Use app Solar Go to connect to inverter via Bluetooth
  11. Go to quick settings (password: goodwe2010)
  12. Select battery. Hopefully it recognizes battery without any user intervention. (HVM*2 works if using both battery inputs form same battery).
  13. Suggest setting power limit (ampere limit) in LilyGo web UI at this point, if not already done. Take something low (5A?) until you feel confident the system works as intended.
  14. Set charging schedule. (app is very buggy here!)

afbeelding_2023-11-25_153042647

Starting and stopping the system

When turning the system on, follow this startup procedure. Work quick, to avoid the inverter getting stuck in battery not detected mode.

Startup

  1. First start the GoodWe inverter via AC switch
  2. Turn ON the Solar DC safety disconnect switch
  3. Turn ON the Battery DC safety disconnect switch
  4. Start the LilyGo hardware
  5. Start the Battery BMS
  6. Then either handle precharge/contactor closing manually or let the LilyGo hardware handle it automatically

Shutdown

  1. If relevant; set power limit (ampere) for charge and discharge to 0 in LilyGo web UI.
  2. Turn off the Battery BMS, cut the 12V supply to it.
  3. Wait 60 seconds
  4. LilyGo status LED will turn red when no battery detected. The inverter will stop using the battery.
  5. Wait 30 seconds.
  6. Turn off the power to battery contactors incase the LilyGo isn't setup to automatically open them
  7. Turn off the LilyGo board
  8. Turn off the Battery DC safety disconnect switch

Compiling the software for GoodWe 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!

Installation examples

(ONGOING APRIL 2024)