can no longer keep up with Vr for
more LEDs. Why? The reason is that
the energy stored in L has all been
used up or exhausted. The frequency
had been increased to its highest
possible, so that in Figure 6, “idle”
time becomes zero. So, even though
the charge pump continues to work
every cycle, there will be no more
energy than its maximum delivered to
In other words, when the number
of LEDs equals five or more, we can
safely remove the MCU’s analog
comparator circuit components R1,
D1, and R2, without having to worry
about the LEDs being overdriven. This
is an advantage. Remember, R2 also
wastes some energy (heat), although
it is needed as a voltage sensing
LISTING 1. Program for ATtiny11L as charge pump.
;CPUMP.ASM: control FlashLight LEDs uisng ATtiny11L at 1 MHz
;When Voltage boost pump ON=7 NOPs, Ton=7us
; make Portb.2 an output
; pump=OFF to begin
Cbi portb, 2 ; pump=OFF
; skip next instruction if Vs=>.6V
; pump=ON for 7 NOPs (7uS)
Serial 5-10 LED
Because Vs cannot follow Vr when
the number of LEDs equals five or
more, so we can remove some
components from the circuit without
having problems, as shown in Figure 7.
Correspondingly, we should also
remove the instruction ‘sbis ACSR, 5’
from the software, since the analog
comparator is no longer used. This new
program is now called CPUMP1.ASM
and it takes only 24 bytes.
We can use this new circuit hardware and software program to build
any 5-10 LED digital flashlight. As an
example, I built a nine LED flashlight on
the base of another flashlight that had
a bulky body and reflector (Figure 8).
The control circuit contains only
six small components
that were mounted on
a perfboard that meas-
ured less than one inch
square. The nine LEDs
were soldered on another circular perfboard.
Before final assembling
and gluing them in the
body, the whole circuit
must be connected
together and tested to
avoid any errors.
This is the fourth
flashlight and it is super
bright. The 4.5V (three AA cells) battery
supplies 150 mA current, and the nine
LEDs output 30V at 20 mA. The input
power is 675 m W, output power is 600
m W, and the circuit efficiency is pretty
high: 88%. The main reason is that in
this case, there is no resistor used, and
the ATtiny11 takes only 2-3 mA.
■ FIGURE 7.
I now have four LED flashlights, all
transformed from traditional bulb
lights (Figure 9). All new versions are
much better than the original in
■ FIGURE 8. The nine LED circuit and
reflector before assembly.
■ FIGURE 9. These
LED flashlights are all
transformed from the
on the number of LEDs
and the applied voltage,
varies from low
(right) to high (left).
February 2008 35