This project began when I was surfing the web looking for any cool electronic projects. I found the mood lamp made by Toon Beerten "http://tobe.nimio.info/led_mood_lamp.php". I was really impressed by the 3 watt RGB LED. I bought some of those on ebay and made some tests with an AVR with PWM to control each color intensity. At this point I found those LEDs very interesting and powerful, so then I needed a project.
One week later a crazy idea came to my mind. I would light my entire kitchen with LEDs so I will be able to light it with up to 16 million colors. With software I would also be able automatically make the light change colors randomly but with smooth fading effects. As you know with programming you can make any pattern, with only your imagination as the limit. I made a controller with a LCD, keypad, and 4 slide pots, 3 for manual led color intensity, and the other to control the speed of the color patterns changing. This master module communicates in RS485 to all slave devices, each of which drives 2 LEDs. Each of the slaves has their own address so the master control can address the LEDs individually.
I also made group of LEDs. If you want you can specify different patterns to each group. The communication protocol I used is the standard for the lighting control industry, DMX512. It's a very old and simple protocol. Each slave module is given an 8-bit address (the protocol actually supports up to 512 devices), and each 8-bit byte in the 512-byte data packet is the lighting data for the corresponding module. The start bit is done by a framing error.
Finally I had another idea. With 3 colors I can make a music color organ!!! I worked hard on this because I wanted a color organ that would be independent of the sound level and the sound quality. It must work with Elvis to Pink Floyd or to any others. I built an AGC that outputs the same level from 1mV to 10V. Next, 3 filters give you the low, middle and high frequency bands. The last stage is a rectifier that gives a DC voltage level equal to the level of the frequency. This DC is connected to the A/D of the MCU and all of the comparator triggering is done by the software, that like I said, makes any type of song work perfectly. One very important thing is the powering of all the slaves with their 3W LEDs. Each color sinks 350ma, so you must calculate 1 amp per LED. I have 16 of those so it uses 16 amps!!! At 5V, I had to use a PC power supply that can handle up to 25 amps. At this point the rest is not too difficult, but you must think about the resistance of your conductor. At 16 amps it's very easy to lose 1 volt. I used #8 wire, which is the minimum you can use.
- 1024 3W RGB LEDs can be controlled
- Over 16 million colors can be generated
- Very powerful, can be used as your primary lighting
- Many patterns are pre-programmed
- Can be connected to any audio RCA jack and the system will became a Music color organ!!! (It's crazy)
- Firmware upgradeable via RS232
42 Comments to “Mood Light”
All my source codes were taken from my personal projects.
Everything is for your information only. The C/C++ codes have been written
with ICCAVR. You can find the header and source CRT files by downloading their compiler.
All is for your information and everything is AS IS without any warranty of any kind. No other files are available and I don't make any modification for any body.
- All projects
- Electric Train
- General Posting
- Lastes News
- Work Bench Tools