Some final testing of the mood light controller circuit board before installing it in the box.
Some final testing of the mood light controller circuit board before installing it in the box.

This simple mood light controller has three PWM controlled channels; red, green and blue. Each capable of delivering 100 mA, or about five LEDs. This can easily be improved by using a more powerful transistor. I’ve used 3x3 LEDs soldered to a tiny circuit board as the light source, and placed them inside a frosted glass. A better solution would be to use a powerful RBG LED. Just remember to use another transistor if you want to use bigger LEDs.

Table of content

Operation

Settings

The settings can be changed with four DIL-switches:

  1. Delay between color changes (long / short)
  2. Fade speed when changing color (fast / slow)
  3. Fade when changing color (on / off)
  4. Color mode (one color / all colors)

I/O

Inputs

  1. PD.0 DIP-Switch 1
  2. PD.1 DIP-Switch 2
  3. PD.2 DIP-Switch 3
  4. PD.3 DIP-Switch 4

Outputs

  1. PB.1 (OC1A) Red LED
  2. PB.2 (OC1B) Green LED
  3. PB.3 (OC2) Blue LED

Connector for LEDs

  1. 5V
  2. Red (0V)
  3. Green (0V)
  4. Blue (0V)

Please leave a comment or tweet if you have any questions or feedback on this project.

Videos

Schematic drawing

Schematic drawing for the mood-light module; with AVR ATmega8. RGB LEDs not included.
Schematic drawing for the mood-light module; with AVR ATmega8. RGB LEDs not included.

Source code

AVR-Mood-light-1

Simple mood lamp controller with three PWM channels, written with BASCOM-AVR. Last pushed 2 days ago.

Master Releases


0 0 0 v1.0 Visual Basic

Image gallery

Parts list

Project: Mood light (RBG) with 100 mA outputs by Thomas Jensen is licensed under CC BY-SA 4.0 with attribution required.

Similar projects


  •   Created Jan 15, 2007
  •   Last modified 2 weeks ago

Comments