Switching between Red, Green and Blue (or Blue1 or/and Blue2 for an RGBB type) using AVR microcontroller

Switching between Red, Green and Blue (or Blue1 or/and Blue2 for an RGBB type):
An RGB LED is a LED which has three (or four for an RGBB type) semi-conductor LED’s in one normal housing i.e. standard 5 mm. The Red LED is made of Gallium Arsenide Phosphide on Gallium Phosphide, the Green LED is made of Gallium Phosphide, the two Blue LED’s made of Gallium Nitride on Silicon Carbide (a lot of technology, that’s why the price isn’t that cheap, about $ 3.- a piece today) In the next examples a standard 5 mm RGBB LED will be used. RGBB was developed because when mixing the three colours to white you need more blue, blue must overrule more then the red and green. Or having a bright blue shine, instead of a single less blue brightness. Other brands have only three integrated LED’s, Red, Green and Blue. With the three colours you can mix to any colour. When using 8-bit PWM a number of 256 * 256 * 256 combinations can be made, thus can show 16.777 million colours, and 256 different brightnesses. For this RGBB LED even more colour accuracy is possible, 256 * 256 * 256 * 256 = 4.295 billion colours ! (In theory) When using i.e. 6-bit PWM, you ‘only’ have 64 * 64 * 64 = 262.144 thousand colours, with 64 brightnesses. For an RGB LED such great numbers are not nessasary, thus 6-bit PWM is more then enough (not for true color video boards) Later more about steering with PWM. Next a picture of a standard RGBB type:

This type of RGB LED has six pins, R, G, B1, B2 and two GND (ground) pins. Red operates on a voltage of 2 V, Green needs 2.2 V, and the Blue LED needs 4.5 V, the current consumption If = 20mA per LED, so all four LED’s on consumes 80 mA, need a 78L05 and three resistors. The resistors can easely be calculated with Ohm’s law. Becomes to Rred = 150 Ohm, Rgreen = 139 Ohm and Rblue = 22 Ohm. If using PWM it’s another story. Here three pictures of an operating RGBB LED (single blue on):
blue
For more detail: Switching between Red, Green and Blue (or Blue1 or/and Blue2 for an RGBB type) using AVR microcontroller


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top