Task 16: RGB LED (Bonus Task)
An RGB LED (Red-Green-Blue Light Emitting Diode) is a special type of LED that contains three separate LEDs in one package: one red, one green, and one blue. By controlling the intensity of each color, you can create millions of different colors.
RGB LEDs can be either common anode or common cathode. In a common cathode RGB LED, all three color LEDs share a common cathode (negative terminal), and each color has its own anode (positive terminal). In a common anode RGB LED, all three colors share a common anode (positive terminal), and each color has its own cathode (negative terminal).
Identifying the LED type: In a common anode RGB LED, the common anode (positive) is usually the longest pin, but this should be verified. In a common cathode RGB LED, the rule does not always hold true. Always check the datasheet or use a multimeter to identify the pin configuration.
Task: Connect an RGB LED to your breadboard. Use appropriate current-limiting resistors for each color channel. Experiment with different combinations of colors by connecting different color channels to power. Try to create different colors by mixing red, green, and blue in various combinations.
Note: If you are using a 9V battery, it is recommended to start with a resistor value above 400Ω.
Additional Resources: