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.
Status: Ready for proof reading.
*************************************
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>
Status: Ready for proof reading.
*************************************
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>