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
- Follow the GoodWe inverter installation manual up to the point when you plug the comms and battery connector terminals in
- Unsolder (If needed!) the canbus terminating resistor on the Lilygo board (as per above)
- Connect both the inverter canbus and battery canbus to the board
- Double check your code to make sure the contactors will isolate under the required fault conditions
- Plug in the battery connector (make sure the terminals are not live)
- Double double check all your wiring.
- Switch your battery breaker on
- Enable the contactors and the inverter will configure and connect if all has gone well.
- Configure the inverter with the battery connected
- Use app Solar Go to connect to inverter via Bluetooth
- Go to quick settings (password: goodwe2010)
- Select battery. Hopefully it recognizes battery without any user intervention. (HVM*2 works if using both battery inputs form same battery).
- 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.
- Set charging schedule. (app is very buggy here!)
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
- First start the GoodWe inverter via AC switch
- Turn ON the Solar DC safety disconnect switch
- Turn ON the Battery DC safety disconnect switch
- Start the LilyGo hardware
- Start the Battery BMS
- Then either handle precharge/contactor closing manually or let the LilyGo hardware handle it automatically
Shutdown
- If relevant; set power limit (ampere) for charge and discharge to 0 in LilyGo web UI.
- Turn off the Battery BMS, cut the 12V supply to it.
- Wait 60 seconds
- LilyGo status LED will turn red when no battery detected. The inverter will stop using the battery.
- Wait 30 seconds.
- Turn off the power to battery contactors incase the LilyGo isn't setup to automatically open them
- Turn off the LilyGo board
- 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)