Introduction: The Hell Rabbit
This Bunny was made a while ago for a Physical Computing class. It triggers motion with a PIR sensor located in the nose, and then randomly selects and plays a very loud creepy sound. While the sound is playing, the Rabbit's eyes blink and the ears move. The Arduino Uno board controls the system.
This project is based on other works, such as Shaun The Noisy Sheep by Paulys and the Adafruit's Pumpkin project. Although the working principles are very similar, I added some new features, such as a different kind of sensor, servo motors for the ears, portability and sound amplification. I hope someone else will come up with other improvements, such as head rotation, sudden jumping, zombie walk, or... you name it.
Happy making everyone!
Step 1: Parts and Tools
- 1 x Arduino Uno microcontroller;
- 1 x Laptop with Arduino IDE installed;
- 1 x USB A/B cable (usually comes with Arduino);
- 1 x Adafruit Wave Shield for Arduino (allows the Arduino to play sounds);
- 1 x 1GB FAT16 Standard SD Card (for the Wave Shield to store your audio files);
- 1 x Card reader (or other means to connect your SD card to the laptop)
- 1 x Smokey Amplifier (connected to the Wave Shield, amplifies the sound);
- 1 x 1/8" TS Male to 1/4" TS Male Audio Cable, 3ft (Smokey Amp to Wave Shield interface);
- 1 x 15" Stuffed Bunny (dog toy) - make sure it is big enough to fit all the components inside);
- 1 x PIR motion sensor (to trigger motion);
- 2 x Micro Servos (moving ears);
- 2 x Super Bright Red LEDs (blinking eyes);
- 1 x 1K resistor (for the LEDs);
- 1 x 9V battery pack w/ON/OFF switch (to power up the Arduino);
- 2 x 9V batteries (one for Arduino, one for Smokey Amp);
- 1 spool of 22 gauge electrical wire;
- Velcro (to allow quick access to the components inside the Rabbit);
- 2 x Straws (connected to servo motors shafts to allow ear motion);
- 1 x Empty bottle of 32 oz Gatorade (for the skull);
Step 2: Wave Shield Assembly
Unpack the Wave Shield Kit, check whether all the components are there, then solder everything using these step by step instructions. The shield has only one surface mount component - SD card slot, so soldering is not too hard. If you are unfamiliar with the process, here is a great instructable on this topic.
I bought the Wave Shield kit together with the SDHC SD card and a 3" speaker, but ended up not using any of these. The AF_Wave library used in the Arduino code for this project works only with Standard SD cards (not SDHC) and only formatted for FAT 16 (not FAT 32). After a quick research I was able to buy a Standard SD card on ebay for $2. As for the 3" speaker, the Wave Shield wasn't loud enough for me, so I decided to use a Smokey Amp instead (it is used as both an amplifier and a speaker).
Step 3: Sound Conversion and Naming
The Wave Shield is designed to play a very specific type of audio – 22kHz max, 16-bit, mono .WAV files. It will not work with MP3, AIFF or any other formats. You have to convert the sounds you wish to play to the format mentioned above. Here is a good explanation of this process. I used iTunes method, because it was the easiest one for me.
After you're done converting, rename your files "01.WAV", "02.WAV" etc. Then put them onto the SD card (make sure it is formatted for FAT16 filesystem; FAT32 will not work with this project's code). Insert the card into the slot on the Wave Shield and connect the shield to the Arduino. Then connect the Arduino board to the laptop and open the IDE. If you don't have this software, you can download it for free from here.
NOTE: In this project we will use a different library - AF_Wave, which is older than WaveHC. The reason for this is very simple - I spent a lot of time trying to modify the code for the newer library (WaveHC), and got nowhere. If anyone can do it, it would be great, because WaveHC library is much better than AF_Wave and is written for SDHC SD cards (e.g. virtually every consumer grade SD card). Until then let's stick with good ol' stuff.
Step 4: Code Uploading and Testing
The next step is to upload the "Hell Rabbit's" code to the Arduino. First, download and extract the AF_Wave and Servo_Timer2 librariesattached below. Then download the "Hell_Bunny" code, connect the Arduino to the computer and upload the sketch.
NOTE: Current version of the code uses 4 audio files named "01.WAV" through "04.WAV". If you wish to use more files (or a different naming convention), modify the code accordingly.
Step 5: Circuit Prototyping
The next step will be to breadboard and test the entire circuit.
On the attached schematics the Wave Shield is shown as a regular Arduino board, because there is no correct symbol for it in Fritzing. The PIR sensor symbol should be also slightly different.
Connect the wires as follows: Common Ground – to the GND pin; common Voltage – to the 5V pin; PIR signal – to pin 6; 1st servo signal – to pin 7; 2nd servo signal – to pin 9, LEDs – to the Analog pin 4 (=digital 18) through a 1K resistor.
After making sure everything is connected properly, upload the "Hell Bunny Code" to the Arduino. You should get something similar to the above video.
Step 6: Circuit Integration and Final Soldering
Now it is time to put the working system inside the Rabbit. Make a hole along the seam under the Bunny's right foot, then take out half of the body stuffing and all the head stuffing. Next, cut a small hole in Bunny's nose for the PIR sensor, insert the sensor from inside, then sew it into the nose through 2 side holes on the sensor.
The hardest thing is to figure out how to secure two servo motors inside the bunny’s head. The head is very soft and the servos have a pretty high torque. I sewed two straws to the servo's shafts through the little holes on the shafts, then used some cardboard and packing tape to hold everything together. I inserted the straws into the Rabbit's ears and hoped for the best.
Next, cut the top part of an empty Gatorade bottle (it will be the Bunny's skull), and make two holes for the eyes. Solder the LEDs and 1K resistor together as shown on the photo (LABEL EVERYTHING!), and insert the skull assembly into the Rabbit's head. Test the LEDs when installed by connecting jumpers to the appropriate pins on the Wave Shield and running the sketch;
After that, solder long jumper wires to the PIR sensor, label them and test them after installation; Next, secure servo motors inside the Bunny’s head (I used some packing tape and cardboard), attach long jumper wires, label them and test the system. Then do the following:
- Solder all ground wires together (LEDs, 2 servos and PIR sensor grounds) and test
- Solder all voltage wires together (PIR sensor and 2 servos voltages) and test the system;
- Solder all remaining wires to the Wave Shield according to the code and the schematics and test the system;
If everything works fine, you will be very close to Step 7. The last thing will be to sew some velcro tape along the seam (to allow a quick access to the Bunny's guts). Then insert a 9V battery into the battery holder, plug it to the Arduino board and put the enclosure into the Rabbit's foot. Connect 1/8" jack of the audio cable to the Wave Shield, and 1/4" jack to the Smokey Amp.
Step 7: Done!
Put the Bunny somewhere in the room and enjoy your friends' (or enemies) reaction!
We have a be nice policy.
Please be positive and constructive.