Step 1: AC Measurement
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.
Step 2: Round Up the Parts
1. ioBridge IO-204 Monitor & Connectivity Module
2. AC Current Clamp. Stand-alone type what will give an output in milli-volts per amp.
3. Circuit parts
- prototyping PCB or solderless breadboard
- 16k, 47k resistor
- 10uF polarized capacitor
- 10k 15-turn potentiometer
- small signal diode (1N4001or equivalent)
- instrumentation op-amp (AD8820, AD627 or equivalent)
- digital multi-meter
- extension cord
Step 3: Construct the AC-to-DC Conditioner Circuit
The other part of the circuit is a leaky peak detector made with a diode, resistor and capacitor. Its purpose is to translate the AC wave peaks into a DC voltage level. The 47k resistor causes the leakiness. Since the voltage level updates 60 times per second, adding that resistor increases the system's response time.
The potentiometer is used for offset calibration. I used a 15-turn pot for the best accuracy. To calibrate, power the circuit, make sure the AC clamp is not on any wire and measure the circuit's voltage output.
Step 4: Test and Calibrate
1. Power up the ioBridge module and connect the conditioner circuit to it. The conditioner circuit will be powered by the module.
2. Connect the AC Clamp leads to the circuit. Make sure you don't have the clamp on any wires at this point.
3. Set your digital multi-meter for DC voltage and connect to the ground and output pin of the circuit.
4. Adjust the potentiometer until you reach an output voltage of 1.000v.
5. Make a "calibration cord" by splitting the wires of an extension cord. Be careful not to cut or expose the extension cord wire.
5. Put a single wire of the extension cord (not the ground wire) in the clamp and plug in something of which you know the AC current draw (preferably something with a resistive load, like a heater) . Note the reading you get with your circuit compared to the real value. Although this step isn't actually necessary, it's nice to see if you are in the ballpark. To calibrate my setup, I plugged a portable space heater into a Kill-A-Watt to check the real number. It turned out that I was about 7% off and adjusted my calculations accordingly.
Step 5: Accessing the Main Power Lines
Don't touch ANYTHING inside the breaker box! The beauty of using an AC clamp is that it's designed for this sort of thing. Just clip it on a line you're interesting in measuring and put the cover back on immediately. Touching the wrong thing in there will kill you. I don't assume any responsibility if someone injures themselves trying to recreate this.
In most US homes, the electricity comes in as 220v on 3 main wires. Some appliances, like ovens and clothes dryers, are connected to these 220v lines directly. However, by using just one of the lines, the power is reduced to 110v for all the wall outlets. Usually, a home's electrical wiring is divided into two sections. One line (known as a leg) powers one section of the home and the other line powers the other side. To get the total power usage in my house, I put an AC clamp on both legs and added the measurements together.
If you are interested in monitoring a single breaker or maybe a single appliance, this method will still work. Just put the clamp on the wire coming out of the breaker.
Now just tuck that clamps in the box so the cover can go back on.
Step 6: Put the Cover Back on the Breaker Box!
Step 7: Mount the Hardware
Since I didn't have an network connection near my breaker box, I connected the ioBridge module to a LinkSys wireless gaming bridge. The gaming bridge allowed the ioBridge to talk my wireless router.
I'd like to point out that there is no home web server involved here. Just the ioBridge module and wireless bridge that together consume less than 5 watts!
Step 8: IoBridge Module Setup
Step 9: Power Calculations
CircuitVoltage = WidgetValue / 1023 x 5
I = (CircuitVoltage - 1) x 100 / Gain x CorrectionFactor
where Gain is the gain of the op-amp and assuming you are using a 10mV/A setting on the AC clamp. It's "CircuitVoltage - 1" because there is a 1v offset provided by the potentiometer.
To convert this to Watts, the math gets a little fuzzy. A number called the "Power Factor" is needed. The power factor is different for different appliances (and even changes for that appliance depending how it's being used.). Some appliances use voltage and current in phase with each other. This is the case with a heater for example. An electric heater would have a high power factor, maybe 90%. Other things, like computers, use power differently and their voltage/current demands are not in phase. In these situations, the power factor is lower, maybe 35% to 50%. Your entire home is a combination of all these devices with differing power factors. In order to calculate power usage in watts from voltage and current, you'll need to make a guess at the power factor. Most people use 60% as a good estimate for a home's average power factor. I used 75% in my calculations. It's important to point out that the power factor of you entire home is not constant but changing all the time. To get power use the following:
Assuming V = 110v (US homes)
P = V x I x Power Factor
Step 10: Google Charts and Website Integration
There are a few features of the chart that I'd like to point out. First, it automatically updates every 10 seconds. It will continue to add more points for an hour. After an hour, data older than an hour will be scrolled off the chart to make room for new data. This limitation is because of the way Google Charts works. A Google Chart is created through the use of a URL. Since a URL is limited to 2048 characters, there is a limit on the amount of data that can be plotted at once. The other thing I want to mention about the chart is that it will automatically scale the Y-axis.
Happy power monitoring!