Monday, July 02, 2012

Home Power System - Hardware Build - Part 1

For the past few months, in my voluminous spare time, I've been working on developing a system similar to my home temperature monitor that would monitor and record electrical power consumption.  The system will  measure the total power consumption of the house as well as that of a select few circuits (air-conditioner, oven, microwave, ...). The design has been almost entirely on paper until yesterday, when I started soldering and testing the first pieces of the design.  Below is what I've accomplished so far:



The two blue blocks on the left and right is where the two phases will be plugged in and the big white, brown and yellow blocks are transformers that will change the voltage from 120VAC (RMS) to 8VAC (RMS).  Most of the components along the top use one of the outputs from the transformer to make a +5VDC power supply; there is also a precision +2.5VDC reference (and capacitor) at the very left of the row of components.  Below that row of components are two op-amps (my new favorites, the MCP6002): one buffers the precision reference and the other (not quite complete) is used to scaling down the voltage supply from each phase to be sampled and used in power calculation.

I've been testing as I've built and so far everything works great.  I learned that the precision reference I'm using (MCP1525) REQUIRES a capacitor on the output and that its important to take your time and get the wires soldered in the right spot.  The later is a bit tricky when you're constantly laying the parts out on top but having the solder the connections on the underside. I'm considering this a prototype version and, assuming it works well, may at some point turn this into a more professional design by making a PCB.

For those interested in the theory, in broad strokes, here is how I plan on measuring power consumption. I am interested in measuring the full complex power which means I need a way of determining the phase difference between the voltage and the current. After some consideration, I decided the best way to go is to sample the voltage and current waveforms directly and calculate the power as the multi-period average of the product of those two.  This is the most general (and hardly ever used) method for calculating power and it allows me to measure the non-sinusoidal waveforms that power electronics (computers, TVs, ...) generate.  Using this technique also allows me to calculate RMS voltage and current which can be used to calculate the apparent power and from there the reactive power and power factor.

Using the general approach is powerful because it enables all these other measurements but it has its own complications.  Since this is truly an AC system, half of the waveform is positive and the other half is negative and is therefore outside the voltage range of the Arduino's ADC.  To make the system work, I'm having to do a bit of signal conditioning to shift all the AC waveforms so that they are centered around +2.5VDC and and adjust the amplitude of each signal so that its maximum voltage swing is 5Vpk-pk. (This is the reason for the +2.5VDC precision reference; it provides a stable elevated "ground" point for my signal conditioning).

Thankfully, the same mechanisms I'm using to isolate this board from the high voltages and currents in a home power system also serve to allow my reference point to be moved up from ground to +2.5VDC: transformers.  All the voltages and currents are measured through transformers which removes the negative side of the signal from the true ground reference and allows me to assigned this signal a reference of my choice. One of the op-amp on the board above handles the amplitude adjustment and scales the signal down so that it fits in the 0VDC-5VDC range.

1 comment:

  1. It's great to see this taking shape in hardware!

    ReplyDelete