DIY ELECTRONICSTR

← All parts

LED resistor calculator

Find the resistor to put in front of an LED: enter the supply voltage, the LED's color and the current you want, and see the value the shops sell and the power it takes.

150 Ω 1/4 W

(5 V − 2 V) ÷ 20 mA = 150 Ω

The shops sell this value: 20 mA flows, and the resistor takes 60 mW. A 1/4 W resistor will do.

The colors of a 150 Ω resistor

How it is worked out

An LED does not limit its own current: straight on 5 V it draws too much and burns out. A resistor goes in front of it and takes the difference between the supply and the LED. By Ohm's law, R = (Vsupply − VLED) ÷ I. For a red LED on an Arduino's 5 V, (5 − 2) ÷ 0.020 A = 150 Ω. When the sum gives a value nobody sells, take the next one up: a little less current, a little dimmer, no harm done. With the 220 Ω many projects use, the current is 13.6 mA and the LED still shines well.

Voltage by LED color

ColorTypical voltage
Red2 V
Orange2.1 V
Yellow2.1 V
Green2.2 V
Blue3.2 V
White3.2 V

For ordinary 5 mm LEDs; the exact value is on the LED's datasheet.

Other calculators: Resistor color code · Ohm's law

In the app, tick off every wire, match the parts to your inventory and pick up where you left off.

Get it on Google Play