Fork: 48 Star: 300 (更新于 2023-06-02 16:42:59)

license: GPL-3.0

Language: C++.

This software converts the LEAF CAN into Modbus RTU registers understood by solar inverters that take the BYD 11kWh HVM battery


BYD-Battery-Emulator-For-Gen24 ⚡🔋

This software converts the LEAF CAN into Modbus RTU registers understood by solar inverters that accept the BYD 11kWh HVM battery. This enables a very easy way to use EV batteries for plug'n'play storage solutions.

alt text

Hardware requirements 📜

This code fits on the LilyGo ESP32 T-CAN485 devboard , see

You will also need a Nissan LEAF battery, any model year will do

Finally, you will need a hybrid solar inverter that accepts the BYD battery communication standard, for example the Fronius Gen24

Installation basics 🪛

  1. Connect one end of the LilyGo RS485 to the Gen24 Modbus
  2. Connect the other end of the LilyGo to the CAN side of a LEAF battery
  3. Wire up high voltage cable between the Gen24 and the LEAF battery. Install a DC high voltage fuse.
  4. Add a 12V power source to power the LilyGo and the LEAF battery (uninterruptible PSU or 12V lead acid recommended in parallel)
  5. Manually handle pre-charge circuit + positive/negative contactor on LEAF battery for now (circuit will be improved soon)
  6. Enjoy a big cheap grid connected battery!

Wiring examples 💡

Here's how to wire up the communication between the components. alt text

Here's how to connect the high voltage lines alt text

Here's how to wire up battery low voltage wiring alt text

For more examples showing wiring, see the Example#####.jpg pictures in the 'Images' folder

How to compile the software 💻

  1. Download the Arduino IDE:
  2. When the Arduino IDE has been started; Click "File" in the upper left corner -> Preferences -> Additional Development >Board Manager URL -> Enter the URL in the input box
  3. Go to "Boards Manager", and install the ESP32 package by Espressif Systems
  4. The arduino settings should be set to "ESP32 Dev Module" with the following settings; alt text
  5. Press Verify and Upload to send the sketch to the board

Dependencies 📖

This code uses two libraries, ESP32-Arduino-CAN ( slightly modified for this usecase, and the eModbus library ( Both these are already located in the Software folder for an easy start.

It is also based on the info found in the following excellent repositories:

Like this project? 💖

Leave a ⭐ If you think this project is useful. Consider hopping onto my Patreon to encourage more open-source projects!

最近版本更新:(数据更新于2023-06-05 05:30:17)


2023-06-05 21:47:06 CleverRaven/Cataclysm-DDA

2023-06-04 20:55:19 yuzu-emu/yuzu-mainline

2023-06-04 03:54:06 pineappleEA/pineapple-src

2023-06-03 22:32:30 Slackadays/Clipboard

2023-06-03 04:24:48 electron/electron

2023-06-03 02:14:14 prusa3d/PrusaSlicer