OpenEnergyMonitor | |
How to build an Arduino energy monitor - measuring mains current only.
This guide details how to build a simple energy monitor on a breadboard that could be used to measure how much electrical energy you use in your home. It measures current, uses a set value for voltage (230V, if you're in the UK) and calculates apparent power. 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 cost.
Here's how to do it:
Step One – Gather Components
You will need:
1 Arduino
Current sensing electronics
1 CT sensor YHDC SCT-013-000
1 Burden resistor 18 Ohms if supply voltage is 3.3V, or 33 Ohms if supply voltage is 5V.
2 10k Ohm resistors (or any equal value resistor pair up to 470k Ohm)
1 10uF capacitor
Other
A breadboard and some single core wire.
Oomlout has a good Arduino + breadboard bundle here £29
Step Two – Assemble the electronics
The electronics consist of the current sensor (which produces a signal proportional to the mains current) and the sensor electronics that convert the signal into a form the Arduino can use.
For a circuit diagram and detailed discussion of sensors and electronics see:
Assemble the components as per the diagram above.
Step Three – Upload the Arduino Sketch
The sketch is the software that runs on the Arduino. The Arduino converts the raw data from its analog input into human readable values, then sends them to the serial port monitor.
a) Download EmonLib from github and place it in your Arduino libraries folder.
Download: EmonLib
b) Upload the "current only" 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.
|
User loginActive forum topicsCommunityLatest Blog postsPopular topics updated in the last month
|
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
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!!
Re: How to build an arduino energy monitor - measuring current only
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.
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
Re: How to build an arduino energy monitor - measuring current only
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?