Connecting an LED looks simple: two wires, apply voltage, light appears. Until it does not work, or it burns out immediately.

An LED does not limit its own current. Use a series resistor and check the exact LED and supply data before connecting it.

Calculate the series resistor

Read the forward voltage (Vf) and allowed current in the datasheet. Then calculate the resistance with R = (Vsupply - Vf) / I.

Example: with a 5 V supply, 2 V forward voltage and 10 mA, R = (5 - 2) / 0.01 = 300 Ω. A higher standard value of 330 Ω is then suitable. Recalculate when the LED, current or supply changes.

For a simple indicator LED, 5 to 10 mA is often sufficient. One example of a 330 Ω resistor is the CRCW0805330RFKEA.

Check polarity and pinout

An LED conducts in one direction. On many through-hole LEDs the anode is the long leg and the cathode the short leg; a flat side can mark the cathode. This is not universal identification proof: always check the datasheet or product marking. SMD LED markings vary by manufacturer.

Examples include the HLMP-EG24-PS000 and the HLMP-1503. Always check the current datasheet and product specifications before use.

Breadboard with coloured LEDs, current-limiting resistors and a 5 volt supply

Connect an LED safely: check these points first

  1. Check the anode, cathode and pinout of the exact LED.
  2. Read its forward voltage and allowed current in the datasheet.
  3. Calculate the series resistor with R = (Vsupply - Vf) / I.
  4. Check the electrical limits of the exact board and microcontroller.
  5. For multiple LEDs or higher current, use a suitable transistor, MOSFET or driver.
  6. No light? Check polarity, common ground, split breadboard rails, wiring and supply voltage.

GPIO pins are not a power supply

Arduino, ESP32 and Raspberry Pi pins have platform-specific electrical limits. Do not use a generic current value as a design rule: check the documentation for the exact board and microcontroller. Always use a series resistor. For multiple LEDs or higher current, use a suitable transistor, MOSFET or driver.

LED strips are a different story

A single LED and an LED strip are not interchangeable. Size the power supply, wiring and controller for the voltage, power per length, total length and manufacturer data. For longer strips, also check voltage drop and the required power-injection points.

Common mistakes

Common causes are reversed polarity, no series resistor, incorrect datasheet values, excessive GPIO load, missing common ground, a split breadboard rail or wiring that does not match the diagram.

When in doubt, start with a higher resistance value. Less bright is better than broken.

Next: view standard LEDs or search for LEDs.