LED Mood Lamp Build-Up

Several months ago I stumbled across Toon Beerton's web site describing the construction of a "Mood Lamp" utlizing an RGB LED and a programmed PIC microcontroller. His project intriged me and I decided to build the lamp.

This page will deal with the assembly of Toon's LED Mood Lamp. Each step will be accompanied with a photo in order to allow the reader to fully understand how the lamp is constructed.

E-mail me here with comments and questions: burning_bus_man@yahoo.com

Parts list:
Tools:
                                            Down arrow
Tools

Schematic

Schematic

Step 1:

The first step is to get your RGB LED and mounting hardware organized. I found a heat sink from an old 486 CPU which turned out to be the perfect size to fit the bottom of the lamp. I used a couple of 3/4" 6-32 machine screws and nuts to fasten the LED to the heat sink. The nuts and screws I used are brass 'cause that's what I had handy at the time. The white washers in the picture are plastic washers which I placed under the heads of the machine screws so there wouldn't be any possibility of shorting the connections on the LED.                                    
                                                        Down arrow
RGB LED & Hardware

Step 2:

Now we mount the LED onto the heat sink. I centered the LED on the heat sink and marked where I wanted to drill the mounting holes with a pencil. The aluminum heat sink is actually quite soft and is easy to drill through. Once the heat sink is drilled, mount your LED onto the heat sink (or whatever you're using), utilizing the machine screws and plastic washers. Note how the plastic washers keep the machine screws from bridging the connections on the LED.
                                                        Down arrow
LED Mounted on Heatsink


Step 3:

Time to solder some wires to the LED. I used some 22 gauge solid wire I had left over from other projects. Be very careful not to over-heat the LED.
                                                      Down arrow     
Connections made to the LED


Step 4:

After soldering wires to the LED I glued the heat sink to the bottom inside of the lamp. I used Elmers "Ultimate Glue", which seems to work better than epoxy. Unfortunately, I didn't pay attention and some of the glue ran down the inside of the lamp. My bad...
                                              
Down arrow
LED glued into lamp


Step 5:

Now comes the fun (hard?) part - assembling the circuit board. I laid out most of the components required. I ended up substituting a couple of resistors, and the PIC I.C. and DIP switches are missing, but basically what's in the picture is what's needed. I tried to make a layout of the components on the circuit board using Word first, but I wasn't too successful. Ultimately, I ended up arranging things on the circuit board until things made sense. Not the most efficient may to do things...
                                               
Down arrow
Mood lamp components


Oops! I was going to use the 2n3904 transistors pictured above until I realized that they can only handle a maximum of 200mA. Instead, I dug out some old metal canned 2n2222 transistors out of my junk box. They can carry up to 800mA.
                                               
Down arrow
2n2222


Assembling the circuit board is not rocket science, but some sort of planned layout and a steady hand (for soldering) is required. My component layout is rather inefficient, if I build another lamp I will look into utilizing some sort of PC board software to help design a better layout. I wanted room for a 5 volt regulator circuit, as it is difficult to find a 5 volt wall wart power supply. Below is a picture of the circuit board partially assembled with most of the components components except for the PIC chip. Note the extra 2 watt resistor - I couldn't find a 4.7 ohm, 2 watt resistor so I put two 10 ohm resistors in parallel to get the desired resistance.
                                            
Down arrow
Completed board


Step 6:

Time to program the PIC. This is new territory for me. I'm using a serial port programmer from Spark Fun Electronics, and I'll be using IC-Prog for the programming software. Here's a shot of the programmer.
                                             
Down arrow
PIC Programmer


Wow! Programming the PIC is easy with IC-Prog. Note - Just make sure you chose the correct PIC when setting the program up. I initially chose the 16f628 PIC. The PIC did not work in the circuit after I programmed it. After an hour of head scratching I realized that my chip was a 16f628A. I reconfigured the programmer application for the proper chip number and reflashed the chip. The PIC worked properly after that. Download source code here.

                                                Down arrow
Programming


Step 7:

Test it. I rigged up a real sloppy power supply and test circuit to confirm the circuit board would work. Of course it didn't initially. I had (1) - The PIC chip programmed incorrectly, and (2) - A cold solder joint on the gound for the emitter used for the red LED driver. After I corrected those issues everything worked fine.
                                              
Down arrow
Test the circuit


The completed circuit board. If I was to build another one, I would reduce the size of the two-watt current limiting resistors. They don't get very warm during operation. I'd also eliminate the dip switch, as I just like having the lamp go through it's random color fades. Note - I rounded the corners of the board in order to have it fit nicely into the base of the lamp.
                                              
Down arrow
Completed circuit board - Top


The back of the completed circuit board. I install a 0.1uf capacitor across the incoming power on the PIC to ensure there would be no problems with oscillation or noise coming from the power supply. I need to get a nice low-wattage, fine tip soldering iron. It was difficult not to cause solder bridges with the soldering iron I used.
                                            
Down arrow
Completed circuit board - Back



Step 8:

Mount the circuit board in the base of the lamp. I used a hot glue gun to fasten the board to the lamp. Then hook up a 5 volt power supply and enjoy the light show! I had so much fun with this project, that my next project is going to be "A Jar of Fireflies".
                                               
Down arrow
Circuit board mounted in the lamp


See my Mood Lamp in operation here!



This site is hosted for FREE by Freewebs.com. Click here to get your own Free Website!          


AddMe - Search Engine Optimization