LED Mood light

Schematic and Build

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.