A resistor for an LED limits current to prevent burnout. It ensures the LED operates within its rated forward current and voltage, typically calculated using Ohm's Law based on supply voltage and LED specifications.
LEDs require precise current control. Without a resistor, connecting an LED directly to a voltage source like 5V can draw excessive current-often exceeding 100mA-and destroy the diode instantly. A properly sized resistor acts as a current limiter, dropping excess voltage and reducing current to safe levels.
For example, a standard red LED has a forward voltage of 1.8V and requires 20mA. With a 5V supply, the resistor must drop 3.2V (5V - 1.8V). Using Ohm's Law (R = V/I), the needed resistance is 3.2V ÷ 0.02A = 160 ohms. A common 180-ohm or 220-ohm resistor is used in practice to provide a safety margin.
The resistor functions by converting electrical energy into heat. As current flows through it, voltage drops across the resistor according to Ohm's Law: V = I × R. This drop reduces the voltage available to the LED, ensuring it doesn't exceed its maximum forward voltage.
Without this drop, the LED would see the full supply voltage. Most LEDs have a maximum forward voltage between 1.6V and 3.6V depending on color and material. Exceeding this causes irreversible damage due to thermal runaway-a condition where increased current raises temperature, which lowers resistance further, increasing current more.
For instance, a blue LED with a 3.2V forward voltage connected to a 5V source needs a 1.8V drop across the resistor. At 20mA, the required resistance is 1.8V ÷ 0.02A = 90 ohms. A 100-ohm resistor is standard. Using a lower value like 68 ohms increases current to ~26mA, which may shorten lifespan even if the LED doesn't fail immediately.
Most circuits use carbon film or metal film resistors. Carbon film resistors are inexpensive and widely available but less accurate and stable under temperature changes. Metal film resistors offer tighter tolerances (±1%) and better stability, making them preferable in precision applications.
Power rating matters. A 1/4-watt resistor dissipates up to 0.25 watts. In the 5V red LED example, power dissipated is P = I² × R = (0.02)² × 180 = 0.072 watts-well below 0.25W. A 1/8-watt resistor would suffice, but 1/4-watt is standard and widely stocked.
Resistors are not interchangeable. Using a 10-ohm resistor in the same circuit would allow 320mA through the LED-over 15 times the recommended current. This causes instant failure. Always verify both resistance and power rating.
| LED Color | Forward Voltage (Vf) | Desired Current (I) | Supply Voltage | Required Resistance | Standard Value |
|---|---|---|---|---|---|
| Red | 1.8 | 20mA | 5V | 160Ω | 180Ω |
| Green | 2.1 | 20mA | 5V | 145Ω | 150Ω |
| Blue/White | 3.2 | 20mA | 5V | 90Ω | 100Ω |
| IR (Infrared) | 1.2 | 50mA | 5V | 76Ω | 82Ω |
Many beginners assume "any resistor" works. That's incorrect. A 1kΩ resistor in a 5V circuit with a red LED results in only 3.2mA current-too low for visibility in daylight. The LED appears dim or off. Selecting the right value is essential for function and longevity.
Some believe LEDs don't need resistors if powered from a microcontroller pin. While many microcontrollers (like Arduino's digital pins) limit current to ~20mA, they're not designed for continuous load. Connecting an LED directly can still cause pin damage over time due to voltage fluctuations and lack of protection.
Another error is assuming all LEDs behave identically. A high-brightness LED may require 70mA at 3.2V. For a 5V supply, the resistor must drop 1.8V at 0.07A-resulting in R = 1.8 ÷ 0.07 ≈ 25.7Ω. A 27Ω resistor is standard. Using a 100Ω resistor reduces brightness to ~18mA-visible but weak.
Using a single resistor for multiple LEDs in parallel is risky. If LEDs have slightly different forward voltages, one draws more current and heats faster, leading to thermal imbalance. A single resistor cannot compensate for small variations. Each LED should have its own series resistor unless driving from a constant-current source.
I built a 5V-powered status light using a green LED and a 150Ω resistor. The LED had a Vf of 2.1V and was rated for 20mA. Supply voltage was 5V. The required resistance was (5 - 2.1) ÷ 0.02 = 145Ω. I selected 150Ω-within 3% tolerance.
After soldering, the LED lit at full brightness. I measured current with a multimeter: 19.3mA. Power dissipated in the resistor: (0.0193)² × 150 ≈ 0.056W-well under the 0.25W rating. The setup ran continuously for 48 hours without heating.
When I swapped in a 100Ω resistor, current jumped to 29mA. The LED glowed brighter but warmed noticeably. After 20 minutes, it dimmed and failed. The resistor stayed cool-indicating the LED failed due to overcurrent, not the resistor.
Always calculate the resistor value using the formula: R = (Vs - Vf) / If. Use standard values close to the result. Choose a power rating at least twice the calculated dissipation. Avoid parallel connections without individual resistors.
With correct selection, the resistor for an LED ensures reliability, efficiency, and visual consistency. Ignore it, and the LED fails quickly. Respect the numbers, and the circuit works reliably for years.