You can change the colour by pushing a button and it changes the colours in a cycle.
This is an very easy step by step instruction including the source code of the PICAXE controller I used in this instruct able.
Step 1: The Parts
- A bulb (what ever you find in your home)
- Wired SMD LED´s (I used 2xblue, 3xred and 4xgreen)
- A PICAXE 08M Prototype kit
- An ULN 2803 Driver circuit
- A switch (on/off)
- 1 10 KOhm Resistor (as a pull down for the push button, see picture 3 below)
- 9 220 Ohm Resistors for the LED´s
- A small piece of a glass tube
- Two component clay
- A small wooden box of your choice
- The PCB
- The socket for the programming cable
- The programming cable
- The chip
- 2 resistors
- 1 capacitor
- 1 Batteries clip
- 1 Batteries holder
- A CD with the programming software
I used three pind for controlling the LED´s and one pin for the push button.
The ULN 2803 is a driver cghip with 8 Darlington drivers. Ideal to drive the LED´s,
There is no need to hassle around with Transistors to build driver circuits.
Step 2: Preparing the Bulb
Use a Dremel to cut of the end cap.
Carefully remove the inner parts of the bulb.
If you are doing right you will have a bulb that looks like the bulb in the second picture.
Step 3: Preparing the LEDs
Pull the wires trough the glass tube and carefully pull the wires inside. If you push them back later on they will unfold again
and it will be easier to put them inside the bulb.
Use the two component clay to close the bulb and to fasten the glass tube.
Step 4: Mounting It Together
Stain or paint the box.
Then attach the PCB inside the box and cable everything together.
The driver circuit fits on the PCB if you remove three legs of it and connect the ground connector with a short wire.
See picture below.
Attach the batteries and switch the power on. Do not have the PICAXE chip in place yet!
Connect a wire to + connector of the batteries and tip to input pins of the driver circuit. The LEDs will lit.
If the driver circuit works fine, switch the power off, insert the chip and start programming.