

A Light Emitting Diode (LED) is a semiconductor device that emits light when an electric current passes through it. LEDs are energy-efficient and have a long lifespan, making them popular for various lighting applications. They are widely used in indicators, displays, backlighting, and general-purpose lighting. LEDs are available in various colors, sizes, and shapes, making them versatile for numerous applications.
Common applications of LEDs include:








Below are the general technical specifications for a standard 5mm LED. Note that specifications may vary depending on the type and manufacturer.
| Parameter | Value |
|---|---|
| Forward Voltage (Vf) | 1.8V - 3.3V (varies by color) |
| Forward Current (If) | 10mA - 20mA |
| Reverse Voltage (Vr) | 5V (maximum) |
| Power Dissipation | 60mW (typical) |
| Viewing Angle | 20° - 60° |
| Wavelength (for color) | 400nm - 700nm (varies by type) |
| Lifespan | 50,000+ hours |
An LED typically has two pins:
| Pin Name | Description |
|---|---|
| Anode (+) | The longer pin, connected to the positive terminal of the power supply. |
| Cathode (-) | The shorter pin, connected to the negative terminal or ground. |
Note: The longer pin (anode) is the positive terminal, and the shorter pin (cathode) is the negative terminal. If the pins are trimmed, the flat edge on the LED casing indicates the cathode.
Determine the Resistor Value: LEDs require a current-limiting resistor to prevent damage. Use Ohm's Law to calculate the resistor value: [ R = \frac{V_{supply} - V_f}{I_f} ] Where:
Connect the LED:
Power the Circuit: Apply the appropriate voltage to the circuit. The LED should light up.
Below is an example of how to connect and control an LED using an Arduino UNO.
// LED Blink Example
// This code blinks an LED connected to pin 13 of the Arduino UNO.
const int ledPin = 13; // Define the pin number for the LED
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
LED Does Not Light Up:
LED is Dim:
LED Burns Out:
Flickering LED:
Q: Can I connect an LED directly to a battery without a resistor?
A: No, connecting an LED directly to a battery can cause excessive current to flow, damaging the LED. Always use a current-limiting resistor.
Q: How do I choose the correct resistor for my LED?
A: Use the formula (R = \frac{V_{supply} - V_f}{I_f}) to calculate the resistor value. For example, if (V_{supply} = 5V), (V_f = 2V), and (I_f = 20mA), the resistor value is (R = \frac{5 - 2}{0.02} = 150\Omega).
Q: Can I use an LED without knowing its forward voltage?
A: It is recommended to check the LED's datasheet for accurate specifications. If unavailable, assume a typical forward voltage of 2V for red LEDs and 3V for blue/white LEDs.
Q: Why does my LED glow faintly even when off?
A: This may be due to leakage current or a floating pin in the circuit. Ensure proper grounding and use a pull-down resistor if necessary.