LED resistor

Started by dave h., February 21, 2005, 07:01:41 AM

Previous topic - Next topic

dave h.

looking at these equations derived from ohms law, i feel like im missing something.

this catalog page (http://www.mouser.com/catalog/621/51.pdf) says that the forward current on the LEDs is 20ma. does this apply to all of them? i bought a 10mm LED because, well... its a 20mm LED. what isn't cool about that? i like shiny objects, especially when theyre huge and sticking out of stompboxes.

using a 9v power supply, would i use a .47 resistor? and is this huge LED really going to be the same current as the little ones? and does the "typical forward voltage" listed (3.8 in this case) have anything to do with how much power its getting from the battery, or is that the level it lets by before clipping as would a diode?

MartyMart

They are all different, my "standard" 3mm red LED's are also 20ma and seem happy with a 4k7 resistor ( is that what you meant by .47 ?? )
Yellow/Green/Violet will all be rated differently.
Ultra brights will drain a battery sooner, but are able to be "bright" enough with less current, so an 8k2 or even 10k will work fine.
Just depends "how bright" and how you are powering, an adaptor means there's no problem  :D

Marty. 8)
"Success is the ability to go from one failure to another with no loss of enthusiasm"
My Website www.martinlister.com

amz-fx

Quotesays that the forward current on the LEDs is 20ma.
20 ma.  (0.020 amps) MAXIMUM but it will operate on less...  even 1 ma.  As you use less current, the LED shines less brightly.

You can use my online calculator to figure the resistor value:

http://www.muzique.com/schem/led.htm

Let's say you are using a 9v battery and you want 20 ma. - just leave the Vf value as it is and plug in the other values to the calculator and you get 360 ohms.

regards, Jack

R.G.

Let me give you another on-line calculator: some knowledge in your brain.

LEDs are like other diodes in that they do not conduct any significant amount of current until they reach a certain threshold voltage; after that threshold is reached, they begin conducting essentially like a short circuit. The trick to LEDs is recognize that this threshold voltage is necessary to start them conducting, and after that, you have to limit current with some other way, usually a resistor.

If you are going to mess about with effects, you simply must learn and keep ready at all times Ohm's law, the idea that a resistor lets through a current equal to the voltage across the resistor divided by the resistor.  Without this, you permanently relegate yourself to understanding what you're doing in electronics, making yourself a permanent second class paint-by-the-numbers Oh-shoot-where-did-I-see-that-on-the-web? citizen.

With those two simple facts though, you have all the info you need to calculate a current limiting resistor for an LED - or a zener, by the way.

You have some supply voltage; in an effect this is usually 9V. You have an LED forward voltage that is the "price" that must be subtracted from the 9V to keep the LED running. That leaves the rest of the 9V to run the current limiting resistor, and it is the resistor that sets the current because the LED simply eats a forward voltage. So the voltage across the resistor is 9V minus the LED voltage, and the current is ohm's law for that resistor.

Ohm's law tells us that the current will be V/R, where V is the voltage across the resistor and R is the resistance. In this case we want to specify a current and calculate a resistor, so the resistor R will be V/I where I is the current.

Now we're coming to the meat of the matter: you have to know a few facts, or you can't do the calculation. You have to know:
(a) the total supply voltage Vtotal
(b) the LED forward voltage Vled
(c) the desired current

With those in hand, you figure out the voltage across the resistor; it's just Vresistor = Vtotal - Vled
Now you set the current by calculating a resistor.
Using the desired current, the resistance value is simply Vresistor/current.

LED have different forward voltages. You find out the forward voltage for *your* LED from the manufacturer's datasheet or more often from the catalog where the parts are listed. Mouser for instance shows the forward voltage of every LED it sells. Some old red LEDs have forward voltages as low as 1.2V. Some blue LEDs have voltages as high as 4V. Some displays composed of multiple LEDs will have forward voltages as high as 6-10V. You just have to look it up.

You probably also want to know how much current you can run through the LED. Mouser and most other catalogs conveniently lists the maximum current for each LED. If you go over that If (forward current) value, the LED burns up, and you convert it into a Darkness Emitting Diode, or DED. Any current less than the listed maximum will work, and the amount of light is about proportional to the current. Half-current, half brightness.

If you have to design something without knowing the exact forward voltage, use 2.0V. That's quite common for modern red, green, and yellow LEDs. Some reds are 1.8V, some greens are 2.2V, but 2.0 is a good middle of the road value.

You'll notice that very often the resistor value you come up with is NOT a value you can actually buy. For instance, if I have a 9V supply and a 2V LED and I want 10 milliamperes through it, the limiting resistance is:
Vresistor = 9V - 2V = 7V
R = 7V/0.010A  = 700 ohms

Cool. Hand me one of them there 700 ohm resistors. ... um... there *aren't* any??? How come?

Resistors only come in certain values. There aren't any 703 ohm resistors, except by accident. The Electronics Industry Association (EIA) set up certain values to standardize things about 75 years ago. Those standard values correspond to certain ranges. There is a 1.0000K in all of them. But then in the 5% (today's most common tolerance range) set, there is a 1.1K, 1.2K, 1.3K, 1.5K, 1.6K, 1.8K and 2.0K, corresponding to about every 5% jump of value. You can find the nominal target resistance values at:
http://www.logwell.com/tech/components/resistor_values.html
I recommend printing that and keeping it around - it's really handy.

But if I can't get a 700 ohm resistor, what can I get? If I want to not spend a lot of money for a resistor, I want a 5% resistor, one of the E24 series. I have my choice of 680 and 750. So what now?

Well, if I put in a 680, I get a current of 9V-2V=7V/680 = 0.00103A, only 3% higher than nominal. Probably OK. If I use a 750, I get 7V/750 = 9.33Ma, dead certain to be OK.

Cool. So I whip in either one and I'm golden.

Not quite. That nice, rock steady 9.0000V you assumed - what is it *really*?
"9V" batteries are usually 9.2-9.8V when new and trail off to as low as 7V when used but still useful. Even more interestingly, some people think it's kewl to try effects on higher voltage just to see what they'll do, sticking 12Vdc or 18Vdc on the effects input. At new-battery time, you get Vresistor = 9.8-2.0 = 7.8, so the current goes to 7.8/680 = 0.0115, or 15% over the max. Will it burn up?

Maybe - possibly - it could - probably not - idaknow. Not particularly good answers for a *designer*, are they?

What about that 780? under high battery, you get a current of 7.8V/750 = 0.0104A, about 4% high. Better. Much more likely to live. If I wanted to be SURE it will live, I'd use an 820 ohm resistor. Then the LED would for sure not exceed its specified maximum current up to a voltage of Vled = 0.01A*820 = 8.2V, or a supply voltage of 8.2 + Vled = 8.2+2 = 10.2V, plenty safe on a 9V battery.

But do you really need the LED to be that bright? LED brightnesses vary a lot, and some of them are dazzling, real searchlight-in-the-eye things. I would personally, as a matter of judgement get a higher brightness LED (yep, Mouser lists that too as the "millicandelas" on each LED) and run it at a lower current. That lets me cut the current way down, so I won't burn the LED out at any conceivable misuse of the battery clips.

Actually, I've been tricking you.

I've been sneakily introducing you to some of the tenets of real design. In real design, as opposed to cookbooks, you have to cope with the real parts you can get, the tolerances those parts have, and what the consequences of the tolerances and conceivable mis-uses are.

I think that having things like this inside your head is a good idea because I've noticed that I can access info I have stuffed into the back of my head about two zillion times as fast as info I have to go look up on the web. At least it works that way for me. Some things, like detailed device data, you just look up for the actual parts you have. Some things, you gotta know.

Like the Gambler said, you gotta know when to hold'em, know when to fold'em. The ace is **knowing**.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

dave h.

Quote from: R.G.

Without this, you permanently relegate yourself to understanding what you're doing in electronics, making yourself a permanent second class paint-by-the-numbers Oh-shoot-where-did-I-see-that-on-the-web? citizen.

that was a far more in-depth reply than i could have ever hoped for. but this bit sums it all up for me. i have a few books and am trying to learn this stuff so eventually i wont have to ask for help, but in the meantime, most of these books are written for people with a background that isnt guitar-effect-oriented, to steal your phrase. just because most electrical engineering students know how current and transformers and things work doesnt mean someone who's built fuzzfaces and tubescreamers all his life knows.

so i thank you for the help. i have had nothing bad to say about this board or its members since i signed up. the past few months worth of experimenting has led me to consider changing my major to electrical engineering because, for the first time ever, the thing i enjoy doing is something i can actually study in school. so your tips not only about theory but about practicality and marketing are equally helpful.

i get excited and jump the gun about lots of things and get off reading the chapters about op-amps before figuring out just how to apply most of these laws. and even when i think i know how, like with the 47k resistor, there turns out to be more to the equation than i could ever guess. but i think that once i get more experience and read up, and possibly even get a degree, i could do some very powerful things. i think i have plenty of marketable and original ideas, and learning how to bring them to reality is something i could study in school without having to sleep through class all day.

amz-fx

Let's go to the workbench for some practical real-world measurements...  I set up the breadboard with a 9v battery going through a 1k resistor into an LED and measured the voltage drop for a handful of different colors and styles that I happened to have on hand.  Here are the forward voltage drops that I measured:

RED LEDs:  1.97, 1.85, 1.62, 1.73
AMBER: 1.94, 1.89
GREEN: 1.95, 1.95, 1.95, 2.03
BLUE:  3.20, 3.17
WHITE: 2.93, 2.95, 3.02

The greatest spread of voltages was in the red colored devices... I happened to have a selection of very different red LEDs -- ultra-brite to old inefficient types.

So, you won't go far wrong by using 1.9v as the Vf for a red, yellow or green LEDs, 3.2v for a blue devices and 3.0 for the white. Try plugging those numbers into the online calculator:

http://www.muzique.com/schem/led.htm

The brightness of the LED  is rated in millicandela and a device with a 100 mcd total output rating at a specified current will be brighter than one with a 20 mcd at the same current.

Old inefficient LEDs may have a 20 mcd output but the latest high-output white LEDs used in flashlights or lamps can be rated 20,000 - 25,000 mcd or more!

If you put one of these white lamps in a pedal it can actually throw a mini-spotlight up on the ceiling   :shock:

Start out with a 10k dropping resistor and see how that looks...  if you need more brightness, sub in a 4.7k....  need more, go to 2.2k or 1k, and continue until you have what suits you best.  :D

regards, Jack

Satch12879

Is there a function or equations that one could use to equate current to brightness? That is, if you wanted to get a certain mcd out of an LED can you design the current supply accordingly?
Passive sucks.

Progressive Sound, Ltd.
progressivesoundltd@yahoo.com

Paul Perry (Frostwave)

Quote from: Satch12879Is there a function or equations that one could use to equate current to brightness?
I think the intensity (actual) of light is roughly proportional to the current, over most of the range of the led.
BUT, eyes, like ears, work logaritmically.
So, each time you halve the current, you get the same proportional decrease in the perceived amount of light. A complex way to say that as you decrease the current, the apparent brightness doesn't decrease as fast as you would think.

amz-fx

There are a couple of problems...  the human eye is not sensitive to all frequencies equally.  It is most responsive to green and much less to the red and deep violet as shown by this diagram:



Another problem is that the response of the LED is not linear...  doubling the current does not necessarily make the light twice as bright, as shown here:



Notice how the output brightness  line is curved.

regards, Jack

R.G.

QuoteNotice how the output brightness line is curved.
Try plotting it log-log, not semilog.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

amz-fx

Quote from: R.G.
QuoteNotice how the output brightness line is curved.
Try plotting it log-log, not semilog.
I didn't plot it...  Maxim Semiconductor did that one.