# Real-time Web Based Household Power Usage Monitor

This Instructable details a real-time web based household power usage monitor. The end result is a live chart in a web page that updates every 10 seconds with the instantaneous power usage for my entire house. The electrical current is measured on the main lines entering my home with AC clamps. The signal is then conditioned with a simple circuit and monitored by an ioBridge module. The ioBridge module takes care of feeding the data to the internet without the need for me to host a power hungry home web server. By using ioBridge widgets with a few JavaScript API calls on my web page, I am able to chart the data with Google Charts as it is measured and make kilowatt-hour calculations in real-time.
Remove these ads by Signing Up

## Step 1: AC Measurement

There are a few ways to measure electrical power. The way I chose might not be the most accurate but it achieves two of the main criteria for this project. It had to be cheap and I didn't want to screw with my home electrical wiring to make it work. I did not want make an electrical connection with main power wires. The idea of interfacing directly to 220v makes me nervous. I could have used a Kill-A-Watt but it is only good for one outlet. Plus there is no way to get at the actual data, basically can just look at it on the LCD display. I've also seen commercial power meters for this kind of thing. Since those meters can cost over \$1000, I didn't want to go that route either.

For this project, I used an AC clamp. With an AC clamp, it is possible to measure the current traveling through a wire without physically touching it. Basically it is a simple transformer where the wire of interest acts as the primary coil and the AC clamp is the secondary coil. Most AC clamps are integrated into a multi-meter. I used a stand-alone type for my project. It outputs 10mV per ampere and is intended to be connected to a multi-meter. All you do is multiply the voltage reading by 100 to get the current in the wire. These can be found for \$20 or less on Ebay. Mine were made by Steren, model MUL-285. The great thing about using an AC clamp is that I was able to do all of my prototyping without ever turning the power off.
 1-40 of 90 Next »
miketranch says: Apr 9, 2013. 5:56 AM
Nice write-up, thanks! I've been working on a related project using a Kill-A-Watt as a starting point. I've added an Arduino clone with a radio (e.g. a JeeNode or Moteino) and it samples the supply voltage and load current 50 times per cycle, computes true RMS values, and also VA, Watts, and power factor, and transmits all that to an R-Pi. I've been documenting the project on my blog, www.mikesmicromania.com. I recently obtained the same current clamps you're using from SterenShop, and they look really decent. For my next project, I'll re-create your whole house project. Thanks again, your project helped my design, and you helped me find the current clamps (very reasonable price compared to everything else out there).
rkincaid says: Jan 29, 2009. 1:15 PM
Would it be possible to just measure the neutral wire and only use one ac clamp?
ham4fun in reply to rkincaidFeb 10, 2009. 6:07 PM
No, because dryers or other 220V equipment won't pass any current through the neutral wire.
legless in reply to ham4funMay 24, 2009. 9:40 AM
Huh? What?
Dryers and 220V equipment use the difference between the two others wires. The neutral wire is at 0v. So, let's say you want 240v. 60 times a second you will have a configuration that looks like this: start of cycle: black wire - +120v Red Wire -120v half cycle: black wire -120v Red Wire +120v As you can see, you would get 240v by using the black and red wire since they are 240v apart at their peaks (AC). The rest of the house uses either the black and neutral wire or the red and neutral wire. And that is why they usually say your house is on two different phases.
Is this why you can just measure the red and black wire, add that up and get your energy consumption? I figured you would have to account for the the voltage going thought the neutral separately otherwise the 240v would be accounted for twice.
You have a weird way of wiring stuff in your country. You want to try testing the idea that there is no current in a neutral wire from any appliance in my country by grabbing it and you will likely have a whole new hairstyle if you live. Of course all of our mains equipment runs off 220V-240V here. Houses here are normally just supplied by a single phase coming from a supply in the street that is multiple phases. If you want power from a second phase for some reason is taken from another in the street supply. You could also get 415V 3-phase power connected if required here.
lrdforster says: Jan 1, 2012. 10:37 AM
I just come across your instructable and had a look. I found both it and the comments interesting reading. Power factor is interesting and needs a simple measuring solution.

Many years ago when I was an apprentice I recall seeing an analouge Power meter which compencated for power factor. As I recall it had a voltage coil and Current coil combined in such a way they gave a Power reading.

The Idea was as the current signal is out of phase with the voltage one rotating force would work against the other rotating force, Calibration was done in 2 parts, 240 vac and zero current moved the needle to 0 Watts increase in current the rotated the coil back up the scale.

Using tis principle and two conditioned analouge signals one AC volts the other ac amps into two op amps respectively and combine those outputs in a multiplying opamp should give a representative Power Output with Power factor included. ie when current or voltage is momentarily 0 the power is 0.

Multiplication requires 2 logerithmic amplifyers and a summing amplifier. for those who didnt know. Op amps are good at analouge maths. once comleted then digitise using an ADC
lrdforster in reply to lrdforsterJan 1, 2012. 1:51 PM
circuit attched quite simple remember it releys on analouge measurment and simaltanious readings. The output would need to be calibrated with known inputs and powerfactor
thecolorblue says: Apr 21, 2009. 9:41 PM
I love this idea but I am really worried about opening up my fuse box to set it up (esspecially, since a lot of the technical stuff went over my head). Even if this setup is only 40% accurate, its a great example of what someone could do with a iobridge. This looks like a great weekend project and maybe another weekend just playing with google visualizations api. With more money, do you think it would be possible to make this more accurate?
jasonT (author) in reply to thecolorblueApr 22, 2009. 1:22 PM
Actually yes, I am working on an update that will address the "power factor" errors.
J,R,D, Ltd in reply to jasonTMay 20, 2011. 7:40 PM
How has progress on the update gone?
thermoelectric in reply to jasonTMay 23, 2009. 8:52 PM
Ooh, I can't wait to see how you do that. It will be really hard unless you can "correct" the misalignment of the current draw. This might give you some ideas (schematic down the bottom...)

I've been watching your live graph and it's amazing how many times it can peak at nearly 4kw's. What draws that much power?

BTW, Great instructable, when I try to do it I will use CT's. I doubt I will use the ioBridge because there isn't much of a DIY factor to that (It's also partially because I'm too young to have a paying job...)
Hightechk says: Sep 25, 2010. 8:49 PM
i hope you know what your doing if you try this because you could easily kill your self. also i would recommend covering those open circut boards (dust and if you have children)

looks cool though im wondering wether i want to do this or just buy one?
DavidRobertson says: Jul 30, 2010. 9:14 AM
Correction. In step 2 it should read "2. AC Current Clamp. Stand-alone type what that will give an output in milli-volts per amp.".
ChookChooks says: Jun 7, 2010. 5:15 AM
This is worth a look :

Power Monitoring, Weather Station Data, Server Performance, throw in some Local News and an interest in Australian Magpies..

and you found ChookChooks.com

Sing out if you would like to know more :)

paulstich says: Feb 15, 2010. 6:38 PM
Good stuff!  Thanks!  I built this using the AD627 as you suggested.  Works great.  I'm using a homemade ammeter coil (based on the info in hydronics' \$2 Carabiner ammeter) and an Onset Hobo U12 data recorder.  I would like to improve the rectification, and am thinking about trying a true-rms chip, like the AD737.
Stevens_Carl says: Jan 2, 2010. 12:30 PM
I am in Toledo, Ohio and am currently using Toledo, Edison... I am currently paying \$900.00 Mo. for my Electric bill. I am compiling a list of projects to help cut these costs. So far burning wood for heat. I have an extensive knowledge of Electricity and a some somewhat limited knowledge of electronics.
I am considering using current transducers mounted on all "hot" lines from each breaker 40 total to monitor the current draw from all circuits individually. My plan would be to cut power to certain rooms and circuits through out my house and monitor the current draw usage real time Via my Blackberry. As well as be able to cut certain loads on the fly. I don't know why but for some reason I cannot wrap my mind around the project in such a way to be able complete it. Any help you may be able offer would be very help full.
jeremiahthebullfrog says: Apr 21, 2009. 3:15 PM
Don't know what country this is but talk about dangerous!!! That's like a load of spagehetti in there! and why are your incoming cables exposed instead of being covered where they terminate??? Another thing is how do your supply company measure your usage? I can't see a meter.
dylanwinn in reply to jeremiahthebullfrogNov 24, 2009. 11:26 AM
1) In the US (California) at least, the terminals are left exposed inside the breaker box by the utility company, and covering them is unlawful because it could present danger when removing the covers.

2) In most places, the Meter is OUTdoors (where it can be easily read), while the breaker box is INdoors (where it is difficult for you neighbors to tamper with).
jasonT (author) in reply to jeremiahthebullfrogApr 22, 2009. 1:26 PM
Since the voltages on the wires coming out of breaker box to my custom circuit are in the millivolt range, I didn't feel like I needed to cover them. Besides, this was a weekend project and I ran out of weekend.
Electron Wizard says: Jan 24, 2009. 12:38 AM
james.mcglashan in reply to Electron WizardNov 20, 2009. 4:52 PM
hey man that is the longest comment ive ever seen if i waned to write some thing like that i would make a new fourm and link to that topic. hehe instead if having a very long detailed comment.
heltones in reply to Electron WizardAug 14, 2009. 12:20 PM
You are correct for all of these points, but I think you paint a bleaker picture than necessary. I agree that the power factor issue is a big gotcha. However, that can be estimated and/or short-term measured (seasonally, depending on HVAC equipment) to get a fairly reasonable idea of how to modify the apparent power to get real power. For that matter, the voltage is not a constant either, so it should be measured. It's generally 118-126 V at my house, with a long-term average somewhere around 122.5 V. That is another bit of uncertainty this method incurs. The average residential monitoring application (at least in the US) will not suffer greatly from lighting dimmers and switching power supplies. These are generally a small percentage of the load at any given time. I'd guess the clamp errors are greater, especially at low currents draws. There is a lot to be gained by a better understanding of the magnitudes and time of energy use and what's going on in one's residence. I think this project is great in both means and ends, despite the limitations. The system really needs to be repeatable more than it needs to be accurate to Watt (or Wh) to give good feedback to the home occupant(s) about energy use. It has the potential to still be more useful than the monthly kWh reading from the electric utility that comes another two weeks after that month ends. I just wanted to add a bit more positive spin to the measurements, because I think they still have a lot to offer.
jasonT (author) in reply to Electron WizardJan 24, 2009. 9:21 AM
(removed by author or community request)
Electron Wizard in reply to jasonTJan 24, 2009. 1:40 PM
jasonT (author) in reply to Electron WizardJan 25, 2009. 11:50 AM
It's all good, no problem. I'm going to look into making a new circuit to that does a true RMS to DC conversion. That should help a little with the error. It'll take me a little longer to figure the power measurement with instantaneous voltage factored it. But I'll give it a shot!
geo in reply to jasonTFeb 14, 2009. 2:16 AM
Hi Jason-- Analog Devices has several analog multiplier chips you will want to look at. Sadly, you will find that they're expensive as chips go. The "low cost" ones can be had for eight bucks at Digi-Key, though...
legless says: Jan 31, 2009. 7:53 AM
just don't do it in OZ. We can't touch in the power box at all except for replacing a fuse or resetting a breaker.
thermoelectric in reply to leglessMay 22, 2009. 7:47 AM
You probably can't, but just do it when nobody's watching :-)
chrisli75 says: Mar 14, 2009. 3:48 AM
To be safe... Turn off your Main House Power.
AdrianCronauer says: Mar 11, 2009. 3:20 AM
Just to mention that the german http://www.enbw.com/stromzaehler/
(unfortunately this site is available in german onyl!) offers an online
counter. This device is connected via kinda powerLAN adapter to the customer's
Router which sends data to the ENBW. Furthermore the customer can check the
current electric power consumption with a computer based program. In addition
the customer does not pay a monthly rate but pays the actual power which has
been used. On the website of ENBW the customer can analyse the power
comsumption on a daily, weekly, monthly and yealy base.
ENBW offers two rates: high price Mo thru Fri 8am to 6pm and a lower rate
during the night and weekends.
Foxtrot70 says: Mar 4, 2009. 8:24 AM
Hey JasonT - To make your setup cleaner you can use current transformer rings. They install by disconnecting each of the two power lines sliding the transformer ring on each leg, then reconnecting the power line. The output is the same as the AC Clamp. I have a similar device I purchased commercially it works great!
Andrew Heine says: Mar 3, 2009. 6:35 PM
add cost calculation based on local power rates to show actual cost per hour
JeyNyce says: Feb 26, 2009. 6:11 AM
I didn't read the whole article so for give me if my question sounds silly, but could I use something like this to compare it with my Con Ed bill? I swear that sometimes I think they are over charging me! Thanks
sydelbow says: Feb 21, 2009. 6:17 PM
lol I need you to come to my house and create this again. It's fabulous, I wish I understood most of it. Does it come in handy for you? Have you discovered what takes the most power and what you can unplug? I'm so curious about my own home.
Callum Snowden says: Jan 23, 2009. 11:52 AM
GET THEM LIVE TERMINALS COVERED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DONT risk an electric shock when you could be enjoying your life
dalesd in reply to Callum SnowdenJan 30, 2009. 9:42 AM
Correct me if I'm wrong, but there are no exposed 110 or 220v connections in the completed project.
Callum Snowden in reply to dalesdJan 30, 2009. 10:14 AM
No I meant the main incoming live power terminals which you said were live
jasonT (author) in reply to dalesdJan 30, 2009. 10:09 AM
Correct. The AC clamp wires that are coming out of the bottom of the panel only carry a few volts at the most.
 1-40 of 90 Next »