Showing posts with label Home Power Measurement. Show all posts
Showing posts with label Home Power Measurement. Show all posts

Friday, November 20, 2015

Air Conditioner Measurement - Part 1 - First Cut


I was getting ready to update the hardware on my air-conditioner measurement system when I realized that I had never written about the initial set-up. So, several months after the fact, here's what I've been doing.

In my previous temperature measurement system, I was able to fairly easily measure the air-conditioner state by tapping into the relay that activated the central circulation fan. In this new house, that was not going to be so easy so I decided to try something more direct: measuring the condenser fan in the outdoor unit. I thought about tapping into the relay on that fan unit but that relay switches 240V and I didn't want to have to worry about making sure the wiring was properly protected for that higher voltage. Instead, I decided to measure the air pressure change caused by the fan turning on.

To do that I employed a BMP180 which measures both pressure and temperature.  I was able to get the sensor mounted on a little PCB and strap down an old milk jug to catch some of the air when the fan turns on, making a little pocket of slightly higher-pressure air. I wasn't sure if this was work but testing revealed the pressure increase was high enough for the sensor to clearly detect.


Air pressure capture for the fan. I've pulled the system for maintenance and it isn't shown.


I wanted to try to make correlations between outdoor temperature and air-conditioner run-time under the assumption that the air-conditioner would run longer when the outdoor temperature was higher. To do that, I employed one of the temperature sensors I previously used for indoor temperature measurement. Not being weather proof at all, I stuck it under the out-cropping on our house under, behind the air-conditioner. This is not ideal as it is very close to the ground (less than 6 inches of clearance) and natural air circulation is likely to not be very high. Its not great but it is out of the rain and is better than nothing. (I'm not able to use the BMP180's temperature sensor because the air blown by the air-conditioner fan will be hotter than ambient. The whole point of the outdoor half of an air-conditioner is to cool the hot coolant as a part of the thermal cycle.)

Since I don't have a real-time measurement system up and running to record the data collected, I decided to use an SD card logger commonly available for the Arduino platform. It is fairly easy to write specific values to the card and it includes a real-time clock to time-stamp each log entry. With this I measured the BMP180 pressure and temperature (the later just for fun), and the TMP36 outdoor temperature. I did this every 15 seconds and, through the use of an extension cord, was able to leave the unit plugged in, running indefinitely.

Here's the final schematic:

The two LEDs are diagnostic lights. The red one flashes every time the SD card is being written to and the green one is lit up when the system is powered.

Here's the hardware, pulled out for maintenance:
From left to right: Interface PCB for LEDs and TMP36 module, BMP180 module, SD card logger on top of an Arduino Uno, and TMP36 module.

And here's the code. Not all of it is working at present, such as the time measurement, but the core measurement functionality has been working great.

Wednesday, August 15, 2012

Air Conditioner Power

In writing yesterday about evaluating the cost effectiveness of our fancy whole-house fan I mentioned that I only had a way of measuring how much air-conditioner run time was saved by using the fan, not the actual dollars and cents difference.  If I knew how much power the air-conditioner used I could make a rough guess on reduction in the energy bill due to the fan use.

Today, I found a way to measure the power and can now fill-in that gap. The number: ~4kW. (You have no idea how long I've wanted to know this number. This made my day.)

This is an astoundingly high number but I don't know how it compares to other air conditioners. Obviously power consumption depends on size; the window units are rated between 1 and 1.5kW. Our air conditioner is old and I bet its efficiency is not that great but I have so little documentation on it that I can't compare it to other more modern units of equivalent size.  Maybe that will be my next bit of research.

Now for some math: Even with a power bill, it can be hard to figure out the $/kWh we all pay.  Let's assume somewhere around $0.1/kWh, a ballpark number that makes the math easy. Using  $0.1/KWh and looking back over this summer's usage of ~8/day, the energy cost just for cooling is $3.20/day; 30 days in a month brings the total to $96/month.

As far as the cost effectiveness of the fan goes, well, there's still a few more complications.  The easiest one to address is the energy consumption of the fan itself.  Looking this up in the manual shows the fan is rated at 292W on high (which we most often use) .  This is a 1:13 energy consumption ratio between the fan and the air-conditioner.  For ballpark analysis purposes, we could probably just consider the energy consumption of the fan as negligible.  Its a bit of a stretch but my work so far has been just as imprecise and I can live with this.

The second issue is very much related to what I discussed yesterday: how many hours over the course of the summer am I using the fan when I would normally be using the air-conditioner?  The results of the experiment I wrote about yesterday show a 25% reduction (using awful experimental techniques) in air-conditioner usage when I use the fan.  Many days of the summer, though,  I can't use the fan at all as the overnight low is still above the indoor temperature.  If I get really committed I might go back through my temperature data and try to make some kind of estimate; that's more work that I want to mess with right now.  For tonight, I'm once again going to table this.

Tuesday, August 14, 2012

Effectiveness of Whole-House Fan

As I've written before, two years ago we installed a whole-house fan in an attempt to make better use of the sometimes-colder outdoor air to cool the inside of our house.  The fan has been great but I've been wondering if it was a good economical choice.  Would we have been better off just spending the money on air conditioning rather than this fancy fan?

To answer this question I would need to compare how long the air conditioner runs on days when we use it versus days when we don't.  Oh, and the days would have to be identical. Since I don't control the weather, doing a direct comparison is pretty much not going to happen.  The next best strategy is to find days with similar weather, use the fan one day and not the other, and do this a bunch of times to average out all the actual differences in the weather.  This is a better strategy but has two problems:

  1. The decision on whether to use the fan or not must be made without knowing the upcoming weather for the day.  Obviously weather forecasts solve this somewhat but it may be hard to decide if the predicted weather for the day is equal enough to the weather in some arbitrary previous day (where I've already collected your data) to make the comparison worthwhile.
  2. By definition, there will be days when I could use the fan but choose not to (so I can collect data for the air-conditioner-only case).  I bought this big fancy fan and I don't get to use it? And I'm doing this so that I somewhat scientifically determine if using this big fancy fan I already bought is doing what it should?  
In light of these two complications it became obvious to me that to do this experiment well requires more commitment to good scientific principles than I can bear right now.  Instead, I did the smallest experiment possible: two days that are vaguely similar in weather one using the fan and one not, measuring the amount of time the air conditioner runs on each day.



This graph shows the outdoor temperature on the two days I ran this experiment. The days are far from identical but do have a similar daytime highs and general temperature trends throughout the day.

The measured air-conditioner runs times are as follows: fan + AC: 3.8 hrs, AC only: 5.1 hrs.  That's a time savings of 24% when running only the fan.  The real question is how much money this saves me and for that I need to know how much energy my air-conditioner uses.  I don't have a way of measuring that at the moment but I've got one in the works. For now I'm going to have to be satisfied with run-time.

UPDATE: I've got a partial follow-up where I get an estimate of the air conditioners power consumption.


Saturday, July 14, 2012

Home Power Monitor - Arduino ADC Speed

An important part of my home power monitor is the ability to measure the instantaneous power for a given circuit; this will allow me to calculate other important nerdy things like the power factor and reactive power.  This approach requires frequent sampling of the voltage and current waveforms so that the average power over many 60Hz cycles can be found.  There are two important points in making this work well:

  • The voltage and current should be measured (ideally) simultaneously so that the power at that specific point in time can be determined.
  • The rate at which new voltage and current measurements are made needs to be high enough that the accumulated samples form an accurate representation of the source waveform.  This is especially true if the current waveform has transients and nonlinearities (due to non-linear loads caused by power electronics).
Both of these factors are highly dependent on the speed of the analog-to-digital converter (ADC).  Assuming that multiple-channel simultaneous ADCs are not being used (which is the case for my system), separation in time between the voltage and current measurements will be entirely a function of the conversion time.  The measurement of the current can't start until the measurement of the voltage is complete.  Similarly, the rate at which the 60Hz voltage and current waveforms can be sampled is determined by how long it takes one voltage-current measurement pair to be made.

For the sake of simplicity, this prototype system I'm building now is going to use the Arduino's on-board ADC.  This ADC has a built-in multiplexer which has a reputation for not being very fast but since I am planning on using an external multiplexer to accommodate all the power circuits I want to measure (the Arduino can only mux in 8 channels, my plan calls for 13-16), I can get away with only using a single channel for the on-board ADC. 

The question that remains, then, is how fast the on-board ADC can do a conversion.  My prowling of the internet found some very experienced people who found a way to adjust the clock that the ADC uses when converting.  The ADC clock runs at a scaled down rate (prescaler) of the main system clock and the scaling rate can be changed programmatically.  A part of the documentation for the microprocessor used in my Arduino states:

The ADC accuracy also depends on the ADC clock. The recommended maximum ADC clock frequency is limited by the internal DAC in the conversion circuitry. For optimum performance, the ADC clock should not exceed 200 kHz. However, frequencies up to 1 MHz do not reduce the ADC resolution significantly.

Operating the ADC with frequencies greater than 1 MHz is not characterized.
Ignoring the actual results from the conversion, I decided to characterize the time it takes for the ADC to complete a given number of conversions.  The results from this test are below showing the conversion time for a varying number of conversions.  The last column is the difference in the 1 million conversions time as compared to the previous prescaler value.

Prescaler Value     1k conv.   10k conv.   100k conv.   1M conv.   Difference
2                     7.52us     7.43us      7.42us       7.42us    -
4                     9.53us     9.32us      9.30us       9.30us    1.88us
8                    12.78us    12.57us     12.55us      12.55us    3.25us
16                   19.15us    19.04us     19.04us      19.03us    6.48us
32                   32.19us    32.02us     32.00us      32.00us   13.00us
64                   60.28us    60.24us     60.24us      60.24us   28.24us
128                 112.24us   112.02us    112.00us     112.00us   51.76us


There are two reasons to feel confident in this data:

  1. The conversion time is reasonably consistent across the various number of conversions.  There is not a dramatic difference in the calculated conversion time when the loop contained 1 thousand conversion and 1 million conversions.
  2. The difference in conversion times scales very nearly linearly with the prescaler value.
Based on these results and the documentation's note that the ADC should operate reasonably well up to 1 MHz, I am planning on setting the prescaler to 16 giving me that 1 MHz conversion rate.  Doing the math: 16 channels at a conversion time of 19us per channel gives me a total of 304us to sample all channels.  With a 60 Hz waveform this allows 54 samples across all channels in one cycle.  This is maximum conversion rate I should expect; the test above does nothing with the conversion results except store them.  The arithmetic I need to do will slow the process down; characterizing that will be another test I'll have to do once the hardware is complete and I have a fuller start on the hardware.

Sunday, July 08, 2012

Home Power System - Hardware Build - Part 2

Here's the latest developments in the home power system monitor:




The black rails down the side are the connectors for the current sensor connector modules. Yes, that makes it a connector for a connector. This is what happens when you buy connectors that you can't solder directly to the board. I've also decided to provide connectors for (and thus modulize) the analog mux I'm going to be using to read all these signals into a signal ADC port on the Arduino, the Arduino itself, and the radio I'll be using to send the information on to a computer for reporting.

The two sockets towards the top are the amplification modules for the current sensors. Each socket will hold two MCP6002 op-amp DIPs giving me a total of four channels per socket. I would have used the correct sized socket (one DIP per socket) but I forgot to order more and my supply here at home is almost gone.

I've completed four channels so far with four more to go before I get done creating channels for all of the circuits in my house that use both sides of the split-phase wiring. This makes eight current sensor channels to read four appliances here at home: mains, air-conditioner, oven, and clothes dryer. For now I'm only going to add three more channels (for a nice, even 11 channels total): refrigerator, entertainment center, and downstairs utilities like a chest freezer and clothes washer. Assuming this all works fine, I have room for three more channels in my current design.

Tuesday, July 03, 2012

Home Power System - Radio Assembly


Each one of those green things is a radio capable of transmitting and receiving data when hooked up to an Arduino.  You'll notice the there are actually two boards soldered together for each module.  My good friend Keith did the layout and legwork in getting the "motherboard" PCBs produced and last night hand-soldered all the components except the radio itself. Note the impossibly small size of the chip on the backside of the board (labelled "TXB0108").  Did I mention that Keith really enjoys doing detailed work like this?  I picked the boards up from him this afternoon and soldered on the radio "daughterboards" this evening.  My work is the messier of the two; forgive me, Keith.

The radios are quite impressive little beasts that provide a large amount of functionality in a very small package. For $7 I got everything I'll need to transmit my power measurements from one Arduino up to the Arduino I'm using right now for my home temperature monitor. I'll be able to use those existing scripts and data presentation methods to generate all the graphs I'll need. There is a lot of information out there on using this radio and I am hoping/expecting it won't be too difficult to get working. The only thing missing now from these modules is the antenna which will simply be a few-foot-long piece of wire.


The tiny chip on the back is a relatively expensive level shifter to convert my +5VDC Arduino signals down to a +3.3VDC that the radio is expecting. Other's have done this level shifting with resistors on signals headed to the radio (and nothing for the signals coming from). This seems to work just fine but technically such a plan doesn't quite meet Vih/Voh requirements; there is a small chance that some batch of chips will barely meet their specs but not work in this application. To avoid this possibility (and try out a new chip), Keith and I decided to go with the level-shifter and see how it works. I probably won't be testing the radios for a while as I'm focussing on getting the other hardware assembled.

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.

Tuesday, May 04, 2010

Power Meter

(A warning to all my non-engineering friends: this is a highly nerdy post.)

A few years ago I received as a gift a wonderfully nerdy item for any electrical engineer: the Kill-A-Watt. The device is used to measure electrical power consumption in household items and I've been using it to do just that, mainly to see how much power devices draw when they are plugged in but turned off.

One of the measurements this device makes is something called the power factor. The power factor is a measure of the ratio of real power a device consumes to the amount of power the device appears to draw from the grid (the apparent power). Devices with a low power factor are bad because they demand more power from the grid than they actually use, sending the excess back every half cycle. Some of this power that gets sent back gets burned up in losses on the wires and is in essence, wasted.

Traditionally, power factor has been caused by electric motors due to their high inductance and the fix was relatively straight-forward: adding a capacitor near the motor provides a place to temporarily store the energy that would have been sent back to the grid. When the motor then appears to demand it again, it gets pulled out of the capacitor. In fact, in these cases, the power factor can be calculated by a tiny bit of math measuring the difference between when the peak current flows and when the peak voltage is present. The larger the difference in time between these two events, the lower the power factor.

Over the past few decades, though, there has been another big power factor culprit on the rise: rectifiers. These are the circuits that change AC into DC and are in nearly every electronic goody around the house: computers, TVs, DVD players, laptops: if you buy it at an electronics shop it has a rectifier. The power factor problems these devices create is very different from motors, though. They send the power back to the grid in a very different way; they convert some of the power at the traditional 60Hz frequency to power at higher frequencies, distorting the waveform. The fix that works for motors does nothing in this case and measuring the power factor is much more complicated.

Well, in a lab I was finishing for class, we had a very fancy (and expensive) power meter we were using that measured the power factor in two ways, the motor way (displacement power factor) and the rectifier way (true power factor, the more useful and accurate of the two). Since I had access to this, I brought in my Kill-A-Watt and we set up both meters to measure the power factor on a PC (which contains a rectifier). Much to my surprise, the fancy power meter showed that my Kill-A-Watt measured the more complicated true power factor. I was very impressed that such a simple and inexpensive device was able to measure this accurately.

This made me a happy nerd for the day.

Thursday, January 11, 2007

Power On Start-Up

At my brother's request, I measured the power consumption of my computer during start-up. As I kind of guessed, power usage is relatively variable, anywhere from 65W to 105W. Using my finely honed real-time, eyeball-powered skills, I would say the average during the whole process was around 90W.

Sunday, January 07, 2007

You know you're a nerd when....

This Christmas, I requested and received something that many of you will find highly nerdy and not all that interesting: an electrical power meter. I have long wondered just how much various items around the house use (home electronics, mainly) and I now have a way to measure and see for myself.

First up, the computer. Instead of shutting my computer (iMac G5) down every time I am done using it, I put it into "sleep" mode. The display turns off, the disks spin down and the computer appears to be off except for a pulsing heart-beat-like light below the display. Power consumed in this state: 9W. Considering most house-hold incandescent lamps are 60W or greater, this is not much power at all. Overnight in the state, my computer consumed 0.08 kW-hrs. Even at $0.10/kW-hr, this is only pennies a month to avoid the hassle of shutting down and restarting my computer every time I want to use it.

Other misc. measurements I made on the computer:

-The display can be set to turn off after a period of disuse. The display consumes about 15W at full brightness. This is a lot less than I expected considering...
-During my normal usage, my computer consumes about 70W. This varies quite a bit depending on what I'm doing but the normal email, web-surfing, typing all weigh in about the same.
-When I'm doing processor intensive work like photo-editing or DVD-rendering the computer consumes about 110W.

I'll be measuring other stuff and probably (maybe) post on it later but I'll leave you with this one highly practical tidbit: those compact florescent lamps REALLY DO use a lot less energy than incandescent bulbs. The ones I've measured have all met their advertised power consumption. These light sources consume only 14W and provide the light of a 60W incandescent. Do us all a favor and go out and get yourself some of these for all the high-usage areas of your home. They'll probably pay for themselves over the life of the bulb and provide the warm fuzzy that you get when you save energy.

Well, at least I do.