Summary of LED Mood light
This project creates an RGB LED mood light using an ATMega8 microcontroller to display eight colors. A potentiometer controls color mixing by adjusting the PWM output on PB0, PB1, and PB2 pins. The circuit uses three 150-ohm current-limiting resistors for red, green, and blue LEDs connected to a common cathode. A tea light cover diffuses the mixed light for a smooth effect.
Parts used in the RGB LED Mood Light:
- ATMega8 microcontroller
- RGB LED (common cathode)
- Potentiometer
- Three 150 Ohm resistors
- Breadboard
- Tea light cover
In this projects 8 different colors are displayed with the use of a RGB LED. The microcontroller that is used is the ATMega8.
An RGB LED is a LED which has three LED’s integrated in one packaging. These LED’s have the colors red, green, and blue. Such a LED costs about 1 Euro. With these three colours you can mix to any colour. When using 8-bit PWM a number of 255 * 255 * 255 (= 16581375) combinations can be made, thus the LED can show +/- 16.777 million colours, and 256 different brightnesses. When all the three LED’s are at full brightness the color will be white. When they are all off the color will be ‘black’ in the dark . In this projects 8 different colors are displayed, the colors are controlled by a potmeter. The microcontroller that is used is the ATMega8. See in the below table what colors can be displayed.
The RGB LED used here has four leads, one for each color and one for the common cathode(ground). The Red LED operates on a voltage of 1.8 V, Green needs 3.8 V, and the Blue LED needs also 3.8 V. Each LED draws 20mA current, so the maximum current consumption is 60mA.
The circuit is very simple.The RGB LED is hooked up to the outputs on PB0, PB1 and PB2 of the ATMega8 microcontroller.
Resistors R1, R2, and R3 act as current-limiting resistors for red, blue, and green LEDs, respectively, and are 150 Ohms each to limit the current to 20mA.
The RGB LED and the resistors are placed on a breadboard and connected to the ATMega328 board.
A tea light cover can be used for proper mixing and diffusing of the three colors.
for more detail: LED Mood light
- How many colors can this project display?
The project displays 8 different colors. - What component controls the color selection?
A potmeter controls the colors. - Which microcontroller is used in this project?
The ATMega8 microcontroller is used. - How many leads does the RGB LED have?
The RGB LED has four leads. - What is the function of the tea light cover?
It is used for proper mixing and diffusing of the three colors. - What voltage does the Red LED operate on?
The Red LED operates on a voltage of 1.8 V. - How are the resistors sized in this circuit?
The resistors are 150 Ohms each. - Can the LED show white color?
Yes, when all three LEDs are at full brightness the color will be white.


