Electronics and Raspberry Pi

LED resistor

Calculate which resistor you need for an LED, for example on a 3.3V or 5V pin.

What does this mean?

An LED lets through nearly unlimited current on its own; without a resistor it will burn out. The resistor absorbs the voltage difference: R = (supply voltage − LED voltage) ÷ current. In practice, use the next higher standard value (E12). The LED will then be slightly less bright, but safe.

A typical value is 10 to 20 mA for a regular LED; for a Raspberry Pi pin, about 5 to 10 mA is advisable (maximum 16 mA per pin). The forward voltage is listed in your LED's datasheet; the color values are averages.