Look no farther, you have found it!
Now you can perform the nights away with your new USB-Powered teddy bear instrument. Yay!
Step 1: Go Get Stuff.
1 - Small white teddy bear (preferably with red bow)
1 - USB cable
1 - Bicycle safety flasher
1 - Small speaker
1 - PIC16F877 micro-processor
1 - 20MHZ ceramic resonator
1 - LM386 audio amplifier
1 - 40 pin socket
1 - 8 pin socket
1 - PCB (cut to size of teddy bear)
2 - 10K potentiometers (preferably with knob)
2 - red knobs (available at Home Depot)
2 - 0.1uF ceramic disk capacitors
1 - 0.022uF ceramic disk capacitor
1 - 330uF electrolytic capacitor
1 - 10uF electrolytic capacitor
1 - 0.1uF polyester film capacitor
2 - 220 ohm resistors
1 - 10K resistor
1 - 330 ohms resistor
1 - Spool red thread to match bear
1 - Role of electrical tape
1 - Red and black 22 AWG wire
- PIC programmer
- Exacto knife or razor blade
- Soldering iron
- Hot glue gun
- Sewing needle
- Wire cutter
- Needle nose pliers
- Drill (possibly)
- Small philips head screwdriver (possibly)
Step 2: Disassemble and Carefully Destroy the Flasher.
The first thing we're going to do is open up the flasher and remove the circuit board. This should be easy.
Next, we are going to deactivate the flasher.
The flashing feature is deactivated because I simply didn't want it to blink. If you want to keep yours blinking, remove the button and solder a wire to each terminal where the button used to be on the board (and then skip the rest of this step as well as the next).
If you want to keep yours from flashing, go get your drill. Determine where the chip is on the board. It probably will look like a black dot, which is really a protective coating to keep people from tampering with it (see secondary picture below). Locate the dot and then drill through it until it is gone. This hole should also be enough of a precaution to break all unnecessary wiring connections.
Step 3: Rewire the LED Flasher.
Step 4: Gut the Bear.
Once the back of the neck is open then you can pull out all of the stuffing from the bear's head and stomach. To aid in re-stuffing later, leave in the stuffing in the arms and feet.
There is something strangely rewarding about unstuffing the bear.
Step 5: Cut a Hole for the LEDs.
If there is not a seam, carefully slice down the belly far enough that the LEDS can poke out from the inside.
Step 6: Sew in the Lights.
As such, when you sew the board to the bear make sure that you sew it up, down, around, over and under. It does not matter how you sew it in so long as the LEDs poke out, the board is held in place and the stiching won't rip out.
Also, try not to get the wires running off the board caught in the stitching. It will save you many headaches later.
Step 7: Sew in the USB Cable.
Cut a small hole in the side of the bear and pass the cable through about 3" or 4". Once passed through, knot the cable inside the bear so that it can't pass through the hole. You can maybe add a drop of hot glue to this for better results.
Now sew the knot to the bear. Again, it does not matter how, just make sure it is attached well.
Step 8: Attach the Potentiometers.
Poke a small hole in the side of each temple and push through the potentiometer shaft.
Sew the potentiometer in place by any means possible. Make sure it is sewn in well and pointing out into space the right way.
Step 9: Attach the Red Head Knobs.
If it does, glue it in place. And then place the new knob construction onto the potentiometer shaft.
If it does not, fill the inside of the knob with hot glue and glue the red knob onto the potentiometer shaft. Be careful to line it up straight and not get glue on the bear.
Step 10: Program the Microcontroller.
The code I used can probably be converted to a more universal programming language and modified to fit your needs. Essentially, one potentiometer controls the frequency of the note and the other controls the duration of the note.
For this task the PIC chip is like using a machine to kill a mosquito. You probably can get the same effect with a 555 chip or two, but I had the PIC chip on hand at the time and felt like using it.
It is as follows:
CPU = 16F877
MHZ = 20
screeching var word
longing var word
' sets variables
' note frequency potentiometer reading
' note duration potentiometer reading
screeching = screeching * 2
' increases the notes frequency range
longing = longing / 12
' decreases notes duration to about 4 second maximum
if longing < 1 then
longing = 1
' prevents 1 or 0 from being divided by 12 and crashing the program
' sound output on pin B0
Step 11: Build the Circuit.
Remember that the LEDs and potentiometers are already sewn into the bear. Don't forget to add a 330 ohm resistor in series with the LEDS.
Step 12: Finish Off the Circuit.
Now would also be the time to put your chips into the sockets.
Lastly, this would be a decent time to wrap some of the exposed wires and electronics in electrical tape to prevent crossed wires when the bear is handled.
Step 13: Debug
If it works, good.
If it doesn't work your problem might be:
- burnt chips
- crossed wires
- incorrect wiring
- broken speaker
- the chip isn't programmed
- you used the wrong oscillator
- you left something out
- acts of god
Step 14: Re-stuff the Bear. Re-stuff It Good.
Then carefully fill the bear back up with as much stuffing as you can until it is soft and fluffy once more.
Step 15: Sew the Neck Shut.
Sew it shut by whatever means you see fit.