DIY Sensors and Deep Learning Applied to Insights into Electricity Use — Part 1

Source: Deep Learning on Medium

DIY Sensors and Deep Learning Applied to Insights into Electricity Use — Part 1

Intro and Getting the Energy Monitor Up and Collecting Readings

Please get hold of me — — if you’d like to discuss this project.

Our planet gets healthier the more we rely on renewable, clean energy. A challenge for us getting to relying on renewable, clean energy is the amount of electricity we currently use. This challenge will become harder to overcome as we add electric cars and more electric appliances into our lifestyle. But while we add, it amazes me how much we waste. I was humbled to find out our house was using 40% more electricity than we needed! I don’t believe my experience is unique. Most likely, many houses are wasting a significant amount of electricity. If we knew how much we were wasting, we would not waste as much. Perhaps it’s obvious, but the cleanest energy is the energy we don’t waste.

The key is knowing how we are using electricity in our homes. What devices suck up the most electricity? When? Why so much? Are some devices wasting electricity? Are there devices that are sucking up electricity we didn’t know were on?

The Project and Its Goals

Let’s build a system where we can gain insight into how our appliances use electricity. We’ll use Sensors, write Python, and apply colab/Keras deep learning to determine how much electricity each of our major devices are using. Using deep learning to disaggregate electricity readings is currently a research field commonly referred to as NILM (for Non Intrusive Load Monitoring). This paper is an example of NILM research.

Project Parts

Our project consists of the following parts:

Major Parts of our DIY electricity analysis project

The energy monitor is attached to a home’s breaker box using Current Transformers. The micropython code running on the energy monitor sends power readings to a Raspberry Pi.

While the energy monitor is busy sending power readings to the Raspberry Pi, a Systemd service on the Raspberry Pi is collecting power readings from the HS110 Smart Plug connected to our microwave’s power cord and putting the readings into mongodb.

A script takes the readings from mongodb and creates zip’d pickle files that are then read into a colab notebook.

At this point, we read the files into the colab notebook and go from pre-processing to predicting whether our microwave is on or off. How we do that will be covered in future articles.

Our Workshop Time

It would be amazingly awesome if you followed along by building the parts along with me. I have built all the pieces except for the Deep Learning part. My hope is the documentation I linked to provides enough information and code to get you started. If not, mail me at the email link provided at the beginning of this article and we’ll figure it out together.

Our workshop time for this article includes:

  • Getting the electricity monitor used at the breaker box, the current transformers, the raspberry pi, and the HS110 smart plug.
  • Building the software discussed above based on the code provided in the links.
  • Collecting electricity readings into the Raspberry Pi’s mongodb.

Any time you work on a home’s electricity — like putting Current Transformers on the electricity line — it can be dangerous. GET AN ELECTRICIAN if you do not feel comfortable installing the energy monitor at the breaker box.

Thanks for reading this far. Please find many things to smile about. See you soon.