Home - 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.

Welcome to the Battery-Emulator wiki!

How do I get started?

Where do I get the hardware needed?

There are many hardware kits that can run the Battery-Emulator software. The cheapest and most common board is the "LilyGo T-CAN485". For those that need more reliable and certifiable hardware, the "Stark CMR" is highly recommended. Here are all alternatives:

Product Product Link Notes CAN interfaces
LilyGo T-CAN485 AliExpress Cheap! CAN & Modbus! 1 (+ 1 soldered add-on)
Stark CMR Module Wiki page Professional HW, CE certified, Massive I/O 2
LilyGo T-2CAN Wiki page Cheap! Dual isolated CAN 2 (+ 1 soldered add-on)
3LB Coming soon Open source triple-CAN 3
LilyGo Motherboard Wiki page A DIN mounting solution with CANFD and contactor drivers 2
ESP32 Devkit V1 Wiki page Build your own! For expert tinkerers

[!NOTE]
There is no way to purchase a pre-programmed device. This is a hobbyist open source project. You will be responsible for loading the software and setting it up correctly for your components. There is however a support Discord group available.

Supported inverters list

The following solar inverters have support. Remember to double check that the voltage range of your inverter matches the battery you intend to use. Click the link in the "Vendor" tab to get a more detailed page about how to set up a specific inverter with the Battery-Emulator. Also pay attention to the star rating to see how easy the inverter is to use.

  • :star: Compatible, but requires significant effort to setup and operate. Not recommended for beginners.
  • :star::star: Works well with some limitations.
  • :star::star::star: Very well supported inverter. Multiple success stories. Beginner friendly.
Vendor Product Name phases Supported Notes Battery voltage
Afore Afore AF17K-THA 230V 3 Good option for Norway IT 150–800V
Canadian Solar CSI-TE & CSI-HE & CSI-BHE Series ⚠️ Untested, works with HVS / HVM
Deye SUN-(5-20)K-SG01HP3-EU-AM2 3 ✅ ( :star::star::star: ) Requires precharge
Deye SUN-(29.9-50)K-SG01HP3-EU-BM3 3 ✅ ( :star::star::star: ) Both BYD_CAN and PYLON_CAN work Requires precharge
Ferroamp EnergyHub 3 ✅ ( :star::star: ) 174-432V
FoxESS FoxESS H1/AC1 1 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 80-480V
FoxESS FoxESS H3/AC3 3 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 180-600V
FoxESS FoxESS H3 Smart 3 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 100-800V
FoxESS FoxESS H3 Pro 3 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 150-850V
Fronius Primo Gen24 Plus 1 ✅ ( :star::star::star: ) 150-455V (Precharge inside inverter)
Fronius Symo Gen24 Plus 3 ✅ ( :star::star::star: ) 160-531V (Precharge inside inverter)
Fronius Symo Hybrid 3.0/4.0/5.0-3-S 150-455V
Fronius Verto Plus 15-33kW ⚠️ Untested, works with HVS / HVM xxx-700V
GE GEH5.0/8.6/10-1U-10 1 GEH10 Tested. Made by GoodWe
GoodWe ET hybrid solar 3 ✅ ( :star::star::star: )
GoodWe BT AC battery inverter 3 ✅ ( :star::star::star: )
GoodWe EH hybrid solar 1 ✅ ( :star::star::star: )
GoodWe BH AC battery inverter 1 ✅ ( :star::star::star: )
GoodWe EHB hybrid inverter (South Africa only) 1 ✅ ( :star::star::star: )
GoodWe A-ES hybrid inverter (America Split Phase) 1 ✅ ( :star::star::star: )
Growatt HV Growatt SPH
Growatt WIT WIT 50-100K-HU/AU ⚠️ :zap: Testing ongoing!
Growatt LV N/A ⚠️ :zap: Testing ongoing!
Huawei SUN2000 ❌ Requires DC/DC converter, NOT supported
Ingeteam STORAGE 1Play TL M (3-6 kW) 1
KACO Blueplanet hybrid 6.0- 10.0 TL3 3 ⚠️ Untested, works with HVS / HVM
Maple Leaf Northern Fox H1-H3-AC1-KH 1/3 ✅ ( :star::star: ) Rebranded FoxESS inverter 150-850V
Kostal Plenticore N/A ✅ ( :star: ) RS485 120-650V
Schneider XW PRO ⚠️ :zap: Testing ongoing! 48V
SMA Sunny Boy Storage 2.5 / 3.7 / 5.0 / 6.0 ✅ ( :star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 100-550V
SMA Sunny Island 4.4M / 6.0H / 8.0H ⚠️ :zap: Testing ongoing! 48V
SMA Sunny Boy Smart Energy 3.6 / 4.0 / 5.0 / 6.0-50 Hybrid Inverter 1 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel!
SMA Sunny Tripower SE Smart 5.0-10.0 SE 3 ✅ ( :star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 150-600V
Sofar 5K...20KTL-3PH 3
SolaX X1 Hybrid 1 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel! 80-480V
SolaX X3 Hybrid 3 ✅ ( :star::star: ) Cannot co-exist on EV battery CAN channel. Needs its own CAN channel!
Solxpow Solxpow X3 12-20kW 3 135-750V
Solinteg MHT 10-20kW 3 Untested, should work 135-750V
Solis RHI-3P(5-10)K-HVES-5G 2 ✅ ( :star::star::star: ) / S6-EH1P10K-H-US-APST US model (120-220V AC) 120-500V
Solis RHI-3P(5-10)K-HVES-5G 3 ✅ ( :star::star::star: ) / S6-EH3P-(5-10.0K)-H-EU 300-950V
Sol-Ark LV 48V ? ⚠️ Testers wanted 48V
Sungrow SH5.0/6.0/8.0/10RT 3 ✅ ( :star::star: ) Some AU models not supported 150-600V
Sungrow SH3.0/3.6/4.0/5.0/6.0RS 1 Some AU models not supported 80-460V
VIESSMANN Hybrid Inverter 5.0/6.5/8.0/10.0 A-3 ⚠️ Untested, works with HVS / HVM
ZCS Azzurro TODO 1/3

Supported batteries list

Be sure to checkout the installation guidelines section for how to install your battery. Amount of stars :star: signal how mature and stable the integration is.

  • :star: Works, but many values estimated or functionality missing. Expect manual tweaking to keep battery operational
  • :star::star: Integration has minor known issues or missing features. Manual interventions sometimes required.
  • :star::star::star: Very well supported battery. Longterm stability confirmed without user interaction. Many success stories from users.

If the battery has a :b: symbol, cell balancing has been confirmed working (Important for longterm operation)

(Car) Manufacturer Product Name # kWh Supported Voltage range Notes
BMW BMW i3 (all sizes) 18/22/40 ✅ ( :star::star::star: ) 270-400V
BMW iX & i4-7 Platform 68 / 80.7 ✅ ( :star::star: ) :b: 270-464V Manual contactor control
BMW PHEV (330e/530e etc) 12/24 ⚠️ Testing ongoing (2021+ Gen4 CAN logs wanted!) 270-400V Manual contactor control
BYD BYD Atto 3 / Yuan Plus 50/60 ✅ ( :star::star: ) 380-440V
BYD BYD Seal 60 ✅ ( :star::star: ) 380-440V
Chevrolet Bolt 60/66 ✅ ( :star: ) 330-403
Citroen C-Zero 16 ✅ ( :star: ) 310-370V
Citroen ë-C4 2020+ (Stellantis eCMP) ? ⚠️ Testing ongoing 320-450V
Dacia Spring 27 ✅ ( :star::star: ) 216-302V
Ford Mustang Mach-E 66/88 ✅ ( :star: ) 300-410V
Geely Geometry C 53/70 ⚠️ Testing ongoing 270-417V*
Hyundai E‐GMP platform 58.2/72.6/77.4/84 ⚠️ (Integration ongoing!) 430-806V SoC not updating, contactors not closing
Hyundai Kona 39/64kWh 39/64 ✅ ( :star::star::star: ) 230-410V*
Hyundai Kona Hybrid 2 ⚠️ Testing ongoing
Hyundai Santa Fe PHEV 14 ✅ ( :star::star: ) 290-400V
Jaguar I-PACE 90 ⚠️ Testing ongoing
Kia e-Niro 39/64kWh 39/64 ✅ ( :star::star::star: ) 230-410V*
Kia Niro Hybrid 2/9 ⚠️ Testing ongoing
Kia EV6 58.2/72.6/77.4 ⚠️ Testing ongoing 430-806V SoC not updating, contactors not closing
Land Rover Land Rover ⚠️ Untested base added
Mini Cooper electric 32 ✅ ( :star::star::star: ) 270-400V
Mitsubishi i-Miev 16 ✅ ( :star: ) 310-370V
MG HS PHEV 16 ✅ ( :star: ) 310-378V
Nissan Ariya 87/63 ⚠️ (CAN logs wanted!)
Nissan LEAF 24/30/40/62 ✅ ( :star::star::star: ) :b: 300-400V
Nissan e-NV200 24/40 ✅ ( :star::star::star: ) :b: 300-400V
Opel Ampera-e 60/66 ✅ ( :star: ) 330-403
Peugeot Ion 16 ✅ ( :star: ) 310-370V
Polestar 2 78 ✅ ( :star::star: ) 290-450V
Renault Kangoo 22/33 ✅ ( :star::star: ) 300-400V
Renault Fluence ZE 22/36 ✅ ( :star: ) 300-400V
Renault K‐ZE 27 ✅ ( :star::star: ) 216-302V
Renault Twizy 6.1 ⚠️ Testing ongoing 48V
Renault Zoe Gen1 22/41 ✅ ( :star::star::star: ) 300-400V
Renault Zoe Gen2 52 ✅ ( :star::star: ) 300-400V
Rivian R1T 135 ✅ ( :star::star: ) 300-400V
Tesla Model 3 & Y (all sizes) All ✅ ( :star: ) 280-400V Note, balancing not working. Battery needs to be off for it to balance, making it unsuitable for stationary storage.
Tesla Model S & X (2021+) All ✅ ( :star: ) 310-460V Note, balancing not working. Battery needs to be off for it to balance, making it unsuitable for stationary storage.
Volkswagen MEB Platform 48/55/61/82 ✅ ( :star: ) 252-450V* Requires extra precharge circuit
Volvo EX30 55/69 ⚠️ (CAN logs wanted!) 300-460V
Volvo XC40/C40 69/78/82 ✅ ( :star::star: ) 290-450V

Other batteries

Supported chargers list (optional)

Emergency charging batteries via a generator, supported via the following standalone chargers:

Shunts

How do I configure the software for my battery/inverter?

All the changes to the software are done on the Change Settings page, which can be accessed thru the Webserver. At the top of this webpage, you can select which battery, inverter protocol and what interface they are connected to. If you are unsure which protocol you need, check the specific page for the battery/inverter you are using linked here in the Wiki

How do I know what battery/inverter interface to use

This depends which hardware you are using for the Battery-Emulator. For instance Stark CMR uses "Native CAN" for CAN1, and "Native CAN FD" for CAN2. See the Wiki page for the hardware you are using for more info

Status LED

The board has a built in LED that is used to signal current status. With this feature, it is easy to at a glance catch what info the board is getting. It will show the current colors:

  • Pulses 🟢 if all is well and BMS is active
  • Pulses 🟡 if battery has entered a warning state
  • Solid 🔴 if battery goes into a fault state

By visiting the "Events" page in the Webserver, you can see which specific warnings/faults are active

CAN wiring troubleshooting

This section has been expanded and moved here

Note! CAN networks are vulnerable to lightning strikes. See the dedicated wiki page for this for more info :cloud_with_lightning:

What about safety? ⚠️ ℹ️

Reusing old often crashed EV packs always comes with risks. The system performs a few safety functions for safer charging and discharging. Apart from this, the data sent to the Inverter is also processed on the inverter side, and depending on which inverter is used a few additional safety checks are performed there. Here is a list of all safety functionalities that are in the system. Note that almost all safety features rely on communication data, so a physical error (damaged cell casings, ruptured/leaking cells, corrosion etc.) wont be detectable via software. For this you need fuses, and periodic visual inspections.

[!TIP] Be sure to checkout the installation guidelines section for how to install your battery

[!CAUTION] At the end of the day, you alone are responsible for the system.

Safety features run on (most) inverter(s):

  • Battery sends max total voltage allowed for charging. Incase this value is reached, inverter stops charging. (For instance 404V)
  • Battery sends min total voltage allowed for discharging. Incase this value is reached, inverter stops discharge (For instance 300V)
  • Battery sends max cell temperature. Incase this value goes too high, inverter stops charge/discharge (For instance 40*C)
  • Battery sends min cell temperature. Incase this value goes too low, inverter stops charge/discharge (For instance -15*C)
  • Battery sends max allowed charge in Watts. Incase this goes to 0W, no further charging is possible. (This can happen when battery is full)
  • Battery sends max allowed discharge in Watts. Incase this goes to 0W, no further discharge is possible. (This can happen when battery is completely empty)
  • Battery sends state of health %. Incase this value drops too low, the inverter will alert the user that it is time to recycle the battery.
  • Inverter analyzes insulation resistance of the battery connection. Incase a leakage to ground is detected, the system stops.

Safety features run on Battery-Emulator side:

  • If the code enters FAULT state, inverter gets notified, all charging/discharging stops, and contactors are opened (if they are controlled via GPIO pins).
  • If CAN communication is lost between emulator and battery for more than 60s, the code enters FAULT state.
  • Total pack voltage is sampled, if it goes too high it sets allowed charge power to 0. If it continues to rise, we enter FAULT mode
  • Total pack voltage is sampled, if it goes too low it sets allowed discharge power to 0. If it continues to fall, we enter FAULT mode
  • Minimum cell voltage is sampled, and if one cell goes too low the code enters FAULT state. (For instance <2900mV)
  • Maximum cell voltage is sampled, and if one cell goes too high the code enters FAULT state. (For instance >4250mV)
  • Battery state of health % is sampled, if it is below 25% the code stops and informs the user that it is time to recycle the battery.
  • BMS fault codes are sampled, if any serious code is set, the code enters FAULT state (For instance LB_Failsafe_Status on Nissan LEAF packs)
  • High voltage wiring is unhooked during operation. This will trigger interlock messages, and the code enters FAULT state
  • Incase of a high voltage leak to battery casing (Protective earth), the code enters FAULT state (For instance LB_Failsafe_Status on Nissan LEAF packs)

[!IMPORTANT]
Do note that all actual limits are battery/inverter specific, the values here are only used for example purposes. The amount of safeties will vary depending on your choice of battery.

[!TIP]
You can also add an equipment stop button to the Battery-Emulator, to increase the amount of safety.

Connectivity

The board has wifi, and supports running a Webserver that you can connect to for real time values, Over The Air updates (OTA), cellmonitoring, changing settings and more. See the Webserver page for more info on how to use the system

For those into home automation, the code also supports MQTT