Instructables

Interactive, Open Source Mood Light

Featured
Picture of Interactive, Open Source Mood Light
This instructable will go through how to make an interactive, multi-function mood light. The core of this project is the BlinkM I2C RGB LED. As I was browsing the web one day, the BlinkM caught my attention, and I just thought that was way too cool to pass of. So, a couple of months later, I decided I'd make some sort of mood light using it. And here it is!

 
Remove these adsRemove these ads by Signing Up

Step 1: What you'll need

This project can be pretty inexpensive if you use the right stuff. I will note alternate parts that can be used to make it less expensive to make. I just used some components that are a little more expensive, due to the face that it makes the construction process a little easier.

  • The light source:

BlinkM RGB I2C-Controlled LED

  • The controller:

Arduino microcontroller - I used an ' Arduino Nano ' because I needed something that was really small, due to the amount of space available inside of the 'touch light' used to house everything

  • Housing:

I considered many different enclosures for this mood light, and I finally settled on something we're all familiar with: those cheap-o, white, ' touch dome lights '. I found a two-pack at home depot for only about $4. The amount of space in these lights is more than enough to fit all the components, if you do it right.

  • Power/Connectors:

At the beginning, I thought it would be cool to run this off of battery power (because the housing already has, conveniently, a battery compartment), but it's not that practical if you're going to be running it long periods of time. Instead, I used a 5.5mm DC power jack from radioshack with a 12V 150Ma transformer I had lying around. The regulator on board the arduino brings down the 12 volts, and 150Ma was plenty current to power everything. For wire, I just used whatever I had around. Be sure to use solid core wire, though.

  • Components:

The components are used to make the three sensors for the mood light: the sound sensor, the 'tap' sensor, and the light sensor. For the sound sensor, you'll need:

- LM741 Op-Amp
- Electret Microhone (3-lead)
- 2.2k resistor
- 100k resisor
- 200k resistor
- 0.47uf electrolytic capacitor
- 0.047uf ceramic capacitor
- 2x 10k resistors
- Diode

For the 'tap' sensor, you will only need:

- Piezo element (you can salvage this from certain electronic toys, telephones, and many other electronic devices that beep, or you can get it from mouser, radioshack, etc.).
- 1M resistor

...And for the light sensor you'll need:

- CdS cell (LDR), preferably a very large one (more resolution).
- 10K resistor
- 3-pin header & crimped connector wires (optional)

  • Other

I used a breadboard because I didn't really want to solder a lot. I also used a lot of crimped connector wires to make all the connections more secure, but those are optional.

Alternatively, you could use a homebrew development board to support the ATmega168 micro, and use a DIP-style ATmega168 (the long one with the larger leads). I'm not sure how well that would fit but it is certainly worth a try. If you don't own/have the money for a breadboard, you can solder down a regular ATmega168 to a PCB and add the regulator, programming connections, etc.
shooby5 years ago
COoOOL DO you have a total cost estimate, I don't think I saw one.
RPisces (author)  shooby5 years ago
Well, if you already had some things such as the arduino (or just the microcontroller with voltage regulator, ICSP, indicator lights, etc) and the breadboard, it would cost you about $30. Generally speaking, if you had most of the common components needed to make this mood light, you could get away with spending less than $50 on the whole thing. But if you had none of the parts needed to make it (arduino/atmega168,most/ all bare components, the breadboard, blinkm, wall adapter) then you might end up spending up to $80. Does that help? I should probably add that in...
Earlack RPisces5 years ago
Do we really have to use this exact type of LED ? Would it be possible to adapt this to Luxeon LEDs ? Cause I have some laying around...
RPisces (author)  Earlack5 years ago
Yes. But it would probably make the code 5x as long, require 5x more work, and would be 5x as hard. Remember, the BlinkM isn't just an LED, it's an SMD microcontroller ATTACHED to an LED, and it already 'knows' all the fading sequences. Although, it WOULD be very easy to adapt the two functions I programmed myself using your luxeon LED's, because the only color being used is white.
Amazing! This looks like great! Very detailed instructions! 5 stars! The only thing I would like to see is a video of the end result. Other then that, Great Instructable! -Joe
RPisces (author)  joejoerowley5 years ago
Videos? Done.
Great! Looks really nice! I would love to build one and stick it next to a strobe light haha.