Logger Device Tracks Amp Hours (Part 2)

Lead ImageWachsmann

Alternative Energy Sources

In this follow on to Part 1 of his story, Bill describes putting to use the amp-hour logger that he built using a microcontroller and a clamp-on ammeter. This time he discusses modifying the amp-hour software so it can be used as an analog input logger to measure solar and wind power. A small solar cell and a homemade windmill are used..

By William Wachsmann

2017-11-012-Wachsmann-Fig1

FIGURE 1 Amp-hour log for the Office Circuit over 24 hours. It adds up to 14.728 A-hours and 1.767 kW-hours at 120 V.

In November and December 2016, I monitored all the circuits in my house. Some of the results were eye opening. We have a shed/workshop that is spray-foam insulated, where—among other things—we store paint cans. It’s heated by a 240-V baseboard heater and in the winter, we keep the temperature at around 10°C or about 50°F. The amp-hour logger showed that the heater was coming on about 3 times each hour and stayed on for 7 to 9 minutes each time. When it was on, it drew almost 7 A. The spreadsheet (file: SteelShed.xls) with the chart for these readings is included with the code—see Circuit Cellar article materials webpage for links.

Over a 24-hour period this amounted to an energy use of 12.5 kW-hours. At the rate we pay for electricity, it was costing around $3 per day or $90 dollars per month. Needless to say, we got rid of the old paint and turned the heater off. Now I only heat it if I need to work out there and it would otherwise be too cold. Figure 1 shows a chart of amp-hour usage in our office where my wife and I normally have three computers and two monitors running. Over a 24-hour period we use 1.767 kW-hours costing us about $0.50 per day. That’s not too bad but it’s actually more than the refrigerator at 1.357 kW-hours.

Table 1 (available in full article) shows the results from all the circuits in our house over a 24-hour period. (Not all on the same day!) I have since turned off the ‘Steel Shed Heater’ thus removing its 12.5297 kW-hours. The daily total is 31.39 kW-hours and monthly is 941.59 kW-hours. As a sanity check, that is quite close to our annual monthly average about 950 kW-hours. I have previously looked into going completely off grid, but it turns out to be too costly—mainly because the payback period would be 12 years or more. This also applies to “feed-in tariff” programs where solar or wind generated power is sent to the grid. The amount paid for this power is subsidized, and is higher than what we pay. But it requires an investment of $30,000 or more—for solar anyway—and wouldn’t be profitable for 8 to 10 years.

There is one exception to getting off grid cheaply. We have natural gas, which at current prices could be used to produce electricity at half the price we pay for power from the grid. The first problem here is that the type of small generators I would need are sold as backup systems and are just that. In other words, they are not designed to run continuously. If I tried to do that, I would void the warranty and the generator wouldn’t last anyway. There are larger ones designed to run continuously and are made to supply power in remote areas. They will run on either propane or natural gas, but are much larger than I need and much more expensive. Second, they are noisy and neither us nor our neighbors would be too happy. …

Read the full article in the November 328 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!
Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Logger Device Tracks Amp Hours (Part 1)

Measuring Home Electricity

Setting out to monitor and log electricity usage in his house, Bill built an amp-hour
logger using a microcontroller and a clamp-on ammeter. He gets into the software
development details exploring solutions like mbed and Microsoft Visual Studio.

By William Wachsmann

Like many people I found that electricity costs have been increasing rapidly over the past few years. Where I live, we have smart meters that allow the power company to charge different rates for high usage, moderate usage and low usage times of the day. The bills show how much energy is used during the different periods but only for the dwelling as a whole.

For this project, I used an NXP-Freescale FRDM-KL25Z microcontroller board.

For this project, I used an NXP-Freescale FRDM-KL25Z microcontroller board.

I wanted to know which parts of my house use how much electricity and at what times of the day. With this information, I would be able to see what parts of the house are using how much energy, and I’d even be able to calculate how much it’s costing to run certain appliances. I could then look into the feasibility of supplementing my energy supply with solar or wind, or maybe use a battery storage system that is charged in the less expensive hours for use during peak periods. Or perhaps even some combination of all three.

THE BASICS

To measure AC current, you normally use a “Clamp on Ammeter” on either the live or neutral wire in the circuit of interest. These ammeters are readily available but they will only tell you the current at the particular point in time that you are using it. What I needed was one that I could leave connected over a 24-hour period and get a log of the current usage throughout the day and night. If such a device exists, I was unable to find one, so I needed to make my own.

The device would have to monitor currents in 120 V and 240 V AC circuits and be reasonably accurate over a range of 200 mA to 30 A. The price we pay for electricity is based on kilowatt-hours (kW-h) multiplied by the rate— usually specified in cents-per-kWh. In my case, in the fall of 2016 we were paying an average of about $ 0.27 / kWh after all extra charges such as delivery and taxes were included.

Using the data from the amp-hour logger would allow calculation of the number of kWh used in each circuit of my house. Since kWh is a measure of energy I also needed to know what the voltage is at the time that the current is being measured. Then, given that P = VI, I would get a measure of the power being used at a given time. Integrating this over a period of time gives me the energy in watt-hours or—dividing by 1,000—in kWh.

To be really accurate, I should measure the voltage as well as the current but I have found that whenever I check the voltage it is pretty constant at 120 V (+ or – a couple of volts). Therefore, using a nominal value of 120 V (or 240 V for some circuits) should be accurate enough for my purposes. If the amp-hour logger is designed to save current measurements for each minute, that should give a pretty good indication of load changes in the circuit that is being monitored. Also, just adding up the amp-hour/minute readings effectively integrates them and provides the total amp-hours used over a 24-hour period. Multiply this by the voltage and divide by 1,000 and I’ll get the number of kWh used in a day. Great. That’s the theory. Now to make something that will work.

Read the full article in the October 327 issue of Circuit Cellar

We’ve made the October 2017 issue of Circuit Cellar available as a sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.
Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!