Bench NotesUno handbook

Choosing a Current-Limiting Resistor

Calculate the resistor an LED or display segment needs, with a calculator and worked examples.

BeginnerResistorLEDSeven-segment

Overview

An LED does not limit its own current. Above its forward voltage, a tiny increase in voltage causes a huge increase in current, so it needs a series resistor to set the current instead.

The formula

R = (Vsupply − Vf) ÷ I

Vf is the LED's forward voltage and I is the current you want. Round up to the next standard value.

LED colourTypical VfAt 5 V, 10 mA
Red1.8–2.2 V300 Ω → use 330 Ω
Yellow / orange2.0–2.2 V300 Ω → use 330 Ω
Green (modern)2.8–3.2 V220 Ω
Blue / white2.9–3.3 V200 Ω → use 220 Ω

Calculator

Seven-segment displays

Each segment is its own LED and needs its own resistor. One resistor on the common pin would share the current between however many segments are lit, so an "8" would be much dimmer than a "1".

When no resistor is needed

Only when the part already contains one: many LED modules, LED "sequins" and the Uno's own L LED include a resistor. If you are not sure, assume it does not.

Diagram

Series resistorArduino Uno Output pin (5 V) to LED anode through R; Arduino Uno GND to LED cathode.Connections (each line is one wire)Arduino UnoLEDOutput pin (5 V)anodeRGNDcathode
The resistor can go on either side of the LED; the current is the same.