An LED is a small light that runs from low-voltage DC, such as the 3.3V or 5V on an Arduino, ESP32 or Raspberry Pi, with a resistor in series to set the current. These are standard 5mm round-top through-hole LEDs with diffused lenses tinted in their own colour, in yellow and blue. The tinted lens shows its colour even when the LED is off, so they are easy to pick out of a parts tray, and the light spreads through the lens for an even glow that reads well from the side. For a clear lens and a brighter, focused point of light, see the 5mm water-clear LEDs in red, green and white.
Use them as status and warning lights, front-panel indicators, or for your first blink sketch. The leads are 2.54mm apart, so they push straight into a breadboard or a standard 0.1 inch PCB, and a 5mm hole holds them in a panel. Yellow runs happily from 3.3V or 5V. Blue needs about 3V itself, so on a 3.3V pin it works with a small resistor but is brightest and most even from 5V. They are sold individually with a minimum of 10 per colour, and you will need one resistor per LED, which is not included.
Specifications
By colour (typical at 20mA)
Datasheets
Wiring & getting started
- Find the long lead
The long lead is the anode (+). The short lead and the flat edge on the rim are the cathode (-). Check this before you trim the leads, because after trimming the flat edge is the only guide.
- Pick the resistor
For about 5 to 10mA: on 5V use 330 ohm for yellow and 220 ohm for blue. On 3.3V use 150 ohm for yellow and 47 ohm for blue. The 600-piece metal film resistor kit has all four values.
- Wire it in series
With the power off, connect the supply or board pin to the resistor, the resistor to the long lead, and the short lead to GND. The resistor can go on either side of the LED as long as everything is in one line. Give every LED its own resistor.
- Switch on and check
The LED lights steadily in its colour. If it stays dark, switch off and turn it round so the long lead faces the positive side.
- Blink it from an Arduino (optional)
Wire the resistor to pin 13 instead of the supply, then open File > Examples > 01.Basics > Blink in the Arduino IDE and upload it to an Uno or Nano. The LED turns on for one second and off for one second, over and over.
