Computing resistor value for LED

The math formula is Vsource - VLED / ILED = R. A typical 5mm red LED may be 1.8v and 20mA so running them on 5v circuit: 5 - 1.8 / 0.02 = 3.8/0.02 = 190 ohms. (probably 200 as the nearest common value resistor)

But that only works if one wanted to have LED at max rated spec or to drive LED at specific voltage and current level, and LEDs are very bright these days. Is there a formula that I can use to computer and determine what resistor value gets me desired brightness level? Say instead of 10,000mcd at max spec, what if I wanted to get light output at about 2500mcd? Resistor value and LED's brightness do not have linear relation, I could double the resistor value from above math from 190 to 380, there would be very little noticeable drop in brightness level.

Any idea or am I stuck guessing value using variable resistor then measuring them?

Don't confuse light output with brightness.
Brightness is a human thing, and our vision is not linear but sort of logarithmic.
Just pick a value CL resistor for the brightness you need or like.
Small SMD LEDs can already be too bright with a 1k resistor (~3mA).
Had to drop the resistor for the flashing indicator LED on my PC to 47k to not annoy me.
Leo..

It kind of boils down to what the purpose of that led is, power on indication, an alert, a warning, etc. For a simple power on indicator I use resistor that enables the LED to glow enough to to be seen as on without welding your retina. For most other uses such as warnings or alerts or status I tend to use PWM and let the duty cycle determine the LED intensity. Just use a resistor that keeps the LED below max current.

I think you will find the calculation to be a exercise in futility.

While theoretically it may be accomplished if the mfg of the LED provides enough information. However the information I’ve seen on “name brand” LEDs is only a nominal and they are very nonlinear.

I think you would be best setting up a small circuit with an LED and Resistor. Vary either the voltage or resistor, then calculate the proper resistor for the target voltage.

Good luck.

Hi,
Don't forget that different LEDs have different emitting angles.

so a 1000mcd LED with 15Deg of angle will appear brighter than a 35deg LED.

Also clear and diffused lens.

Tom.. :slight_smile:

wilykat:
Any idea or am I stuck guessing value using variable resistor then measuring them?

Subjective brightness is, er, subjective. How to calculate that??

wilykat:
Any idea or am I stuck guessing value using variable resistor then measuring them?

I also prefer Due_unto's solution: use the minimum value for the resistor, adjust LED brightness by PWM. That way you can change it as needed w/o touching the hardware

Due is also rather large and I can’t solder deadbug onto SMD ICs. Even if the package are using SOJ pins, the tiny pin can still shift around and even break off. I am using ATTiny84 as it’s the smallest DIP package that can handle 10 LEDs in the form of Larson scanner

Guess I’ll play with a variable resistor. I am using SMD LEDs and I will be using the code I posted at http://forum.arduino.cc/index.php?topic=502994.

Basically as small as possible Larson scanner to fit in a LEGO model of KITT. I was planning to use some 0805 LEDs as I could fit 10 inside the space with bits of gap in between the LEDs. This is the build I am aiming for:https://www.reddit.com/r/lego/comments/72meai/i_built_umkdirs_kitt_moc_and_i_love_it/

3 stud spacing = 24mm. The 0805 LEDs is something like 1.2mm if stacked veritcally and spaced about 1mm apart should leave me about 1.5mm left on either side. I’d go for 11 or even 12 LEDs but the ATTiny84 I am using is using up 448 bytes of RAM out of max 512 and won’t be able to handle any more without finding a 1KB version of the 14 pin chip.

I’d have to experiment to see if white LED behind red transparent piece looks good or if I should go with red LED behind red transparent piece.

I am not large!!!