• Applications
    • Home Energy Monitoring
    • Solar PV Monitoring
  • Modules
    • emonTx
    • emonGLCD
    • emonBase
    • emoncms
  • Building Blocks
  • Community
    • Forums
Home ยป Applications ยป Home Energy Monitor
Tweet

Build a home electricity monitoring system

This guide details how to build a home electricity energy monitoring system that logs electricity consumption and room temperature data to the web for visualization and outputs the data to a living-room display. The display also gets the current time back from the internet.

All units are based on Arduino, code sketches can be uploaded using Arduino IDE and an FTDI cable. 

spacer

1) Build and setup an emonTX

The emonTx is a low power wireless energy monitoring node. It's designed to sense data from up to 3 CT current sensors, optically from a pulse-output utility meter and from multiple one-wire temperature sensors. It can be powered by 2 x AA batteries or 5V USB.

a) Build an emontx

b) Upload the emontx firmware sketch emonTx_CT123 using the Arduino IDE and an FTDI cable

Once uploaded you should see power readings printed in the Arduino IDE's serial window. The LED on the font on the emonTx should flash quickly once every 10's. 

2) Build and setup an emonGLCD

The emonGLCD is an open-source general purpose wireless graphical LCD display unit. Powered by an Atmega328 which is Arduino compatible.

a) Build an emonGLCD

b) Upload the singleCT emonGLCD sketch using Arduino IDE and an FTDI cable

With the emonTx connected you should now see power data being displayed on the display. Next lets get the power data on to the web:

3) Setup Emoncms

Emoncms is a powerful open source energy visualisation web application that you can install on your own server or if you prefer you can use a hosting of emoncms on the openenergymonitor beta server.

To install on your own server follow the installation guide here.

To try out the beta service, see the launch page here and then create an account.

Once you have your account up and running click on on API and copy/note down the write access API key you will need this in a minute to point the emonBase to emoncms.

4) Build and setup an EmonBase

The emonBase is a web-connected base-station that receives energy monitoring data from the emonTx and posts to a remote or local server for web-based logging and visualisation. The emonbase is a NanodeRF which is an Arduino clone board running at 3.3V with the addition of an ENC8J60 Ethernet controller chip and a RFM12B wireless transceiver module.

a) Build the emonbase following Ian Chilton's build guide.

b) Download and open the NanodeRF sketch for single CT setup, including internet time relay and forwarding of temperature data from GLCD.

c) You will see that on line 87 of the NanodeRF sketch it is setup to point to the emoncms demo server as default, if you have your own server then change this line as required. 

d) Scroll down to line 221 and change the apikey to the api key you noted or copied earlier when setting up emoncms.

ether.browseUrl(PSTR("/emoncms3/api/post.json?apikey=2d177d7311daf401d054948ce29efe74&json="),str.buf, website, my_callback);

e) Upload the sketch with changes to the NanodeRF using Arduino IDE and an FTDI cable

5) Create an emoncms dashboard

With the emonbase powered and connected to your router via ethernet. Navigate to the inputs page in emoncms, you should now see new inputs registered:

spacer

The next step is to map the inputs through to feeds, for this example the main input we need to configure is the power input, to do this click on the power feed button to open the input configuration page. 

First lets map the power input directly to a power feed with the input processor "Log to feed". In the arg box enter in the name of the resulting feed you would like to create, here I have just called it power.

Second add the power to kWh/d input processor, this will create a second feed that will contain the daily total energy use (kWh/d)

spacer

If you also map through the temperature and other inputs as "log to feed"  your feeds page should now look like this:

spacer

Next navigate to the dashboard page and click on "edit dashboard". Copy and paste the following dashboard script into the edit box. Change the text highlighted in bold to your apikey, power and kwh feed id's or names. Then hit save and a dashboard as below should appear. 

<div class="widget-container-nc">
  <h2>Energy explorer</h2>
  <br style="px; px;" 
          frameborder="0" scrolling="no" margin"0" margin"0" 
          src="/img/spacer.gif"> YOURAPIKEY&amp;kwhd=2&amp;power=1">
  </br>
</div>

<div class="widget-container-v" style="px">
  <div class="widget">
    <div class="title">Power now</div>
    <div class="dial" feed="power" max="10000" units="W" scale="1"></div>
  </div>
  <div style="clear:both;"></div><br>

  <div class="stats" style="px">
    <b>Energy used today:</b><br>
    <div class="value"><span class="kwhd"></span> kWh</div>
  </div>

  <div class="widget">
    <div id="house-graph" class="graph" feed="power"></div>
  </div>      
</div>

spacer

Thats it! please post up your experiences on the forums

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.