ELM ELM711SM

ELM711
Christmas LEDs Driver
Description
Features
The ELM711 is a sequencing circuit that is
typically used to control strings of LEDs on
Christmas trees. No external components are
needed for its operation, as all timing and logic
functions are performed internally.
Each high current output is capable of directly
driving an LED, but in order to drive a string of LEDs,
a higher voltage supply and an interface circuit
(typically a transistor and two resistors) are required.
See the Example Applications section for a short
discussion on how you might typically build such a
circuit.
Note that this integrated circuit uses rapid PWM
switching techniques to perform the LED dimming,
so this device is not suitable for use with slow
interface devices such as electro-mechanical relays.
Applications
• Christmas LED lighting control
• Marquee lighting
• Display attention grabbers
•
•
•
•
•
•
•
One button controls power and patterns
Needs no external timing components
Eight different patterns
Debounced control switch input
Wide supply range – 3.0 to 5.5 volts
High current drive outputs
Low power CMOS design
Connection Diagram
PDIP and SOIC
(top view)
VDD
1
8
VSS
Blue
2
7
Green
White
3
6
Yellow
PB
4
5
Red
Block Diagram
power
control
pattern
generator
VDD
PB
ELM711DSA
4
switch
debounce
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
3
White
2
Blue
7
Green
6
Yellow
5
Red
1 of 7
ELM711
Pin Descriptions
VDD (pin 1)
This pin is the positive supply pin, and should always
be the most positive point in the circuit. Internal
circuitry connected to this pin is used to provide
power-on reset of the internal microprocessor, so an
external reset signal is not required. Refer to the
Electrical Characteristics section (page 3) for further
information.
Blue, Red, Yellow, and Green (pins 2, 5, 6, and 7)
These outputs are used to control four different
groups of LEDs. The colours mentioned are only for
pin identification, and you can connect the actual
colours as you wish (none of the patterns require a
specific colour).
Each pin outputs a high level (VDD) when ‘active’ or
‘on’. Note that Pulse Width Modulation (PWM)
techniques are used by a few patterns to control the
intensity of the LEDs, with a minimum pulse width
period of about 1 msec. For this reason, the ELM711
should not be used with mechanical relay circuits.
PB (pin 4)
This pin is for the connection of a momentary action
pushbutton switch. Each press of the switch should
connect this pin to circuit common (VSS).
If the outputs are on, a momentary pressing of the
switch will change the LED pattern to the next
available one (there are eight in total). If the button is
pressed for more than 2 seconds, the circuit will turn
off all of the outputs. If the outputs are off when the
switch is pressed, the circuit will turn itself on with
the pattern set to the one that was in effect when the
circuit was turned off.
This input is internally ‘debounced’ and has an
internal pullup resistor to simplify the direct
connection to mechanical switches. Should you
prefer to use a logic signal rather than a switch, this
can be easily done, as the input will accept standard
TTL and CMOS logic levels.
VSS (pin 8)
Circuit common is connected to this pin. This should
be the most negative point in the circuit.
White (pin 3)
This output is identical to the others except that in
many sequences, it is held continuously on. The
intention was that this would control a special group
of LEDs on the top of the tree (for a star or other
ornament).
Ordering Information
These integrated circuits are available in either the 300 mil plastic DIP format, or in the 208 mil SOIC surface
mount type of package. To order, add the appropriate suffix to the part number:
300 mil Plastic DIP............................... ELM711P
208 mil SOIC..................................... ELM711SM
All rights reserved. Copyright 2009 by Elm Electronics Inc.
Every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be
given and no liability assumed by Elm Electronics with respect to the accuracy and/or use of any products or information
described in this document. Elm Electronics will not be responsible for any patent infringements arising from the use of these
products or information, and does not authorize or warrant the use of any Elm Electronics product in life support devices and/or
systems. Elm Electronics reserves the right to make changes to the device(s) described in this document in order to improve
reliability, function, or design.
ELM711DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
2 of 7
ELM711
Absolute Maximum Ratings
Storage Temperature....................... -65°C to +150°C
Ambient Temperature with
Power Applied....................................-40°C to +85°C
Voltage on VDD with respect to VSS............ 0 to +7.0V
Note:
Stresses beyond those listed here will likely damage
the device. These values are given as a design
guideline only. The ability to operate to these levels
is neither inferred nor recommended.
Voltage on any other pin with
respect to VSS........................... -0.6V to (VDD + 0.6V)
Electrical Characteristics
All values are for operation at 25°C and a 5V supply, unless otherwise noted. For further information, refer to note 1 below.
Characteristic
Minimum
Typical
Supply Voltage, VDD
3.0
5.0
VDD rate of rise
0.05
Maximum Units
5.5
1.4
Conditions
V
V/ms
see note 2
mA
see note 3
Average Supply Current, IDD
0.8
Output low voltage
0.3
V
current (sink) = 10 mA
Output high voltage
4.2
V
current (source) = 10 mA
PB input debounce time
60
msec
PB input pullup resistance
400
KΩ
see note 4
Notes:
1. This integrated circuit is produced using one of the Microchip Technology Inc.’s PIC12C5XX products as the
core embedded microcontroller. For further device specifications, and possibly clarification of those given,
please refer to the appropriate Microchip documentation.
2. This spec must be met in order to ensure that a correct power on reset occurs. It is quite easily achieved
using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as
may be obtained through direct connection to solar cells, or some charge pump circuits.
3. Device only. Does not include any current supplied to external circuits.
4. This is typical – the value varies with temperature and voltage.
ELM711DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
3 of 7
ELM711
ELM711 Operation
The ELM711 is a very simple sequencing circuit
that uses one of eight preset patterns to control five
output pins. When power is initially applied, the circuit
will reset itself, and will display pattern 1, a traditional
slow sequence, with the White LED on continuously.
While displaying an output pattern, the circuit
continuously monitors the pushbutton (PB) input for
signals from the user. If it sees a short pulse on this
pin, it will switch to the next stored pattern (see Table
1 for a description of all 8 patterns). Should the circuit
be displaying pattern 8 when the button is pressed, it
Pattern
will go to pattern 1.
If you wish to turn the circuit off, simply press the
pushbutton for at least 2 seconds. When the ELM711
sees this special signal, it will force all 5 outputs to a
low (off) level, and will keep them in that state until the
next time that the pushbutton is pressed. Provided that
the supply to the ELM711 was not interrupted, the next
time that the pushbutton is pressed, the circuit will
‘wake up’ and display the last-selected pattern.
Description
1
This one provides a slow twinkling of all of the coloured LEDs (the
White one will stay on continuously). The rate will vary slightly with
time to give a more natural appearance.
2
This pattern fades one colour out at a time (including the White one)
with a fairly slow period. LEDs are faded in the order White, Red,
Yellow, Green, and Blue.
3
The White LED stays on continuously, while the other colours fade in
and out very slowly. A relaxing pattern.
4
A fast blinking pattern – all LEDs (including the White) are only on for a
short time. Not a very relaxing pattern, but it does grab your attention.
5
Strings will light one at a time, with the White on throughout. Once per
sequence, the White LED will blink.
6
One colour at a time is added until all LEDs are on, then all turn off
and the pattern builds again.
7
Similar to pattern 6 with the strings building over time, but this pattern
also turns them off one at a time, rather than all at once.
8
This pattern provides a rapid twinkling of all the LEDs (including the
White one).
Table 1. ELM711 LED Patterns
ELM711DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
4 of 7
ELM711
Example Application
This section shows how the ELM711 might be
typically used. Basically, all that needs to be done is
apply power to the IC and it will create a sequence of
outputs for you. There are some concerns over the
external connections that should be discussed first,
however.
Whenever interfacing to CMOS circuitry, you need
to protect against a problem called ‘latchup’. This may
occur when excessive current is allowed to flow into
one of the IC’s pins, typically an input. This can
happen at almost any time, but generally occurs if
there are long wires connected directly to the IC, with
no form of current limiting. Latchup will cause
excessive currents to flow, which may damage
components (such as the ELM711).
Figure 1 shows how a pushbutton will typically be
connected to the input of the ELM711. This works well
if the wires to the switch are short (less than about 12
inches long). If the wires are longer than that, currents
can more easily be induced into the wires, and into the
ELM711 pin. Since there is no current limiting, the
currents can possibly be large enough to exceed the
latchup threshold, and the IC may be damaged.
Simply adding a series resistor such as that shown in
Figure 2 is all that is generally needed to prevent
latchup. Note that we also show a 4.7KΩ pullup
resistor connected to the switch as well. This pullup
resistor helps to pass some of the induced currents
around the ELM711 input, and also provides a lower
impedance input so that the voltages caused by the
induced currents are reduced, and less likely to
provide false inputs. (The ELM711 input pin also uses
a relatively long debounce time, so that it is less
susceptible to noise.)
The ELM711 may be used to control other
devices, but it was designed with LEDs in mind. When
on, LEDs require a forward voltage of about 2 to 3
volts as shown in Table 2. These voltages will remain
fairly constant over a wide range of currents, and can
be used in calculations as if they are constant.
If the ELM711 is to use a 3 to 5 volt power supply,
it is clear that it can only be directly connected to 1 or
possibly 2 LEDs on each output, as there isn’t enough
voltage available to power a longer string of LEDs.
This could result in a sparse Christmas tree unless
something can be done.
The circuit of Figure 3 shows a transistor driving
several LEDs from a power supply of Vp volts. As long
as the sum of the LED voltages is less than Vp, the
ELM711DSA
1
8
2
7
3
6
4
5
Figure 1. Typical Pushbutton Connection
1
8
2
7
3
6
4
5
4.7KΩ
4.7KΩ
Figure 2. Protection for very long PB leads
Colour
Typical Vf
Red
1.8
Yellow
1.9
Green
2.0
Blue
3.0
White
2.9
Table 2. Typical LED Forward Voltage Drops
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
5 of 7
ELM711
Example Applications (continued)
resistor (R) will have a voltage across it, and the total
current in the string will be determined by the voltage
across the resistor, and the value of that resistance.
Choosing a resistance value may require a little
experimentation, but to get you started:
If you plan to use N LEDs in the string, each with a
forward voltage drop of Vf, then choose Vp such that:
Vp ≥ (N+1) x Vf
Then, given the LED current (I), determine the
value of R from:
R = (Vp - NxVf) ÷ I
For example, if you wish to have 4 green LEDs in
a string, then you need to choose:
Vp ≥ (4+1) x 2.0
Vp ≥ 10.0 volts
a capacitor very close to the IC, much of the current
for these spikes can be supplied by the capacitor
rather than through the (inductive) leads of the supply.
The net result is that there will be less noise generated
at the supply by the ELM711. A value of 0.01µF works
well.
We will leave the wiring details to you, but to get
you started, we have found that the wires for a small (2
to 3 foot high) tree should be about 5 feet long. Space
the LEDs about 12 inches apart, beginning at the end,
and install them by cutting a 2 inch piece from one of
the two conductors in the wire. When you bring the two
ends of the cutout together to solder them to the LED,
the other conductor is forced to form a loop, which
allows it to hang from a tree branch.
Enjoy the light show!
Since 12V supplies are very common, we will use
that. Then, you need to choose R, which requires a
knowledge of the LED current. A good starting point is
to use 9 or 10 mA for red, yellow and green leds, and
a smaller current (4 or 5mA) for the blue and white
LEDs. As this calculation is for a green LED, we
choose I = 9 mA (or 0.009 A). R is then given by:
R = (12 - 4x2.0) ÷ 0.009
R = 444Ω
While 444Ω is not a standard value, you could
select either 430Ω or 470Ω for the resistor and the
current would still be close to the desired 9mA.
Continue in a similar fashion for the other colours. You
may need to try a few resistor values for each colour in
order to make all the LEDs appear to be of the same
brightness, as your eye is more sensitive to some
wavelengths, and some LEDs are simply more
efficient than others.
In this way, all of the component values can be
chosen and a circuit such as the one in Figure 4 can
be designed. Note that Figure 4 does not show a
transistor driving the white LED, as the wires to it are
short, and the resistor helps to limit currents should
some be induced. If you are considering very long wire
runs, the White LED should also have a transistor
buffer added in the same way as the others.
Figure 4 also shows a supply bypass capacitor
connected across the ELM711 power supply pins. This
is to prevent problems due to the transients, or
‘spikes’, that are inherent in all digital circuit’s current
flow (due to the internal switching process). By adding
ELM711DSA
Vp
N LEDs
R
4.7KΩ
2N3904
Figure 3. Driving LED Strings
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
6 of 7
ELM711
12V
470Ω
12V
4.7KΩ
(+)
78L05
2N3904
5V
4 Green
LEDs
12V
external
source
12V
(-)
470Ω
4.7KΩ
2N3904
5V
4 Yellow
LEDs
0.01µF
12V
1
8
2
7
3
6
4
5
470Ω
4.7KΩ
2N3904
4 Red
LEDs
Pushbutton:
If on, pushing changes the pattern.
Hold for 2 seconds to turn LEDs off.
If off, press momentarily to turn on.
470Ω
1 White
LED
12V
1KΩ
4.7KΩ
2N3904
3 Blue
LEDs
Figure 4. Typical Connections for a Small Christmas Tree
ELM711DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
7 of 7