A CHEAP ESP32 BOARD TURNS A CRASHED EV'S BATTERY INTO YOUR HOME POWER WALL

A crashed EV still holds 40-60 kWh of good cells, but speaks only the manufacturer's private CAN protocol — this firmware makes a solar inverter understand it.

by Daniel Öster

FULL CAD BOM FIRMWARE DOCS

EnergyOpen-hardware

Built withESP32

difficulty
●●●●●
time
a weekend-plus
license
GPL-3.0
repo
repo ACTIVE2,950 stars
3
Jump to section

COMPAREE VERDICT

Battery-Emulator is firmware that runs on a cheap ESP32-based board and translates the proprietary CAN bus protocol of a salvaged EV battery pack into the protocols that home solar inverters speak. The result: a crashed car's battery becomes usable home storage instead of landfill. The firmware is mature, with nearly 3,000 GitHub stars and active development. What will actually be hard: sourcing a salvaged pack safely, handling 300-400V DC, and navigating local rules around grid-tied storage. The firmware is the easy part. The pack is the expensive part, and salvage prices vary widely with capacity and condition. The regulation is the part most likely to stop you: many regions require a licensed electrician or an inspection for grid connections, and the project itself tells you to follow local high-voltage rules and consult an electrician if unsure. If you have access to a pack, the skills to work at high voltage, and the legal clearance, this is a proven route to cheap storage. If any of those is missing, this project will waste more than a weekend.

GOOD TO KNOW

  • —Firmware is complete and supports dozens of EV packs (Tesla, Nissan Leaf, BMW i3, Kia, Renault, Hyundai, Volkswagen and more).
  • —The wiki lists the compatible boards with a newcomer-friendliness rating: the LilyGo T-2CAN is the cheap recommended option and the Stark CMR the certifiable one. The original LilyGo T-CAN485 still works but carries a limited-flash warning.
  • —No CAD files — this is a software project that runs on a commercial board.
  • —Wiki includes wiring diagrams, supported inverter list, and configuration instructions.
  • —GPL-3.0 licence permits commercial use.
  • —This is high-voltage DC work (typically 300-400V) and connecting to the grid is regulated in most jurisdictions.

Parts to buy

6 items

From our check of the build. Exact quantities and part numbers are in the creator’s BOM.

  • Compatible board from the wiki listFind
  • Salvaged EV battery packFind
  • Compatible solar inverter if you do not already have oneFind
  • Low-voltage power supply for the boardFind
  • CAN cable and connectorsFind
  • Safety equipmentFind

BUILDS OF THE WEEK

Five open-source builds worth your weekend, every week.

Checked like this one: what’s really in the repo, what it costs, how hard it is. One email, unsubscribe anytime.

Can I build this?

Printnothing required
BuyA compatible board from the wiki list (LilyGo T-2CAN as the cheap option, Stark CMR for certifiable hardware), a salvaged EV battery pack (by far the largest cost; prices vary widely with capacity and condition), a compatible solar inverter if you do not already have one, a low-voltage power supply for the board, CAN cable and connectors, safety equipment (insulated gloves, multimeter rated for the voltage)
Toolscomputer for flashing firmware, multimeter rated for high voltage DC, soldering iron if you need to add connectors, electrician's tools if grid-tying
Skillshigh-voltage DC electrical work (this is not beginner territory), ability to read wiring diagrams and configure firmware via web interface, understanding of battery management and grid-tie regulations in your region
Timea weekend-plus: flashing firmware is an evening, wiring and testing the pack is a full day if you know what you are doing, longer if you are learning as you go, plus however long it takes to satisfy local electrical inspections if grid-tying
Cost$$$: the board is cheap but the pack dominates the cost, plus inverter if you do not have one, plus any required inspection or certification fees
SafetyHigh-voltage DC (typically 300-400V). Salvaged packs can have damaged cells or poor insulation. A short at this voltage can cause lethal shock or fire. Insulated gloves and a high-voltage-rated multimeter are mandatory. Grid connection must comply with local electrical codes and is often illegal without a licensed electrician. Do not attempt this if you are not confident working with mains-level DC voltages.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

Videos

Community build video (Battery Man). For the official software install walkthrough, watch the creator's own 'Installing Battery-Emulator (2026 guide)', linked from the README.

More builds like this

All projects

Gallery

opengraph.githubassets.com
img.youtube.com

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the wiki overview and supported hardware list (Check whether your target pack and inverter are both supported before buying anything.)
  2. 2.Source a salvaged pack(Salvage yards, EV forums, and specialist dealers all vary in price and pack condition. Verify cell health if possible.)
  3. 3.Order a compatible board from the wiki's hardware list (the LilyGo T-2CAN is the recommended cheap option)(The wiki's hardware page rates each board for newcomers. There is no pre-programmed device to buy: you flash the firmware yourself with the web installer.)
  4. 4.Flash the firmware and configure for your pack (Web-based configuration interface; settings vary by pack type.)
  5. 5.Wire the board to the pack and inverter following the wiki diagrams(Double-check all connections before applying power. Use a multimeter to verify voltage and polarity.)
  6. 6.Comply with local grid-tie and electrical safety regulations(Many regions require inspection or certification. Check before connecting to the grid.)

Resources

Documentation, files and community threads for this build — we link straight to the original sources and never rehost the creator’s files.

KNOWN ISSUES

  • Buying a pack without verifying its condition first — salvaged cells can have hidden damage, and you will not know until you apply load.
  • Assuming your inverter is supported — the wiki lists compatible models, but not every brand or firmware version works.
  • Underestimating the voltage — 300-400V DC is not forgiving, and a cheap multimeter will not protect you.
  • Skipping local electrical regulations — grid-tied storage is illegal in many places without a licensed electrician or inspection.
  • Not having a plan for fire suppression — a thermal runaway in a 60 kWh pack is a structure fire, not a small battery incident.
  • Expecting the firmware to diagnose a bad pack — it translates CAN messages, it does not perform cell-level diagnostics.

Which EV packs are supported?

The wiki lists dozens of packs with a maturity rating, including Nissan LEAF (24, 30, 40 and 62 kWh), Renault Zoe, BMW i3, Hyundai Kona and Kia e-Niro 64 kWh, the VW/Audi/Skoda/Cupra MEB platform, BYD Atto 3, Stellantis eCMP cars and Tesla Model 3/Y and S/X. Some packs (Kia Soul EV, Kia EV6, MG4 and others) are still work in progress. Check the supported hardware page and its star rating before buying.

Do I need a specific inverter?

The firmware emulates several common protocols (SMA, Pylontech, SolaX, BYD), so many inverters work. The wiki has a compatibility list — verify yours is on it.

Can I use this off-grid?

Yes, if your inverter supports it. Off-grid use avoids most of the regulatory complexity of grid-tied systems.

Is this legal?

Legality depends entirely on where you live. Many regions require a licensed electrician or an inspection for grid-tied installations, and rules for reusing salvaged packs differ by country. The project itself tells you to follow local high-voltage regulations and consult a licensed electrician if you are unsure. Check local codes before starting.

How long does a salvaged pack last?

Depends on the pack's history and how hard you cycle it. A well-cared-for pack can last years; one from a high-mileage car or a crash with cell damage will degrade faster. There is no blanket answer.

Does a repurposed EV battery need its cooling system for home storage?

Mostly no, but "no cooling" is not the same as "no thermal management". Battery-Emulator reads the pack's original temperature sensors over CAN and exposes them on its web UI and over MQTT to Home Assistant. It enforces hard limits in firmware: above 50 C it raises a battery-overheat event that puts the system into FAULT and forces both charge and discharge power to 0 W. What it does not do is drive any cooling hardware - a feature request for a temperature-triggered output was closed by the author, who recommends a Home Assistant automation instead. The project's installation guide states that using the coolant loops "is usually not required at all" for temperate climates and points to shade and placement first; the loop matters mainly in hot climates, or as a heated loop to keep the pack working through winter. The physical reason is load: a typical home install runs around 0.2C (the guide's own example is a 5 kW inverter on a Nissan LEAF pack), versus the far higher currents of acceleration and fast charging in the car. Two caveats are easy to miss. If you also repurpose the EV's onboard charger, liquid cooling there is mandatory - running it dry works for a few minutes before it shuts off. And Battery-Emulator's cold cutoff is -25 C, far below the 0 C limit under which lithium-ion must never be charged; in the firmware that cold event is only informational, so it does not stop charging for you - cold-charge protection is on you. Manufacturer datasheets derate above freezing too: Panasonic specifies charging at 0.25C below 10 C, so a cold pack should not take full charge current even above 0 C. Ignoring temperature costs life even when nothing dramatic happens - cycle life drops about 20 percent at 30 C, about 40 percent at 40 C, and roughly half at 45 C compared with 20 C. The pack's original BMS remains an independent safety layer, but software checks rely on communication data, so physical damage to a salvage pack will not be caught by software at all.

Will my home insurance cover a DIY battery installation?

Assume not until your insurer says otherwise in writing. Home policies commonly exclude damage caused by unpermitted electrical work or by equipment that is not listed or certified for the purpose, and a salvaged high-voltage pack wired in by the owner is exactly the sort of installation that fits both descriptions. The failure mode here is not a small one either: a lithium fire in a pack this size is a structure fire, which is why the project's own guide tells you to site it where a fire could not hurt anyone. Practical order of operations: ask your insurer before you buy anything, get the answer in writing, and ask specifically about a salvaged pack rather than about "a battery" in general. In many jurisdictions grid-tied storage also needs a permit and a licensed electrician, and a signed-off installation is usually the thing that keeps cover intact. Rules differ by country and by insurer, so nothing here replaces asking yours. Off-grid installations in an outbuilding are often treated differently from anything tied into the house supply, which is worth raising in the same conversation.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion3

FROM THE COMPAREE TEAM

Nearly 3,000 stars and dozens of supported packs, but the real gate is not the firmware, it is access to a salvaged pack and the local rules around using it. What is stopping you: the pack, the voltage, or the paperwork?

P

Pdoubled112mo ago

What information are you able to access on the BMS. Besides opening and closing contactors what else can you control on the pack?

CompareeTEAM2mo ago

It splits into two halves: what it reads out of the pack's own BMS, and what it can actually command. Reading is the part the whole project is built around. You get the real SOC and separately the scaled SOC it reports to the inverter, SOH, pack voltage and current, instantaneous power, remaining and total capacity in Wh, the pack's own max charge and discharge power and current limits, every individual cell voltage plus min/max and deviation, per-cell balancing resistor status where the manufacturer exposes it, min and max pack temperature, isolation resistance in kOhm on the packs that report it, the BMS state machine, balancing status, and up to 32 stored DTCs with their status. There is also a CAN watchdog counter, so it knows when the pack has gone quiet. Controlling is where the honest answer matters. Contactors are the main thing you command on the pack itself. Beyond that you set charge and discharge current limits and voltage limits, both as persistent user settings and as remote-set values with a timeout; an SOC window, where you pick the real min and max SOC and the inverter then sees 0-100 percent mapped onto that, which is probably the single best thing you can do for pack life; forced balancing with its own time limit, target cell voltage, allowed deviation and float power; and a time-limited recovery charge for a pack that has been left too flat, which deliberately overrides BMS limits and deserves respect. Then there are manufacturer-specific commands where the protocol allows them. On Tesla packs the firmware can trigger a BMS reset, clear an isolation fault and reset the SOC estimate, and there is a configurable daily BMS reset period. What it does not do is reprogram the OEM BMS. It speaks the pack's language and works inside what that BMS will accept.

CompareeTEAM2mo agoedited

Practical notes from our verification: the repository is well documented, with wiring guidance and a supported-battery list in the wiki, and an official quickstart video from the author's channel (Dala's EV Repair). Supported packs include Nissan LEAF, Renault Zoe, BMW i3, Hyundai Kona and Kia e-Niro, VW group MEB, Tesla Model 3/Y and S/X, BYD Atto 3 and Stellantis eCMP, each rated in the wiki for how well it works. The board itself is cheap and widely available. The expensive and uncertain part is the pack: salvaged packs vary a lot in price and condition. The biggest trap is assuming your region allows grid-tied storage built from a salvaged pack without inspection or certification; check before you buy. Off-grid use sidesteps much of that, but you still need the skills to handle high-voltage DC safely. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.

Daniel Öster

Daniel Öster (dalathegreat on GitHub) built Battery-Emulator to make salvaged EV packs usable for home energy storage. The project supports dozens of pack types and is under active development.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.