Build Better Energy-Saving Electronic SystemsWelcome to the Darker Side. Simple calculations can generate
impressive figures,especially when calculating energy waste.
According to Wikipedia, our worldwide energy consumption is around
15 TW, which is 15,000,000,000,000 W. Considering that there are
around 6.5 billion people on Earth, this is an astonishing number.
Let‘s assume that everyone is using the same amount of power,
including developing countries,this comes out to an average of
2,300 W per person. Think about it twice: the average four-person
family (worldwide) uses nearly 10 kW, 24 hours a day, 365 days a
year! This is, of course, not only your personal energy
consumption, but also the energy used to manufacture the goods you
buy, the food you eat, the gas in your car, and more. But that‘s
still impressive,isn't it? And that‘s for the average human. I
would guess that Circuit Cellar readers are significantly above
average when it comes to energy consumption, no?
The purpose of this introduction is to remind you that we are
sometimes unreasonable and to introduce the subject of this
article. This month, I will present some tips and ideas that will
help you build better energy-saving electronic devices. Let‘s stay
modest, but assuming that better engineering practices could reduce
our energy bills by 0.1%,that's still 15 GW worldwide, a
significant number of nuclear plants.
Energy savings are even more critical in battery-operated
equipment. The same energy can be wasted in battery and
line-powered products; but in the former case, it can be disastrous
if you need to replace or recharge the batteries too often.
Moreover, in the case of primary (nonrechargeable) batteries, this
also implies a large environmental impact. Because the same
engineering principles could be used to build green line-powered
products or good batteryoperated systems, I will use a
battery-based imaginary example for this article. Let‘s assume that
you are asked to design the SmartyCook (see Figure 1), an
innovative cooking timer with a remote thermal probe and zillions
of new and heavily demanded software features like automated foie
gras cooking. Sorry for this example, but I have two excuses: I'm
French and my wife is a wonderful foie gras chef!

As you know, you could design such a product quickly with a
microcontroller. Imagine that one of your colleagues has already
designed the schematic shown in Figure 2. He has found a nano-power
PIC variant with an on-chip LCD interface, the Microchip Technology
PIC16F914, which could drive a custom LCD glass. The oven
temperature is measured with a 1,000-Ω platinum resistance
thermometer, RT1, powered through the RD1 software-controlled pin
and R4 resistor, and fed back to one of the PIC‘s ADC inputs. A
reference voltage is measured on another ADC input to
counterbalance voltage drops. A small loudspeaker is connected to
an I/O pin. Three push buttons are wired to the RB port, which has
interrupt-on-change and internal pull-up features. Lastly, three
resistors, R1 to R3, provide the LCD driving voltages, a 4-MHz
crystal is included, and the device is powered by two standard AAA
batteries. This colleague even told you that he has already
developed power-optimized firmware, which keeps the PIC in
Low-Current Standby mode until it is activated by the user. Your
task is to check this design on the energy-saving side and improve
it, if possible. Caution: Don't ask me for the software and don‘t
cry if the schematic is wrong somewhere. It is just a schematic
drafted as an example for this article. It was never built.

BUDGET CALCULATIONS
How would you start? You first need to evaluate the battery life
of this design to find out which areas must be improved and how far
you are from the target. This is the energy budget calculation,
which is a four-step calculation process for any project.
The first step is to identify what I call the device operating
modes. Each operating mode corresponds with one, and only one,
instantaneous current consumption. For the SmartyCook example, I
have identified three basic operating modes (see Table 1a)。 You
also need to estimate the time spent in each mode every day. This
may be more or less difficult to do, but you need an estimation.
Here I have assumed that the cooking timer is used on average of
two times per day, each time for 15 minutes and with a 30-s
loudspeaker activation.
点击查看Table 1
The second step is to calculate or measure the current drawn on the
battery in each operating mode. The components'datasheets are good
starting points. Don‘t forget to read them completely because the
current announced on the first page is often described in very
optimistic conditions: no watchdog active, no (or few) internal
peripherals active, lowest supply voltage, and more. Also, don't
forget to include the currents going through any wire or passive
component of the design, including pull-ups or non-perfect
capacitors. The best way is to check it systematically. Go through
the schematic wire per wire for each operating mode and ask
yourself if it can have any current going through it. The result is
Table 1b, with instantaneous currents going from 12 μA in Standby
mode up to 10 mA when the loudspeaker is active.
The third step is the easiest. Calculate the average daily energy
consumption, in milliamperes per hour, by multiplying each
instantaneous current by the time spent in this operating mode and
summing all of the modes. Take care of the units: seconds must be
converted to hours and microamps must be converted to milliamps
(see Table 1)。A little less than 1 mAh is needed each day, split as
50% for Active mode and 20% when the loudspeaker is on. The
remaining 30% is devoted to Standby mode.
Finally, you can calculate the lifetime of the batteries in days by
dividing their capacities by the previously calculated daily energy
requirement. The only issue is that battery suppliers don‘t provide
the actual capacity of their products for your application; they
provide only "test-bench" capacities in usually optimistic
situations. So, you must include derating factors. In particular,
you must include the effect of the lowest voltage you may tolerate,
which is often higher than the supplier‘s minimum specified
decharge voltage. You also need to take care of the battery's
autodischarge for long-life products, the minimal temperature in
which your design may survive, the battery-supplierto-
battery-supplier capacity variation because your customer may not
buy the best batteries, and the effects of current pulses that
could degrade the battery faster than planned. These parameters are
often unknown and need to be estimated, but an overall 50% derating
is not uncommon.
Starting with a pair of fresh 464-mA AAA zinc/carbon batteries,the
estimated lifetime of the SmartyCook with your colleague‘s design
is 260 days. Not too bad, but let's assume that you need a longer
battery life. Remember that the daily energy requirement is the
sum, for each operating mode, of the instantaneous current times
the time spent in this mode, including Standby mode. You have four
different ways to try to improve the situation, and I‘ll give you
some tips for each of them:
This equation gives the daily energy consumption of a device, which
is the sum of the energies used in each operating mode. This will
enable you to identify four different ways to save energy: you can
either reduce the operating current (IMODE), reduce the time spent
in each power-hungry mode (TimeMODE), reduce the standby current
(ISTANDBY), or introduce new operating modes.
REDUCING OPERATING CURRENT
The first idea is to reduce the current supplied by the energy
source when the device is operating, and that‘s a good idea. How do
you do that? The first good option is to reduce the power supply
voltage. If you look at the PIC16F914's datasheet, you will find
that its typical supply currents are 40% to 60% lower at 2 V than
at 3 V, and that‘s often the case! For example, its operating
current in 4-MHz EC mode goes down from 320 to 180 μA. Moreover,all
resistive losses are also reduced at lower voltages. You can get
this improvement either with a lower voltage battery (but 2 V is
not easy to get) or with a low-loss linear regulator, such as the
MCP1700 from Microchip Technology,which has a self consumption
under 2 μA. Adding this regulator to the original schematic will
enable you to extend the battery life by 30%, with a daily energy
requirement down from 1 to 0.7 mAh. This is a good start with such
a small change. For more complex designs, you can check if a small,
lowpower,step-down DC/DC converter can help. For example, a Maxim
Integrated Products MAX1556 doesn't need more than 16 μA to
operate. You can also use a lower-voltage battery and a step-up
DC/DC converter working with very low start-up voltages, such as
the MAX1674, which starts at 1.1 V,because this solution could also
enable you to use the batteries more deeply.
Clock frequency is another good source of savings, because any CMOS
circuit has a power consumption roughly proportional to its
operating frequency. Here, your colleague has planned a 4-MHz
crystal, probably because it is a common value for
microcontrollers,but do you think such a design actually needs so
many MIPS? Because the LCD is managed in hardware, you need to
count down seconds and measure a thermal probe from time to time so
you can replace the 4-MHz oscillator with a 32.768-kHz watch
crystal and clock the PIC at that frequency. The good news is that
the PIC operating current goes down from 180 to 8 μA, providing
another 10% improvement on the overall bill. Even if your design
can‘t tolerate such a low clock frequency, you can still try to
reduce the clock frequency when you don't need the full power,
thanks to the onboard clock prescalers or PLLs that are available
in many chips.
Finally, check each component systematically and think twice. Is
there a lower-current alternative? Look again at Figure 2. There
are three easy improvements. First, your colleague has used a
PT1000 platinum sensor, which has a 1-kΩresistance at ambient
temperature. If you replace it with a 10-kΩ sensor, namely a
PT10000, the measurement current will be divided by 10. The same
goes for the R1/R2/R3 voltage divider used to generate the LCD
voltages. Why 100 kΩ?Because the PIC input impedance is high enough
that you can safely use 470-kΩsensors, with a five times current
reduction. Lastly, the loudspeaker could be replaced with a
resonant piezoelectric transducer with the same audio volume,but
with a current that is half as powerful. After these first easy
modifications,refer to the schematic in Figure 3. It is not very
different from the initial one,but your daily energy is reduced
from 1 to 0.23 mAh. Another way to express this 75% improvement is
that the SmartyCook‘s lifetime on a single set of batteries is
extended from 260 days up to 1,055 days!
REDUCE OPERATING DURATION
Energy is proportional to current multiplied by time. You have
drastically reduced the operating current,but can you do something
regarding operating duration? One way would be to process more
quickly, but that would require a quicker clock, which means higher
currents. An alternative to processing-hungry systems is to select
processors with built-in hardware accelerators. For example, a
hardware multiplier can give a real energy bonus on DSP-like
applications. Don‘t forget that you can increase battery life just
by using a better compiler. A better compiler will give you
optimized code and will not waste energy through extra clock
cycles. The difference could be significant. Of course, you can
also hand-optimize the critical sections of the code.
But there are plenty of other ideas. For example, and even if it is
not applicable in this example, you may reduce power requirements
going back to the user-interface level. If the user can perform a
task quicker with a better interface, then the power consumption
will be lower. Do you know how many CPU cycles are needed to dig
into a hierarchical menu structure on your phone? Wouldn't it be
easier to have one button dedicated to the feature you use the
most? In the same spirit, you can also transfer data to external
systems more quickly (e.g., when using power-hungry RF links)。 Data
compression could help there.
Another trick is to use "wasted" CPU cycles to do something useful.
In particular, when using crystal oscillators,there is a frequency
stabilization delay that could be counted in milliseconds. Often
the boot code of the processor just waits for stabilization. The
cycles can be used to do anything you want as long as they are not
timecritical,such as variable initializations. If you can accept a
little degradation in precision, you can also replace your crystal
with ceramic resonators, which usually have a far shorter startup
time. By the way, I have a column devoted to crystals in mind, so
stay tuned.
Going back to the SmartyCook, there is one operating mode where
things can easily be done more quickly: Alarm Beep Generation. As
part of the hypothesis, I stated that the alarm was 30 s long, but
nothing prevents you from drastically reducing the alarm‘s duty
cycle. The resonant piezoelectric transducer can be activated for
100 ms every 2 s or so, with the same functionality. It is a small
modification, but because the Alarm mode was starting to be a
significant waste after the previous optimizations,this gives you
another 30% improvement,with the estimated battery life jumping
from 1,000 to 1,500 days.
NEW OPERATING MODESYou can also try to break powerhungry operating modes into more
optimized modes. The easiest example is when a processor waits for
something: the end of a timer, the end of an ADC cycle, or an
external event. A power-conscious engineer will never leave the
processor in the same operating state; he will use the processor's
hardware resources (i.e.,interrupts) to put the processor in a
low-power idle or standby mode. However, on the SmartyCook design,
the gains will be minimal because the system clock is already very
low.
Another way to introduce new operating modes is to doublecheck each
component and the wiring of the design. Could it be switched off
more often? This approach needs to be fully systematic because you
may forget basic components, such as pull-up resistors. Doing this
exercise on the already optimized SmartyCook schematic enables you
to find two possible improvements (see Figure 3)。 Have you found
them? The first one is the R1/R2/R3 network. It is always powered,
but it is needed only when the device is operating,not in Standby
mode when the LCD is off. Just power it from a free GPIO pin and
you can save 1.4 μA. That‘s few microamps, but it is still a 30%
improvement on standby current. The second improvement is related
to the thermal probe. Until now, I've assumed that it is powered
when the device is operating. But it needs to be powered only when
it is measuring the temperature and this could be as quick as 1 ms
each second through the introduction of a new "measurement"
operating mode. The schematic in Figure 4 sums up all of these
small changes. It is still close to the initial one, but the
estimated battery lifetime jumps to 2,391 days, which is nearly 10
times longer than the original design!


REDUCE STANDBY CURRENTNow the operating modes are optimized and the standby power
consumption is starting to be significant. This is the last savings
you need to work on. You have already checked that you are using
low-standby current components and you have turned off any unused
component or internal peripheral (unused ADCs,timers, clocks, and
more)。 You have also double-checked that each pin is configured in
its lowest current-consumption mode before entering Sleep mode. It
is usually the "output" state, but it can change from
microcontroller to microcontroller. What else is there to do?
Because RAM is usually preserved in sleep modes,a processor with a
smaller RAM may be more power friendly than a larger one, so don‘t
keep large components if you don't need them.
Another trick is that often a processor or its oscillator is kept
active in Standby mode just to enable a software-based real-time
clock to run. This may be a costeffective solution, but it usually
isn‘t power-efficient. Don't forget that a dedicated RTC chip, such
as the Maxim Integrated Products DS1302, needs just 300 nA at 2 V
to keep the time!
The best way to reduce standby power is to have zero standby power,
which usually means a small mechanical on/off switch. That‘s a very
good solution, but you will dislike it because it implies one more
action before using the device and because you will forget to
switch it off 50% of the time. A better solution is to implement a
real "zero power"mode using one of the device‘s buttons as a
hard-wired power-on. Look at the principle in Figure 5. The Smarty-
Cook design can easily use this trick by just replacing the MCP1700
regulator with a model equipped with a standby INPUT pin (i.e., the
MAX1725) and a couple of diodes. The final schematic is shown in
Figure 6.
点击查看Figure 6
WRAPPING UPThe schematic is now a little more complex than the initial design,
but compare the energy analysis in Table 2. The theoretical
SmartyCook's lifetime on two standard AAA batteries jumped from
around 260 days to 10 years! Of course, these calculations are
approximate and would need to be checked on an actual prototype.
You may also argue that the first design was not well optimized to
let me write this article,and you would be right. But nevertheless,
I guess that you wouldn‘t have bet on an improvement 14 times
greater than when you started to read this article, no?
点击查看Table 2
In conclusion, I want to emphasize that all of the improvements I
discussed must work together in a holistic manner. When operating
modes are optimized, standby modes start to hurt and vice versa. If
you are tracking the microamp, you must take your time and check
everything. I hope this article will help you design more
energy-saving devices. You may also use it as a checklist for your
next project. Even if the impact on our 15-TW global energy
consumption may be limited, it will help our planet somehow. I also
hope that you are convinced that low-power techniques are not black
magic, even if they are sometimes on the darker side.
Author‘s Note: I first talked about the ideas presented in this
consumption. article in Ivry-sur-Seine, France, on January 10,
2008, during an ecodesign seminar that was organized as part of the
ECO'TRONICS initiative. This program is managed by Jessica France
and financed by several French state and regional public funds. I
want to thank them for their support and action for better
environmentally friendly devices.
Robert Lacoste lives near Paris, France. He has 18 years of
experience working on embedded systems, analog designs, and
wireless telecommunications. He has won prizes in more than 15
international design contests. In 2003, Robert started a consulting
company, ALCIOM, to share his passion for innovative mixed-signal
designs. You can reach him at rlacoste@alciom.com. Don‘t forget to
write "Darker Side" in the subject line to bypass his spam filters.
PROJECT FILESTo download the OpenOffice energy budget calculation spreadsheet,
go to
ftp://ftp.circuitcellar.com/pub/Circuit_Cellar/2008/213.
RESOURCESMicrochip, "PIC16F913/914/916/917/946 Data Sheet:28/40/44/64-Pin
Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and
nanoWatt Technology," DS41250F, 2007.
Wikipedia, "World energy resources and consumption,"
http://en.wikipedia.org/wiki/World_energy_resources_and_consumption.
SOURCESDS1302 Timekeeping chip
Maxim Integrated Products, Inc.
www.maxim-ic.com
MCP1700 Voltage regulator and PIC16F914 microcontroller
Microchip Technology, Inc.
www.microchip.com