Resistors for LEDs: the real answer



In the thread above where someone asked about selecting resistors for use with driving a LED, nobody really nailed it right on the head. So just to clear a few things up, a rather long post follows.

First of all, while non-electronics types refer to the resistor in this use as a "dropping resistor", that's not really technically accurate: whats actually going on is that you're making a voltage divider network (a really simple one) with a resistor in series with the LED. Now, this sounds like nitpicking, but it can actually make the whole deal easier to figure out.

(Non-electronics types please bear with this: it ain't rocket science, but like many such things, it does take some technical understanding.)

The problem we were given was how to drive a LED from a 24-volt power supply. (Forget for a moment that the supply may be AC: we'll cover that later.) Obviously, if you just put the poor LED across the 24 volts, you're going to FAR exceed what's known as its "forward (i.e., right-way) voltage" rating, with the result that the "magic smoke" will be let out; bummer.

By putting a resistor in series with the LED, you're dividing the 24 volts between the resistor and the LED, because the whole idea is to make sure that the LED doesn't get too many volts and blow. How it gets divided depends on the value (in ohms) of the resistor. How the heck do you figure that out?

What a guy would need to know is one crucial bit of information that was left out of the original discussion: the *rated forward voltage* of the LED. In plain English, how many volts are supposed to be across it under normal operation.

Turning to my handy-dandy Jameco catalog, it appears that most garden-variety LEDs (not the super-bright ones) are rated at about 2 volts, some more, some less: close enough to be no never mind.

So what we want to do is divide the voltage with 2 volts across the LED and the remainder (24-2, or 22) across the resistor (voltages in series simply add and subtract). Now we're getting somewhere.

OK, so how many ohms? That's where the other crucial piece of information comes in: how much current does the thing draw? Or, in other words, how many amps flow through the LED? Turning again to the catalog, the great majority of LEDs are rated at 20 mA (milliamps); again, others are different but plenty close enough. So the current is 0.02 A (amps).

Now all a guy would need to do is apply Ohm's Law. Someone stated it as

I = E/R

meaning current (I) equals voltage (E) divided by resistance (R).

But we want to calculate R from the other 2 terms. So we just rearrange it so it looks like:

R = E/I

So to get the value of the resistor we need, divide voltage (22 volts across the resistor) by current (0.02 A flowing through the whole thing), which gives us (ta da)

1100 ohms

(And of course, as the OP in the original thread was asking, if all a guy had were, say, two 560-ohm resistors, he could just put them in series to make a 1200-ohm resistor.)

Now, the other answers given in the other thread were plenty close enough to work just fine. We're not working on an electron microscope here.

By the way, how BIG a resistor (in terms of power, in watts) do we need? Simple: by the power formula

P = EI

(power in watts equals volts times amps)

we get 0.44 watts, a little less than 1/2 watt. If all you had was an eighth-watt resistor, it would get a little warm, but it would work OK. (If a guy used two 560-ohm resistors in series, then the power through each would be half this, or about 0.22 watts.)

Now, about that AC power supply: Someone said, correctly, that since LEDs are, after all, diodes, you can use them with AC power supplies. HOWEVER, someone replied, also correctly, that this is only true up to certain voltages. To be precise: the rating you need to look at is the "reverse voltage" or "peak inverse voltage" (or PIV). Unfortunately, for LEDs, this is pretty low, on the order of 5 volts or less. So if you did have just a transformer, you'd need to put a small diode that can handle that higher PIV (like, say, a 1N914 or 1N4004) in series with the whole thing to produce (pulsating) DC from the AC. If you do this, you ought to then figure the voltage drop of the diode into the equation. (Stop, you're making my head hurt!) Since this is so small--about half a volt or so--you really can just ignore it, and let the LED just be a *tiny* bit dimmer, or you can adjust the size of the resistor (make it a little smaller) to compensate.

So now you know everything you need to know to run LEDs on your layout.


--
Napoleon won the battle of Waterloo. The German Wehrmacht won World War
II. The United States won in Vietnam, and the Soviets in Afghanistan.
The Zealots won against the Romans, and Ehud Olmert won the Second
Lebanon War.

- Uri Avnery, Israeli peace activist
(http://counterpunch.org/avnery09022006.html)
.



Relevant Pages

  • Re: He who laugh last, laughs loudest, was Re: Wet your pants funny-- A.J. as an EE
    ... if you look at the LM675 spec sheet it shows 90db of power supply ... If the power supply voltage varies ... going to get 60 volts peak-to-peak out, which is about 20 volts RMS ... So this added resistor has used up all the IC's power ...
    (rec.audio.tubes)
  • Re: P2B-DS and generic slotkets
    ... The slockets are labeled "Cpu Card ... processors are requesting 2.0 volts instead of 1.65 volts. ... If R3 is a 56 ohm resistor, ... With regard to the voltage being requested, ...
    (alt.comp.periphs.mainboard.asus)
  • Laughing even louder at the "engineers", thanks Old Hack Re: He who laugh last, laughs loudest, was
    ... if you look at the LM675 spec sheet it shows 90db of power supply ... If the power supply voltage varies ... going to get 60 volts peak-to-peak out, which is about 20 volts RMS ... So this added resistor has used up all the IC's power ...
    (rec.audio.tubes)
  • Re: Basic question about volts
    ... The voltage of the supply is the force that drives current through any ... So if you want to connect an LED that requires about 2 volts before it ... passes the required current (LEDs produce light roughly in proportion ... Typically, this is a resistor. ...
    (sci.electronics.basics)
  • Re: P2B-DS and generic slotkets
    ... processors are requesting 2.0 volts instead of 1.65 volts. ... If R3 is a 56 ohm resistor, ... With regard to the voltage being requested, ... you sure the slocket doesn't have a way to modify the VID ...
    (alt.comp.periphs.mainboard.asus)