# Why is a current limiting resistor needed?

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?

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!

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.

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

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

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

When voltage applied is too low, it won’t light or light faintly (you can try with a 1.5V battery).

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

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.

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)?

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.

my sentence is not false.

Yes this sentence is also not false:-

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.

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

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?

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

“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.

For months now i’ve been controlling RGB LED Dot Matrix displays using multiplexing, which is a kind of PWM (at a set rate) and have not used any current limiting resistors at all. I know I should and perhaps one of the LED’s will eventually blow, but i’ve had clocks running continuously without a problem yet.

The way I see it, the multiplexing is at 100Hz and so each row is turned on and off 100 times per second and therefore the resistor isn’t necessary. Increasing the interrupt rate decreases the brightness. Although a PWM signal is a square wave, the sides of those squares aren’t vertical, they are ramped as the voltage ramps up from zero and heads towards its maximum. I am guessing that with a fast enough ISR they would never reach the top of that ramp as they would be turned off before reaching it.

Hi Mike,

the device will only take the current it needs and no more

There are two types of loads in electronics, liner and non liner. An arduino is an example of a liner load. The impedance (resistance) of it is fixed and doesn’t change with voltage. Therefore given a fixed voltage it will always take a fixed current, just like a resistor. If you plot the current against voltage you get a straight line, hence it is called liner.

The other sort none liner is where the voltage and current relationship are not in a straight line. An LED is a classic example of this. Here a small change in voltage (at the right point) results in a large change in current. These are devices that have to be kept in check, they are not give a current rating (other than maximum current) and it is up to you to put them in a circuit that controls the current. In the case of an LED a resistor is a simple constant current drive given sensible values of voltage or current.

pwillard:-
Yes that’s right.
This is exactly what I do on my Junk Box Monome. The LEDs are only rated at 20mA but I put 24 mA through them because I am multiplexing them with a 8:1 duty cycle. I could actually go much higher than this but I wanted to limit the current to what the USB connector could supply.

EDIT

I am guessing that with a fast enough ISR they would never reach the top of that ramp as they would be turned off before reaching it.

No you are wrong, you are drawing more current that you should on the peaks and will eventually burn something out. In this case I would guess the Arduino will go first because the LEDs have a higher pulse rating, where as the Arduino dosn’t have one at all.

Another question on the way… it’s becoming a nice topic!

Some store usually sells what they call a COSTANT CURRENT POWER SUPPLY

and sometimes they sell a POWER SUPPLY @ 350mA (or other key value like 700mA, 1400mA).

like this one

http://www.led-tech.de/en/LED-Controlling/Constant-Current-Power-Supply/Power-Supply-for-1x-3W-LEDs--230V--LT-1088_118_119.html

i’m very curious if i can use a MOSFET to control with a PWM signal this generated rail that comes out from this two kind of power supply, in this way:

i’m quite sure i can do it, including a current limiting resistor, in the case of the component 2 (the power supply only), using the OMHIC region of the mosfet.
but with a costant current power supply? can i still do this? and i can remove the resistor too ?

A constant current power supply can’t be a 12V supply as well because this would mean the power supply could some how control the load impedance.

Take a bench supply with a current limit on it. Set the current limit to say 100mA and whack the voltage up to full, (say 30v). Now what ever load you put on it will take 100mA - unless its impedance is so high that it can’t get 100mA through it with 30v. At that point it stops being constant current and becomes constant voltage. Some batteries are best charged at a constant current only up to a certain voltage.
The old tellytype terminals used a 20mA current loop output. This was achieved by only a few volts on the output if it were connected by a short wire. However if its output were unconnected there could be up to 600V on the output trying to drive 20mA through the load.

If you use a FET to turn a load on an off like you said, then when the FET is off it reverts to a constant voltage supply because it can’t go high enough in output voltage to drive it’s required current. If it could then it would no doubt break down the FET and you would be no better off. But yes you could remove the resistor relying on the constant current regulation to keep the LEDs safe.

So, I draw a few conclusions at this point:

1. LEDs can withstand higher currents, as long as they are short pulses (so they don’t get “cooked”);
2. if the PWM pulses are fast enough, the PWM’s measured voltage should determine the value of the resistor, as if the LED would be powered from a DC source with the same voltage as the PWM’s measured voltage;

Now, what is “fast enough” pulses? Should this be calculated from the LED datasheet so that the LED is not powered for a (relatively) “long” period of time until it gets cold again (from the heat of the pulse)?

BTW, what is the frequency of the PWM signals output by Arduino? Can this frequency be adjusted?