have one available. A linear
12V supply would probably
also work, but I don’t have
one that can supply 1A to
test that assertion. The main
requirement is that the supply
is powerful enough so that its
output voltage doesn’t
decrease much below 12V
when it’s supplying power to
the Pi. If it did, the batteries
would kick in and be
unnecessarily depleted.
Alkaline Batteries
I chose to use alkaline
batteries because they are
reasonably inexpensive with a
relatively high energy density.
However, two questions
remain: Why D cells, and
why seven of them? D cells
may be larger than necessary,
but many retailers sell them at
about the same price as C
cells, so why not?
Why seven of them? As you
know, all alkaline batteries are rated
at 1.5V. However, their initial voltage
is actually somewhat higher. I
measured the voltage of each battery
in a fresh set of alkaline D cells, and
found that they averaged 1.625V
each. Seven times 1.625V = 11.375V;
with that in mind, refer to the
schematic in Figure 1.
You can see that diodes D1 and
D2 effectively isolate the two sources
of power (12V main power and
battery power). In normal operation,
the 12V from the main power supply
is greater than the 11.375V provided
by a fresh set of seven D cells.
As a result, the battery voltage is
effectively blocked by the higher 12V
supply. Therefore, the main 12V
supply reaches the voltage regulator,
and the batteries are not drained
at all.
If the battery pack contained
eight cells, it would initially output
13V ( 8 1.625V = 13.0V) which
would block the main supply and
quickly drain the batteries down
below 12V. At that point, the main
supply would again block the battery
supply and power the circuit. The net
result is that eight D cells would
cause the battery pack to be
unnecessarily depleted; using seven
D cells avoids this problem.
Before we move on to the next
feature in the schematic, there’s one
more point about alkaline batteries
that needs to be made clear. Diode
D2 is especially important in the
circuit because attempting to
recharge an alkaline battery can
cause the battery to explode! If you
don’t believe me, read the warning
label on every alkaline battery.
LM2940 Voltage Regulator
All linear voltage regulators have
a characteristic known as the
“dropout” voltage (VDO). This term
refers to the minimum difference
between Vin and Vout that’s required
for reliable regulation. For example,
the LM7805 (which we’ve used in
many of our projects) has a VDO of
2.0V, which means that Vin must be
greater than 7V in order to maintain
a regulated 5V output.
The LM2940 is what’s
called a low dropout (LDO)
regulator because its VDO is
relatively small; it’s usually
listed as 0.55V. However,
using a fixed value for VDO
can be somewhat misleading
because a regulator’s VDO
can vary significantly with
temperature and with the
amount of current flow. In
order to see how large the
variance can be, refer to
Figure 2 which presents the
VDO graph that’s included in
the LM2940 datasheet.
First of all, it’s obvious
that current flow makes a
considerable difference in the
At 1A of current, VDO varies
approximately between 0.45V and
0.55V, so we can use 0.6V as a
generous estimate of the maximum
VDO for the LM2940. One final point
about the VDO graph presented in
Figure 2: The lines terminate at
125°C because that’s the maximum
operating temperature of the
LM2940.
If you look back at the schematic
presented in Figure 1, you’ll see that
I listed 6.3V as the minimum voltage
for the battery pack. A single-cell
alkaline battery is fully depleted
(“dead”) at 0.9V, so our seven-cell
battery pack will be depleted at 6.3V
( 7 0.9V). However, whenever the
battery pack is powering our PICAXE-
June 2014 9
SHARPENING YOUR TOOLS OF CREATIVITY
■ FIGURE 2. LM2940 dropout voltage.