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. BlinkM RGB I2C-Controlled LED
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
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.
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
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
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)
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.