This is only a preview of the February 2017 issue of Silicon Chip. You can view 44 of the 104 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:
Items relevant to "GPS-synchronised Analog Clock Driver":
Items relevant to "Ultra-low-voltage Versatile LED Flasher":
Items relevant to "El Cheapo Modules from Asia - Part 4":
Items relevant to "High Power DC Motor Speed Control – Part 2":
Items relevant to "New SC200 Audio Amplifier – Part 2":
Purchase a printed copy of this issue for $10.00. |
Ultra Low Voltage
Mini LED Flasher
by NICHOLAS VINEN
This versatile design uses just a handful of components to flash any colour LED
brightly and it can be powered from a single Alkaline cell. In fact, it will run off
any supply from 0.8V to 3.3V and consumes very little power when the LED is
off. It’s built on a tiny board, so it will fit just about anywhere and incorporates
ambient light monitoring to switch the LED off during the day.
W
e have presented simple LED
flashers in the past but this one
is a little different. While it uses just a
handful of parts, it’s able to drive the
LED with a current of up to 50mA, to
provide a very bright flash, even when
running from a 1.5V cell.
The complete module is just 15 x
19 x 4mm, so it can fit inside toy cars,
model railway locomotives and other
tight spots.
The LED current is set by a resistor
and the maximum setting produces an
almost blinding flash when used with a
high-brightness LED. But it consumes
just a few microamps the rest of the
time for a low average current draw
and thus excellent battery life.
It also incorporates a feature we previously introduced in a recent LED
flasher design, an optional light-dependent resistor (LDR) which turns
the flasher off during the day or when
bright indoor lighting is switched on,
to avoid wasting energy and thus further extend battery life.
While this design does rely on a few
small SMDs to build such a compact
module, they are not especially difficult to solder and do not require any
special tools.
You just need a temperature-controlled soldering iron, flux paste, solder wick, magnifying lamp (or equivalent) and reasonably steady hands.
And although the ICs are relatively
Features & Specifications
Supply voltage: 0.8 – 3.3V
LED current: 12mA as presented; can be set to 1-50mA
Supply current: 4mA average as presented, 50mA peak (8% duty cycle)
Standby current: ~20µA average when not flashing
Battery life: ~10 days with button cell; ~25 days with alkaline AAA; 50+ days
with alkaline AA (10 hours flashing per day)
LED driving efficiency: ~60%
LED forward voltage: 1-3.6V
LED flash rate: 0.1-10Hz, as set by C1; increases by up to 50% with
reduced supply voltage
LED duty cycle: 8% as presented; can be set to 1%-25% by changing R2
Size and weight (not including cell/battery): 15 x 19 x 4mm, <5g
40 Silicon Chip
specialised, they are not expensive
nor difficult to get.
We will be offering a kit for this project which includes the PCB and most
of the parts, to save readers the hassle of gathering them. But before we
get into the construction, let’s look at
how it works.
Circuit description
The complete circuit is shown in
Fig.1 and consists of two main parts,
an oscillator which determines the
LED flash frequency and duty cycle (at
lower left) and the switchmode regulator in the middle, which boosts the
supply voltage up to that required to
run the LED, and regulates the current through it. Let’s look at the oscillator first.
This is based around IC1, an
SN74AUP1G14DBVR schmitt trigger
inverter. The part number is a mouthful but you may notice the 74 and the
14 in there, indicating that it’s similar
to a 74HC14 IC, but with just a single
inverter instead of six.
It’s designed to run from between
0.8V and 3.6V and has a static current
drain of less than 1µA, although its dynamic power consumption in this circuit is higher with the current at around
10µA. This needs to be relatively low
as the oscillator is constantly powered
from the unregulated supply (typically
a single cell at around 1-1.5V).
siliconchip.com.au
POWER
L1 4.7µH
K
2
4.7µF
6
Vin
SW
Vout
5
A
C1
1µF
2
IC1
SN74AUP1G14
5
330kΩ
4
REG1
MCP1640
3
3
100kΩ
R2 10MΩ
D1
BAT54
LDR1 λ
EN
GND
K
A
A
1
CON1
ZD1
LED
CATHODE
BAND
1
K
ZD1
λ LED1
VFB
5.6V
K
4
2
A
4.7µF
R1
100Ω
BAT54
K
A
K
NC
A
MCP1640
SN74AUP1G14
5
SC
2017
MICROPOWER LED FLASHER
1 2
3
6 5
4
1
4
2 3
Fig.1: complete circuit for the Micropower LED Flasher. The circuit is based
around an SN74 schmitt trigger inverter (IC1) and an MCP1640 low voltage
boost regulator (REG1) with an integrated load disconnect switch.
It oscillates due to positive feedback
from its output to its input, mainly via
the 10MW resistor and the rate of oscillation is determined by this in combination with C1, which forms an RC
low-pass filter.
When IC1’s output is high, C1 discharges (ie, the voltage at pin 2 increases) until the voltage at pin 2 reaches
its positive-going threshold and output pin 4 goes low. C1 then charges
through the 10MW resistor until the
pin 2 voltage reaches the negativegoing threshold and the output at pin
4 switches high again.
The difference between the two
thresholds is known as the hysteresis
voltage and for IC1 this can be calculated as 70mV + (VCC – 0.8) ÷ 3.
Unfortunately, since the hysteresis
varies with VCC, the frequency will increase as the supply voltage drops (eg,
due to the cell discharging). To give an
idea of the magnitude of the effect, if
the flash rate is 1Hz at 1.5V, it will be
around 1.5Hz at 1V.
Schottky diode D1 and its series
100kW resistor (R2) change the duty
cycle of the square wave at pin 4 of IC1.
Normally it would be close to 50% but
this would result in visibly long LED
flashes and waste power. When pin
4 goes high, D1 is forward-biased, so
C1 discharges via R2, speeding up its
discharge rate and thus reducing the
time that pin 4 is high.
The values shown set the duty cycle to around 8%. You might think it
would be 1% but remember that D1’s
forward voltage is a significant fraction
siliconchip.com.au
of the supply voltage. Despite this low
duty cycle, the LED flashes appear very
bright on our prototype.
The opposite end of timing capacitor
C1 is connected to the positive power
rail so that input pin 2 of IC1 is initially high and thus its output is low
and the boost regulator (REG1) and
LED1 are disabled. C1 needs a couple
of seconds to charge before the oscillator begins to operate and it’s best for
REG1 to be off during this time.
The oscillator output at pin 4 of IC1
goes through a voltage divider consisting of a 330kW fixed resistor and the
LDR, which has a dark resistance in
excess of 1MW and a light resistance
below 50kW. Thus, in the dark, when
the output of IC1 is high, the voltage
applied to pin 3 of REG1 is close to
VCC, since the resistance in the bottom
leg of the divider is so high.
But in relatively bright light, the
~50kW resistance of the LDR shunts
most of the current from the output of
IC1, reducing the voltage at pin 3 of
REG1 by 0.3V and this is insufficient
to switch REG1 on. So if the ambient
light level is high, REG1 is off and the
LED won’t flash.
The only power consumption in
this condition is that of IC1, the current required to charge/discharge C1
and the current through the 330kW/
LDR divider, which only flows when
the output of IC1 is high. This averages to around 20µA (see Fig.6). Note
that if you want the LED to flash constantly, all you need to do is omit the
LDR so that the output of IC1 reaches
REG1 without attenuation.
When pin 3 of REG1 is high, the IC
is enabled. REG1 is a somewhat unusual boost regulator in that when it is
disabled, the current path from input
to output is cut off entirely. This is
very useful since otherwise the supply
voltage may be high enough to cause
the LED to light even when it should
be off. But REG1’s internal switch ensures that there is no path for current
to flow even so.
Fig.2 shows the internal block
diagram of the MCP1640 boost regulator. In brief, what it does is pulse pin
VOUT (PIN 5)
VIN
(PIN 6)
Direction
Control
SW
(PIN 1)
EN
(PIN 3)
Fig.2: internal
block diagram of
the MCP1640 boost
regulator (REG1). Once
the voltage at pin 1
(SW) rises above that
at pin 5 (VOUT), the
top transistor in REG1
switches on to allow
current to flow from
pin 1 to 5. This charges
the external capacitor
at pin 5. The other
internal transistor (an
N-channel Mosfet)
pulls pin 1 low, in
order to charge the
external inductor
which provides the
voltage boost.
Internal
Bias
IZERO
ILIMIT
Gate Drive
and
Shutdown
Control
Logic
ISENSE
GND
(PIN 2)
Oscillator
Slope
Compensation
∑
PWM/PFM
Logic
1.21V
VFB
(PIN 4)
February 2017 41
Fig.3: there is enough light on the LDR to attenuate the
Fig.4: shows the same traces as Fig.3 except the LDR is
output of pin 4 to a low voltage; thus REG1 is not triggering. shaded from light so that the enable pulses reach REG1. The
The yellow trace is pin 2 of IC1 while green is at pin 4.
blue trace is pin 1 of REG1 while pink is at LED1's anode.
1 (SW) low at a frequency of around
500kHz with a controlled duty cycle,
so that the interruption of current
through inductor L1 causes an increase
in the voltage at this pin, compared to
the input at pin 6. Current then flows
from L1 through REG1 and out of pin
5, charging the 4.7µF output capacitor
and also driving current through LED1.
The current through LED1 and R1
rises until it reaches approximately 12mA, at which point the voltage
across R1 reaches about 1.21V. At this
point, REG1 throttles back the duty cycle of its internal switch to maintain
this current level. This continues until
the pin 3 enable (EN) input goes low
and the 4.7µF output capacitor discharges through LED1 and R1.
In more detail, when REG1’s internal
transistor from pin 1 to pin 2 (ground)
is switched on, current starts to flow
through SMD inductor L1, increasing
in a smooth manner. As the current
increases, L1's magnetic field charges
up. When this internal switch turns
off, L1’s magnetic field continues to
drive current from the supply at pin 6
through to pin 1. As a result, the voltage at pin 1 rises.
Once the voltage at pin 1 rises above
that at VOUT (pin 5), the other transistor in REG1 switches on to allow current to flow from pin 1 to pin 5. This
charges up the 4.7µF capacitor from
pin 5 to ground and, depending on
whether the voltage is sufficient to
cause LED1 to conduct, some or all of
this current causes it to light up.
Note that should the supply voltage
be more than 1.21V above the forward
voltage of LED1, the current flow will
be higher than intended. However, R1
will still limit this current, albeit at a
higher level.
But even with a very low forward
voltage for LED1 at around 1.8V, you
would need a supply of over 3.01V
(1.8V + 1.21V) for this to happen and
then the increase in current would be
minor; no more than a few milliamps.
Because REG1's feedback is set up to
regulate the current through LED1, the
voltage supplied to LED1's anode pin
Fig.5: is the same as Fig.4 except over a shorter timebase,
letting you easily see the switching of REG1 (blue) in detail,
which has a switching frequency of 485kHz in this case.
42 Silicon Chip
will automatically be adjusted to take
into account its forward operating voltage, which will depend on its colour.
For example, blue LEDs normally
have a forward voltage of at least 3V
while red LEDs will often operate below 2V. REG1 will simply supply more
voltage to a blue LED than a red one,
in order to achieve the pre-set current flow.
However, were LED1 to become disconnected (eg, due to an intermittent
section of wire, a bad solder joint or if
it fails), because no current could flow
through R1, the output voltage could
increase to an unsafe level, possibly
damaging REG1 or other components.
To avoid this, we've included zener
diode ZD1. Should the output voltage
exceed 6.81V (5.6V for ZD1 plus 1.21V
at pin 4 of REG1), ZD1 will conduct
and prevent REG1's output from rising any higher until the connection
for LED1 is fixed.
Operating waveforms
The scope grabs of Figs.3-6 show the
Fig.6: shows the measured current draw from one AAA cell
while there was enough light on the LDR to prevent the LED
from flashing.
siliconchip.com.au
operation of the flasher running from
a single AAA cell.
In each case, the yellow trace shows
the voltage at pin 2 of IC1, depicting the charging and discharging of
timing capacitor C1. The green trace
shows the voltage at pin 4 of IC1, the
pulses which enable REG1 when the
LDR is in darkness and also determine the length of the LED flash. The
blue trace shows the voltage at pin 1
of REG1, the switch terminal, while
the pink trace shows the voltage at the
anode of LED1.
In Fig.3, there is enough light on the
LDR to attenuate the output of pin 4 to
a low voltage and thus REG1 is not being triggered. You can see the charge/
discharge sawtooth ramp of the timing capacitor at top and the resulting
trigger pulses below.
The frequency read-out is 900mHz,
ie, just a little less than 1Hz (with a
1µF timing capacitor) and the amplitude of the sawtooth waveform can be
seen to be 520mV, around ⅓ of the 1.5V
supply voltage.
Fig.4 shows the exact same traces
but this time, the LDR is shaded so
that the enable pulses reach REG1.
You can see that the frequency has
increased slightly, to 1.04Hz, due to
the slight drop in cell voltage from the
extra current drain and also, to some
extent, due to the noise from REG1 affecting the operation of IC1.
You can also now see some evidence
of the switching output of the boost
operator in the blue trace (although
note that, due to the high frequency,
the scope is underestimating its amplitude) and the 4.45V now being applied
to the LED anode in ~60ms bursts.
Fig.5 is similar to Fig.4 but with
a shorter timebase so you can better
see the operation of REG1 in detail.
The switching frequency is 485kHz
and you can see how pin 1 of REG1
is pulled to 0V briefly, after which it
shoots up to over 4V, before dropping
down to 0V as the energy in L1 is
exhausted. It then sits at around 1.5V
(ie, the supply voltage) while D1 is reverse-biased before being pulled low
again for the next cycle.
Fig.6 shows the measured current from the AAA cell while there
was sufficient light on the LDR to
prevent the LED from flashing. We connected a 1:1 scope probe across a 100W
shunt resistor placed in series with
the cell and set the scope to measure
in microamps.
We then used its measurement facility to average the result. Note that
there’s a significant DC offset of 5.4µA
in the measurement which you have
to subtract to get an accurate reading
and note also how the current draw
changes during the oscillator cycle
and spikes when the oscillator output
is briefly high.
Component value selection
Using the values shown will give a
flash rate of around 1Hz at 1.5V and a
peak LED current of around 12mA. If
you want a slower flash rate, simply
increase the value of C1, eg, 2.2µF will
result in around 2.2s between flashes
(0.45Hz); 470nF will give around 0.5s
between flashes (2Hz), etc. If you need
a rate that’s between those that are easy
to achieve with preferred values, you
can quite easily parallel two SMD ceramic capacitors by soldering one on
top of the other.
It’s best to use X5R (±20%) or X7R
(±10%) capacitors for C1 to avoid too
much variation with temperature, but
Fig.7 (right): overlay diagram for the LED Flasher
which is built on a 15 x 19mm PCB. This makes it
easy to fit in a model train or toy car.
When building the
Flasher, it's best to use
an X5R (±20%) or X7R
(±10%) capacitor for C1
as its value won't drift as
much due to changes in
temperature.
TO
BATTERY
0.85-3.3V
NOTE:
PCB IS
SHOWN
TWICE
ACTUAL
SIZE
GND
ZD1
R1
5.6V
+
100Ω
C1 100kΩ
1µF
10MΩ
IC1
330kΩ
siliconchip.com.au
LED1
A
K
D1
BAT54
1
4.7µF 4.7µF
L1 MCP1640
remember that regardless of the accuracy of C1, it will vary somewhat with
supply voltage and you may need to
experiment with capacitance if you
want a particular rate.
Setting the peak LED current is easy;
simply select R1 = 1.21V ÷ (current in
amps). So for example, if you want to
set it at 5mA (which will still be quite
bright), use 1.21 ÷ 0.005 = 242W or the
nearest value, in this case, 240W.
Keep in mind that the current drawn
from the supply is substantially higher than this programmed current due
to the fact that the supply voltage is
normally considerably lower than that
required to drive the LED, and due to
limited efficiency.
For example, on our prototype
we measured a peak draw of around
50mA from the 1.5V (nominal) cell
when LED1 was receiving 12mA, with
its anode at around 4.6V. Of course,
the battery only has to supply this
50mA for the 8% or so of the time
that LED1 is lit.
The average battery drain can be
reduced by lowering the duty cycle.
To do this, reduce the value of R2, to
as low as 15kW which should give a
duty cycle of around 1%. Likewise,
the value of R2 can be increased, up
to about 2.2MW, for a duty cycle of up
to around 25%.
Power supply
You can use one or two AA or AAA
cells, a 3V Lithium button cell or a
3.3V regulated supply. Keep in mind
that the relatively high internal resistance of a button cells places an upper
limit on how much current the circuit
can reasonably draw, so we recommend increasing the value of R1 and
possibly lowering the value of R2 for
LDR1, which
is optional,
can either
be soldered
to the board
as shown at
the bottom of
the PCB, or
attached via
flying leads.
1
4.7µH REG1
LDR1
February 2017 43
reasonable performance and battery
life if using a button cell.
Construction
The LED Flasher is built on a tiny
double-sided PCB measuring just 15
x 19mm. That makes it easy to fit
inside something like a model railway
carriage or toy car, especially since it
can be run from a single AAA cell.
The PCB is coded 16110161 and carries 12 SMD components plus the LED,
optional LDR and power supply header/wires. The overlay diagram, shown
twice actual size, is shown in Fig.7.
None of the components are overly
difficult to solder but IC1 and REG1
have the closest pin spacings. Start
with REG1.
This has six pins, three on each side,
so you will have to examine it with a
magnifying glass under good light to
find the printed dot which indicates
its pin 1. Orientate REG1 so that pin 1
is closest to L1, ie, on the side nearest
to the LDR mounting pads.
Melt a small amount of solder
on one of the pads for REG1, then
carefully slide it into place while
heating the solder on that pad. Check
its orientation with a magnifier and
if necessary, re-melt that solder and
gently nudge the component until
all six leads are positioned properly
above their pads.
Now solder the pins on the opposite side of the one you tack-soldered,
then go back and solder the three on
the other side (refresh the solder on
that initial pin).
The solder will flow more easily if
you spread a little flux paste over the
pins of the IC. Since they are so close
together, when you solder them, there
is a high chance that the solder will
bridge the pins.
This can be cleaned up by adding
a little flux paste and then applying
some solder wick and a hot soldering
iron. It should suck the excess solder
right off the pins once it reaches the
right temperature. You can then slide
the solder wick away from the part and
remove the soldering iron.
Clean off with methylated spirits,
isopropyl alcohol or flux cleaner and
then check carefully with a magnifier
that all the joints are good and there are
no bridges. You can then move on to
soldering IC1 using a similar technique.
Its orientation should be obvious since
it has two pins on one side and three
on the other. You will find soldering
44 Silicon Chip
Parts List
1 double-sided PCB, coded 16110161, 15 x 19mm
1 4.7µH 100mA+ inductor, size 3226/3216 (imperial 1210/1206) (eg, Taiyo
Yuden CBC3225T4R7MR or BRL3225T4R7M)
1 LDR, dark resistance >1MW (eg, GL5528) (optional)
1 2-way pin header with plug or light duty twin lead
1 1.2-3.3V (nominal) battery or DC power supply
Semiconductors
1 SN74AUP1G14DBVR schmitt trigger inverter, SOT-23-5 (IC1)
1 MCP1640T-I/CHY* synchronous boost regulator, SOT-23-6 (REG1)
1 high-brightness LED, size and colour to suit application; 3mm and 5mm
through-hole types are suitable (LED1)
1 5.6V SMD zener diode, SOT-23 (ZD1)
1 BAT54 SMD schottky diode, SOT-23 (D1)
Capacitors
2 4.7µF 10V X5R SMD size 2012/1608 (imperial 0805/0603)
1 1µF** 6.3V X5R/X7R SMD size 2012/1608 (imperial 0805/0603) (C1)
Resistors (all 1% 1/4W SMD size 2012 or 1608 [imperial 0805/0603])
1 10MW
1 330kW
1 100kW#
1 100W
* do not use MCP1640B, MCP1640C or MCP1640D
** increase value for lower flash rate or reduce for faster rate
# increase value for longer flash period or reduce for shorter period
Note: a kit of parts is available for this project from the Silicon Chip Online
Shop and that includes the PCB and all SMDs, including a few extras
to allow you to alter the flash rate and duration. A blue high-brightness
LED and a suitable LDR are also included but no battery or power supply
connector/wiring.
the side with the two pins easier due
to the increased spacing.
With that in place, soldering the
remaining SMDs should be quite easy.
Don’t get ZD1 and D1 mixed up as the
packages look very similar. It will take
a little more time to form the solder
joints for L1 than the resistors and capacitors due to its larger size but the
passive components can all be soldered using a similar technique as for
the semiconductors.
LED1 can either be mounted on the
board or via flying leads, depending
on what’s more convenient. Just make
sure to get the anode and cathode the
right way around. It can be a 3mm or
5mm LED or even a 2012/0805 SMD
LED soldered directly across the pads,
if that suits you.
LDR1 can also be soldered to the
board or attached via flying leads. It’s
located at the opposite end of the board
from LED1 to prevent optical feedback
from causing LED1 to flicker, however, you can probably get away with
mounting them in reasonable proxim-
ity if necessary, as long as they don’t
face each other. As mentioned earlier,
if you don’t want the Flasher disabled
by a high ambient light level, simply
leave LDR1 off.
There is no reversed supply protection on this board (to minimise
size and voltage loss) so be very careful in wiring up the supply connections. Make sure to connect the negative end of your power supply to the
corner pad (GND) of CON1 and it
should be OK.
A power switch can be wired in series with either supply wire should
that be necessary, using either a twopin vertical or horizontal header or,
as with our prototype, simply solder a
pair of flying leads to these pads. Make
sure they can’t move around too much,
though, or the wires will eventually
break due to metal fatigue.
That’s it. Once you’ve applied power and LDR1 (if fitted) is in the dark,
LED1 should start flashing after C1
has charged up to its normal voltage,
which may take a few seconds.
SC
siliconchip.com.au
|