Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: airman00 on December 14, 2008, 11:57:36 AM

Title: Why LEDs need Current-limiting Resistors
Post by: airman00 on December 14, 2008, 11:57:36 AM
Just want to share with you guys an experience
I was being lazy and was testing out PWM on an RGB LED that I did not connect current-limiting resistors to. After about 3 hours in total of use the LED fried, and the signal pins for the LED and the Ground pins were shorted together- which is bad .

Lesson learned : Don't be lazy and always use current-limiting resistors with your LEDs !
Title: Re: Why LEDs need Current-limiting Resistors
Post by: Trumpkin on December 14, 2008, 12:23:02 PM
Sort of off topic but.....Why do LEDs smell so bad when they frie?
Title: Re: Why LEDs need Current-limiting Resistors
Post by: Gertlex on December 14, 2008, 12:49:48 PM
Sort of off topic but.....Why do LEDs smell so bad when they frie?
Not  much smells good when burning in the first place...
Title: Re: Why LEDs need Current-limiting Resistors
Post by: izua on December 14, 2008, 01:49:31 PM
incense oil does.
well anyway, why do leds need current limiting resistors: the led is a semiconductor, a p-n junction. junctions, while they're not in equilibrium (no current) tend to equalise the voltage on their pins, or in more technical terms, they attempt to reach a 0 volt drop, which is equal to 0 resistance.

Now, if you let your power supply give out its full load through a forward biased led, there will be no resistance except the one in the wires (neglilible). So if it can do 5A, your led will let run 5 Amps through it. Multiply by voltage to get power.
Why do they actually burn? Such current causes ohmic heating. The junction materials are less than 1mm^2 in surface. So they arc and weld together, at higher currents than rated.

Of course, you may also use another method to limit current, like pwm (as you did), but computing pulses right, so no single pulse will be over the max specs. Resistors are the cheapest method, though.
Title: Re: Why LEDs need Current-limiting Resistors
Post by: ArcMan on December 14, 2008, 03:43:06 PM
There is a flaw in your reasoning.  LEDs do not have a 0 volt drop when forward biased.  Like all diodes, there is some forward voltage drop.  It varies, but a typical value is 0.7V.  So 5A of current would cause the LED to produce 3.5W of power.  Fried!

Title: Re: Why LEDs need Current-limiting Resistors
Post by: izua on December 14, 2008, 06:54:43 PM
Of course, but there are losses over the wires, the power supply, etc. I was reffering to the ideal case :)
Title: Re: Why LEDs need Current-limiting Resistors
Post by: pomprocker on December 14, 2008, 09:32:53 PM
This was in a sparkfun tutorial:
Quote
Light emitting diodes (LEDs) are bits of silicon that light up when current flows through them. Go google for the science. As a general rule of thumb, LEDs can have 20mA max current flowing through them before they begin to fail.

(http://www.sparkfun.com/commerce/images/tutorials/BeginningEmbedded/1-PowerSupply/PowerSupply5.jpg)

So if you hooked up your LED like in the above schematic, it would light up very bright for a split second and then burn out. That's cause the LED is a diode and the current will flow from the anode (arrow) to the cathode (line) to ground - uncontrolled! The silicon will flow current at something like amp for a split second and burn up. To limit this current flow to 20mA, we need Ohm's law. Yea, the book worms in the room suddenly perked up:

V = IR (this is Ohm's law)

If we have 5V, and we only want 20mA flowing through the LED:

5V = 0.02 * R

R = 250 Ohm

Now this is not completely true because the LED has a forward voltage drop, but don't worry too much about that. Hooking up LEDs is very common with micros. All you need to remember is that you're going to need to limit the current. The most basic way to do this is with a resistor. 220 Ohms will work (LED will be brighter), 330Ohm is also good (LED a bit dimmer), 1K (1000) will work as well. 220, 330, and 1K are more common resistor values.

I highly recommend you get your hands dirty. Hook up an LED to a 1k resistor, then a 330, then a 220, 100, 50, then finally blow the thing up by hooking it with no resistor. That was fun right? Good. You had a back-up right? Once the bit of silicon inside the LED is burned out, it is no good and the LED can be thrown away.

Title: Re: Why LEDs need Current-limiting Resistors
Post by: Admin on December 28, 2008, 01:18:17 AM
Quote
After about 3 hours in total of use the LED fried
I'm surprised the LED worked for 3 hours! . . . you've been doing robotics too long to make a noob mistake :P

(and yes, there was a day I fried my LEDs too . . . even a day I couldn't figure out why 50% of them didn't work when I hooked them up . . . memories of my noobness . . .)
Title: Re: Why LEDs need Current-limiting Resistors
Post by: airman00 on December 28, 2008, 07:12:36 AM
Not so much noobness - more laziness
I've found that if its for a short time - like just testing out the LED for a minute or two - is fine , you won't fry the LED
Title: Re: Why LEDs need Current-limiting Resistors
Post by: TrickyNekro on December 28, 2008, 05:25:49 PM
I once, burned a 10$ Power LED :'( :'( :'( :'( :'(

That really hurt.... believe me....
Title: Re: Why LEDs need Current-limiting Resistors
Post by: tristantech on December 29, 2008, 08:35:38 PM
Here's an equation for calculating the value of the current limiting resistor when you use an LED:

Resistor value (in ohms) = (Supply voltage - LED drop voltage) / 20 mA

Title: Re: Why LEDs need Current-limiting Resistors
Post by: Trumpkin on December 30, 2008, 09:56:05 AM
Quote
Here's an equation for calculating the value of the current limiting resistor when you use an LED:

Resistor value (in ohms) = (Supply voltage - LED drop voltage) / 20 mA
Actually it is:

R=(supply voltage - voltage led is rated for)/I

"I" stands for current.