This year the boys wanted to be Mario and Luigi. Kind of boring right? Well my wife didn't think they were ready for throwing real fireballs so we did sound effects instead. I wanted them to make the Mario jump sound when they jumped and be able to make the fireball sound too and maybe a few others. So I too a Wii Nunchuck, an arduino, a set of portable speakers and a birthday card to make this.
The Wii Nunchuck has an accelerometer in it so I used that to tell when they jump and for them to control the rest of the sounds. The Nunchuck is connected to the arduino using an adapter that you can make or buy so you don't have to cut the cable.
For the sound recording and playback I found a birthday card that you can record 4 sounds on and playback the sounds by pressing each button. After tearing the card apart I found that it ran on a 3V battery so I used an arduino pro mini 3.3V for one and an arduino FIO which is also 3.3V for the other. This way the arduino could directly control the sound board and power it too.
Step 1: Materials and Tools
Programmable birthday card (I got it from Walgreens)
3.3V arduino (like the arduino pro mini or arduino FIO from Sparkfun)
Battery for FIO
Wii Nunchuck arduino adapter (or make your own like I did)
3.5mm female jack
I used an arduino FIO for one and an arduino pro mini 3.3V for the other because that was what I had on hand. This instructable shows the FIO because it was a bit easier than using the pro mini.
Step 2: The Birthday Card
Step 3: Sound Board
How this board works is the left button wire of each button is the input wire and the right is 3V. When the button is pressed it completes the circuit and brings the input wire up to 3V and triggers the sound. Since the arduino I am using is 3.3V when you set an output to high that does the same thing and triggers the sound. So all we have to do is wire each of these to a pin on the arduino.
Step 4: Connect Sound Board to Arduino
Step 5: 3.5mm Jack
Solder wires to the adapter like in the second picture below. It should go green then red on the top and black below green and yellow below red.
I messed up on the first one I made and put the power on A0 and A1 pins so I changed it in my nunchuck_funcs library. The default should be to use A2 and A3.
Check out the WiiChuck homepage for more info and the library for the arduino.
Step 7: Program the Arduino
Go to the WiiChuck homepage for more info and the nunchuck_funcs library for the arduino.
In the code is a section like this:
int FirePin = 7;
int SuperPin = 8;
int CoinPin = 9;
int JumpPin = 6;
This is where you set which sound is on which pin of the arduino. Change the pin numbers to suit where you put the sounds. The JumpPin is on the C button and plays when the nunchuck goes up and down quickly. The FirePin is on the Z button and the other 2 sounds play when the joystick is moved up or to the right.
Step 8: Wrap It Up
When you turn on the arduino the sound board goes through the whole greeting but once it is done it won't play again. I just leave the portable speakers turned off until it is done playing.
I put the speaker in one front pocket of the overalls and the arduino in the other. Then I cut a small hole in the back of the bib pocket to run the wire to the portable speakers battery pack so it was easy to turn the sounds off when needed. The Nunchuck runs inside the shirt and through the sleeve.