Mmmmmmm Pi… – Setting up Open Source Energy/Home Monitoring via Arduino & Raspberry Pi

I’ve wanted to do this for 2 years, ever since I heard about the guys at Open Energy Monitor. Getting actual data on how the house heats & powers itself puts numbers to the evident differences we’ve noticed from things like added insulation. It also highlights where the greatest improvements can still be made. This system will hopefully do just that; and by combining this with air quality/weather measurement developed by some inspiring London sixth formers (AirPi) we might get useful insight for managing energy load & energy automation. But that’s stage II once we’ve got the data, so before that here is stage I: the install!

Spec’ing the setup

We already monitor our PVs’ energy production and plot that up using some simple open source code I wrote (on GitHub): there’s an example in the plot below. This uses the proprietary system which came with the system (fromgeo monitor) to track the output. To its credit, this is working fine, however it doesn’t give us the full picture. We don’t get consumption data & to get a proprietary system that does this as we’d like costs at least >£200 (even the basic one that came with our system was ~£100!) and most of these monitors are still based on the pulse counting technique rather than continuous current measurements.

PV Production March 2014
PV Production March 2014

So we wanted the system to be able to:

  • monitor electricity production from the PVs
  • monitor net electricity use
  • monitor gas consumption (analogue) – not 1st build, but i’ll add this later & others have already done this
  • monitor temperature/humidity around the house
  • monitor outside air quality/weather (Inc. CO, pressure, N2O etc) – done via AirPi with a raspberry pi currently, but I’ll add this to the system via Arduino & data later and get it to sent its data via radio
  • monitor O3 & CO2 – not 1st build, i’ll add this later
  • stream data to server & store locally
  • use WiFi/Radio frequency (RF) connection between modules – to avoid mess of wires everywhere

It turns out its quite simple to meet this spec, and the build guides on the open energy monitoring ended up basically meeting this, making it all quite simple at this 1st stage.

Putting it together

Digging out our old soldering iron from the loft & picking up some solder was easy, but it had certainly been a while since I had done any soldering! Luckily the guys @Openenergymon have put together a guide for the Arduino assembly. It was quite fun once we got into the swing of it, and it was satisfying to make good connections on the board.

To monitor the temperature and humidity in the house we added additional sensors via radio connection – there are up to 30 sensor slots available through the base station, so this is easily done. These are pretty simple, and the first 2 nodes I bought came practically fully assembled.

EmonTH - Humidity & Temperature node
EmonTH – Humidity & Temperature node

The weather station (AirPi) goes together nicely as well, and has simple build instructions. It’s been designed to be attached to the Raspberry Pi directly, however I’d prefer to remotely connect to the AirPi’s outside measurements in the same way as the other sensors. So I am looking at RF linking it directly to the Raspberry Pi “base station” (more detail on that in a sec) to cut costs and collect all the data through one route.

The Raspberry Pi “base station” is the bit that gets the info from the arduino and other inputs via RF and then acts as a gateway, forwarding the readings to the internet etc. These are easily purchased pre-made & the setup is pretty simple to use. You can get the system already set up on SD from @Openenergymon & a few steps  is all it takes to get it up and running. Since this is all open source, the firmware/code is written & freely available on github.

Installing the system

This bit was very easy. We just put the clips round the household consumption & PV production cables. The nodes for temperature/humidity are automatically received by the Pi base station, so its straight to checking out the data & what it means…

 

EmonTX - Arduino AC-AC, Production and consumption monitoring
EmonTX – Arduino AC-AC, Production and consumption monitoring
Production and consumption monitoring - CT clip on PV input & home consumption
Production and consumption monitoring – CT clip on PV input & home consumption

 

What to do with the data?

The data is streamed to a server (kindly provide free-of-charge by @Openenergymon) as well as stored locally. It is viewed via a web interface & fully accessible by customisable dashboards for web browsers/iphones/etc. Again, all of this is opensource so is free to tinker with or use as is.

We’ve setup monitoring screens for the house on web/phone so we always know how the energy balance is on a particular day. But lots of people have played around more than us and come up with some pretty cool ideas. The options for exploring/plotting with the data are pretty unlimited, and we’re still testing ideas from other people like these rather cool ones below:

credit: forum submission

 

emoncms_v3credit:  nathan.chantrell.net

 

What’s next?

Although my geeky side will have a lot of fun with the data, just plotting & looking at what is happening, the real power of this data will come after about a year. Hopefully it will be possible to draw some useful insight, allowing us to predict patterns of production for PVs, just like energy companies predict generation and consumption for other renewable/fossil fuel production. We’d love to then use that to automate some of our energy use (e.g. washing machines and heating). Knowing when it’s cheapest and best to use electricity should be easy with just a couple of red/green indicators  (like the open energy monitor guys have done), but I’m really keen on automation of heating of the house during the winter when it’ll make the most difference to the bills.

I also intend to build the system further, to monitor and generate suite of air quality relevant variables (e.g. CO2 & O3) & to more completely monitor the house (e.g. gas consumption – on a analog meter! – & ventilation).

Anyone could do this, which is the part of this that gets me excited. To do the mini met station all you need is a Raspberry Pi (~£30 on RS) and an AirPi shield (~£55 on tindie) or a set of open energy parts (~£100 for energy monitoring or ~£100 for PV monitoring) for energy monitoring. Its all open source, and there are loads of far more adventurous ideas out there including voice controlled houses, cool ideas, and more quirky projects.

 

Here are some refs/links :

There are also more general relevant links on the links page.

 

 

Disclaimer: I’ve tried to be as accurate as I can, and when prices have been quoted those were available openly on the date of publication. Obviously I take no responsibility for any of the prices quoted or products mentioned, and in no way am I providing financial advice or recommending a particular course of action. If you see any errors/broken links/have any comments please just drop me and email or comment.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.