Thursday, December 3, 2026

LED and Resistor: How to Choose a Series Resistor

LED with a resistor

An LED is a simple component, but it needs the right current to work reliably. Connect it directly to a voltage source without limiting the current, and too much current may flow through it. This can damage the LED or the output pin driving it.

A series resistor limits the current in the circuit. To estimate its value, subtract the LED’s forward voltage from the supply voltage, then divide the result by the desired LED current:

R = (Supply voltage − LED forward voltage) ÷ LED current

For example, suppose you have a 5 V supply, a red LED with an approximate forward voltage of 2 V, and you want about 10 mA of current:

R = (5 V − 2 V) ÷ 0.01 A = 300 Ω

A 330 Ω resistor is a common nearby value. With these example values, it gives roughly 9 mA of current.

The exact result depends on the LED’s forward voltage, the resistor’s tolerance, and the actual supply voltage. Check the LED datasheet and the output limits of your microcontroller or board. Also make sure the resistor’s power rating is suitable for the circuit.

Never connect an LED directly to a GPIO pin without a current-limiting resistor.

No comments:

Post a Comment