Teddy Nightlight Multicolor

by fraz75 in Circuits > Microcontrollers

2997 Views, 4 Favorites, 0 Comments

Teddy Nightlight Multicolor

221_01.jpg
A nice night light multicolor, ideal for baby's room.

221_02.jpg
For the realization I used:
- Out of a pack of bubble bath for children in the shape of teddy bear
- a nightlight with positive economic pressure
- Complete circuit with a PIC16F84A (I was at home, but you can use any programmable microcontroller)
- LED multicolor

221_03.jpg
221_04.jpg
221_05.jpg
I started preparing the teddy bear, all the markings on the package, such as the make and range indications, I canceled with the nail polish remover.
Then I drilled the base so that it gets wedged perfectly on the spherical part of the nightlight I drilled (enlarged the hole) also the upper part so as to pass light well.

Then I switched to accommodate nightlight, I removed the original LED and resistor, and I drilled the top of the ball so as to pass the led.

221_06.jpg
221_08.jpg
At this point I have made the circuit of the pic, it is a very basic.
The multicolor LED has 4 feet, the longest (in the type of LED I) is the common cathode, the anode is the other three for red, blue and green (RGB).

The legs were connected respectively to ports RB0 (green), RB1 (red), RB2 (blue) of the pic.

The program does is turn an LED and using the pwm is going to fade the next color:
G -> R
R -> B
B -> G

the duty cycle is of 20000 microseconds, as the duty cycle decreases to a color for the other increases, and so on ...

I mounted the whole, the switch for the circuit I have used one of the lamp, and the teddy bear has been glued with hot glue on the upper part of the lamp.

221_09.jpg
221_11.jpg
221_14.jpg
221_15.jpg