OffGrid Masterplan

— Dave. Measure twice, buy once.

ArticlesCalculatorsSite PlannerShop
Dave Miller, OffGrid Masterplan author

By Dave Miller · off-grid sparky · 22 years wiring solar, batteries and sheds in central QLD

“After blowing a $400 shunt on a used Nissan Leaf pack, I learned that voltage mismatch kills inverters faster than anything else.”

HomeCalculators & Guides › EV Battery DIY

The Easiest Way to Connect Used EV Batteries to Your Solar Inverter

Used Nissan Leaf battery pack connected to a solar inverter
A 30kWh Nissan Leaf battery pack powering a workshop via a Fronius Gen 24 inverter. Image: Dala's EV Repair.

Video: Dala's EV Repair — Connecting a used Nissan Leaf battery to a Fronius Gen 24 inverter

Used electric vehicle batteries are one of the best-kept secrets in off-grid energy. A three-year-old Nissan Leaf battery that has been written off for automotive use still has 80% of its original capacity, and it can run a home or workshop for under $2,000. The problem has always been the interface: EV batteries are designed to talk to their own onboard systems, not to a third-party solar inverter. That wall is what Dala's EV Repair has broken down.

Off Grid Workshop With Open Source Control

In this setup, a 30kWh Nissan Leaf battery (2017 model) powers a workshop eight months of the year, entirely off-grid, charged by 7kWp of rooftop solar. The inverter is a Fronius Gen 24. The communication bridge is a $20 LiLyGO S32 microcontroller running open-source code. No proprietary hardware. No special firmware. Just a CAN bus, a translation layer, and the right startup sequence.

This guide breaks down exactly how it works, what components you need, and how to replicate it at home.

Why Use EV Battery Packs for Solar Storage?

Purpose-built solar batteries like the Tesla Powerwall or Pylontech US5000 are convenient and well-supported, but they carry a premium price tag. A used Nissan Leaf module from a wrecker delivers roughly 24 to 30kWh of usable capacity for $500 to $1,500 AUD. That is less than half the cost per kilowatt-hour of a new solar battery.

The trade-off is engineering effort. EV batteries do not have a standard solar BMS output. They speak CAN bus, a protocol used for communication inside vehicles, not Modbus RTU or RS485 that most solar inverters understand. You need a translation layer. Dala has open-sourced exactly this on GitHub under the Battery Emulator project, and it works with both Nissan Leaf and Tesla modules.

Build Cheap High Capacity Batteries

For Australian off-grid builders, this opens up a genuine pathway to cheap, high-capacity storage. If you have a wrecking yard nearby or can import modules from overseas, you can build a 20 to 40kWh battery bank for a fraction of the commercial equivalent.

The Setup: What Dala Is Running

The system in the video consists of:

The system has been running for over two months without a single grid purchase. Dala plans to remake the install with proper foundations and fireproofing, but the core setup is proven.

The Junction Box: High Voltage to Low Voltage

EV battery packs output at high voltage. A Nissan Leaf module runs at roughly 350 to 400V DC when fully charged. Solar inverters like the Fronius Gen 24 accept a wide high-voltage DC input from solar panels, but the battery connection needs to be managed carefully.

In Dala's setup, the thick 50mm2 battery cable enters a junction box where it is downsized to 10mm2 cabling. This is necessary because the Fronius inverter's battery input terminals are rated for a maximum cable size of 10mm2. The junction box is essentially a reducers and a distribution point for the multiple cables required for the system.

The Startup Sequence

This is the part that trips most people up. You cannot simply connect an EV battery to an inverter and flip a switch. EV batteries have internal contactors that must be closed in the right sequence to avoid arcing and damage. Dala walks through the exact order:

  1. Turn on the pre-charge circuit
  2. Turn on the negative contactor
  3. Turn on the positive contactor
  4. Turn off the pre-charge resistor (to avoid burning it out)

The pre-charge resistor limits inrush current when the battery first connects to the inverter's DC bus. Without it, the sudden connection of a large capacitive load causes a spark that pits the contactor contacts and eventually destroys them. The pre-charge resistor absorbs that initial surge harmlessly.

Once the contactors are closed in sequence, the Battery Emulator firmware takes over and manages the battery's state of charge, cell balancing, and communication with the inverter. The full startup sequence is documented on the Battery Emulator GitHub page, along with wiring diagrams for the Fronius Gen 24 specifically.

The Communication Bridge: CAN to Modbus

On the communication side, the most interesting piece is the LiLyGO S32 microcontroller running the Battery Emulator firmware. It performs two functions:

  1. Reads CAN bus messages from the Nissan Leaf BMS
  2. Translates them into Modbus RTU registers that the Fronius Gen 24 understands

The LiLyGO S32 is a cheap ESP32-based development board with a CAN bus interface onboard. It costs roughly $20 to $30 AUD. The firmware is open source and actively maintained on GitHub. The same project supports Tesla batteries as well, which means you can use the same code base for either EV pack type.

In the video, the S32 board is powered by a simple 5V phone charger. Dala notes this is an area for improvement: ideally the S32 would have a small battery backup so it does not lose communication with the inverter if mains power drops. Without the S32 running, the inverter cannot communicate with the battery, even if the battery still has charge.

OBD2 and Leaf Spy: Monitoring Your Battery

The optional but highly recommended addition is an OBD2 diagnostic port wired into the battery system. This lets you connect Leaf Spy (a smartphone app for Nissan Leaf owners and EV DIYers) to monitor:

Leaf Spy is free for the basic version and available on Android. It connects via a Bluetooth OBD2 adapter. This is genuinely useful for monitoring battery health over time and catching issues like a cell going out of balance before it becomes a problem.

Fire Safety: The Things Worth Doing Properly

Dala acknowledges the current install is temporary. The permanent version will include fireproofing and a proper concrete foundation. This is not optional for a high-voltage battery inside a building. Key safety considerations for any EV battery installation:

For Australian off-grid installations, check your state regulations regarding high-voltage battery storage. Some jurisdictions require licensed electrician involvement for systems above certain voltages or capacity thresholds.

What You Need to Build This

Nissan Leaf Battery Modules

Leaf modules are available from wreckers in Australia, typically $300 to $800 per module depending on condition and capacity. A full 30kWh pack requires around 12 to 15 modules. Before buying, check the modules with a lithium cell meter or Leaf Spy to verify their health. Modules showing significant capacity loss or imbalance are not worth the saving.

Fronius Gen 24 Inverter

The Fronius Gen 24 is widely available in Australia through solar distributors. It supports high-voltage DC input from solar and can integrate with battery storage through its Modbus interface. It is a premium inverter, but the communication protocol is well-documented and the Battery Emulator project has pre-built profiles for it.

LiLyGO S32 and Battery Emulator Firmware

The GitHub repository for the Battery Emulator project (github.com/dalathegreat/Battery-Emulator) has full instructions for setting up the S32 board, configuring the CAN bus pins, and loading the firmware. The firmware supports multiple inverter brands and both Nissan Leaf and Tesla battery types.

Cabling and Junction Box

You will need appropriately rated high-voltage cable for the battery connection, a junction box with fuse or circuit breaker protection, and 12V wiring for the contactor control circuit. Cable sizing depends on the current draw of your system; for a 30kWh battery at 350V, the current at full discharge is modest, but the cable must handle peak discharge currents safely.

Key Tools and Accessories

To build and maintain this system you will need:

Recommended Products from Amazon AU

Tesla Support Coming

Dala mentions in the video that Tesla battery support is actively being added to the same Battery Emulator code base. Tesla modules offer even higher capacity per dollar than Nissan Leaf packs, and the same translation hardware works for both. Once the Tesla integration is stable, users will be able to choose whichever pack type offers the best availability and price in their area.

For Australian builders, this is significant. Tesla Model S and Model 3 packs are increasingly available from wreckers as these vehicles age. A Model 3 long-range pack at 75kWh would run a substantial off-grid home for days on a single charge.

Is This Actually Plug and Play?

Dala calls it the easiest way to connect an EV battery to a solar inverter, and after watching the video, it is hard to disagree. The Battery Emulator firmware handles all the protocol translation. The wiring is standard DC work. The startup sequence is documented. The only custom element is the junction box wiring, and that is straightforward electrical work.

Compare this to building a battery from scratch with a hobby BMS, balancing boards, and custom enclosure work. Using a used EV pack with the Battery Emulator is simpler, higher capacity, and cheaper per kilowatt-hour. The trade-off is learning the CAN bus communication and the firmware setup, but the community support on GitHub and YouTube makes that accessible to anyone willing to spend an evening reading.

Final Thoughts

The days of EV batteries being waste products after automotive retirement are over. Dala's setup proves you can take a battery that a car insurer has written off, connect it to a standard solar inverter with $20 of hardware and open-source firmware, and run your workshop or home off-grid for the majority of the year. The capacity-to-cost ratio of used EV packs is simply unmatched by any purpose-built solar battery on the market.

If you are building an off-grid system in Australia and budget is a concern, this is worth researching seriously. Start with the Battery Emulator GitHub page, check your local wreckers for Leaf or Tesla modules, and price out the cabling and junction box. You might find you can build a 20 to 30kWh battery for under $1,000.

Calculate the right system size for your energy needs with our Solar System Size Calculator and Battery Sizing Calculator before you start buying components.


Credits And Disclosure

Original video and system design by Dala's EV Repair. The Battery Emulator project is available open source at github.com/dalathegreat/Battery-Emulator. OffGrid Masterplan is a participant in the Amazon Services LLC Associates Program. Affiliate links may earn us a commission at no extra cost to you.

⚠️ SAFETY WARNING: Working with electrical systems, structural modifications, or gas installations carries inherent risks. If you are not confident in your abilities, always engage a licensed professional.

Worth a watch: Salvaged Tesla Batteries for Off-Grid Power? · Overkill Solar Channel

They walk through the exact terminal layout and BMS wiring for salvaged Tesla packs, showing you how to safely connect them to an off‑grid inverter without frying your system. — Dave Miller

Frequently asked questions

Can I use an old Nissan Leaf battery for home solar storage?

That's exactly what I'm walking through here. A 30kWh Leaf pack gives you serious storage, but the voltage coming out is way higher than what a standard solar inverter wants, so you'll need a junction box to step it down and a way for the inverter and battery to talk to each other.

Is it safe to connect used EV batteries to a solar inverter?

It can be, but only if you do the fire safety side of it properly. Voltage mismatch is the fastest way I've seen an inverter die, and that's exactly the trap a secondhand Leaf pack can set if you rush the wiring. If you're not confident with high-voltage DC work, that's your cue to ring a sparky.

How do I monitor a used Leaf battery in my solar setup?

Plug into the OBD2 port and run Leaf Spy. It pulls the cell voltages and the pack's state of health so you can actually see what the battery is doing instead of just hoping for the best.

Do I need an electrician to wire up used EV batteries for solar?

For most people, yeah. I left a whole section in the article on when to call a professional because hooking a traction battery into your solar isn't the same as wiring a normal battery bank. Even after a couple of decades doing this, I know when a job is outside my comfort zone, and that's not something to be stubborn about.

When to Call a Professional

While many off-grid projects are achievable as DIY, certain situations require licensed professionals:

Always check local regulations and obtain necessary permits before commencing work.