Go Down

Topic: Why is a current limiting resistor needed? (Read 9518 times) previous topic - next topic

Mike Mc

I was thinking the other day that about 2 threads i've seen on the forum (but now can't remember where) about current.

One said that supplying a device with more current than it needs does not matter as the device will only take the current it needs and no more. Such as powering the Arduino with a 1A DC supply. It won't need 1A but will 'take' what it needs.

So.... Why does this not apply to LED's? Why is a current limiting resistor needed?

rFree

Due to the nature of diodes. There's a lot of reference material available explaining the operation of p-n junctions - it's possibly a few pages worth of explanation, to perhaps an entire chapter.

It's worth reading, as its a foundation to learning how transistors work.

This is a bit of a crap RAFB answer, but my own fuzzy understanding of the depletion zone and charge carriers will probably do more harm than good!



pwillard

Quote
device will only take the current it needs


Well, if you ask a Light Emitting Diode to "live fast and die young", it will.  They ARE a lot like light bulbs... they will eventually burn out but it takes a LOT longer under "normal" conditions.  

I love analogies... so here goes.  In this case... The water analogy.

voltage <--> water pressure
current <--> water flow rate (eg. liters/sec of water)

By omitting the resistor, you are essentially asking the LED to drink a 4 liters of water ALL AT ONCE!   ... and it will.    (Try it sometime... you can't do it)

To an LED with a 1.2V forward voltage... the extra pressure of over 2.5 times what it can swallow is unfriendly... but without restricting the flow at all that's what you are asking it to do...

  It will drink it really fast and probably get really sick or worse.  I understand what people mean when they talk about "Taking as much as it needs" but it doesn't really work here.  

By using a resistor, you are giving the LED in a nice smaller amount... (restricting the flow) like having a lot of smaller glasses of water over time.  It won't get sick that way and will last a lot longer.

LED's have a nominal current rating. Most RED types are ideally run between 10-15ma.  OHMS LAW comes to the rescue when figuring out how to keep the diode happy at 12ma with a 5V voltage source and 1.2v drop through the diode.

In this case, you would ideally have a 330 ohm resistor in the circuit feeding the LED.  My advice, buy some...  no... buy a LOT, they are really cheap.


Sean

#3
Jul 05, 2009, 04:23 pm Last Edit: Jul 05, 2009, 04:34 pm by Sean Reason: 1
Your average Arduino, or Arduino clone has a built in voltage regulator. Think of it as a variable load resistor.

Take for instance, my Boarduino sitting here. Using the coaxial connector, I can hook it up to a 12V, 2A power supply. The on board regulator through an internal pass transistor drops that to 5V. Same thing happens if I hook up a 9V, 850mA power supply, the measured voltage on the board is 5V.

Now lets put this Arduino into a portable circuit. Because passing the input voltage through a regulator burns all the excess off as heat which is a waste of good electricity, we decide to hook up four 1.25V NiMH rechargeable batteries for a total voltage of 5V. Works pretty good because we can connect this directly to the GND and 5Vdc pins. So we decide to run a motor and 5V just doesn't cut it and we forget we're running unregulated to save on battery drain. What happens if we put together a battery pack with six D Cell 1.5V Alkalines for a total voltage of 9 Volts. Our Arduino's ATMega chip is only rated for 5.5 Vdc Max and the higher voltage forces more current through it than it was designed to handle, probably quickly frying it.

Remember that Ohm's Law states that Current = Voltage / Resistance. With this 9V D-cell pack, we could put a series dropping resistor, or a two resistor voltage divider in place to lower the input voltage to our 5Vdc port on the Boarduino so it sees a proper input voltage less than 5.5V. (We also need to put some decoupling/noise filter capacitors in there to handle brush hash from the motor, but that's a whole other topic)

Using what we learned about why a 12V 1A power supply won't burn up the Arduino if the power is applied to the proper port, we now see that over-voltaging any circuit will cook it. Voltage regulators, dropping resistors, load resistors, voltage dividers all are used to reduce voltage to acceptable levels.

Now let's take that LED. Depending on the material used for the PN junction, it can be anywhere from a 1.3 to 4.6 volt device. If you supply exactly this voltage to it, you won't need a load/current limiting resistor because the proper current will flow through it, however, with semi-conductor junctions, the current increases exponentially to the applied voltage, unlike a resistor which has a linear increase in current. If you supply more than that voltage, you need to put a resistor in series, typically 1k will let it light, but if you want full brilliance without burning up the LED, you need its data sheet to know its operating voltage and current rating.

Luxeon recommends this website's resistor calculator for determining the exact value of this current limiting resistor:
http://led.linear1.org/1led.wiz

A good web page for explaining LED circuits:
http://www.theledlight.com/ledcircuits.html

Resistance formula:
Resistor = (Voltage - LED Spec Voltage) x LED Spec Current

florinc

A resistor is not needed if the LED is supplied with the "nominal" voltage, around 1.7V (depending on the color).

Coding Badly

What happens to the LED if the voltage is less than "normal" (less than 1.7V)?  Will it light?  Not as bright?  Still draw too much current?

Thanks,
Brian

florinc

#6
Jul 05, 2009, 09:03 pm Last Edit: Jul 05, 2009, 09:03 pm by florinc Reason: 1
When voltage applied is too low, it won't light or light faintly (you can try with a 1.5V battery).

retrolefty

Quote
A resistor is not needed if the LED is supplied with the "nominal" voltage, around 1.7V (depending on the color).


Too many uncontrolled variables to operate LEDs safely with a constant voltage. It's my opinion that current control or limiting is the only proper way to drive LEDs.

Lefty


Grumpy_Mike

Quote
A resistor is not needed if the LED is supplied with the "nominal" voltage, around 1.7V


Utter utter rubbish.   >:(

Anyway, if you go to the trouble of generating a 1.7V supply you are using more components that a resistor. It will not draw a stable current under temperature variations. It will change the amount of current it draws as the LED ages.
Yes with 1.7V it won't burn out immediately but it will eventually. No one who knows anything about electronics would ever consider it. You are doing a great disservice to people who look to this forum for sensible advice. Please grow up.

florinc

With all due respect, my sentence is not false. The following sentence is also true: "A resistor is not needed if the LED is supplied with a voltage lower than 1.7V".
I understand your explanation and it makes total and perfect sense. I always use resistors myself.

But, in my very limited electronic experience, I was in a situation where the LED was faintly lighting up with a resistor of 100 ohms. What could I do? Lower the resistor value. Well, I lowered to 0 to get a decent light. (I actually found out later that those LEDs were actually 2 LEDs in series, so they would require 3.4V to activate.)

Now, some innocent questions (especially for Mike): is this what you would have done as well? Also, would you use a 5 ohms resistor when the voltage is 1.8V (0.1V / 20mA)?

Grumpy_Mike

Quote
is this what you would have done as well?


No I would not have done the same thing. Faced with that situation I would have implemented a constant current supply using a transistor and a resistor providing feed back. Alternatively you can get a constant current supply with a FET by wiring the gate and source together. The other alternative is to boost the voltage up so that a sensible current limiting solution can be used. This is used increasingly nowadays with white LEDs requiring to be lit from processors running 3v3 voltage rails. Alternately you could have used low current LEDs, these can be very bright with only 3mA of current.

Quote
my sentence is not false.

Yes this sentence is also not false:-
Quote
According to the laws of physics a glass of water resting on a table can suddenly pass through the table and fall to the floor.

However, this would not lead me to advocate placing bowls under tables to prevent spillages.

Mike Mc

OK I think I understand now. Thanks for the replies.

florinc

Thanks Mike.

Another issue that "torments" me is this: how do you handle the case where the LED is powered by a PWM signal whose average (measured) voltage is 1.7V, even though the absolute voltage varies between 0 and 5V?


snick

#13
Jul 06, 2009, 04:02 pm Last Edit: Jul 06, 2009, 04:04 pm by snick Reason: 1
well pwm signal can imaged as a square wave,
something like that



this signal can assume only two values (HIGH and LOW), usually this two values are set to VCC and GND (where vcc can be in you case 5v)
no other values are allowed in this signal (well, there is a transiet from vcc to gnd so we can don't takes care of it)

since this is a MODULATION (PWM means Pulse-width modulation), you use this to generate a various range of signal,
usually the range beetween VCC and Ground.

image to have a switch, and you can turn on/off ti very faster (where very faster mean at a frequency of 1000hz, so 1000 times in a second)
you can also define a basic-period called duty cycle. And you calculate total time the switch is on inside the duty cycle:

at the end you will have:

ONtime + OFFtime = dutyCycletime.

and the % of the Ontime is set to:  (ONtime/dutyCycletime)*100  

fo ie: you turn it on for 2 second inside a 10 second dutycycle , you can say that it's on for the 20% of time.

so where is the magic...

Some system are not so faster-frequency response able, like our eyes that can only handle 30hz (this is the reason why we don't see the normal AC light flickering)
PWM over led are equal:  you let the led turn on and off master, and off course your tester dosn't take it as a faster +vcc/gnd sequence but just take it as the VCC * % (over calculated)
so for you or for your tester is a sort of avarange measure, but for your led, that is faster enought to light on and off, is only a quickly sequency where sometimes there is 5v, and sometimes no.

so in case the pwm is HIGH you need the resistor as always... so at the end:

if you controll a led with a constant signal (V) you need to put a resistor to takes care of the current draw,
and
if you controll a led with a PWM signal (Von/Voff) you need to put a resistor to takes care of the current draw in the HIGH part of the wave lenght

pwillard

"You" may see it as average 1.7v but the LED does not.  

If you use REALLY REALLY fast pulses, they are less damaging and this technique is often employed with IR LED's in hand held remotes as well as those LED "laser" pointers.  You can increase the effective brightness of the LED during the on pulse by using a higher pulse current than the datasheet rating. The brightness is proportional to current.   Remember my comment about little sips?   The moment the LED starts to heat up from your abuse of it...   your "cooked".  Aim for 5% duty cycle "on" time.

If you do it right... they work...  do it wrong...  they die young.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy