How to build a basic energy monitor - measuring current only.

For the full energy monitor - voltage and current measurement have a look at this page.

New revision April 10th to make it more consistent with rest of documentation.

 

Picture: Setup plus nokia 3310 screen, for info on adding the screen have a look here.

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 directly and takes a set value for voltage (if your in the uk 240V) 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 oomlout £23.67 , nuelectronics £16.99 

1x CT sensor efergy £7.50 , seeedstudio $11.50, Sparkfun $9.95

2x 10kOhm resistors

1x 56 Ohm resistor (depends on choice of CT and power to be measure: see detailed design page) for calculation

1x 10uF capacitor

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 look on the detailed system design page, the page details voltage and current so if you just want current ignore the voltage bit.

Assemble the components following the Fritzing diagram below:

 

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.

Download the sketch here: powerMonitorCurrentOnly.tar.gz

and then upload it onto the Arduino. Then go to the Arduino serial monitor and you should see values being printed to the screen, looking something like this:

 

From left to right: Apparent Power, Irms.

Step Four - Calibration

If you compare the output from the serial monitor with the output from a reference energy monitor (like a kill-a-watt plug in meter) they probably wont be the same. To get accurate measurements the energy monitor needs to be calibrated, as follows:

For best results choose a load that's within but close to the maximum range of your energy monitor and your reference meter minus a couple of hundred watts, most domestic plug in meters go up to about 3120W so around 2000-2800W would be fine (as long as this is also within the range of the energy monitor)

If your using non-halogen heaters beware that the power that they consume decreases for sometimes up to 10mins as they heat up. To take an accurate calibration point wait until the power consumption is stable.

Note down the Current value off your reference meter and from the Arduino serial monitor and then calculate the calibration coefficients:

Look in the Arduino sketch for the lines:

double ICAL = 1.0;

Multiply the old ICAL by the new ICAL and replace the old value with the result.

Upload the sketch and now hopefully your values should be a lot closer to what they should be.

Hazmatt's picture

Wierd Analog Reading

I have put a 6 channel version of the current only model to monitor two 3 phase motors. I have one ct on each leg of three phase of each motor. Then I hooked up the arduino to LCD and will output the amp draw to LCD screen. My problem is when I power it off of a 9 volt wall wart Analog 0 reads around 30 to 60, when I power it off of usb from my computer it will A0 will read zero just like the others. This is without any CT's plugged in. Someone told me I probably need a 10k pull down resistor. Just wondering if you agree or would this affect the circuit in a bad way.

Any Help you can give me would be much appreciated. Thanks.

Hazmatt's picture

Another Note

When reading actual current A0 will read about 4x higher that A1-A5. Even using the same ct. Do I just need to scale it back hat much??

TrystanLea's picture

A0 problem

Hello Hazmatt, I dont know why this should happen? Have you tried swapping the CT's and so on? Amin did I think have a similar sounding problem with analog input 0, problem being solved when moving to other pins. Could you have overloaded the input at some point? Have you another arduino at hand to see if the problem is the same?

Hazmatt's picture

A0 problem

I figured it out my problem was I forgot to complete connection of CT to burden resistor. I am so sorry. Thanks for your great tutorial thouh it was alot of help.

Michele's picture

hi! i have built this monitor

hi!
i have built this monitor with efergy ct sensor and 100 ohm burden resistor and i'm experiencing some problems
if i connect light loads (for example 60watt) everything works okk, but:
1) if i do not connect any device to the monitor i still read something like 10 watt!!!
2) if i connect big loads (from 300 to 2000 watt) the monitor reads wrong values (for example 290 instead of 300, 1700 instead of 2000, etc....)
any idea?
thank you very much!!

Sergegsx's picture

Its normal to measure

Its normal to measure something (10watts) when nothing is connected as analog reading go from 0 to 1024 so sometimes a 1 in the reading leads to something like 10 or 20 watts.
as for higher loads, you need to calibrate the unit with big loads so that this phenomenom is reduce to the max. but if your error is 290/300 then i guess is not that bad. as for 1700 instead of 2000, calibrate again.

arnon's picture

true rms

Is this project measures true rms?

arteqw's picture

Real Power

 There is possible to calculate Real Power using current only ?

TrystanLea's picture

re real power

I'm afraid not, you really need the voltage measurement.

Amin's picture

Current works correctly only with power factor = 1

Hi Trystan,
Still waiting for the AC-AC adapter but couldn't wait to test the current only setup. It works beautifully, but only with purely resistive loads...
And also with something strange: it shows the correct results only with ICAL = 0.07 in the sketch... is it because my burden resistor is too small?

Amin

Regeneractiv's picture

German translation

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

Gus's picture

Pushing the Data to Pachube!!!

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.

Luis Correia's picture

idle Current measuring

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 :))

TrystanLea's picture

idle Current measuring

 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?

Luis Correia's picture

it is measuring about 80 to

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.

Gix's picture

hi, after so much time

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.