Introduction: Booty Box: Instant Dance Parties

About: I spend my time somewhere between engineering and art.

We've all wanted it. Now you can build it. 

Instant dance parties.
Personal theme music. 
Motion activated music.
Booty Box.

Step 1: Gather Electronics

Wave Shield - Adafruit
Arduino Uno - Adafruit
SD Card - Adafruit
ADXL335 Accelerometer - Sparkfun
Female Headers - Sparkfun
Toggle Switch - Jameco
9V Battery Snap - Jameco
9V Battery - Adafruit

X-Mini Speaker (surprisingly good sound quality for the size) - Amazon
Web Belt - Most workwear clothing stores

Soldering iron & solder
Wire strippers
Diagonal cutters
3D printer for the case

Step 2: Solder & Test the Wave Shield

First step is to solder the wave shield together. There is already a great tutorial from Adafruit for soldering it together. If you are going to assembling this inside of the 3D printed box, you will have to leave off the black volume control knob. You can still control the volume by twisting the potentiometer, it will just be slightly less convenient. 

In order to program the wave shield you'll need to download the WaveHC library and put it in the libraries folder within the Arduino program files.  

Audio files need to be converted into 22KHz, 16-bit, mono .wav files. If you don't know how to do this, follow this tutorial using either iTunes or Audacity.

My experience with the Wave shield is that it can be fickle. I highly recommend loading a formatted song onto the SD card and testing out this shield with this example. This example should automatically search for any properly formated wave files on the SD card and play the songs all the way through. If it doesn't start playing, check the serial monitor to see what error messages you are getting. If a song starts playing, you are good to go!

Step 3: Finish Soldering

The easiest way to attach the accelerometer is by using female headers. Break off a row of six header pins. When you break female headers, it will break along one of the holes in the header. You'll want to break it along the seventh hole from the end. 

Solder the row of six pins to the analog pins. 

One the 9V battery snap, cut the black lead in half. Solder the lugs of toggle switch to the the ends of the two black leads you just cut. This will be the on/off switch for all of the electronics. 

Solder the red lead of the 9V battery snap to the input voltage (Vin) pin of the Arduino and the black lead to one of the ground (GND) pins. 

Step 4: 3D Print the Case

Get that extruder hot and primed because now is the time to print the case. Download the .stl files and get printing. I printed with PLA and 20% infill.

The case allows for access to the USB connector, audio jack, and SD card. It also has a hole for mounting the toggle switch and holes to loop a belt through. Oh and a lightning bolt because why not?

Step 5: Assembly

Now it's time to assemble your Booty Box!

The accelerometer attaches onto the female headers that you soldered onto the analog pins in this configuration:
Vcc : A5
Gnd : A4
X : A3
Y : A2
Z : A1
ST : A0

Everything should fit nicely into the box you've just printed. Secure the toggle switch with the nut and lock washer that came with the switch. For the video, I found that there was a little bit of rattle in the box while I was getting down. I put some rubber feet around the Arduino and battery to eliminate this noise. 

Lid secures with a press fit around the box. Hopefully your 3D printer is printing well enough to do this. If you wear it with a belt, it will also help secure the lid. 

Step 6: Upload Code

It's almost done but the last thing you need to do is upload the code

Currently, the code will play one song. You'll need to change the the song file name in the code before you upload (see image). There are two variables that control the sensitivity of motion to start and stop the music, threshold and offThreshold. Increasing threshold will make you have to shake it harder to turn on the music. offThreshold will control the sensitivity of turning the music off. If it is too high, it will glitch out and sound like it is skipping. If it is too low, it will take a while for it to turn off after you stop moving. You might have to tweak these values to make it work well for your dancing.

Step 7: Additional Accessories for Freaky Fun Dancy Times

Time to dance!

It works well with headphones or anything that has an amplifier. The amplifier chip on the Wave Shield is too weak to wire it directly to speakers and get any significant volume. 

The optional X-Mini Speaker that was listed is surprisingly loud and clean for how small it is. It also comes with a rechargeable lithium ion battery, which is nice

Epilog Challenge V

Participated in the
Epilog Challenge V