How do you tell what resistor to pair with an LED?

Hi all,

I've been learning how to use the Arduino Uno using the "Arduino Starter Kit". The kit comes with LEDs and resistors and tells you what power of resistor you need to pair with which LED. The same is true for other components, for example: what capacitor to pair with the servo motor.

But how do you tell if you just go and pick up a brand new (or maybe a used) servo? Or when you purchase new LEDs, or have some hanging around from older projects, how do you know how much resistance they need to be paired with?

Thanks so much!

For LEDs you can use
http://led.linear1.org/1led.wiz or http://led.linear1.org/led.wiz

How to calculate by foot see this page:
http://www.ohmslawcalculator.com/led-resistor-calculator

You don't know, unless you know the type and specifications.

Most leds are 20mA. Sometimes there is a number on the part. With unknown parts I sometimes search for one that looks the same. It also happened that I had an old unknown part but I had to order a new one, so I would know the specifications.

If you don't have any data on your LED, get some: Connect it up from a 5V supply and use a 1K resistor. Measure the voltage drop, Vf, across the LED. Then do the math to pick a resistor that yields up to 20mA: (Vs - Vf)/.02 = Resistance needed. Using 5V and assuming your Vf =2.2V (typical for Red for example), (5V -2.2)/.02 = 140 ohm, so use a 150 ohm standard value resistor, resulting in (5V -2.2V)/150 = 18.7mA. Same for green, yellow, blue, white, which may have Vf of 3.2V up to maybe 3.7V.

Capacitor with servo motor, use a 1uF to 10uF electrolytic cap located at the servo; it's just adding some local temporary power storage to the motor to accommodate current surges as the servo makes big position changes, without impacting the supply too much back at the source too much.

I recently hooked up an led with a "normally sized" resistor of a couple of hundred ohms (from memory), and it glowed bright enough to be seen from the moon*. I went for a resistor up in the high hundreds or a k, to bring it down to a less blinding brightness, current was down to some 7-8mA iirc, and was still pretty bright.

  • the led, not the resistor....

Having a 2k POT in series with a 150R fixed resistor can be handy to have around.

JimboZA: I recently hooked up an led with a "normally sized" resistor of a couple of hundred ohms (from memory), and it glowed bright enough to be seen from the moon*. I went for a resistor up in the high hundreds or a k, to bring it down to a less blinding brightness, current was down to some 7-8mA iirc, and was still pretty bright.

  • the led, not the resistor....

Some types of LED technology have achieved amazing brightness due to increased efficiency. In fact, they are often sold as "high efficiency", or by high advertised mcd specs. Usually they are at a slightly higher price point, but that still doesn't make them expensive. So I like to use them where possible and use a much higher value resistor to save power. I think LEDs have become brighter than in the old days, in general. Also the 20mA max rule of thumb might no longer apply to all LEDs.

Thanks so much for all your input everyone--very much appreciated :)

When LEDs were first available they were only red, and only 0.01% efficient or something
like that. Quantum wells and new semiconductor materials allow much higher efficiencies
today, comparable or better than fluorescent lights.

In the 1970’s the idea of having to protect your eyes from an LED would have been ludicruous. I believe infra-red semiconductor lasers were the first to benefit from
improved technology.

Highly efficient blue LEDs (which are used in “white” LEDs) were worth a Nobel Prize…

These days an indicator LED might only need 1mA or less (but beware the efficiency
varies a lot between different product lines).

MarkT: When LEDs were first available they were only red, and only 0.01% efficient or something like that.

Red LEDs are now approaching 40 % efficiency!

Russell