Giter VIP home page Giter VIP logo

battery-emulator's Introduction

Battery-Emulator โšก๐Ÿ”‹

GitHub release (with filter) GitHub Repo stars GitHub forks GitHub actions Static Badge

This software enables EV battery packs to be used for stationary storage. It achieves this by converting the EV battery CAN data into a brand battery format that solar inverters can understand. This makes it extremely cheap and easy to use large EV batteries in a true plug'n'play fashion!

alt text

Hardware requirements ๐Ÿ“œ

This code fits on the LilyGo ESP32 T-CAN485 devboard , see https://github.com/Xinyuan-LilyGO/T-CAN485

You will also need a complete EV battery. See the battery compability list on which are supported.

Finally, you will need a compatible hybrid solar inverter, for example the "Fronius Gen24" or "GoodWe ET"

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 the battery
  3. Wire up high voltage cable between the Gen24 and the battery
  4. Add a 5-12V power source to power the LilyGo and 12V to the battery (uninterruptible PSU or 12V lead acid recommended in parallel)
  5. Some batteries need manual pre-charge circuit and positive/negative contactor control. Others are automatic. See the wiki for more info.
  6. Enjoy a big cheap grid connected battery!

Wiring example, LEAF battery ๐Ÿ’ก

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

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

For more examples showing wiring, see each battery types own Wiki page. For instance the Nissan LEAF page

How to compile the software ๐Ÿ’ป

  1. Download the Arduino IDE: https://www.arduino.cc/en/software
  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 https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  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. Select which battery type you will use, along with other optional settings. This is done in the USER_SETTINGS.h file.
  6. Press Verify and Upload to send the sketch to the board. NOTE: In some cases, the LilyGo must be powered through the main power connector instead of USB-C when performing the initial firsmware upload. NOTE: On Mac, the following USB driver may need to be installed: https://github.com/WCHSoftGroup/ch34xser_macos

This video explains all the above mentioned steps: https://youtu.be/_mH2AjnAjDk

Dependencies ๐Ÿ“–

This code uses two libraries, ESP32-Arduino-CAN (https://github.com/miwagner/ESP32-Arduino-CAN/) slightly modified for this usecase, and the eModbus library (https://github.com/eModbus/eModbus). 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/websites:

Like this project? ๐Ÿ’–

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

battery-emulator's People

Contributors

dalathegreat avatar cabooman avatar lenvm avatar rjsc avatar levinswe avatar gingofthesouth avatar smaresca avatar kharnt0x avatar dependabot[bot] avatar mackelec avatar moorgrove avatar dimonlipko avatar jespersogt avatar starkjohan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.