I’ve designed and built an inexpensive energy-consumption monitor using a Raspberry Pi. It enables anyone to monitor as many meters, panels, and breakers as they want. What follows is the story of how I came to build it and some of the things I’ve learned about my home’s energy usage in the process.*
Proud owners of an inefficient home
Back in 2017, I was living in a relatively small home here in Kansas City, Missouri, with my wife, Cecilia, and our newborn son, Bruce. Bruce’s arrival had prompted us to begin searching for a larger home. We wanted to find a four-bedroom home that would allow our family to grow without needing to move ever again, or at least not until everyone was off to college. Feeling guilty about the prospect of owning a large home, we were interested in finding one that we could ultimately make carbon neutral. That meant it needed to be all-electric and have a large south-facing roof upon which we could install a solar array.
After months of searching, we found a 3500-sq.-ft. Colonial-style house built in the late 1980s. With a simple roof that faced south-southwest, it fit the solar criteria. As an all-electric home, it had two heat pumps, one for each floor, with electric-resistance heat as backup. I inquired about the home’s electricity consumption and subsequent utility bills in the winter and learned that its worst month, February, was over $600. That figure scared us a bit, and we thought it might be better to buy land and build an efficient home from the ground up, rather than retrofit an existing house. But, if we did that, this old house would still be sitting there, owned by someone else, burning through untold volumes of coal every year. And lest I make us sound too altruistic, it also had an amazing backyard that was too good to pass up.
So, we became the new owners of an inefficient 30-year-old house. Where to begin? We addressed the low-hanging fruit first. All the incandescent lights were replaced with LEDs. The exterior doors whose jambs had started to sag were re-hung and weatherstripped. Fireplaces were caulked and plastic-wrapped where cold winter air could be felt coming through. The refrigerator, which was straight out of the 1987 Sears catalog, rattled and clanked, so it was replaced. Those were the items that were inexpensive enough to tackle without measuring if we were getting our money’s worth by replacing them.
The more expensive investments included the original windows with wooden frames and double-pane glass. Many of them had a fog on the inside, indicating that their inert gas had escaped long ago and on a cold day we could feel a breeze coming through the side jamb. Without a doubt, the windows were one of the leading causes of that $600 winter electric bill.
The heat pumps seemed to be in good condition but when temperatures dipped below freezing, the flickering of the lights made it easy to tell that the electric resistance heat had kicked in. I wondered how much power it was pulling to make the lights flicker. If those resistance heaters activate when it’s below freezing, would we save money by putting a space heater in our bedroom and letting the rest of the house drop in temperature through the night? Why heat 3500 sq. ft. when we’re sleeping in about 200 of that? And if we replaced the windows, how could we compare our energy consumption for two days with similar weather before and after replacing them? Would it be possible to isolate the climate control from the usage information on our electric bills? Probably not. I wasn’t comfortable making a huge investment in new windows and new climate controls without being able to measure exactly how much each change was impacting usage.
In search of full data sets
I started looking for a home-power monitor that could help me track our usage, so I could start optimizing these big-ticket energy-consumers. I found two products that stood out. One was designed for commercial-scale use; it tracks only the mains and attempts to identify appliance usage using machine learning. As a software engineer, I have worked with machine learning. I was immediately skeptical that it would be able to identify anything but the most common appliances. At $350, I wasn’t willing to gamble that it would give me the level of detail I wanted. The other monitor was an open-source device that could track up to 14 breakers. By the time you added 14 current transformers, it cost almost $300. Our house has 54 breakers—it would cost over $1000 to track everything. Even if I were willing to make that investment, the user interface was unsophisticated, and it didn’t provide simple ways of viewing different subsets of data. It did integrate with several other open-source projects, but their user interfaces also seemed lacking.
An avid DIYer, I thought to myself: How hard could it be to make a home monitor? I knew the current transformers and AC transformers that the other monitors use. P=IV, right? So, I just needed to sample the voltage and the current back-to-back as fast as I could, and then add it all up in software. I set to work soldering together my first breadboard prototype in January of 2020.
After getting it assembled, I found myself holding a spider web of copper and headphone jacks that didn’t look all that capable. But after coding together a simple-command line app to get a reading from it, lo and behold, it worked! For something that looked like a prop from an 80s B-movie, I could calibrate it to an incredible accuracy by comparing it to a Kill-A-Watt monitor. Encouraged by this success, I wrote an entire software platform that could take readings from multiple Raspberry Pis, or “hubs,” as I started to call them; and then aggregate them into complete energy-use summaries. To test the software, I soldered together two more breadboard prototypes and was able to track 45 breakers.
Identifying problems—big and small
Armed with this new tool and its vast array of data, I was ready to answer the questions I’d been asking about how to optimize my home. First question: How much does it cost to heat the entire upstairs at night with a heat pump versus only heating our bedroom with a space heater when it’s above freezing? I compared two days with the same average and low temperatures. Using the heat pump to heat the entire upstairs, four rooms, when it was above freezing took 15kWh. Heating only our master bedroom with two space heaters at the same outside temperature took 17kWh. Lesson learned: When it’s above freezing, go ahead and heat the entire upstairs and enjoy the comfort.
Second question: How does it look when it’s below freezing? Answer: When the central-furnace electric-backup heat engages, it takes over 16,000 watts! It’s no wonder the lights flicker when it turns on. At 10 p.m., the central furnace had already used 50kWh of electricity. Test aborted; no more data needed. With space heaters in our bedroom the next day, we were able to heat our bedroom all day for 35kWh. The downstairs heat pump does a little extra work to compensate for most of the upstairs not being heated, but the savings of not using the resistance heat upstairs more than outweighs the additional cost of the downstairs running a little longer while we’re sleeping. It’s clear that we need to avoid engaging that centralized backup resistance heat at all costs. These heat pumps are nearing end of life, and we’ll be shopping for a geothermal heat-pump system soon.
I was able to answer many simple questions with my whole-house monitor. For example, the house came with a glass-door mini-fridge. I wasn’t wild about the glass door and wondered how it compared to our new full-size fridge with a solid door. The full-size fridge is on its own breaker, and the mini-fridge shares a breaker with a few kitchen outlets that aren’t used most days. On a day when the mini-fridge and the full-size fridge are the only appliances in use, the mini-fridge consistently uses about 20% more electricity despite being about a quarter of the volume and not having a freezer. Turning it off and keeping everything in the big fridge saves 36kWh or about $4 per month.
What about the ceiling fan in the dining area? This is a tall room, and we use the ceiling fan to bring some of the hot air down. It’s a bit subjective, but it does make the room feel warmer, so we like to run it (80W on high, 40W on medium, and 20W on low). Medium and high create too much of a breeze anyway, so we can leave it on low for half a kWh per day to make it feel a little nicer in there.
In the process of monitoring, we found that our septic-aerator control module was broken, resulting in it running constantly at 300 watt—an extra 200 kWh per month. I had been paying a company to come inspect the septic system twice per year. That “inspection” amounted to opening the lid and making sure it wasn’t backed up. They didn’t notice the mechanical switch had cracked and failed. They wanted $400 to replace it with another mechanical switch that would undoubtedly fail too. I opted to fix it myself with a $5 solid-state relay attached to my power monitor. It turns it on for 15 minutes at the top of the hour like clockwork. That’s 150kWh or about $18 saved per month on the septic system alone.
In April of 2019, we had an 8kW solar array installed and turned on. Having solar panels results in a variety of new ways to optimize energy usage. By tracking production and consumption, we can calculate “from grid” and “to grid” readings per second and track peak values across any time frame. This yields the two values needed to size a battery-backup system to go completely off-grid: the capacity needed in kWh and the power rating in kW.
Fortunately, our electricity provider offers net-metering, so until we lower our consumption to the point where we’re meeting our needs with solar, we’re better off feeding the power back into the grid during the day. As more and more people turn to residential solar, there won’t be enough consumers to accept the over-production during the day. If large-scale storage is not solved by then, it will be important for individuals to calculate their own needs for storage.
In the spirit of sharing
I was so happy with the quality of data that I was getting and the decisions it was allowing me to make, I decided to work on making it possible for others to build their own. That meant two things: releasing the source code and creating a Printed circuit board (PCB) design for the hardware. I could hardly expect anyone to solder together a rat’s nest like my prototypes. I put the code and PCB design on github, available for anyone to download and use. I also put a feature in the Android app that allows anyone to generate a bill of materials that will give them a complete list of every component they need to purchase to be able to assemble one.
A few dozen people have used the open-source materials to create and run their own power monitors, but for most people, ordering a board from a PCB manufacturer and assembling a hub is too much work. I often get requests to sell completed PCBs and completed power monitors. I had never expected to make a business out of this, but I’ve decided to test the waters and see if demand for a product like this is there. I’m offering kits and completed power monitors via Kickstarter. I hope people find it as useful as I have.
After using our power monitor for a year and a half, our most expensive electricity bill was $320, down from the previous owner’s $600. Our best bill was $56. As we complete projects moving forward—namely replacing the windows, upgrading the heat pumps, and improving the attic insulation—we’ll be able to analyze exactly how much each improvement is helping. With that knowledge, we can make a target for lowering our consumption and increasing our production to achieve our goal of living in a carbon-neutral home.
Mark Milligan is a software engineer, DIY hobbyist, and founder of Lantern Software, Inc.
* Full disclosure, I’m in the middle of a Kickstarter campaign to start selling these power monitor devices. The most expensive component is the current transformer, which is the part that clips on the wire and measures the current through each breaker. When ordering more than 1500 current transformers, the price drops dramatically. The Kickstarter campaign is a way for me to order them in bulk so everyone can benefit from the reduced price. My only goal is to get this technology into as many hands as possible so people can start taking control of their energy consumption.
Get building science and energy efficiency advice, plus special offers, in your inbox.