

A Light Emitting Diode (LED) is a semiconductor device that emits light when an electric current passes through it. LEDs are energy-efficient, have a long lifespan, and are widely used in various applications. They are available in different colors, sizes, and brightness levels, making them versatile for numerous use cases.








Below are the general technical specifications for a standard 5mm LED. Note that specifications may vary depending on the type and manufacturer.
An LED typically has two pins: the anode (positive) and the cathode (negative). The cathode is usually shorter and may have a flat edge on the LED casing.
| Pin Name | Description | Identification Method |
|---|---|---|
| Anode | Positive terminal; connects to | Longer pin or no flat edge |
| the positive side of the power | ||
| supply. | ||
| Cathode | Negative terminal; connects to | Shorter pin or flat edge on |
| ground (GND). | the LED casing. |
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} ]
Example: For a 5V supply and a red LED ((V_f = 2V), (I_f = 20mA)): [ R = \frac{5V - 2V}{0.02A} = 150\Omega ]
Connect the LED:
Test the Circuit: Power the circuit and observe the LED emitting light. If it does not light up, check the polarity and connections.
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.
// Ensure a 220Ω resistor is used to limit current through the LED.
void setup() {
pinMode(13, OUTPUT); // Set pin 13 as an output pin
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(13, 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?
A: No, always use a current-limiting resistor to prevent damage to the LED.
Q: How do I choose the right resistor for my LED?
A: Use the formula (R = \frac{V_{supply} - V_f}{I_f}) to calculate the resistor value.
Q: Can I use an LED with an AC power source?
A: LEDs are designed for DC operation. Use a rectifier circuit to convert AC to DC before connecting the LED.
Q: Why does my LED only light up in one direction?
A: LEDs are diodes and only conduct current in one direction. Reverse the polarity if it does not light up.
This concludes the documentation for the LED component.