I came across a recent post about LEDs and it was full of incorrect information so I thought it would be better to post the correct info.
Folks like using LEDs for their projects - they are pretty cheap, come in many sizes and colors, have different luminosity levels, and so on.
What are the important things to know about an LED? It is useful to know the actual part number of the LED so we can get a datasheet, but sometimes we have a salvaged LED or a mixed bunch of parts with unknown origin. But first – it is important to understand is how an LED works and also how it fails.
How does an LED work? Simply, an LED will emit photons (light of some frequency – may be Infra Red, Visible, or Ultra Violet) when the forward voltage Vf is within the operating range and the forward current If is within the operating range.
What do we do if we dno't have a datasheet? Well, experience suggests that basic and inexpensive LEDs often have similar datasheet values and if we were to look at a few of them, we could find out most of what we need to know. Also, use a operating point that is in the middle of the common ranges and try not to push the device too hard, or you might let the smoke out.
Here is a chart taken from a Knightbright WP7113PGT datasheet which is a Green LED, a good representative of a common Green LED. The first chart shows Forward Current (If) versus Forward Voltage (Vf). From this chart we see that up to about 1.7 volts, there is no current – so no light. Then the current increases pretty quickly. Notice that the largest If on the curve is 20mA. The datasheet elsewhere says the maximum If is 25mA.
Another chart is Luminous Intensity versus Forward Current. This chart shows the Intensity (normalized to the 10mA If) versus the forward current. Again, the If goes to a maximum of 20mA. This chart holds a very useful hint – the manufacturer thinks it should be used at 10mA If since that is what they specified the Intensity in the graph.
These charts also indicate that the most important parameter in using the LED is the current – If.
Not voltage, but current.
But my power source is a voltage, how do I control the LED? If you were to put the supply voltage across the LED, the current would increase rapidly and you would let the smoke out. If you have a spare LED, you can touch it straight to the supply and you might see a brief flash and then the LED would be burnt up.
The simplest way to control the current through the LED is with a Current Limiting Resistor. A Current Limiting Resistor isn’t a special part, it is just a resistor, but it performs a special function to keep the current within range so the smoke doesn’t come out. How does that work? Let’s start with the simple LED circuit below.
For this example, we will use a battery voltage of 5v. We know from the LED datasheet that we want If=10mA and then from the graph we see that Vf would be 2.1v. Looking at the circuit, if the LED voltage is 2.1v and the Battery is 5v, that leaves 2.9v across the resistor and the current through the LED and resistor are the same, so the current through the resistor would be 10mA. Using Ohms law, V=I*R, if we want to know the resistance, we rearrange the equation to be R=V/I and R will be ohms, V would be Volts, and I would be Amps (so that 10mA will be 0.010A in the equation). Plugging in the values R=2.9/0.01 gives R= 290 ohms.
What if the power source is 12v? 12-2.1 would be 9.9v across the resistor, same 10mA If. R=9.9/0.01 = 990 ohms.
How about if we want three LEDs? For the 5v supply, we would need to have a current limiting resistor for each LED as shown here.
That is because 3*Vf is greater than the supply (6.3v > 5v). Each resistor would be 290 ohms. You might look at this a think that you could save 2 resistors by attaching all three LEDs to one resistor. First, you would need to have 3*If or 30mA in the resistor, which the resistor can handle just fine, but the problem comes to be if the LEDs aren’t very close in parameters. What can happen then is that the imbalance in If versus Vf can cause an LED to take more current and that can cause the LED to fail. Best practice is to use the three resistors.
If we had the 12v supply, we could get rid of the resistor for each LED, because we can put the LEDs in series as in this drawing. One reisitor will current limit all in series.
Here, the resistor gets 12v-(3 * 2.1v) which is 5.7v and If is 10mA, so R=5.7/0.01 which is 570 ohms.
Now for selecting the resistor. The choices are vast. I did a simple lookup on Mouser for resistor and it returned 714,305 results. Digikey returned 1,438,858 results.
To simplify, if you are making a simple circuit, you can stick to Through Hole resistors.
We know the resistance value the equations above give, so the next thing we need is to know the voltage across the resistor and also the power the resistor needs to dissipate. The power equation is P=V*I so for the 12v single resistor example, P=9.9 * 0.01 = 0.099watts or 99mW (it is useful to know mW as many small sized resistors are rated in mW).
After we know the power range, we need to pick the Tolerance – which is the range the resistor value will be to the specified value. For example, a 5% 100ohm resistor will be 100 +/- 5% or 100 +/- 5 or 95ohms to 105ohms. The range of choices in tolerance is large, 20%, 10%, 5%, 3%, 2%, 1%, and all the way to 0.005% just at Mouser for Through Hole resistors.
In small quantities, 5% and 1% are about the same price, so the recommendation is to use 1% if you need to buy the part, because the range of values is larger, so you can get to your target R much closer.
Back to the selection …
For a 990ohms resistor, we can get 976ohms or we can get 1000ohms – so we pick 1000ohms as it is a little above the target (so it will limit slightly more current).
For 570ohms, there is 565ohms and 576ohms – pick 576ohms.
For the 290ohms, there is 287ohms and 291ohms, so we pick 291ohms.
Now that you understand how all this works, you can also search for
led current limiting resistor calculator
in your browser and a bunch of choices pop up and they will do most of the calculations for you.
Arrgh – why didn’t this post start with that?????
Bookmarks