# LEDs, 555s, Flashers, and Light Chasers (Test)

Discussion in 'General Electronics Chat' started by Wendy, Jan 20, 2009.

1. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
I'm going to use this space to write an article on 555's and LEDs. I'm going to try to cover all the ground we've seen here on AAC. Feel free to comment, or point out something I've missed. I may not use all of it, but I'll try to be comprehensive.

*************************************

LEDs, 555s, Flashers, and Light Chasers

One of the most common uses of a 555 is to flash LEDs. It is as if they were made for each other. I'll try to show most of the techniques used for this purpose, explaining how and why along the way.

Index

LEDs
Current Limiting
The 555 Integrated Circuit
Low Power Applications
The Joule Thief
From Four, Twenty
Light Chasers
Transistor Drivers
Making Patterns
Conclusion

LEDs

To design a flasher to order it is important to understand how these parts work. LEDs are simple enough, but they have been around for a long time, and have changed quite a bit from their first commercial release. The old parts were fairly dim, and didn't stand much current. It is possible to buy LEDs that will use over an amp and easily outshine most light bulbs. This article will deal with the dim to medium 5mm type of LEDs, since that is the majority simple ICs can easily power.

LEDs are current devices. This means they operate on current once a minimum voltage is provided. Like conventional diodes, they do not limit this current, another component has to do this. Connect an LED to a power source without a resistor and it will be damaged, probably burned out. Figure 1 shows the conventional scheme to light up an LED.

..................Figure 1

The forward dropping voltage, or Vf, of an individual LED is very stable. Go below this voltage and the LED stops conducting. This LED is assumed to be 2.5V, pretty standard for a modern red unit. The target current is 20ma. Going though the math (using Ohm's Law) the resistor is 325Ω. Since 330Ω is the nearest standard resistor value 330Ω it is.

Here is the approximate Vf of most LEDs:

......... Older Generation ... Newer Generation
Current ....... 10ma ................... 20ma
Red ............ 1.5V .................... 2.5V
Yellow ........ 2.0V .................... 3.0V
Green ......... 2.0V .................... 3.0V
Blue ....................................... 3.5V
White ..................................... 3.5V

For the Vf of a specific device you need to refer to the datasheet, and also understand there will be some variation even within a family. Part of the reason LEDs have changed so much is their efficiencies have gone way up. A modern LED at full power can damage your eyes if held directly next to the eyeball with the light shining in. Obviously these are not toys for children. Older LEDs didn't come close to these power levels.

LEDs can also be chained to share the same current to light more than one LED. Since this current is being used twice the apparent efficiency to light these LEDs is increased. Given that the LEDs can vary their Vf it is a really bad idea to parallel LEDs directly. Figure 2 shows a fairly typical example of how to do both for increased lighting.

.........................Figure 2

The reason it is such a bad idea for parallel LEDs to share their current limiting resistor is normal variations in Vf can cause one leg to draw more current than the other. This can result in the failure of one chain over time, leaving the second chain to absorb all the current. If you have a lot of LEDs in parallel this can lead to a progressive cascade failure, with LEDs popping like corn. You might be able to get by with it, but it is definitely not good design practice.

Current Limiting

If you are dealing with a stable power supply a resistor is good enough. Be sure to use a resistor that is twice the wattage (or more) than is actually needed. Wattage equals the voltage squared across the resistor divided by the resistance (P=V²/R). This is because some resistors may shift in their values if baked out, or overly stressed.

If the LED current is critical and you need precision, or if the power supply is less than stable, as in the case of automobiles, then better might be needed. A car can vary from 12VDC (battery) to 13.7V when running. This may seem like a small change, but it can create a significant current variation in practice.

The way around this is to use either a constant current source (current regulator) or voltage regulator. Used properly these circuits will stop power supply or LED Vf variations from affecting the design.

The LM317 is an excellent IC for this use. It comes in a wide variety of transistor packages big and small, is easy to use, inexpensive, and has excellent performance characteristics. It can be a voltage or current regulator. It's only downside is it drops about 3 volts. Figure 3 shows the two ways of using it's current regulation mode, Vcc can be 5.5V up to 37V, the LED doesn't change its brightness a bit (though the LM317 will get hot, and possibly burn up if not properly heatsinked for extreme voltage). The TO220 case style is shown because it is one of the most available models, and it dissipates heat extremely well.

...
............................Figure 3............................................................................Figure 4

In the figure 4 the current is kept constant by keeping the voltage constant. This way one regulator IC can handle many more diodes. The LM317 requires 10ma minimum on its feedback leg, so 120Ω for R1 is pretty much a requirement, though lower values can be used (with an increase in current and no improvement in performance). If there is a long length of wire between the output of the LM317 and its load (the LEDs) you should add a 0.1µF and 10µF capacitor to the input and output pins of the LM317 to prevent the regulator from oscillating.

The 3V drop between the input and output of the LM317 IC can make it unsuitable for some uses. Lets go back to the automotive circuit, where the Vcc can vary between 12VDC and 13.7V. We'll start with this example in Figure 5.

..............................................................Figure 5

Each leg the total voltage drop across all three LEDs is 10.8V. If Vcc is 13.7V, then the current through each leg is 19.3ma. These LEDs were rated at 20ma, so the number matches nicely. However, if the voltage goes to 12V the current in each leg drops to 8ma. Quite a difference, and the LEDs will be a lot dimmer. This would be unacceptable.

If you change the resistors to 56Ω to power the LEDs with 21.4ma at 12V then they would get 51.8ma at 13.7V. Again, this is unacceptable. A regulator is needed. However, remember that the LM317 drops 3V. At 12V it could output 9V, at 13.7 it could output 10.7V. You could remove one of the resistors in the chain, but to use the same number of LEDs the total current would go up by a third.

Being willing to remove an LED per leg may be the best choice. Sometimes we get so fixated in squeezing every bit of use out of the current the design dependability suffers. It is a personal decision, just be aware when you are skirting this edge.

The other answer is to go to other designs for the regulator. Here are some I've come up with over time.

..................................................................................................Figure 6

The first two designs, current regulators, work well. The voltage regulator in Figure 6 has an insertion drop of 0.6V, and if everything is perfect it will work. However, the zener diode VR1 has a 5% tolerance, which is 11.4 to 12.6V. The outside ranges just won't work, so it would have to be test selected and the LED resistors adjusted. A friend suggested a programmable shunt regulator that might do this job better, a TL431A. It would replace the zener with a precision value.

A few tenths of a volt can make huge differences in these designs. If the blue LED had a Vf of 3.8V (a real world value) the voltage regulator would not work.

For the beginners I may have terrified I apologize. Most times you can get by with a simple resistor, LEDs are pretty easy. I covered some pretty advanced ground here, but look at Figures 1 and 2, understand them, and you'll have what you need to know.

<Continued on next post>

2. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
The 555 Integrated Circuit

This IC has been around for a long time, over 30 years. The 555 IC could have been designed for LEDs, it is as if they were made for each other. I've written several articles about it, and won't go to the depth I did about the LEDs. Some internals of the 555 IC do need covered, since they relate to LED voltages.

The 555 has a digital output. It is either switched to the positive voltage (high) or the negative (low). An equivalent drawing of it's output would look something like this:

.........................................................Figure 7

Although Circuit #1 and Circuit #2 look different, they are pretty similar in performance. Generally I prefer circuit #2, but #1 will handle some special LEDs that are a red and green LED in the same package. Alternate between the LEDs fast enough, and it appears yellow. In both cases the 555 output shorts one side or the other, leaving the opposite side to light up with full power. The two internal diodes shown (which are actually two base emitter junctions) generate 1.2V, which swamps the LED Vf it is parallel to.

So far I have been showing how to light the LEDs at full power, and how to select the resistor for this. An LED will light up with 1ma and be visible, which will work for a lot of indicator applications. Many cases, such as my experiments, I use a 1KΩ for convenience, and don't worry about it. In the above application this would work out to 6½ma, which works well enough.

Another issue to be aware of is what the 555 can provide in current. I've already shown it's voltage limitations, but the transistors inside the IC can only provide 200ma before being damaged. There is a general rule in electronics that you should only use half what a component can provide, to make sure the part lasts its expected life. I don't always follow this rule myself, but you need to be aware. The 555 is also rated for 4½VDC to 18VDC, generally this will set the power supply limits of the circuit.

The 555 is a very open ended ICs, and have a lot more uses than just flashers, but for the purposes of this article we'll concentrate on the flasher applications. Shown in Figure 8 are two basic configurations that can be used to flash LEDs.

........................................................ ............ .........................Figure 8

Oscillator #1 is in the family of Hysteretic Oscillators, which is usually made with op amps. The 555 version adds some its own twists, since the output isn't quite rail to rail (as shown by the two diodes in the first illustration). Its duty cycle is hard to predict, since it is somewhat dependent on power supply voltage. The higher it's power supply voltage, the closer to 50% it becomes. However, for many applications the duty cycle imperfection is hard to see, so it can be used in a large number of applications with good results. You can even put a potentiometer for R1, which allows the flasher to cover a really large range of rates and frequencies.

Oscillator #2 is straight out of the 555 datasheet. With the addition of a second resistor it overcomes all the problems with oscillator #1, including the 50% duty cycle. For 50% R1 needs to be as low as possible, which is balanced by the fact that at one point R1 is completely across the power supply, thus being one of the components that set the total current draw of the circuit.

C2 is a bypass capacitor. For a single 555 on a battery you don't really need C2 or any other bypass capacitors, which is why I show it as a "ghost" image.

So what if you need a single LED that is one only 10% of the time? It is simple, use the D1 side for your LED. If you need 90% then use the D2 side for your LED.

Low Power Applications

While the 555 isn't a power hog, it is a product of the 70's. It has 15KΩ resistance, not counting the rest of the circuitry. It will drain a battery very quickly, in days if not hours. Several manufacturers have come out with low power CMOS versions, such as the TLC555 and the 7555. These parts are pretty similar to each other, though not exact. They can both drive an LED going to ground (low), but have about 10% the current capability going to Vcc (high). As the power supply voltage drops the current they can provide radically reduces, so with really low voltages you will have to use a transistor to light an LED to full brightness. On the other hand the CMOS versions draw about one hundredth the current for its internal circuitry, so they definitely have their uses.

Figure 9 shows some low power long duration flashers.

....................................................Figure 9

Oscillator #4 uses a capacitor voltage multiplication to boost the 3V from the battery to almost double that, enough to drive the 3.5V Vf of the blue LED.

The Joule Thief

The classic Joule Thief uses transistors. The basic principle, using an inductor to kick the voltage from the battery up until it will power an LED has also been applied to the 555 also. Figure 10 is a redrawn schematic, the original source was uploaded on another thread.

.............................................Figure 10

The 555 has been so useful over time that a dual version, two complete 555s, have come out. They also have their CMOS versions. I applied this to the following schematic.

.............................................................................Figure 11

These schematics use a feature that hasn't been shown to date. Pin 4 is an Enable pin for the 555, it is possible to use a 555 oscillator to control the second one, the voltage booster. This design works, and should make a battery or two last a very long time, but it could be improved quite a bit. Using two batteries to make 3V improves the brightness of the LEDs substantially. You may notice there is no current limiting resistor. This is because at 3V there simply isn't enough voltage to turn the LEDs on, all the current driving these LEDs is coming from the inductive kick of the coil.

From Four, Twenty

There is a way to flash 20 different LEDs from 4 555 ICs. Each LED would have it's own flash pattern, no two alike (though some are inverted from others), half of the LEDs will be on at any time for a total of 100ma. Basically we're merging Circuit #1 and Circuit #2 together, and using the way the 555s switch on the outputs for this effect. This could be used in a Christmas Tree, or just a light panel for a kinetic sculpture, or some other special effect. The base idea could be expanded even further for more LEDs, however the current draw on the 555s quickly approaches their limit. For 10ma per LED, 5 would be the max (150ma, 30 LEDs). At 6 would be 42 LEDs (210ma). The colors shown in Figure 12 were selected at random, and are by way of example.

.............................................................................................Figure 12

<Continued on next page>

3. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Light Chasers

Light Chasers take a flasher to the next step. Many cases they are done with microcontrollers, small computers, but that isn't really necessary unless some kind of computation for the display is really needed. Two nifty ICs, the CD4017 and CD4022, are perfect for this kind of application. They will sequence almost any number of outputs. The data sheet shows how to cascade even more 4017s for more than 10 outputs, and one 4017 can do 2-10 outputs. For CMOS this chip has incredible drive, rated up to 6.8ma best case! I have designed it using 10ma for direct drive of LEDs, though this is definitely not recommended by the manufacturer, and may not work in everyones build.

Figure 13 is an old design of mine. This circuit has worked for over 25 years, though not continuously (figure several months on that level). Again, the CD4022 is very stressed, so this isn't a recommended design (but I would use it again in non critical uses).

..........................................................................................Figure 13

The thing to note about this design is it makes absolutely no difference how many LEDs are in each chain, as long as you are under the Vcc/Vf limit (and don't forget the LM317 3V drop). Why is this important? Take the following circuit in Figure 14 as an example.

..............................................................................Figure 14

With this circuit there are 3 lights apparently chasing around the square. We have all seen variations of this effect on signs and in supermarkets. The thing to remember is this was done by how the LEDs were arranged and wired. It could have as easily been runway lights. I have done this in friends cigarette ashtray with good effect. The arrangement of the lights is more important that the circuit driving them in many cases.

Note how the CD4022 was limited to 4 counts. This is a common theme in using these chips. The 4017 is probably more popular, but it can be limited in a similar way. This is important when you want to generate patterns, which will be discussed later.

Transistor Drivers

The CD4017/4022 low current output means we have to have some means of increasing this drive. It is easy to become spoiled by the 555, with its relatively huge output currents. It can be fun to cheat a little with something like the 4017, forcing it to go beyond it's ratings, but at some point everything will go permanently dark. These chips can work for decades if kept within their ratings. Fortunately it is easy to use transistors as simple switches, to fully drive modern LEDs. A lot of the schematics have already shown this to one degree or another. Most moderate LEDs seem to focus around 20ma. In some cases much more current is needed, either because the LED requires it or there is a large quantity of LEDs.

The humble 2N2222A NPN transistor has been around for many decades. It performs admirably as a switching transistor, with a rated max of 0.6A. If we derate it to 0.3A this will still drive a lot of LEDs. If a job comes up that is too big for this part there are many other much higher rated transistors to choose from.

There are two ways of using a transistor. The common collector mode shown previously and in Figure 15 is a variation of the voltage regulator. It works because CMOS tends to get quite close to the power supplies rails (the plus or minus voltages). The loading on the CMOS chip is the LED current divided by the gain of the transistor. So if a LED array is pulling 100ma, and the gain of the transistor is 50 (which is pretty low, a minimum spec) the current from the CMOS device is 2ma. This design will generate some heat, since the emitter is 0.6V below Vcc (at a minimum). 0.6V X 100ma is 0.06 watts. In extreme cases the transistor can get a lot hotter.

.....................................................................Figure 15

The common emitter mode has a different bag of advantages and disadvantages. The transistor acts like a switch because the collector is very close to the emitter voltage, so it generates very little heat. The two most efficient states for any transistor in terms of wattage is when they are fully on (dropping almost no voltage) or fully off (drawing almost no current). Since wattage is voltage times current (V X I), and you have moved one of the variables close to zero the wattage is a very low number. The disadvantage of this configuration is input current, which has to be controlled by R6. A general rule of thumb is the base current should 1/10 the collector current. This isn't always practical, and the collector current should be the base current times the gain of the transistor (Ic = ßIb), but since gain is such a wildly variable number even within a family, the rule of thumb exists.

The way around this is to increase the gain of the transistors. Fortunately this is pretty easy to do with only minor drawbacks. Darlington transistors (aka Darlington pair) and a Sziklai pair. The gain is the two transistors gains times each other, and the only major drawback is the collector emitter will have a minimum of 0.6 volts (as opposed to less than 0.1V for a single transistor in common emitter mode). Shown in Figure 16 are examples of the two types in use. In both cases the value of R6 can be increased dramatically.

........................................................................Figure 16

<Continued on next post>

scoobydoo1 likes this.
4. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Making Patterns

Light chasers are cool, but sometimes you want to do more. By steering the current from the 4017 IC sequence other special effects can be created, such as this one.

...................................................................Figure 17

This circuit will make the LED light sweep back and forth, a popular Hollywood effect. We have also added transistor drivers that will give the LEDs 20ma without significantly loading U2, which means this particular circuit should last. You may need to add some power supply capacitors, but in general battery circuits are pretty stable without them, as the batteries share some of the same characteristics as capacitors. The voltages from 9V batteries tend to drop fast, down to 7.5 volts, and then stabilize, so be aware. The 555 oscillator will go as low as one cycle every 3 seconds, with the other end being faster than the eye can follow, so it is very open ended for the user.

Another popular design shown in Figure 18 is the flasher used in emergency vehicles. This can get you a ticket if you try to use it on a street vehicle, but the basic design is pretty simple.

..
.................................................Figure 18.....................................................................................................Figure 19

Of course, a design like this practically screams bright lights, so I've shown several options in Figure 19. Toys usually use 9V batteries, which can drop as low as 7.5, so this limits what can be done. Some blue LEDs can have a Vf of 3.8V (and 3.8V X 2 = 7.6V). I'd use single transistor in Common Collector configuration shown in Figure 19 (also shown in Figure 15) to drive individual chains. If the circuit is drawing 100ma for the LEDs, and the transistor has a gain of 50, the current pulled from the CD40XX chips is around 2ma. At 9V and a Vf of 3.8V the LED current is are getting 21ma, if the Vf is 3.5V the LED current is 22ma. At 7.5 and Vf of 3.8 the LED current is 14ma. These calculations show this circuit tries to minimize the current variance for the LEDs. This was covered in the Current Limiting chapter.

If you have a stable 12V then the options are more open. Since you can put more LEDs per chain the total current per LED is reduced a bit. The calculated current for this layout is 21ma. If the Vf is 3.5 then the current would be 24ma. Again, the variation is minimized.

But what if you want a lot of LEDs, say 100 of them (50 chains)? This would be a current of 1 amp. A transistor with a gain of 50 would use 20ma through the base, more than the CMOS IC could provide. This would be a good time to use a Sziklai pair as shown. Q2 would definitely have to be a power transistor, but other than that it is pretty straight forward. This would bring the CMOS requirement to 0.4ma, which solves the problem.

I mentioned earlier that the CD40XX ICs could go above their individual counts. The datasheet shows how to do this, as well as Bill Bowden's Website. Figure 20 shows how this is done.

.................................................................Figure 20

The number of transistors and resistors used makes the method shown in Figure 13 to drive LEDs more appealing, doesn't it? U3 can be repeated for even more counts, if need be.

Conclusion

LEDs are among the more fun circuits to build. They are easy to construct, give instant feedback when they work, and can be tweaked in many different ways. Your imagination can take these basic ideas even further. The field is still advancing very quickly, future models of LEDs will probably replace light bulbs, and we'll be building circuits to make them do wild and crazy things right along side. If you are interested in the history of these LEDs, I would recommend the online LED Museum.

********************************************

This is the end of the article. What you see after is a formating experiment.

5. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Current Limiting

If you are dealing with a stable power supply a resistor is good enough. Be sure to use a resistor that is twice the wattage (or more) than is actually needed. Wattage equals the voltage squared across the resistor divided by the resistance (P=V²/R). This is because some resistors may shift in their values if baked out, or overly stressed.

If the LED current is critical and you need precision, or if the power supply is less than stable, as in the case of automobiles, then better might be needed. A car can vary from 12VDC (battery) to 13.7V when running. This may seem like a small change, but it can create a significant current variation in practice.

The way around this is to use either a constant current source (current regulator) or voltage regulator. Used properly these circuits will stop power supply or LED Vf variations from affecting the design.

The LM317 is an excellent IC for this use. It comes in a wide variety of transistor packages big and small, is easy to use, inexpensive, and has excellent performance characteristics. It can be a voltage or current regulator. It's only downside is it drops about 3 volts. Figure 3 shows the two ways of using it's current regulation mode, Vcc can be 5.5V up to 37V, the LED doesn't change its brightness a bit (though the LM317 will get hot, and possibly burn up if not properly heatsinked for extreme voltage). The TO220 case style is shown because it is one of the most available models, and it dissipates heat extremely well.

...
............................Figure 3............................................................................Figure 4

In the figure 4 the current is kept constant by keeping the voltage constant. This way one regulator IC can handle many more diodes. The LM317 requires 10ma minimum on its feedback leg, so 120Ω for R1 is pretty much a requirement, though lower values can be used (with an increase in current and no improvement in performance). If there is a long length of wire between the output of the LM317 and its load (the LEDs) you should add a 0.1µF and 10µF capacitor to the input and output pins of the LM317 to prevent the regulator from oscillating.

The 3V drop between the input and output of the LM317 IC can make it unsuitable for some uses. Lets go back to the automotive circuit, where the Vcc can vary between 12VDC and 13.7V. We'll start with this example in Figure 5.

..............................................................Figure 5

Each leg the total voltage drop across all three LEDs is 10.8V. If Vcc is 13.7V, then the current through each leg is 19.3ma. These LEDs were rated at 20ma, so the number matches nicely. However, if the voltage goes to 12V the current in each leg drops to 8ma. Quite a difference, and the LEDs will be a lot dimmer. This would be unacceptable.

If you change the resistors to 56Ω to power the LEDs with 21.4ma at 12V then they would get 51.8ma at 13.7V. Again, this is unacceptable. A regulator is needed. However, remember that the LM317 drops 3V. At 12V it could output 9V, at 13.7 it could output 10.7V. You could remove one of the resistors in the chain, but to use the same number of LEDs the total current would go up by a third.

Being willing to remove an LED per leg may be the best choice. Sometimes we get so fixated in squeezing every bit of use out of the current the design dependability suffers. It is a personal decision, just be aware when you are skirting this edge.

The other answer is to go to other designs for the regulator. Here are some I've come up with over time.

..................................................................................................Figure 6

The first two designs, current regulators, work well. The voltage regulator in Figure 6 has an insertion drop of 0.6V, and if everything is perfect it will work. However, the zener diode VR1 has a 5% tolerance, which is 11.4 to 12.6V. The outside ranges just won't work, so it would have to be test selected and the LED resistors adjusted. A friend suggested a programmable shunt regulator that might do this job better, a TL431A. It would replace the zener with a precision value.

A few tenths of a volt can make huge differences in these designs. If the blue LED had a Vf of 3.8V (a real world value) the voltage regulator would not work.

For the beginners I may have terrified I apologize. Most times you can get by with a simple resistor, LEDs are pretty easy. I covered some pretty advanced ground here, but look at Figures 1 and 2, understand them, and you'll have what you need to know.

<Continued on next post>

6. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
The 555 Integrated Circuit

This IC has been around for a long time, over 30 years. The 555 IC could have been designed for LEDs, it is as if they were made for each other. I've written several articles about it, and won't go to the depth I did about the LEDs. Some internals of the 555 IC do need covered, since they relate to LED voltages.

The 555 has a digital output. It is either switched to the positive voltage (high) or the negative (low). An equivalent drawing of it's output would look something like this:

.........................................................Figure 7

Although Circuit #1 and Circuit #2 look different, they are pretty similar in performance. Generally I prefer circuit #2, but #1 will handle some special LEDs that are a red and green LED in the same package. Alternate between the LEDs fast enough, and it appears yellow. In both cases the 555 output shorts one side or the other, leaving the opposite side to light up with full power. The two internal diodes shown (which are actually two base emitter junctions) generate 1.2V, which swamps the LED Vf it is parallel to.

So far I have been showing how to light the LEDs at full power, and how to select the resistor for this. An LED will light up with 1ma and be visible, which will work for a lot of indicator applications. Many cases, such as my experiments, I use a 1KΩ for convenience, and don't worry about it. In the above application this would work out to 6½ma, which works well enough.

Another issue to be aware of is what the 555 can provide in current. I've already shown it's voltage limitations, but the transistors inside the IC can only provide 200ma before being damaged. There is a general rule in electronics that you should only use half what a component can provide, to make sure the part lasts its expected life. I don't always follow this rule myself, but you need to be aware. The 555 is also rated for 4½VDC to 18VDC, generally this will set the power supply limits of the circuit.

The 555 is a very open ended ICs, and have a lot more uses than just flashers, but for the purposes of this article we'll concentrate on the flasher applications. Shown in Figure 8 are two basic configurations that can be used to flash LEDs.

........................................................ ............ .........................Figure 8

Oscillator #1 is in the family of Hysteretic Oscillators, which is usually made with op amps. The 555 version adds some its own twists, since the output isn't quite rail to rail (as shown by the two diodes in the first illustration). Its duty cycle is hard to predict, since it is somewhat dependent on power supply voltage. The higher it's power supply voltage, the closer to 50% it becomes. However, for many applications the duty cycle imperfection is hard to see, so it can be used in a large number of applications with good results. You can even put a potentiometer for R1, which allows the flasher to cover a really large range of rates and frequencies.

Oscillator #2 is straight out of the 555 datasheet. With the addition of a second resistor it overcomes all the problems with oscillator #1, including the 50% duty cycle. For 50% R1 needs to be as low as possible, which is balanced by the fact that at one point R1 is completely across the power supply, thus being one of the components that set the total current draw of the circuit.

C2 is a bypass capacitor. For a single 555 on a battery you don't really need C2 or any other bypass capacitors, which is why I show it as a "ghost" image.

So what if you need a single LED that is one only 10% of the time? It is simple, use the D1 side for your LED. If you need 90% then use the D2 side for your LED.

<Continued on next post>

7. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Low Power Applications

While the 555 isn't a power hog, it is a product of the 70's. It has 15KΩ resistance, not counting the rest of the circuitry. It will drain a battery very quickly, in days if not hours. Several manufacturers have come out with low power CMOS versions, such as the TLC555 and the 7555. These parts are pretty similar to each other, though not exact. They can both drive an LED going to ground (low), but have about 10% the current capability going to Vcc (high). As the power supply voltage drops the current they can provide radically reduces, so with really low voltages you will have to use a transistor to light an LED to full brightness. On the other hand the CMOS versions draw about one hundredth the current for its internal circuitry, so they definitely have their uses.

Figure 9 shows some low power long duration flashers.

....................................................Figure 9

Oscillator #4 uses a capacitor voltage multiplication to boost the 3V from the battery to almost double that, enough to drive the 3.5V Vf of the blue LED.

<Continued on next post>

8. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
The Joule Thief

The classic Joule Thief uses transistors. The basic principle, using an inductor to kick the voltage from the battery up until it will power an LED has also been applied to the 555 also. Figure 10 is a redrawn schematic, the original source was uploaded on another thread.

.............................................Figure 10

The 555 has been so useful over time that a dual version, two complete 555s, have come out. They also have their CMOS versions. I applied this to the following schematic.

.............................................................................Figure 11

These schematics use a feature that hasn't been shown to date. Pin 4 is an Enable pin for the 555, it is possible to use a 555 oscillator to control the second one, the voltage booster. This design works, and should make a battery or two last a very long time, but it could be improved quite a bit. Using two batteries to make 3V improves the brightness of the LEDs substantially. You may notice there is no current limiting resistor. This is because at 3V there simply isn't enough voltage to turn the LEDs on, all the current driving these LEDs is coming from the inductive kick of the coil.

<Continued on next post>

9. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
From Four, Twenty

There is a way to flash 20 different LEDs from 4 555 ICs. Each LED would have it's own flash pattern, no two alike (though some are inverted from others), half of the LEDs will be on at any time for a total of 100ma. Basically we're merging Circuit #1 and Circuit #2 together, and using the way the 555s switch on the outputs for this effect. This could be used in a Christmas Tree, or just a light panel for a kinetic sculpture, or some other special effect. The base idea could be expanded even further for more LEDs, however the current draw on the 555s quickly approaches their limit. For 10ma per LED, 5 would be the max (150ma, 30 LEDs). At 6 would be 42 LEDs (210ma). The colors shown in Figure 12 were selected at random, and are by way of example.

.............................................................................................Figure 12

<Continued on next post>

10. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Light Chasers

Light Chasers take a flasher to the next step. Many cases they are done with microcontrollers, small computers, but that isn't really necessary unless some kind of computation for the display is really needed. Two nifty ICs, the CD4017 and CD4022[/URL], are perfect for this kind of application. They will sequence almost any number of outputs. The data sheet shows how to cascade even more 4017s for more than 10 outputs, and one 4017 can do 2-10 outputs. For CMOS this chip has incredible drive, rated up to 6.8ma best case! I have designed it using 10ma for direct drive of LEDs, though this is definitely not recommended by the manufacturer, and may not work in everyones build.

Figure 13 is an old design of mine. This circuit has worked for over 25 years, though not continuously (figure several months on that level). Again, the CD4022 is very stressed, so this isn't a recommended design (but I would use it again in non critical uses).

..........................................................................................Figure 13

The thing to note about this design is it makes absolutely no difference how many LEDs are in each chain, as long as you are under the Vcc/Vf limit (and don't forget the LM317 3V drop). Why is this important? Take the following circuit in Figure 14 as an example.

..............................................................................Figure 14

With this circuit there are 3 lights apparently chasing around the square. We have all seen variations of this effect on signs and in supermarkets. The thing to remember is this was done by how the LEDs were arranged and wired. It could have as easily been runway lights. I have done this in friends cigarette ashtray with good effect. The arrangement of the lights is more important that the circuit driving them in many cases.

Note how the CD4022 was limited to 4 counts. This is a common theme in using these chips. The 4017 is probably more popular, but it can be limited in a similar way. This is important when you want to generate patterns, which will be discussed later.

<Continued on next post>

11. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Transistor Drivers

The CD4017/4022 low current output means we have to have some means of increasing this drive. It is easy to become spoiled by the 555, with its relatively huge output currents. It can be fun to cheat a little with something like the 4017, forcing it to go beyond it's ratings, but at some point everything will go permanently dark. These chips can work for decades if kept within their ratings. Fortunately it is easy to use transistors as simple switches, to fully drive modern LEDs. A lot of the schematics have already shown this to one degree or another. Most moderate LEDs seem to focus around 20ma. In some cases much more current is needed, either because the LED requires it or there is a large quantity of LEDs.

The humble 2N2222A NPN transistor has been around for many decades. It performs admirably as a switching transistor, with a rated max of 0.6A. If we derate it to 0.3A this will still drive a lot of LEDs. If a job comes up that is too big for this part there are many other much higher rated transistors to choose from.

There are two ways of using a transistor. The common collector mode shown previously and in Figure 15 is a variation of the voltage regulator. It works because CMOS tends to get quite close to the power supplies rails (the plus or minus voltages). The loading on the CMOS chip is the LED current divided by the gain of the transistor. So if a LED array is pulling 100ma, and the gain of the transistor is 50 (which is pretty low, a minimum spec) the current from the CMOS device is 2ma. This design will generate some heat, since the emitter is 0.6V below Vcc (at a minimum). 0.6V X 100ma is 0.06 watts. In extreme cases the transistor can get a lot hotter.

.....................................................................Figure 15

The common emitter mode has a different bag of advantages and disadvantages. The transistor acts like a switch because the collector is very close to the emitter voltage, so it generates very little heat. The two most efficient states for any transistor in terms of wattage is when they are fully on (dropping almost no voltage) or fully off (drawing almost no current). Since wattage is voltage times current (V X I), and you have moved one of the variables close to zero the wattage is a very low number. The disadvantage of this configuration is input current, which has to be controlled by R6. A general rule of thumb is the base current should 1/10 the collector current. This isn't always practical, and the collector current should be the base current times the gain of the transistor (Ic = ßIb), but since gain is such a wildly variable number even within a family, the rule of thumb exists.

The way around this is to increase the gain of the transistors. Fortunately this is pretty easy to do with only minor drawbacks. Darlington transistors (aka Darlington pair) and a Sziklai pair. The gain is the two transistors gains times each other, and the only major drawback is the collector emitter will have a minimum of 0.6 volts (as opposed to less than 0.1V for a single transistor in common emitter mode). Shown in Figure 16 are examples of the two types in use. In both cases the value of R6 can be increased dramatically.

........................................................................Figure 16

<Continued on next post>

12. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Making Patterns

Light chasers are cool, but sometimes you want to do more. By steering the current from the 4017 IC sequence other special effects can be created, such as this one.

...................................................................Figure 17

This circuit will make the LED light sweep back and forth, a popular Hollywood effect. We have also added transistor drivers that will give the LEDs 20ma without significantly loading U2, which means this particular circuit should last. You may need to add some power supply capacitors, but in general battery circuits are pretty stable without them, as the batteries share some of the same characteristics as capacitors. The voltages from 9V batteries tend to drop fast, down to 7.5 volts, and then stabilize, so be aware. The 555 oscillator will go as low as one cycle every 3 seconds, with the other end being faster than the eye can follow, so it is very open ended for the user.

Another popular design shown in Figure 18 is the flasher used in emergency vehicles. This can get you a ticket if you try to use it on a street vehicle, but the basic design is pretty simple.

..
.................................................Figure 18.....................................................................................................Figure 19

Of course, a design like this practically screams bright lights, so I've shown several options in Figure 19. Toys usually use 9V batteries, which can drop as low as 7.5, so this limits what can be done. Some blue LEDs can have a Vf of 3.8V (and 3.8V X 2 = 7.6V). I'd use single transistor in Common Collector configuration shown in Figure 19 (also shown in Figure 15) to drive individual chains. If the circuit is drawing 100ma for the LEDs, and the transistor has a gain of 50, the current pulled from the CD40XX chips is around 2ma. At 9V and a Vf of 3.8V the LED current is are getting 21ma, if the Vf is 3.5V the LED current is 22ma. At 7.5 and Vf of 3.8 the LED current is 14ma. These calculations show this circuit tries to minimize the current variance for the LEDs. This was covered in the Current Limiting chapter.

If you have a stable 12V then the options are more open. Since you can put more LEDs per chain the total current per LED is reduced a bit. The calculated current for this layout is 21ma. If the Vf is 3.5 then the current would be 24ma. Again, the variation is minimized.

But what if you want a lot of LEDs, say 100 of them (50 chains)? This would be a current of 1 amp. A transistor with a gain of 50 would use 20ma through the base, more than the CMOS IC could provide. This would be a good time to use a Sziklai pair as shown. Q2 would definitely have to be a power transistor, but other than that it is pretty straight forward. This would bring the CMOS requirement to 0.4ma, which solves the problem.

I mentioned earlier that the CD40XX ICs could go above their individual counts. The datasheet shows how to do this, as well as Bill Bowden's Website. Figure 20 shows how this is done.

.................................................................Figure 20

The number of transistors and resistors used makes the method shown in Figure 13 to drive LEDs more appealing, doesn't it? U3 can be repeated for even more counts, if need be.

<Continued on next post>

13. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
Conclusion

LEDs are among the more fun circuits to build. They are easy to construct, give instant feedback when they work, and can be tweaked in many different ways. Your imagination can take these basic ideas even further. The field is still advancing very quickly, future models of LEDs will probably replace light bulbs, and we'll be building circuits to make them do wild and crazy things right along side. If you are interested in the history of these LEDs, I would recommend the online LED Museum.

14. ### Wendy Thread Starter Moderator

Mar 24, 2008
20,765
2,536
File Stash Point

File size:
331.9 KB
Views:
503
File size:
194 bytes
Views:
32