This is only a preview of the April 2006 issue of Silicon Chip. You can view 36 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Items relevant to "Studio Series Remote Control Module":
Items relevant to "4-Channel Audio/Video Selector":
Items relevant to "Universal High-Energy LED Lighting System":
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
The prototype LED lighting system being tested on a Greenspeed
recumbent trike. The headlamp uses the Luxeon LED Spotlight
described next month and the rear lights comprise four 1W red
Luxeons, two equipped with narrow beam collimators and two with
wide-angle collimators. The headlamp has a range of well over 50
metres (and will light large reflective signs at 400 metres), while the
rear lights are visible from over 500 metres. Note that two Universal
High Energy LED Lighting Systems are needed to run this many LEDs!
Universal High-Energy
LED Lighting System
This incredibly versatile LED lighting system uses a rechargeable
battery pack and is suitable for nearly any application that needs
powerful LED lighting. From a camping light to bicycle lighting to
emergency blackout lighting, this project does it all!
PART 1: By JOHN CLARKE & JULIAN EDGAR
M
ANY ELECTRONIC PROJECTS
have been designed to run highpower LEDs – but that’s all they do!
This project is very different – not only
can it run multiple Luxeon LEDs but
it also uses intelligent control to allow
easy dimming, flashing and automatic
switch-on facilities.
In addition, the control system
monitors the level of the high-capacity
internal rechargeable battery pack and
supervises battery charging. It also
uses various schemes to automatically
cut the light output when the battery
voltage drops below a certain level, to
70 Silicon Chip
give the maximum possible hours of
light. The battery can be charged from
a mains plugpack, a car, a solar cell or
even a human-powered generator.
Different light modes
The key to the versatility of the
“Universal High-Energy LED Lighting
System” is the ability to select different operating modes. For example,
the system can be used as a normal
(always on) lantern or as a flashing lantern. It can also be used as a
roadwork-style warning flasher that
automatically switches on as it gets
dark, or as emergency lighting that
automatically activates when mains
power is lost.
In fact, no less than 11 different light
operating modes are available!
The desired operating mode is selected by rotating the BCD switch on
the PC board. Note that in most cases,
once the mode is selected, the switch
will be left permanently in that position. The system is then controlled via
an external pushbutton switch.
Let’s take a closer look at the various
modes as set by the BCD switch:
(0). ALWAYS OFF – this can be used for
siliconchip.com.au
Suggested Uses
•
•
•
•
•
•
•
•
Auto-on garden lighting
Auto-on blackout emergency
lighting
Intelligent multi-mode handheld
torch or lantern
Caving light
Fishing light
Camping light
Intelligent bike headlight or
tail-light
Industrial warning lights
transporting the Universal High Energy LED Lighting System.
(1). STANDARD LIGHT – a quick doublepress of the pushbutton switches the
LED on and a single press turns it off.
Three quick presses from off activates
a fast attention-getting flash.
(2). MULTIMODE LIGHT – a quick doublepress switches the LED on and a single
press turns it off. Holding the pushbutton cycles between full brightness, a
dimmed level and a slow flash. Three
quick presses from an off state activates a fast attention-getting flash. The
dimmed level is stored and reactivated
at switch on.
(3). CAMPING LIGHT – a quick doublepress switches the LED on, while a
single press turns it off. Holding the
pushbutton down decreases the brightness before returning to full brightness.
Three quick presses from off activate
a fast attention-getting flash. The selected dimmed level is reactivated at
switch on.
(4). WARNING FLASHER – a quick doublepress starts the LED slowly flashing
and a single press turns it off. Three
quick presses from off activate a fast
attention-getting flash.
(5). AUTOMATIC TORCH – a quick doublepress switches the LED on, with the
LED intensity automatically increasing with falling light. Three quick
presses from off activate a fast attention-getting flash and a single press
switches the LED off. Unlike Mode
6, this mode provides LED indication
of battery condition, even when the
Luxeon LED is switched off due to
high ambient light levels.
(6). PLUGPACK-CHARGED GARDEN LIGHTS – a
quick double-press switches the system on but the Luxeon (and battery
monitoring LED) stay off until the
siliconchip.com.au
The High-Energy LED Lighting System is built into a rugged diecast
aluminium box. It uses high-capacity C-size 4500mAh nickel metal hydride
(NiMH) cells and can drive up to 6W of Luxeon LEDs. In addition, it has
intelligent charge and discharge control and user-adjustable modes that
allow it be adapted to nearly any Luxeon LED lighting use.
ambient light level falls. The Luxeon
LED then automatically increases in
intensity with falling light.
Three quick presses from off activate
a fast attention-getting flash, with this
mode operating only when the Luxeon
LED is already on; ie, below the low
ambient light threshold. The system is
normally left on but can be switched
off with a single pushbutton press,
with the battery condition LED also
then switched off.
(7). SOLAR GARDEN LIGHTS – this is very
similar to the above mode except that
after the Luxeon LED automatically
activates, it stays on for six hours or
until the ambient light level rises.
(8). ROADWORK WARNING – a quick doublepress switches the system on but the
Luxeon LED (and battery monitoring
LED) stay off until the ambient light
level falls. The Luxeon LED then starts
slowly flashing. Three quick presses
from off activate a faster flash.
April 2006 71
Main Features
•
•
•
•
•
Runs nearly any combination of Luxeon LEDs from 1W to 6W total power
•
•
•
•
Flashing, dimming and auto switch-off modes
Self-contained high-capacity NiMH battery pack
Rechargeable from any 8.7–18.6V voltage source
Automatic control of charge rate
User-selectable modes include auto switch-on as it gets dark or when plugpack
power is lost
Automatic light output conservation strategies as battery charge drops
Rugged diecast aluminium housing
Battery level/charge monitor multi-function LED
The system can normally be left
switched on (there’s very low current
drain when the Luxeon LED is off,
as the battery status LED is also off).
However, if required, the system can
be switched off by pressing the pushbutton switch.
(9). BICYCLE HEADLIGHT – a quick doublepress switches the Luxeon LED on. The
LED is on when ambient light levels
are low but switches to flashing when
light levels increase.
If the Luxeon LED is on and the
pushbutton is held down for about
three seconds, the unit changes to
a “parking flasher” mode. Three
quick presses from off activate a fast
attention-getting flash and a single
press turns the system off (for more on
bike lights, see the “Bicycle Lighting
System” panel).
(10). (A) BICYCLE TAIL-LIGHT – a quick
double-press switches the Luxeon
LED on. A low-duty cycle flash occurs
when light levels are low, the duty cycle
increasing as light levels increase. If
the Luxeon is on and the pushbutton
is held down for about three seconds,
the unit changes to a “parking flasher”
mode. Three quick presses from off activate a fast attention-getting flash and a
single press turns the system off.
(11). (B) BLACKOUT EMERGENCY LIGHTING
– a quick double-press switches the
system on but the Luxeon LED activates only when the light level drops
below a preset threshold and charger
power is lost. A single press switches
the system off.
(12). (C) EXIT LIGHT – a quick double-press
switches the system on but the Luxeon LED activates only when charger
power is lost. A single press switches
the system off.
72 Silicon Chip
(13). (D) MICROCONTROLLER RESET – used if
the battery is discharged to the extent
that IC1 behaves erratically.
(14). (E) LUXEON DRIVE FREQUENCY – alters
the drive frequency to the Luxeon
LED.
(15). (F) TEST – for setting the reference to
2.49V, testing the LDR and thermistor,
and setting the charging current.
In all but the Reset, Test and Drive
Frequency modes, a quick double
press is used to turn the system on
while a single press switches it off. In
most modes, a fast attention-getting
flash is also available and is activated
by three quick presses of the pushbutton from off.
This fast attention-getting flash
could be a lifesaver if something goes
wrong when bushwalking or camping, etc.
Of course, you aren’t limited to the
uses described in our mode descriptions. The Camping Light mode could
also be used for a dimmable torch or a
reading light, for example.
Luxeon LEDs
The Universal High Energy LED
Lighting System is designed to work
with Luxeon LEDs with a total rating
of up to 6W. You can use 1W, 3W or
5W units but where multiple LEDs are
used, they must all have the same rating
(the lowest wattage LED is the one that
determines the LED current).
In practice, this means that you can
use up to six 1W LEDs, one or two
3W LEDs, or a single 5W LED. For
example, a garden lighting system
might use six 1W LEDs, while a bike
headlight might use two 3W LEDs. The
only combination not permitted is five
1W LEDs, as it’s not practical to drive
five of these in parallel (six 1W LEDs
are wired as three parallel groups of
two in series).
Before building this unit, you first
need to decide on the number of Luxeon LEDs to be used and their power
rating. That’s because the number of
turns wound on the transformer, the
value of a resistor and the adjustment
of a trimpot all depend on the LEDs
that will be driven.
In addition, the choice of LEDs
determines whether they are wired in
series, in parallel or in a series/parallel
combination.
The higher the total power rating
of the LEDs, the greater the current
drain and so the shorter the battery
life. However, there are major practical
advantages in specifying high-wattage
LEDs and then dimming or flashing
them. Let’s take a look at a typical use
to see why this is the case.
As an example, you might be running two 3W LEDs (6W total) in a
camping lantern. At full brightness,
the battery pack will last something
in the order of two hours – but that’s
at full brightness. If you have the system set to Camping Light mode, you
can use the pushbutton to dim the
LEDs substantially and in many applications, one-quarter of the available
power will be quite sufficient. At this
power level, the battery pack will last
well over four times as long – ie, eight
hours with ease.
And the reason we specify 3W
LEDs rather than 1-watters? Well,
that’s for when you hear some rustling in the bushes and immediately
want lots of light. A few pushes of
the button and you’ll be illuminating
the whole site!
The same idea applies when you’ve
picked one of the flashing modes. In
many cases, the duty cycle of the flash
(ie, the proportion of time the LEDs
are on for) will be only 3%. The current drain on the battery will then be
about 97% less than it would if you
were running the LEDs at constant full
brightness.
In this case, you can take advantage
of the attention-drawing capabilities
of the very powerful flash while still
retaining excellent battery life. In fact,
in “Roadwork Warning” mode – where
the flasher turns itself on at night and
stays off in daylight – the battery life
will be weeks!
Finally, in many applications it
makes more sense to use multiple
siliconchip.com.au
The LED Lighting
Controller is designed
for use with Luxeon
LEDs or with similar
generic units such as
those shown at top left.
LEDs rather than a single high-power
unit. That’s because using multiple
LEDs allows you to aim them in different directions and/or use different optics with each LED. For example, emergency blackout lighting usually uses
two broad beam lights aimed widely, while a bicycle headlight might use
a narrow beam aimed higher than a
second broad lower beam.
Note that although we’ve referred
to Luxeon LEDs throughout this
article, any equivalent high-power,
high-brightness LEDs (rated at 1W or
more) can be used. However, all the
prototypes used Luxeon LEDs and
optics (eg, collimators) designed for
those LEDs. Note that the circuit is
not designed for driving conventional
5mm or 3mm high-brightness LEDs.
Batteries and charging
Four C-size 4500mAh nickel metal
hydride cells are used to power the
Universal High Energy LED Lighting
System. These provide the best compromise between volume, capacity
and cost.
Battery charging is automatically
supervised by the microcontroller.
In its default mode, all you need do
is provide an 8.7V-18.6V DC input
voltage from a source capable of supplying 700mA. This means that the
batteries can be charged directly from
a 1A 12V plugpack or a car cigarette
lighter socket.
Note, however, that a power source
with greater or less current capability
siliconchip.com.au
than 700mA can also be used – see the
Adjustable Charging Current panel
next month. If the charging voltage
is outside the required range, the
system automatically switches off
the charge.
In operation, the unit automatically
selects one of three battery charging
modes. These are (1) Fast Charge, (2)
Top-Up and (3) Maintenance.
Unless the user has requested a
non-standard battery charge rate,
the Fast Charge mode (indicated by
the battery monitor LED showing a
4Hz green flash) charges at 700mA.
A timer prevents Fast Charge mode
running longer than appropriate (to
prevent over-charging), the actual time
depending on the charge rate.
For example, if Fast Charge is set
to operate at 700mA, the timeout is
typically nine hours. Table 1 shows
the time-out periods for the other
charge rates. Note that the charge rate
referred to here is the current supplied
by the charging source. As we shall see
later, this is not necessarily the battery
charge current.
In addition to timing the duration
of charge, the unit also monitors the
battery temperature to detect an appropriate end of charge point. If the battery temperature rises by 20°C during
charging, the charge mode switches
from Fast Charge to Top-Up.
Top-Up mode, indicated by a slower
2Hz green flash of the battery monitor
LED, runs for one hour at half the fullcharge rate (unless the full-charge is
only 100mA, in which case this rate
of charge is maintained).
Finally, in Maintenance mode, the
charging rate is set to 100mA – indicated by the battery monitor LED
flashing at a 1Hz rate. Note: when
the LED is flashing green, it will go
red as it switches off each time. This
is normal.
If the battery level falls to 1.15V/
cell while in the Top-Up or Maintenance charge modes, Fast Charge is
automatically reinstated. If an overtemperature condition is detected, the
system switches back to Maintenance
charge mode. And if a cell over-voltage
condition is detected (cell voltage
greater than 1.95V), the charging
system switches off until cell voltage
drops below 1.95V, at which point
Maintenance mode is activated.
Finally, if the input power is removed during Fast Charge and then
re-applied, charging will not restart
unless the cell voltage is below 1.5V
per cell. Also, if the leads to the thermistor are broken, charging cannot
occur
All that might sound complicated
but in normal use, all charging is done
completely automatically. All you
need do is look at the indicator LED
– the slower it is flashing, the greater
the charge level in the battery pack.
Flat battery strategy
The indicator LED also shows the
battery level when the system is not
being charged (but the power is on).
It uses the following logic:
(1) >1.2V per cell – green
(2) >1.15V – orange
(3) >1.1V – orange flashing
(4) >1.05V – red
(5) >1V – flashing red
(6) <1V – off
The logic is easy to remember –
green for good (more than 50% capacity left), orange for less than half battery
capacity (not-so-good), and flashing
red for bad. And if the battery LED is
off, that’s very bad. However, the user
has plenty of warning when the battery
voltage is low. That’s because when
cell voltage drops below 1.05V (and
the battery LED starts flashing red),
the Luxeon LED output automatically
decreases to half power.
Should the battery voltage fall even
further, the Luxeon output switches
to flashing at the “attention-getting”
rate and the battery monitor LED is
switched off. Note, however, that if the
April 2006 73
Fast Charge
Rate Setting
Timeout Period
8.7-12.6V Input
Timeout Period
12.6-15.6V Input
Timeout Period
15.6-18.6V Input
100mA
Indefinite
Indefinite
Indefinite
200mA
33h
22h
17h
300mA
22h
15h
11h
400mA
17h
12h
9h
500mA
14h
9h
7h
600mA
11h
7h
6h
and Automatic Torch), the LDR can
be mounted on the box containing the
rest of the system so that it detects the
ambient light level. However, in the
Bicycle Tail-light mode, the LDR is
primarily used to detect the headlights
of cars approaching the bike from the
rear. In this way, the duty cycle of the
flashing tail-light increases as the cars
draw nearer.
To be effective in this application,
the LDR needs to be remotely mounted
in a tube facing rearwards.
700mA
9h
6h
5h
How it works
800mA
8h
5h
4h
900mA
7h
4h
3h
1A
7h
4h
3h
Refer now to Fig.1 for the circuit
details. It’s based on a single microcontroller (IC1) and its custom software.
As detailed above, it controls the
lighting of the Luxeon(s) as well as
supervising battery charging. In addition, the microcontroller also controls
the Luxeon output based on the mode
selected by the user.
In short, IC1 forms the heart and
soul of this project.
The four C-size NiMH cells provide
a nominal 4.8V supply to power the
circuit. In addition, the supply for
IC1 is regulated using a low drop-out
3-terminal regulator (REG1). This is
needed to ensure that IC1’s supply
voltage is maintained at 5V even when
charging, when battery voltage can
rise above 7V.
Table 1: Charger Time-Out Periods
When connected to a power source, the battery pack fast charges until a timeout
period elapses or the battery temperature rises by more than 20°C. This table
shows the time-out periods for the different user-selectable charging rates versus
input voltage. The default is 700mA and for input voltages below 12.6V, the
charger will change from “Fast Charge” mode to “Top-Up” after nine hours .
system is set to one of the slow flashing
modes, the flash rate doesn’t change as
the battery drops to this level.
The attention-getting flash rate uses
a duty cycle of just 12.5% at a frequency of 2Hz, so the unit continues
to provide lighting for a very long
time, even after the battery is nominally flat.
Note: a single LED is used to indicate
both battery level and charging rate.
Normally, it will be obvious whether
charge or battery level is being shown
by the LED. However, if the Universal
High-Energy LED Lighting System is
being charged by an intermittent (eg,
human-powered) generator and at the
same time is powering a Luxeon, the
function might not be immediately
clear. In this case, there’s an easy rule
to remember: flashing green indicates
charging is occurring – see Table 2.
Flashing & dimming
Because the unit can flash and dim
in a number of different modes, let’s
take a look at what actually occurs in
each mode.
First, as already stated, the attention-getting flashing uses a 12.5% duty
cycle at 2Hz. This allows the Luxeon
LED to be used to light your way and/
or to attract attention while using very
little power. This feature is available
with three quick button pushes in most
modes (as well as occurring when the
battery is nearly exhausted).
74 Silicon Chip
The modes that incorporate a specific flasher function (ie, Multimode
Light, Warning Flasher and Roadwork
Warning) and also the bicycle “parking
light” use a 3.1% duty cycle at 0.5Hz.
In other words, the Luxeon LED flashes
once every 2s for 1/32nd of the available time. This mode draws only low
average current and so battery life is
excellent.
The Bicycle Headlight mode flashes
the headlight when the light level
is relatively high. This uses a flash
frequency of 4Hz and a duty cycle of
25%. By contrast, the Bicycle Tail-light
mode flashes the light at the same frequency but has a duty cycle that varies
between 12.5% at low light levels to
50% at high light levels. In both cases,
this conserves power while providing
excellent visibility and illumination in
all ambient lighting conditions.
Dimming is available in the Multimode Light mode (where current is
reduced to 25%) and in the Camping
Light and Automatic Torch modes
(where the current is reduced from
100% to 2.5% in 2.5% steps). These
dimming increments are so small that
the light appears to dim steplessly.
Ambient light measurement
A number of modes require the use
of an external light sensor. A Light
Dependent Resistor (LDR) is used for
this purpose. In some applications
(eg, Blackout Emergency Lighting
LED driver
The Luxeon LED driver circuitry is
based on Mosfet Q2, transformer T1
and current feedback resistor R1. In
operation, a pulse width modulation
(PWM) output from pin 9 of IC1 drives
Q2 on and off at a duty cycle that can
be varied to set the LED current.
Q2 is a logic level Mosfet that can be
fully switched on with logic level (5V)
signals at its gate. Standard Mosfets
usually require at least 10V at the gate
in order for the device to fully switch
on, so a logic level Mosfet is best suited
to this circuit since we have only a low
voltage drive from IC1 to Q2.
The circuit works as follows: when
Q2 is switched on, current flows
through T1’s primary winding. Then,
when Q2 is subsequently switched
off, the current through this winding
(and thus its associated magnetic field)
collapses and induces a voltage across
T1’s secondary winding. This voltage
is then rectified using diodes D3-D6
and filtered by a 470mF capacitor.
The resulting DC supply drives the
siliconchip.com.au
siliconchip.com.au
April 2006 75
Fig.1: microcontroller IC1 controls both the charging current (via MOSFET Q1 and a filter circuit consisting of inductor L1 and diode D2) and the Luxeon LED
current (via Q2). It also monitors switches S1 and S2 (Mode), the battery temperature (via a thermistor) and the ambient light level (via an LDR).
Bicycle Lighting System
This unit can be configured to produce very effective bicycle lights – both front
and rear.
Let’s look at the headlight first. Bike headlights perform two functions: (1) they illuminate the road ahead for the rider (obviously); and (2) they alert motorists to the
rider’s presence.
The best way of alerting motorists is to flash the headlight rapidly, while the best
way of showing the road ahead is to light the headlight continuously. So a headlight
that automatically changes from flashing (in high ambient light) to constantly on (in
low ambient light) provides the best of both worlds. The Bicycle Headlight mode gives
just this function.
The designers of tail-lights also face a dilemma. A tail-light that flashes with a long
duty cycle is more attention-getting than one that flashes with a short duty cycle.
However, a short duty cycle means less total current draw from the battery and less
heat build-up in the LED. This means it’s best to use a short duty cycle when the
cyclist is alone on the road.
This problem is easily overcome by selecting Bicycle Tail-light mode. This normally
flashes the tail-light with a short duty cycle but automatically increases the duty cycle
when the headlights of an approaching car are detected from behind.
Luxeon LED (or LEDs), the current
also passing through feedback resistor
R1. The voltage developed across R1 is
then sampled using a voltage divider
consisting of a 1kW resistor, trimpot
VR4 and a 2.2kW resistor to ground.
VR4 adjusts the voltage “seen” by IC1
at its AN0 input (pin 17).
In operation, IC1 maintains the LED
current set by trimpot VR4 at a constant value. It does this by adjusting
the duty cycle of the PWM switching
signal applied to Q2’s gate. This duty
cycle can be very finely controlled in
1024 steps between fully off and fully
on to control the LED brightness.
The PWM signal is normally 7.8kHz
but 13kHz can be used instead. This
higher frequency reduces the faint
but audible squeal produced by the
transformer but the dimming control
is not as precise.
Note that the PWM output at pin 9
of IC1 drives Q2 via a 1mF capacitor.
This AC coupling is included as a
safety measure, in case IC1 locks up
and sets pin 9 permanently at 5V. If
this occurs, Q2’s gate is held low via a
10kW resistor, thus preventing a short
circuit with T1’s primary permanently
connected across the battery.
Note: IC1 could “lock-up” if the
batteries were allowed to discharge to
below 3V, at which point IC1’s operation cannot be guaranteed.
Zener diode ZD2 protects the 470mF
Table 2: LED Status vs Battery Condition
Charging
Discharging
LED Status
Condition
Fast green flash
Fast Charging
Medium green flash
Top-up charging
Slow green flash
Maintenance charging
Steady green
Battery high level
Steady orange
Battery medium level
Orange flashing
Charge needed
Steady red
Charge urgently needed
Flashing red
Luxeon output halved
Off
Luxeon output flashing
This table shows the tri-colour LED indications for the battery condition. Note
that at the threshold voltages between the various conditions, the LED flash rate
and/or colour may alternate until the battery voltage rises or falls sufficiently.
76 Silicon Chip
capacitor from instantaneous excess
voltage if the Luxeon load is disconnected while being driven. In addition,
the software shuts down the drive
circuit and switches the unit off if the
connection goes open circuit.
LED drive strategy
As already noted, the Luxeon LEDs
are supplied with current from a nominal 4.8V battery via transformer T1,
which is switched on and off using Q2.
This type of driver is far more efficient
than using a series limiting resistor to
set the LED current and also allows
us to maintain the LED current as the
battery voltage falls. In addition, this
arrangement allows us to provide drive
for a wide range of LED combinations
that would otherwise be impossible to
power from a 4.8V battery.
For example, a 5W Luxeon LED
internally incorporates two LEDs in
series, so the voltage drop across it is
similar to two 3W Luxeons connected
in series. This voltage drop amounts
to about 6.8V. This means that a series dropping resistor between a 5W
Luxeon and a 4.8V battery would not
drive the LED to anywhere near full
brightness.
However, with transformer T1 and
Q2, the switching can be arranged to
fully drive a 5W Luxeon. In this case,
T1’s windings need to be wound to
step-up the voltage, since the 4.8V
battery voltage is lower than the total
LED voltage of about 6.8V.
When driven at its maximum current of 350mA, a single 1W Luxeon
LED will have approximately 3.4V
across it. In this case, T1 is wound to
step down the voltage – ie, less turns
on the secondary winding than on the
primary – because the supply voltage
is greater than the voltage required
across the LED.
As previously mentioned, when
driving more than one Luxeon LED,
they are connected in series/parallel
combinations. For example, two 1W
Luxeons are connected in series and
we need twice the voltage used for a
single LED – ie, about 6.8V. The current through each LED is still set at
350mA, however.
Ideally, when driving more than
one LED, it’s best to connect them in
series so that they all receive the same
current. However, for more than three
LEDs, this becomes impractical as the
drive voltage needs to be increased to
a relatively high value and there isn’t
siliconchip.com.au
Par t s Lis t– LED Lighting System
1 PC board, code 11004061, 104
x 79mm
1 diecast IP65 box, 115 x 90 x
55mm
1 selection of Luxeon LEDs to suit
application
4 C-size 4500mAh NiMH cells
with solder tabs
1 12VDC 1A plugpack (or similar)
2 FX2240 or equivalent pot core
and bobbin assemblies (L1, T2)
1 IP65 sealed single-pole pushbutton switch (Farnell 312-0880,
Omron B3WN-6002) (S1)
1 binary coded DIL rotary switch
(0-F) (S2)
1 LDR with light resistance of
50kW (Jaycar RD-3480 or
equivalent) (LDR1)
1 NTC thermistor with 47kW
resistance at 25°C
1 30A in-line blade fuse holder
2 M205 PC-mount fuse clips
1 M205 2A fast blow fuse (F1)
1 5A blade fuse (F2)
1 DIP18 IC socket
1 3-6.5mm IP68 waterproof cable
gland
1 2-pin DIN panel socket
1 2-pin DIN line plug
1 red neon bezel for LDR window
(Jaycar SL-2630 or equivalent)
2 TO-220 silicone insulating
washers
2 M3 x 9mm tapped Nylon
spacers (cut to 4 x 4mm)
8 M3 x 12mm Nylon screws
8 M3 Nylon nuts
1 4m length 0.63mm enamelled
copper wire
1 1m length of 5A figure-8 cable
enough room to wind sufficient turns
at the required wire thickness on T1
to achieve this.
As a result, we run a maximum of
two LEDs in series when driving four
or six LEDs. These series-connected
LEDs are then connected as two or
three parallel pairs, with the current
shared between them. Admittedly, the
current sharing may not be perfect but
it is better than just running all the
LEDs in parallel.
Charging
Power to charge the batteries is
provided by an external supply, with
siliconchip.com.au
1 100mm length of red or brown
7.5A hookup wire
1 100mm length of black or blue
hookup wire
1 50mm length of red 5A hookup
wire
1 50mm length of green 5A
hookup wire
1 100mm length of twisted pair
light-duty hookup wire
1 150mm length of 0.8mm tinned
copper wire
1 100mm length of 3mm heatshrink tubing
2 11mm-dia. x 0.5mm-thick PVC
discs (as a gap for L1 and T1
cores) (from plastic book
covers, roll-up cutting mat, etc)
3 100mm cable ties
2 200mm cable ties
16 PC stakes
1 small tube of neutral-cure
silicone sealant
Semiconductors
1 PIC16F88 microcontroller
programmed with Luxeon.hex
(IC1)
1 IRF9540 100V 23A P-channel
Mosfet (Q1)
1 STP45NF06L 60V 38A N-channel logic level Mosfet (Q2)
2 2N7000 N-channel Mosfets
(Q3,Q4)
1 BC337 NPN transistor (Q5)
1 LM336-2.5 voltage reference
(REF1)
1 LP2950CZ-5.0 regulator (REG1)
1 tri-colour (green/red) 3-leaded
LED (LED1)
2 FR302 fast 3A diodes (D1,D2)
diode D1 providing reverse polarity
protection. Fuse F1 protects against
short circuits in the charger circuitry.
In operation, the charge rate is controlled by rapidly switching Mosfet Q1
on and off. This sets the duty cycle
and thus the charging current through
the batteries.
Mosfet Q1 is a P-channel type and
is switched on when its gate voltage
is pulled below its source voltage. It’s
driven by transistor Q5 which in turn
is controlled via the RA6 output of IC1.
When RA6 goes high, Q5 turns on and
pulls Q1’s gate low via a 47W resistor,
thus turning Q1 on. Conversely, when
4 1N5822 3A Schottky diodes
(D3-D6)
1 1N4148 signal diode (D7)
1 18V 1W zener diode (ZD1)
1 20V 1W zener diode (ZD2)
Capacitors
1 4700mF 10V low-ESR capacitor
3 470mF 25V low-ESR capacitors
1 100mF 16V PC electrolytic
2 10mF 16V PC electrolytic
4 1mF 16V PC electrolytic
3 100nF MKT polyester
2 1nF MKT polyester
Resistors (0.5W, 1%)
3 470kW
2 470W
1 220kW
1 330W 1W
2 56kW
1 47W
2 10kW
1 10W
2 2.2kW
1 1.2W 5W
2 1kW
1 10kW 7-resistor 8-pin array
(Bournes 4608X-101) (Farnell
148-973)
1 0.5W 2W surface mount (Welwyn LR series 2512 case)
(Farnell 361-0433)
1 0.2W 2W surface mount (Welwyn LR series 2512 case)
(Farnell 361-0410)
Trimpots
1 500kW horizontal trimpot (code
504) (VR1)
1 50kW horizontal trimpot (code
503) (VR2)
1 10kW multiturn top adjust trimpot (code 103) (VR3)
1 10kW horizontal trimpot (code
103) (VR4)
Q5 turns off, Q1’s gate is pulled to the
source voltage via a 330W resistor and
so Q1 also turns off. ZD1 ensures that
Q1’s gate-source voltage is limited to
18V if the external supply voltage is
too high.
Diode D2 and inductor L1 form a
step-down filter circuit. It works like
this: when Q1 is switched on, current
flows from through L1 and charges the
batteries. Then, when Q1 switches off,
D2 becomes forward-biased and the energy stored in L1 continues to supply a
charging current – rather like a flywheel
effect. Altering Q1’s duty cycle varies
the charging current, to give the variApril 2006 77
Battery Amp-Hour Ratings
The NiMH cells used in this project have a 4500mAh capacity. This rating
refers to the amount of current that can be drawn continuously from the cells
over a 5-hour period.
For 4500mAh cells, this means that we can draw 0.9A (4.5/5) for five hours
before the battery is discharged. Typically, individual cells will be at 1.25V during
discharge (provided they were fully charged in the first place) but their voltage
drops to around 0.9V when discharged.
In many cases, the Luxeon LED Lighting System will draw more than 0.9A
from the cells. For example, this occurs when driving LEDs rated at 2W or more
at their full power rating. In this case (ie, if the current drawn exceeds 0.9A), the
usable cell capacity will be less than the specified 4500mAh.
There are two reasons for this. First, when drawing higher currents, the cell
voltage is lower and this means that the system stops driving the LEDs at full
power before the cells are fully discharged. Second, the cells dissipate power
as heat when delivering high currents and so there is a loss of efficiency.
On the other hand, the capacity of the cells will be higher if the current
drawn from the cells is intermittent rather than continuous. So the Universal
High-Energy LED Lighting System can be used for a longer periods on the one
charge if the LEDs are not driven continuously until the cells are discharged
but rather used intermittently.
Calculating the expected discharge time for each Luxeon LED load is rather
difficult. That’s because the current drawn by the Luxeon LEDs automatically
increases as the battery voltage drops over the discharge period. However, in
a worse case scenario of driving 6W of LEDs continuously, full output power
will be maintained for about two hours.
ous charging modes – ie, Fast Charge,
Top-Up and Maintenance.
Note that this switching circuit also
acts as a power converter – stepping
down the input voltage to the battery
voltage allows the charging current to
be increased.
The charging current is monitored
using a 1.2W 5W resistor. In operation, the voltage across this resistor is
proportional to the input current and
this is monitored by the AN2 input of
IC1 via Mosfets Q3 & Q4.
It works like this: two voltage dividers consisting of 470kW and 56kW
resistors sample the voltage at both
ends of the 1.2W resistor. The resulting attenuated “input” and “output”
voltages are then filtered using 1mF
capacitors and fed to the drains of
Q3 & Q4 respectively. By alternately
switching these Mosfets on and off,
IC1’s AN2 input can monitor first one
voltage and then the other.
In practice, Q3 and Q4 are turned
on when the RB4 and RB5 outputs
alternately go high respectively. Thus,
when Q3 turns on, IC1 monitors the
voltage on the input side of the 1.2W
resistor. Similarly, when Q4 turns
on, IC1 monitors the voltage on the
78 Silicon Chip
output side. The microcontroller then
calculates the charging current and
adjusts the duty cycle output at RA6
to maintain the required rate.
Switching the RB4 and RB5 outputs
also simultaneously changes the function of the coloured LED – ie, from
showing “battery level” to “charge”.
As a result, each time the system
switches on Q3 to measure the charger’s input voltage, the battery/charge
LED briefly flashes. This allows you to
find the control unit in the dark!
Battery indication
LED1 provides battery level indication. It can produce a green light,
a red light or an orange light (both
red and green LEDs lit) – see Table 2.
IC1 monitors the battery voltage at its
AN1 input (pin 18) via a 470kW/220kW
attenuator.
Voltage measurements
The voltage measurements made
by IC1 are all referenced to an accurate voltage source. This is provided
by REF1 which is an LM336 2.490V
precision voltage reference.
In operation, current is supplied to
REF1 via a 2.2kW resistor when RA7
goes high. Trimpot VR3 is used to set
the reference voltage to 2.490V and
this is then fed to IC1’s VREF+ input.
Note that the RA7 output is only
momentarily activated (taken high)
at regular intervals when the Luxeon
LEDs are off, whereas RA7 is always
high when the Luxeons are on. This
gives a worthwhile power saving when
the LEDs are off.
As well as driving REF1, IC1’s RA7
output is also connected to the common (C) terminal of binary-coded
rotary switch S2. S2’s switched connections are normally pulled low using four 10kW resistors which are part
of a 7-resistor SIL package. However, if
a contact is closed, its corresponding
pin will be pulled high each time the
common terminal is pulled high by
RA7 and this sets the mode.
The LDR and the thermistor are both
powered from the REF1 supply. IC1’s
AN6 input monitors the LDR, while
AN5 monitors the thermistor. VR1
and VR2 set the levels for the LDR and
thermistor respectively.
Power switch S1 is monitored by
IC1’s RB0 input. This input is normally
pulled low via a 10kW resistor but
when S1 is pressed, RB0 is pulled to
+5V and the circuit toggles on or off.
Low power modes
IC1’s internal oscillator operates at
either 31.25kHz or 8MHz, depending
on the mode of operation. When the
circuit is ostensibly off, the oscillator operates at 31.25kHz to conserve
power. In addition, RA7 is low and no
current is supplied to REF1, the LDR
or the thermistor.
In this state, current is drawn only
by REG1 and IC1, with switch S2 and
the charger input voltage monitored
once every few seconds. However, if
the Luxeon LED is to be driven or if
charging starts, the oscillator is reconfigured to operate at 8MHz.
In addition, the Plugpack-Charged
Garden Lights, Solar Garden Lights
and Roadwork Warning modes are all
special low-power modes. When the
Luxeon LED is off, the standby current
in these modes is decreased to just
400mA. To help achieve this very low
current draw, the battery indicator LED
is also switched off.
That’s all we have space for this
month. Next month, we’ll cover the
construction and show you how to
build some very effective LuxeonSC
powered lights.
siliconchip.com.au
|