A Two Color LED is a light-emitting diode capable of emitting two distinct colors of light. This is typically achieved by incorporating two separate LED chips within a single package or by altering the polarity of the current flowing through the LED. These LEDs are widely used in applications where status indication or multi-state signaling is required, such as in electronic devices, control panels, and DIY projects.
Pin Number | Name | Description |
---|---|---|
1 | Anode/Cathode | Acts as the positive terminal for one color and the negative terminal for the other color. |
2 | Cathode/Anode | Acts as the negative terminal for one color and the positive terminal for the other color. |
Pin Number | Name | Description |
---|---|---|
1 | Anode 1 | Positive terminal for the first LED chip (e.g., red). |
2 | Common Cathode/Anode | Shared negative or positive terminal for both LED chips. |
3 | Anode 2 | Positive terminal for the second LED chip (e.g., green). |
// Example code to control a 2-pin Two Color LED with an Arduino UNO
// Connect one pin of the LED to pin 9 and the other to pin 10 via 220Ω resistors.
const int ledPin1 = 9; // Pin connected to one side of the LED
const int ledPin2 = 10; // Pin connected to the other side of the LED
void setup() {
pinMode(ledPin1, OUTPUT); // Set pin 9 as an output
pinMode(ledPin2, OUTPUT); // Set pin 10 as an output
}
void loop() {
digitalWrite(ledPin1, HIGH); // Turn on the first color
digitalWrite(ledPin2, LOW); // Ensure the second color is off
delay(1000); // Wait for 1 second
digitalWrite(ledPin1, LOW); // Turn off the first color
digitalWrite(ledPin2, HIGH); // Turn on the second color
delay(1000); // Wait for 1 second
}
LED Does Not Light Up:
LED Flickers or is Dim:
One Color Does Not Work:
LED Overheats:
Q: Can I use a Two Color LED without a resistor?
A: No, a current-limiting resistor is essential to prevent excessive current, which can damage the LED.
Q: How do I identify the common pin on a 3-pin Two Color LED?
A: Use a multimeter in diode mode to test the connections. The common pin will show continuity with both anodes (or cathodes) depending on the LED type.
Q: Can I control a Two Color LED with PWM?
A: Yes, you can use PWM (Pulse Width Modulation) to control the brightness of each color independently, especially with a 3-pin LED.
Q: What happens if I reverse the polarity of a 2-pin Two Color LED?
A: The LED will emit the second color, as the current flows through the other LED chip.