Here is a nice, simple instructable for anyone just starting out with LEDs, soldering and electronics. It uses basic parts, with no mucking about with microcontrollers or timers (as fun as those are!) You can build one in an evening if you have all the parts ready to go.
But what is it? The LED Disco Light in a Jar is exactly what the name implies. Over a dozen RGB LEDs in a mason jar, frantically changing colour in a completely random pattern. It's a neat light effect for your next party, or you can use it to entertain a baby for quite a while!
See the last page for videos.
Step 1: Parts
1 mason jar, jam jar or anything with a suitably wide neck and a metal cap
1 4xAA battery holder, in a 2x2 configuration
1 9V battery snap (mates with the battery holder)
24 RGB fast or slow-change LEDs*
12 10 ohm resistors
some solid 22 gauge wire
perfboard or make your own printed circuit board**
some 25mm aluminum standoffs and matching screws
Glass Frosting Spray (optional)
- These LEDs have only two pins, and when power is applied they automatically cycle between red, green, blue, and combinations thereof. You can find them on eBay from various sellers in Hong Kong and elsewhere.
Step 2: Tools
Soldering iron and solder
Heat gun or carefully controlled lighter
"helping hands" clamp (optional, but makes things much easier!)
small needle-nose pliers
hot glue gun
something to cut perfboard or PC board
a sharp knife
PC board manufacturing kit (only if you're making a PC board)
Step 3: Make the LED Branches
Those 12 branches are then connected in parallel with each other, so that each branch receives about 6V (3V + 3V + a nominal amount across the resistor).
You may want to start by "frosting" each LED using a piece of 800-grit sandpaper to diffuse the light a bit.
I spaced the LEDs in each branch at a random distance, so that when they were place in the jar they would appear randomly placed. Try to make a wide range of branches, but also make sure they will fit inside the jar!
The assembly is relatively straightforward. Start with the resistor, twisting a bit of wire around one lead and soldering it down. This is where the "helping hands" clamp comes in handy; the pieces tend to move around! Then solder an LED to the other end of that wire. Solder another wire, then the second LED. Finally, solder on the last wire so that it reaches all the way back to the resistor.
To anyone who has played with LEDs this will seem obvious, but to beginners remember this: OBSERVE POLARITY! LEDs will only light if connected in the right direction, and while nothing will blow up if you hook them up backwards they certainly won't light and you'll be sad. The LEDs have a longer lead (positive) and a shorter lead(negative); when I made my Disco Light I made sure that the long lead was towards the resistor on every branch.
Step 4: Finish the Branches
Step 5: Test the Branches!
Step 6: Make the Circuit Board
Instructions if you are using a PC Board:
1. Cut out a piece of copper-clad board that will fit inside the neck of the jar.
2. Using an etch-resist pen (or in my case, a bottle of nail polish my wife didn't want anymore) draw two concentric circles around the outside edge of the PC board. Make sure there is enough room in the center to mount the battery holder!
3. Etch the board
4. Drill 1/32" holes in the tracks at regular intervals around the board, one pair of holes for each branch, and an additional set of holes for the battery/switch.
5. Drill three more holes approximately as shown, for mounting the standoffs and to pass a wire through the board.
Instructions if you are using perfboard:
1. Cut a piece of perfboard that will fit inside the neck of the jar.
2. Drill three holes in the board in approximately the same place as on the PC board.
Step 7: Build the Lid
Next cut a hole for the switch. I used a rectangular switch so I had to (very carefully) cut the hole for it using a sharp knife. If your switch is round, you can just drill a hole.
You may also mount the switch and attach the standoffs at this point. To prevent the switch from moving I glued it in with hot glue.
The standoffs attach the PC board to the lid, and provide spacing for the switch. The length of the standoffs was chosen to match the height of the switch. In this case, 25mm standoffs were chosen to give enough clearance for the switch, which extended about 22mm below the lid.
Step 8: Solder the Branches Onto the PC Board
If you're using perfboard, glue the branches in place first, then solder the "rails" in two circles around the board to connect the branches.
Once all the branches are soldered in, you can hot glue the battery holder in the middle. Make sure it doesn't cover any of the drilled holes.
Step 9: Wire Up the Switch
Pass the red one through the large hole drilled in the PC board and up to one terminal on the switch. Solder in on - it doesn't matter which terminal it gets soldered to. Grab a piece of wire and solder it to the other terminal on the switch. Pass it through the hole and solder it onto the positive rail of the PC board.
Load up some batteries, and switch it on! It should light up now.
Once you know that everything works, you can attach the lid to the PC board. Line up the standoffs and insert screws from the other side of the PC board. Everything should hold together tight.
Step 10: Final Assembly
If you like seeing the LEDs through the glass, then consider this project done. However, if you've prefer a bit of mystery, you can frost the glass using glass frosting spray or glass etching cream. I used Rustoleum glass frosting spray. Frosting the inside of the jar hides the mechanics of the Disco Light, and helps diffuse the light a bit.
Spraying the inside of the jar is messy. Protect the outside using masking tape, and spray a coat inside the jar every few minutes as per the directions on the can. You'll probably find that the frosting spray isn't drying very quickly - I used a heat gun to dry the frosting inside in no time. It will take a few coats to hide the innards. Using white wires and painting the battery holder white will further obscure the contents of the jar.
Step 11: Videos!
LEDs: eBay, seller was 'topbright88'
Other parts: Sayal electronics (an electronics components store in southern Ontario)
Small mason jar: Free from my mother in law (thanks!)