Basics of Design CC Blog Research & Design Hub

Energy Monitoring – Part 1

Written by George Novacek

Sun-Powered System

The efficient use of energy is a topic that’s front and center these days, as climate change and energy costs begin to affect our daily lives. Curious to discover how efficient his own energy consumption was, George built an MCU-based system to monitor his household energy. And, in order to make sure this new device wasn’t adding more energy use, he chose to make the energy monitoring system solar-powered.

There are a lot of energy-related matters for us engineers to think about these days. Among these are energy efficiency and energy conservation as well as the clean environment, climate change, renewable energy resources—and, of course, ever-growing energy costs. In fact, we, the engineers are among those who can and must do something about these issues and carry the responsibility for their management. But I wonder sometimes. While, on one hand we’re being urged to save the resources, more and more products appearing in the stores today are not repairable. They are often designed with inferior materials and quality control to slash the manufacturing costs, which ultimately reduces their life-cycle. While that approach increases repeat sales, it is shortsighted because it leads to overfilling landfill sites and wasting precious resources. Worse, manual appliances are replaced with ridiculous electrical ones. An example is the electric jar opener which—adding insult to injury—doesn’t even work very well. All that presumed convenience comes at the cost of increased energy consumption.

To see if and how I may be contributing to the energy hogging problem, I resolved to build a monitor to track and log my long-term household energy consumption and to correlate it with the climate I live in. Yes, I know—adding another energy consuming device to my household might make me look like a hypocrite. But don’t fret. My monitoring system is powered by solar energy. Moreover, I challenged myself to use as many parts as possible from my own component bins, even though that made for a less than elegant design.

SYSTEM DESIGN
Figure 1 shows the system block diagram. I wanted to track my energy usage with respect to the outside temperature and humidity. With that in mind, I designed the monitor to log and save to an SD card the following variables: time, date, outside temperature and humidity, electrical power draw and the consumption of the natural gas. I didn’t have to track the water usage. Because I have my own well, the water usage is reflected by the electricity consumption.

Figure 1 – System architecture block diagram

The log serves to show my household’s long-term energy consumption profile with respect to the weather, time of day and season. As a fringe benefit, it allows me to compare weather year-to-year in my locale. The collected data enables me to generate annual graphs based on the variables I listed.

I am not looking for precise day-to-day, hour-to-hour electrical and gas consumption. If needed, that data can be downloaded from my utility companies. I just want to see how my energy consumption varies during the day because its cost changes based on the time of the day. I also want to see the effects of the weather. Eventually I should be able to analyze the trends and make informed decisions. I’ll be able to see if and how my energy usage habits could be modified to improve my overall energy efficiency.

— ADVERTISMENT—

Advertise Here

The first consideration was the level of precision I wanted to achieve in my measurements. Since I’m more interested in the trend than the precise data, I figured an overall precision of around 10% should be sufficient for my needs. Such a requirement is easily satisfied by 10-bit digitization. Since Arduino, already in my bin, features a 10-bit analog-to-digital convertor (ADC), the choice was obvious. I selected an Arduino Uno R3 for the development board because of the convenience of its USB interface. Once the software was finished, I replaced the Uno with an Arduino Pro-mini board. Arduino Pro-mini has the same functionality as Arduino Uno, but does not contain the USB port. This reduces its power consumption by about 50% compared with the Uno.

One challenge to consider was the shortage of I/O pins available on the microcontroller (MCU). Rather than changing the MCU, I alleviated this shortage by using the LCD display module ID 714 from Adafruit with the I2C interface. During its assembly I omitted the two 4.7 kΩ pull-up resistors R1 and R2 to reduce loading of the I2C lines. The pull-ups are already installed on the Data Logger shield and other sensor modules. The display module contains six push buttons: one is used to enable the display back lighting and one is for the system reset. I may decide to use the other buttons for new features at a later date.

POWER SUPPLY DESIGN
To begin with, I needed to know: How much power is the solar panel required to deliver to run the monitor? Due to the lack of electrical data from the vendors, I measured the current draw of the modules. In its continuous operation Arduino Mini draws 22.1 mA and the logger shield uses 0.96 mA—reduced to the microampere range after disabling its unnecessary “power-on” LED. The temperature/humidity module needs less than 1 µA while not converting its readings. The AC/DC converter pulls continuous 0.22 mA and the display module—while it can draw a fairly large current when lit—is enabled only manually when needed. In its normal stand-by condition it draws 2.4 mA.

With the exception of periodic data acquisition, the total steady current draw is 24.78 mA supplied by the PRT-10255 boost converter. The converter supplying 5 V to the system has 73% measured efficiency, drawing a steady 53.3 mA. I used 60 mA as the estimated total to include the data acquisition and logging. Because the two parallel LiPo (Lithium Polymer) batteries have 2,800 mA-hour capacity when fully charged, they can operate the monitor for nearly two days. After replacing the 18500 with the 18650 cells, 5,200 mA-hour capacity will be available.

A 6V/2A solar panel feeds the charger to keep the two parallel LiPo batteries topped up. About four hours of daylight should be sufficient to fully charge the batteries, the power draw of the monitor notwithstanding. The batteries are not necessary just for the solar powered operation. They also ensure uninterrupted monitor operation because I rely on a 5 V plug-in power adapter for a backup to recharge the batteries whenever sufficient solar power is not available.

Figure 2 is the power supply schematic. Because I don’t believe in reinventing the wheel, instead of designing circuits of my own I purchased the LiPo charger ID 390 from Adafruit and the PRT-10255 booster from SparkFun. The battery voltage is monitored by Arduino’s A2 ADC port. According to their specification, the batteries must not be discharged below 2.75 V. For safety, the ID 390 charger has a nice feature in that it automatically switches off when that voltage is reached. Nevertheless, as might happen during a prolonged period of dark winter days that we experience regularly, once the batteries’ voltage drops below 3 V, the 5 V DC power from the plug-in adapter (Wall Wart) is connected through P-MOS Q1 to provide charging current. As soon as the battery voltage has risen above 4.1 V, Q1 is turned off and the external power source disconnected.

Figure 2 – Power supply

BATTERY CHARGING
During the charging cycle the LiPo backup batteries’ voltage can rise up to 4.2 V. I used two parallel batteries (also from my components bin) for a comfortable back-up capacity of two days. But I ran into an unexpected problem. According to my unconfirmed information, it seems that the 18500 battery is gradually being phased out, being replaced by its larger, more powerful sister: the 18650. In any case, I had been unable to find the right size battery holders. I found holders on eBay advertised as for the 18500 batteries, but when I received them, I discovered they were for 18650 batteries.

The mechanical difference between 18500 and 18650 is their length. While the former is 50 mm (1.97”) long, the latter is 65 mm (2.56”) long. Both batteries have the same diameter. My solution was in employing ½” diameter copper (Cu) end caps used for plumbing. They have perfect dimensions to fit into the battery holder and fill the gap as shown in Figure 3. Just don’t forget to remove the nonconductive coating of the copper with a fine sand paper where the battery’s positive terminal touches the cap. When the 18500 batteries come to the end of their useful life, I plan to replace them with the more popular, larger capacity 18650s just by removing those caps.

Figure 3 – Modified solar battery holders

Using the 5 V power adapter to supplement the solar cells takes a little away from the originally desired utility power independent operation, but it was a trade-off based on several considerations. To ensure continual uninterrupted data collection, I would have to purchase a significantly larger solar panel and appropriate storage batteries at a significant cost. So, I figured the household power consumption increase during an occasional recharging would be negligible.

— ADVERTISMENT—

Advertise Here

In the upcoming issues, I’ll take a closer look the peripheral modules—specifically the utility power monitoring, the AC/DC converter, temperature/humidity acquisition, the data logger, the display and the natural gas consumption tracking. 

For detailed article references and additional resources go to:
www.circuitcellar.com/article-materials
RESOURCES
Adafruit | www.adafruit.com
Sparkfun | www.sparkfun.com

PUBLISHED IN CIRCUIT CELLAR MAGAZINE• JUNE 2019 #347 – Get a PDF of the Issue


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.


Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Become a Sponsor
+ posts

George Novacek was a retired president of an aerospace company. He was a professional engineer with degrees in Automation and Cybernetics. George’s dissertation project was a design of a portable ECG (electrocardiograph) with wireless interface. George has contributed articles to Circuit Cellar since 1999, penning over 120 articles over the years.