Like the bearing size code, resister values for LEDs is something that I keep needing to work out, or just go back to my nominal somewhere between 200 Ω and 1 kΩ rule of thumb.
While I could work it out every time I need it using
Resistor = (Supply Voltage – LED voltage(Vf)) / desired LED current(If)
and then chose the nearest common resister value. I have just assembled the following table:
|If 20 mA||If 10 mA||If 5 mA|
All of the above resistors can be 1/4 W resistors, most values will work on 1/8 W resistors however I only stock 1/4 W.
The values for series resistors for Blue and While LEDs when running off of a 3.3V supply need checked, since the Vf of these LEDs is typically around 3.2V, this leaves only 100mV across the resistor. As the Vf can vary quite a bit from device to device, as well as by temperature – there will be a LOT of variation in diode current…
If you are doing anything more than prototyping, I would recommend getting the data sheet for the LEDs you are using and test it out on a breadboard before you commit to PCB layout, and take that time to work out the best value of resister for your needs.
I made these Breadboard LEDs Previously with all the same 560 Ω value resistors, which as you can see from the above chart is set for 20 mA If at 12V and between 5 and 10 mA at 5 V so that one value is able to be used on a very wide band without causing long term damage to the LED.
If I want to make them dimmer I could have used a higher value resistor.