NEWBIE - how do I know which resitor for a LED?

Hi,

sorry for my absolute noobie-question.

I am trying around with the Arduino-Emulator (www.circuits.io) and cant find any info on how do I know, which resistor should I use for a LED?

are there differences between the LEDs (different resistor for different LEDs?)?
do I always have to put a resistor between the voltage and the LED?

are there differences between the LEDs (different resistor for different LEDs?)?

Yes. The forward voltage drop of different LED depends on the color of the LED.

do I always have to put a resistor between the voltage and the LED?

Only if you want the LED to survive, so yes.

To calculate the resistor value for your LED you must know the forward voltage drop of the LED, the LED supply voltage and the LED current . The data sheet for the LED will tell the forward voltage drop. Here are some LEDs and their forward voltage (drop).

LED Vf.jpg

If your supply voltage is 5V and the forward voltage is 2.2V (green LED) The series resistor must drop the difference between 5V and 2.2V (2.8V). Next decide on the current through the LED. Again consult the data sheet for the maximum allowable continuous current (or pulse current if you are driving it that way). Let’s use 10mA. The same current flows through the resistor and the LED. Ohms law says that to drop 2.8V at 10mA we need a 2.8/0.010 ohm resistor or 280 Ohms. Since 280 Ohms is not a common standard resistor value we could choose 220 or 330 Ohms.

So the formula is: resistor value = (supply voltage - forward voltage) / LED current

http://ledcalc.com/

You need to know your source voltage (usually 5V from Arduino),
the voltage drop aka forward voltage of your LED (only you can know this since there are so many kinds of LEDs out there, read the info from where you bought it),
and what current (in mA) you want to pass through the LED (again the acceptable range is in the info of your LED)

It's also worth noting that the precise value of the resistor is rarely critical - as long as it's not so small that you're exceeding the LEDs current spec (or are driving it off an Arduino pin and exceeding it's current limit). It only really matters if you need to match the brightness - in which case the resistors and leds just have to match, not have a specific value.

I've always assumed 3v for green/blue/white, 2v for red/yellow, and left it at that. When I've actually measured the forward voltage on LEDs, it's often been a tenth of a volt or two away from (china-generic) manufacturer's spec for that current.

folks.. thank you all very much :slight_smile: .. awsome :slight_smile: