I’ve been working with Microchip PIC processors for
quite a while, and their eXtreme
Low Power (XLP) processors
have some impressive low power
sleep modes — with some
claiming 20 nano-amps (nA). This
makes them ideal for battery-powered devices. Okay, but
what does that mean in real life?
We need to do a little math
to get some perspective. Let’s
say the design goal is to run the
device off two AAA alkaline
batteries for at least a year. The
actual run time of a wireless
doorbell transmitter, for example,
is calculated as 1,000 rings per
year, with each ring lasting a
generous four seconds and
drawing 25 mA. That comes to a
total of roughly 28 milli-amp
hours (mAh). The total capacity
of these batteries ranges from
800 to 1,200 mAh, so we can easily operate the doorbell
for several years.
Now, we need to worry about the current draw while
the doorbell is idle. If our circuit at idle draws 1 micro
amp (uA) or less, then the batteries will last roughly
800,000 hours. With 8,760 hours per year, this is about
90 years. At a sleep-mode draw of 20 nA, we’re talking
about 50 times longer!
So, if the specs are correct, then putting our
processor and the rest of the device into sleep
mode should not appreciably deplete our
batteries. The shelf life of alkaline batteries is
only 10 years, and most gadgets don’t stick
around for even that long — with garage door
openers and alarm sensors being the exception.
For now, on paper, the numbers look promising,
and if the spec sheet writer hasn’t misplaced a
decimal point, we can use a low power
microprocessor to switch our device on and off.
Design and Testing
A simple pushbutton operated LED is used
to test this. I only needed a few parts (which I
had on hand), a voltmeter, and David Jones’
µCurrent (see sidebar) to verify I’m drawing very
little current when I’ve turned the system off.
Figure 1 shows the test circuit. You can see that
the processor is permanently connected to the
battery. The power switch is between the
battery and one of the processor input pins.
Figure 2 shows the prototyped circuit (with a few extras)
connected to my current measuring system.
The meter shows that in sleep mode this circuit draws
16. 8 nA. The code for the power switch is written using
the CCS PIC® C compiler, and the entire file can be
obtained from the article link. Portions are duplicated here
to explain how the switch works.
The power switch uses two key features of the
●●●●
November 2014 41
By Jürgen G. Schmidt
■ FIGURE 1.
■ FIGURE 2.