BuildLog: Home Battery Backup

I posted a bit about this in the December show & tell thread, but figured it would be worth having an ongoing thread to talk about the project and document the progress so others can ask questions and learn.

I’ve wanted to have some degree of energy independence for a while now, mostly to help keep some of the basics running during short outages. Originally my thoughts were along the traditional lines of solar panels and a battery (e.g. Tesla Powerwall). Unfortunately solar panel installation labor is pretty expensive, even with the price of panels continuing to drop significantly. Plus why pay for a clean and prebuilt system when I can cobble together a bunch of components myself and spend way too much time tweaking and optimizing it. :rofl:

I like to start all my projects with a set of design goals, though these can change as I learn more about the subject. In this case I needed to know what circuits I have in my house, what their average usage is so that once I identified which ones were critical I could size out a system. My previous experience with sizing battery based solutions led me to immediately ruling out trying to run any major loads off the battery bank, as it would require a lot of space, cost more and I know from experience (e.g. snowpocalypse) that I can do without things like a clothes dryer but not internet. :grin:

A while back I installed an IotaWatt so that I could track my power usage per circuit and it proved invaluable for helping define the design goals. Initially I was only monitoring a handful of circuits, mostly the large ones (HVAC, dryer, EVSE, etc), but for this project I mapped out all of the circuits in my house and added more circuits to the IotaWatt monitoring. This gave me an amazingly detailed view of what devices were on what circuits and how much power they used.

This is what the real-time view on the IotaWatt looks like, for historical data it has a powerful graphing feature but I tend to just use the graphing built-in to HomeAssistant (my smart home system).

Here you can see the installed IotaWatt and the clamps it uses to monitor the power usage of the circuits. I cleaned the exterior cables for it after I put the panel cover back on.

In the end I decided that these were my critical load circuits:

  • GarageOutlets
    • 120V 20A, GFCI protected
    • Idle draw: 20 watts
    • These outlets power my fios optical network terminal (ONT), my garage door and the iotawatt itself and the garage door opener.
  • AirHandler
    • 120V 15A
    • Idle draw: 10 watts
    • Under load: 550 watts
    • This is actually a single outlet in the attic that the air handler is plugged into, I guess that’s just how they did it in the 80s. We have gas heat, so as long as this outlet is powered we can run the fan and heat, we just can’t run the AC compressor (it’s a different, larger circuit).
  • Network
    • 120V 20A AFCI protected
    • Idle draw: 220-250 watts
    • This is a dedicated circuit that I had installed during our remodel. It powers a single outlet in the office for the Ubiquiti UDM-Pro router, PoE switch, Intel NUC that runs HomeAssistant and my fileserver. This circuit is the “core” of my home automation, it also provides power to the wifi access points and security cameras.
  • Fridge
    • 120V 20A
    • Idle draw: 5 watts
    • Under load: 125 watts
    • Food goes in here, cold drinks are also nice to have.
  • WaterHeater
    • 120V 15A
    • Idle draw: 5 watts
    • Under load: 200 watts
    • Tankless gas water heater, but also a few other random things like lights because it’s pretty common for outlets and lights to be on the same circuit.
  • Office
    • 120V 15A
    • Idle draw: 200 watts
    • Under load: 900+ watts :grimacing:
    • Outlets and lights for my office and our bedroom. Not exactly critical, but I can easily shed the load if needed by turning off lights/computers.

Adding all that up we get about 485W or idle load and up to 2,045W if everything is on all at the same time. For that reason I decided to go with a 5,000W inverter, as it’ll have more than enough capacity to run everything and will allow me to add a bit more load if my needs change in the future.

There are a few options on the market now for inverter/chargers, the device that will generate AC from the DC battery and also charge the battery when grid power is available. I’ve used Victron Energy gear for some other projects so I decided to use their MultiPlus-II. They have versions that can work with a 12V, 24V or 48V battery, but I chose 48V because higher voltage allows for thinner wires and slightly better efficiency. Additionally I choose to use a 230/240V inverter so that during normal operation, when the inverter is in passthrough mode, I won’t be drawing all my power off of just one of my house’s phases. It also allows me to add 240V circuits later if the need arises.

So with all that in mind I now had a good set of design criteria:

  • Able to power my 6 critical circuits
  • Ideally with 24h runtime at idle load
  • 48V battery
  • Ability to expand the system later as needed
  • Observability of the system and battery, so I can get runtime estimates while on battery power or identify issues before they cause an outage. Ideally tied into my HomeAssistant system.
  • High degree of safety without the need for constant maintenance.

I choose LiFePO4 battery cells as they are highly cost effective, very safe/stable, and have a number of battery management systems available to ensure the battery is only charged/discharged when conditions are safe. Since I knew I wanted to have a 48V battery pack, that means I needed at least 16 LiFePO4 cells (known as a 16s pack).

I was able to find a good deal on Alibaba for 280Ah cells from the Chinese manufacturer EVE, which is one of the newer and decently well rated suppliers of battery cells. At 3.2v nominal cell voltage that is 896 watt-hours per cell or ~14.3kWh for the entire pack. That’s a lot of capacity! It’s actually slightly larger than the latest Tesla Powerwall (13.5kWh) which cost about $10k each.

Initially I had looked for slightly larger cells but the particular supplier I used (Shenzhen Qishou Technology Co., Ltd.) had some in stock at a US warehouse and were able to ship them to me at a reduced rate. The only catch was that they had 22 cells on hand, and while I had initially wanted to buy 20 cells (16 for this pack and 4 for a 12V portable pack) I agreed to buy all 22 for a reduced price, as they didn’t want to be left with just 2 cells on hand. After shipping the cost per cell was $130/ea which works out to $2,080 for the pack! Maybe I’ll make a really big ~5V battery with the two leftover cells. :thinking:

There was a lot more back and forth I did in my research, but in the end this is the setup I decided to go with:

The inverter/charger outputs 230Vac, but all of my circuits and devices need normal 120Vac, which is where the autotransformer comes in. It takes 230/240Vac and gives me two 120Vac lines that are split-phase, just like the power I got from the grid. I really liked this style of setup because it lets me run 120Vac and 240Vac loads, automatically balances the load to the phases! If needed the A/T can provide the entire output to just one phase. That helps keep planning a lot simpler and gives more flexibility on what loads I can place on the battery backup.

I don’t have a full breakdown of parts and costs, there’s lots of tools and things I had on hand already (such as wire) but here are the major parts and their cost:

  • 22x EVE LiFePO4 cells (280Ah) = $2,860
  • Victron Energy MultiPlus-II, 48v/5000W/230Vac/70A inverter/charger = $1,670
  • Victron Energy AutoTransformer 120/240Vac/32A = $550
  • Overkill Solar 16s/48V BMS = $172
  • SquareD QO 125A panel with lugs (no main breaker) = $64
  • AFCI and dual function (AFCI/GFCI) breakers = about $240
  • 125A DC circuit breaker = $24
  • Electrical permit from the city = $76
    • What? You think I’m crazy enough to do this kind of work and NOT cover my butt with proper permits and inspection? :grin:

That’s a total cost of about $5700, though I forgot how much I paid for the wood and a few other bits and pieces. Still, that’s well under the cost of just one Tesla PowerWall and I was able to get it now instead of being on a super long waiting list.


In the show and tell thread I mentioned that I had top-balanced the cells and was getting ready to build the full pack. Top-balancing is a very important step when building a battery as it ensures you can get the most capacity out of the pack since the cells will all be starting at the same state of charge when assembled into a pack. Basically all this means is charging up each cell individually to 100%. There are a bunch of great youtube videos out there about top balancing, building battery packs, and general off-grid setups. Some of my favorites are:

This is by no means a complete list either, I’ve watched way too many videos to remember them all.

For my pack I decided to build it very similar to what The Digital Mermaid did, with only a few minor tweaks to fit my available tools and skills. I especially like how this layout minimizes the width of the pack so it’ll fit better against the wall in my garage, it was also a lot easier for me to build with my level of woodworking skill.

Test fitting the cells to ensure a tight fit.

The mostly finished box.

I still need to figure out how I want to do the top since I haven’t decided if I want to have a hinge or just screw it on and be done with it once everything is in place. I also plan on taking off the handles and painting the entire thing so it’s a bit nicer looking.

Some of you may have noticed that the way the sides are attached is completely wrong for holding a vertical load, but this was actually an intentional design choice. For one it allowed for easier assembly, as I was able to secure one side and an end, place the cells, mark where the other side would go and then attach it (without the cells of course!). Then I just simply trimmed off the excess. It’s also because I expect this box to stay on a flat surface for it’s entire life and almost never experience any kind of vertical load, but I do expect that the cells will expand and contract and this ensures that the pressure they exert is lateral against the screws instead of axial. The manufacturer actually recommends the cells be keep under a good bit of pressure (called fixture in their datasheet) to improve cycle life.

I’m busy with being lazy and enjoying vacation right now, so it’s unlikely I’ll make any more progress until the new year. Once I do I’ll be sure to post updates here!


Wow! This is terrific! Can’t help but admire your design and planning. KUDOS!

1 Like

Can this act as a UPS as-is, or automatically switch critical loads to battery power when grid power goes down?

Just a suggestion. Keep an eye on your main input power physical connection as well as your main breaker. IMO, those incoming feeders do not have enough loop or support. What can happen is your main breaker can tweak or your lugs can get loose.

1 Like

Yeah, the default mode is basically the same as a UPS. Mains power is directly passed through the unit and to the load. It has a very fast switch-over time, but it can also be placed in active mode where it’s always running the load off the inverter.

Yeah, gotta love that builder cost cutting. Maybe someday I’ll replace the main panel and have those redone.

1 Like

Awesome write up, @AndrewLeCody! Great timing, too, as I’ve been looking into an off grid solar setup for my barn and the IotaWatt monitoring and load calculations you did will be quite useful.

Looks like the IotaWatt is out of stock til January. Is that an Open Hardware logo on their device or just a similar design?

It is! IotaWatt is open source hardware and software. Here’s their main git repo which has the board files if you want to build it yourself:


Got my permit, so once the battery box is done I can begin work! Interestingly Carrollton now does remote inspections for a lot of the basic work (e.g. adding a circuit), where you just submit pictures and/or video. The process seems to be a good bit faster than before, which is awesome.


Oops, I went a bit too aggressive with an electric hand planer trying to trim down the plywood edge. :grimacing:

I also noticed that one end of the box was pretty out of square and it was bugging me, so I’m going to just redo the box a bit. I picked up some wood putty, primer and enamel paint because I think it’ll look cooler.

I found a nice little enclosure to hold the main disconnect/breaker for the battery. My current idea is to mount this on the end of the box, with the wires to the battery going through the back of the enclosure and the wires to the load/inverter going out the top (through the grommets).

I’ve been making steady progress on this build, but keep forgetting to update the thread!

I rebuilt the box, installed the cells and wired everything up.

I changed up my plans a little bit on placement thanks to some encouragement from a friend. Originally I was going to mount the new sub-panel on the drywall, but he convinced me to do as much stuff flush mount as possible and to put the inverter and autotransformer off to the right, with the battery pack under the shelves.

He also brought over some spare 6/2 NM-B that I used to connect the MultiPlus-II to the main panel. Most houses in this area use NM-B for just about everything, it’s the white, yellow and orange bundles of wire you might see in your attic or if you open up a wall. The numbers for NM-B specify the gauge of the conductors and the number of them in the bundle, so 6/2 is 6awg with 2 conductors. This is a pretty common type of NM-B used for older clothes dryer outlets (3-prong) that don’t have a neutral. Since I don’t need a neutral for this circuit either, it’s one less wire to worry about.

We cut the drywall in a mostly straight line and saved the long piece to make repairing a bit easier. I used a magnet to find the drywall screws/nails so they were easier to remove. After that we drilled some holes in the studs to run the 6/2 NM-B to the inverter and another set to run 6/3 from the autotransformer back to the sub-panel.

I used some PVC conduit to protect the wiring, the oval shaped 90 degree boxes are great for this as it makes it easy to access and pull the wires. These are called LB fittings because they have an opening out the back, there’s also LL and LR fittings where the opening is out the left or right.

I don’t really like how the DC cables worked out, so I’m going to redo this in the future. But it works for now and I wrapped them in sheathing for a bit more protection.

The system is now configured, and I’ve tested it with a load plugged into the outlet under the sub-panel. Everything works as expected and I’m ready to start moving the old circuits over to the sub-panel!

While I was testing out the battery backup I decided to redo the quad outlets and surge suppressor, so that everything near the panels was flush mounted. Every project has scope creep. :grin:

This does mean I have to do more drywall repair, which I’m not looking forward too.

I’ve definitely glossed over a bunch of details this time around, so if anyone has questions please ask!


I’ve got the critical load circuits moved over and tested the system under grid failure. Everything is working as intended!

Next up I started to tackle the issue of pulling data from the BMS and the inverter so I can put it into my Home Assistant instance. For the BMS I’m using a python library written by Eric Poulsen called BMS Tools, but for the MultiPlus-II I wasn’t really happy with any of the existing stuff, so I wrote my own very basic library.

The python scripts are pretty basic right now, they read data from their respective USB serial connection (one for BMS, one for MultiPlus-II), interpret that data and then send it to Home Assistant via MQTT. All of my code is available on GitHub:

I also have the scripts setup to do device auto discovery, so there’s almost no configuration needed on the Home Assistant side other than creating an MQTT user and adding the entities to my dashboard.


Thanks @AndrewLeCody! Very well done! I’m going to want to do something similar when I build out my hangar later this year. Want to cover the roof with a grid of solar panels that track the motion of the sun to keep the energy as perpendicular to the panels as possible. Also planning to use geothermal for HVAC. Lots to learn…


1 Like

Be careful in this. If the geothermal wells are too close together, you will saturate the field. A customer of mine had this problem. Ironically the design engineer was the person that brought this up to me. He still put them too close. They ended up putting a cooling tower to end get rid of the extra heat.

1 Like

Sounds awesome! If you want any help with design or selecting components let me know.

Oh and try and take more pictures than I did. :rofl:


Thanks Guys! Greatly appreciated!


Just a random thought on the geothermal. The managing electronics die just like all HVAC does, but then it’s harder to find someone to repair them.

1 Like

Passed inspection! The only things I got dinged on was some open slots in the main panel and I needed to put a label on the autotransformer to indicate that it was the disconnect for the critical loads sub-panel. Super easy fixes that I got done later in the day, sent some pictures to the inspector and got my final approval.

This project is now effectively “done”!


I’ve been regularly checking the IotaWatt page waiting for the monitor to come back in stock. It’s finally in stock again! :partying_face: If you planned to get one, I would grab one now before they’re out again.

1 Like

Finally got around to reinstalling my iotawatt and cleaning up some of the power cords. I’ve tested the system a few times now by simply turning off the breaker that supplies mains power to the inverter. Nothing on the battery backup even notices the switch between mains and battery! I’m very pleased with how the build turned out.