## How to build an arduino energy monitor - measuring mains current only.

This little guide details how to build a simple electricity energy monitor on a breadboard that you could use to measure how much electrical energy you use in your home. It measures current and takes a set value for voltage (if your in the uk 230V) to calculate apparent power all the calculations are done on an arduino, although not as accurate as when a voltage measurement is taken, it is a method commonly used in whole house energy monitors for reasons of simplicity and lower cost. Here's how to do it:

### Step One – Gather Components

You will need:

1x Arduino

Current sensing electronics

1x CT sensor yhdc SCT-013-000

1x Burden resistor 18 Ohms if supply voltage is 3.3V or 33 Ohms if supply voltage is 5V.

2x 10kOhm resistors (or any equall valued resistor pair upto 470kOhm)

1x 10uF capacitor

Other

1x A breadboard and some single core wire.

Oomlout do a good arduino + breadboard bundle here £29

### Step Two – Assemble the electronics

The electronics consist of the current sensor (which produce signals proportional to the current in the mains) and the sensor electronics that convert these signals into a form the Arduino is happy with.

For a circuit diagram and detailed discussion of sensors and electronics see:

CT Senors - Introduction

CT Sensors - Interfacing with an Arduino

Assemble the components as in the diagram above.

### Step Three – Upload the Arduino Sketch

The Arduino sketch is the piece of software that runs on the Arduino. The Arduino converts the raw data from its analog input into a nice useful values and then outputs them to serial.

a) Download EmonLib from github and place in your arduino libraries folder.

b) Upload the voltage and current example:

```#include "EmonLib.h"                   // Include Emon Library
EnergyMonitor emon1;                   // Create an instance

void setup()
{
Serial.begin(9600);

emon1.current(1, 111.1);             // Current: input pin, calibration.
}

void loop()
{
double Irms = emon1.calcIrms(1480);  // Calculate Irms only

Serial.print(Irms*230.0);	       // Apparent power
Serial.print(" ");
Serial.println(Irms);		       // Irms
}

```

c) Open the arduino serial window

You should now see two columns of values. Apparent power on the left and rms current on the right.

### Re: How to build an arduino energy monitor - measuring current only

Guten Morning!
I translated this tutorial into German. It´s not perfect but I hope it could help someone.-->Link.
Ich hab´ den Tutorial übersetzt, ist sehr schlecht geschrieben, da Deutsch nicht meine Muttersprache ist, aber verständlich sollte es sein... für fragen:

OpenEnergymonitoring-Current Only

### Re: How to build an arduino energy monitor - measuring current only

Amazing project! I just ordered my Arduino and CT-Sensor. I also translated this Tutorial to
German, so feel free to ask for it.

Do someone know how to push the PowerData to Pachube-Network?, I think I just need a

Processing Sketch, but maybe someone has allready done it!

Thanks,

Gus.

### Re: How to build an arduino energy monitor - measuring current only

Hi,

I stumbled upon your design several times and now I decided to actually built it.

but, using the current only method, I find an odd thing,

with the efergy sensor just sitting on the table, it is measuring something and it should just show 0 power.

how can this be? (either that or i'm measuring the Earth's magnetic influence :))

### Re: How to build an arduino energy monitor - measuring current only

Hey Luis, how much are you measuring? if its very small its just noise, there is always a bit of noise around. How many Amps, Watts are we talking about?

### Re: How to build an arduino energy monitor - measuring current only

it is measuring about 80 to 90W, which i find odd.

OTOH, when I measure my 'data center' it shows almost the same amp's my clamp ampmeter.

### Re: How to build an arduino energy monitor - measuring current only

hi, after so much time wanting to do some project like this, i have found your website and has encourage me to start it.

I just ordered the CT sensor, however new sensor is jack connector which i belief has 3 pins. is this a problem to continue with your project? does it change anything? or only two wires will be needed and a pin will be left empty?

http://www.efergy.com/Products/efergy-Shop-Accessories/EFERGY/Jackplug-E...

I think mentioning this is important for new users as the DC connector pin is no longer supplied with new efergy products.

Thanks for your time, website and great work.

hope to hear soon as i cant wait to start the project.