![Elektor EPROM Скачать руководство пользователя страница 44](http://html1.mh-extra.com/html/elektor/eprom/eprom_manual_2386336044.webp)
GENERAL
INTEREST
59
11/2002
Elektor Electronics
features are defined in software so if you
need to change some aspect of the control it is
relatively simple to do so (assuming you have
the correct programming tools available).
Looking a little more closely at the main fea-
tures of the torch we have:
– The torch brightness can be adjusted in six
steps; each step increases power by about
three.
– At its lowest setting the light output is suf-
ficient to illuminate close work, ideal for
reading comics under the bedcovers!
Astronomers will also find this setting use-
ful for reading star maps without seriously
impairing their night vision. This setting
will use just 0.5 mA and means that one
charge will last 120 days (one year if the
torch is used for 8 hours per night).
– A built-in time out for each power level is
included (see
Table 2
). This feature ensures
that only 3% of the battery charge is lost if
the torch is accidentally switched on. The
torch will give a warning one-minute before
it switches off by modulating the light level.
– When the battery voltage falls below 3.3 V
the controller will automatically reduce
power to the lamp ensuring that the battery
has sufficient charge for at least 15 minutes
illumination. When the battery voltage falls
to 2.8 V the torch switches off to ensure that
the battery is not damaged by too deep a
discharge.
– After a recovery period the Li-Ion battery
regains about 0.5% of its capacity and this
will be sufficient for 1 hours operation at the
20 mW setting or 3 hours at 8 mW.
– The torch can be set to act as a warning
flashing light with adjustable on/off ratio to
conserve power.
– Standby mode uses the least energy. The
light flashes at a low setting and can be
useful for example for finding the torch in
a dark tent. Before the lamp goes into
standby mode it will flash to indicate the
remaining energy left in the battery. Each
flash represents 10% of the cell’s capacity.
When the cell has less than 10% of its
energy left it will indicate after a short
delay how much energy remains in steps
of 1%.
Table 1
Shows how the torch is controlled
using push buttons S1 and S2.
Table 2
gives
the parameters of the torch at different light
level settings. The column showing duration
can be made smaller than a conven-
tional bulb and reflector arrange-
ment.
For the power source a lithium-ion
rechargeable battery has been cho-
sen. These cells are more expensive
than NiCds but offer a number of
advantages: A NiCd cell of the same
capacity will weigh three times as
much as a Li-Ion cell. Li-Ion also
offers a much lower self-discharge of
less than 10 % per year compared to
20% per month (!) for NiCds. They
also do not suffer from the so-called
‘memory effect’.
The circuit
The voltage of a Li-Ion cell varies
from 4.1 V fully charged to 2.8 V
when empty. The forward conduc-
tion voltage of a single white light
LED is 3.6 V so it is not possible to
limit the current to the LEDs with a
simple resistor as you would nor-
mally for a red indicator LED. The
circuit diagram in
Figure 1
uses a
step-up voltage regulator formed by
L1, MOSFET T1, diode D1 and
smoothing capacitor C1 to supply
the LED chain with a controlled
power source. The efficiency of the
circuit is approximately 94%.
Unusually for a torch, the step-up
regulator is controlled by a
PIC12C672 microcontroller (IC1).
This device has an internal 4 MHz
RC oscillator and an 8-bit A/D con-
verter. Analogue input AN0 mea-
sures the reference voltage produced
by IC2. To conserve energy IC2 is
switched on (by pulling GP2 low)
only during the measurement time.
Capacitor C3 buffers the battery
voltage (V
BATT
) and the A/D con-
verter measures this voltage at the
VDD pin. The microcontroller adjusts
power to the LEDs by altering the
mark-space ratio of the output on pin
GP4. The frequency of the signal on
this output is a maximum of 30 KHz,
less at lower power settings. In the
very low power mode the microcon-
troller would use more power than
the LEDs so in this case the micro-
controller operates for most of the
time in sleep-mode and is woken up
every 18 ms to switch the power. In
the low power setting capacitor C2
is used to store energy and smooth
out the 18 ms flicker on the LEDs. In
all other power settings transistor T2
is turned off to disconnect C2. C2
would otherwise prevent a clean
switch-off of the light when the torch
is set to flash mode.
Two push button switches on the
torch allow the selection of six pos-
sible commands.
Functions
An advantage of using a microcon-
troller in this design is that the torch
BT1
2V8...4V1
S1
S2
IC2
TL431
2V5
R1
680
Ω
PIC12C672
IC1
GP5
AN0
GP3
GP4
GP2
GP1
2
1
7
8
4
3
5
6
T1
BSP308
T2
BS170
L1
D1
BAT48
C1
220n
C2
33
µ
25V
D2
D3
D4
D5
D6
D7
D8
012019 - 11
C3
1
µ
6V3
Figure 1. The voltage converter uses a microcontroller.
Содержание EPROM
Страница 1: ......