Keep It Down
One of the things that I really like about building
embedded systems is that they are portable. I can pack a
host of functionality into a small microcontroller-based
project, pop it into a weatherproof container, and deploy
it pretty much wherever I want it. The projects don’t need
to be tethered to a power point as their consumption is
relatively low. Attach a small battery pack and they’ll run
for days. All you need to do is switch the battery pack
once a week, and you have a truly remote system.
How does that sound? Well, not ideal in my world,
actually. I’m not a fan of clambering around changing the
batteries in all my projects every weekend. Therefore,
we’re going to look at ways to reduce the power
consumption of our embedded projects, so that a project
can run for months without needing a battery change.
There are a number of ways to reduce the power
consumption of an embedded project — each with
different levels of complexity and, of course, degrees of
effectiveness. Here are some that we won’t look at in
detail in this article. They seem like common sense, but I
see project after project where they are overlooked
(including some of my own):
• Component Choice: Different components use
differing amounts of current. How often do you read the
datasheet of an LED to see the current draw, and choose
the LED on that basis?
• Power Conditioning: Implement more efficient
power conditioning by using a low dropout voltage
regulator instead of a linear regulator. Also make sure you
aren’t stepping voltage down by more than a couple of
volts because this results in wasted energy and current
consumption.
• Run Off Battery: Establish if you need to control
your voltage. I’ve run many simple projects straight off the
battery, eliminating all the leakage from the power
conditioning circuitry. This won’t work if you need a fixed
reference voltage, for example, in ADC (analog-to-digital
converter) applications — unless you include a circuit to
provide a reference voltage.
• Turn It Off: Turn off the components that you don’t
need. Do you really need a power indicator LED on your
project? If you’re logging temperature every hour, does
your temperature sensor need to be powered all the time,
or can you turn it on just before taking a reading?
These are relatively simple steps, and can be
retrofitted to an existing project to an extent. The rest of
this article will look at measures you need to consider
when you’re still in the design phases of your project —
unless you really enjoy re-engineering your completed
projects! They are fundamental considerations; they also
have the biggest impact on your project’s consumption.
Choose Your Volts
The ATmega328P is a 5V microcontroller, right? The
Arduino runs at 5V, our projects so far have run at 5V, so
it must be! Wrong! The ATmega328P can run at anything
from 1.8V to 5.5V. We chose 5V as it’s the most common
voltage for the microcontroller to run at. Many of the
more popular components and modules we use need a
5V supply, so it makes sense to run at 5V — but not if you
want to reduce your consumption and run off a battery
for months.
Look at the extract of the MCP79400 datasheet in
Figure 1 (this is the real time clock module we used in the
September 2015 article). The graph shows the current
consumption at voltages of 1.3V, 3.0V, and 5.0V. Look
how that figure climbs as the voltage increases! Sure,
we’re talking nanoamps, but take note of the magnitude
Beyond the
Arduino
By Andrew Retallack
Power: Less is More
8
www.crash-bang.com
This month, we focus on common
ways to reduce the power
consumption of our projects so they
can run for longer on less. That’s
right! We’ll be putting our
microcontrollers to sleep. No lullaby
needed ...
54 January 2016