Instructables

Arduino Air Drums

Picture of Arduino Air Drums
This instructable will tell you how to make your own set of air drums using little more than an Arduino microcontroller and a few accelerometers. 
Here's a video of the drums I based this design off of: 

http://www.youtube.com/watch?v=jjvy_jzGlAQ


My drums feature a number of improvements over those shown in the video:

-Funtional Hi Hat Pedal: Looking at the original designer's code, I noticed he never got the photocell "hi-hat" to work. Instead, he programmed the cymbal drumstick to play a crash at high acceleration and a closed hi hat at lower accelerations. 

-More responsive drumsticks and pedals

 
Remove these adsRemove these ads by Signing Up

Step 1: Get Your Materials

Items you will need (can be found on sparkfun.com unless otherwise noted): 
4 - 6 foot usb a male - a male cords
8 - usb female type a smd connectors 
3 - adxl 335 accelerometers 
1 - Mini photocell 
1- 10k resistor
1- 220 ohm resistor
1- MIDI Connector - Female Right Angle
1- MIDI USB converter (find it on Amazon.com for around $5) 
Arduino Uno microcontroller 
A Breadboard
Lots of Wire  
Cheap flip flops you can cut up (got mine at target for $3) 
Replacement strap for flip flops (I used some tennis wristbands for this) 
Air drumsticks (I used some PVC pipe) 

Step 2: MIDI Connector

Picture of MIDI Connector
The first thing you'll want to do is wire up your Arduino to your MIDI female connector so you can play MIDI notes.  This is an easy process - just follow the diagram! Note that the resistor is 220 ohm. 

Step 3: Wiring up the Accelerometers

Picture of Wiring up the Accelerometers
adxl.jpg
usb female.jpg
Next, we want to hook up our accelerometers to the Arduino. Hook up the z terminals of the accelerometers to the analog inputs 0,1, and 4 of the arduino. Hook up the GND terminals to ground and the VCC terminals to the +3.3V of the Arduino. Also, hook up the Analog Reference pin to +3.3V. For reference, see the diagram below. 

Also, to avoid long, tangled wires, use usb cables as connectors. Just solder the wires from the accelerometer onto the usb females and use usb males to connect them. The picture below shows a USB female with accelerometer cables soldered to it. 
uneyrand1 year ago
After many time, I find the solution for ME

put A0 (hithat) A2 (snare) A3 (Crash) A4 (Bass)

in the program i change : int Threshold = 125; TO int Threshold = 700;

For Apple Garage Band the midi for a good hit hat :
{playMidiNote(1, 44, 127);}
{playMidiNote(1, 46, 127);}

uneyrand1 year ago
Hello, i try to do the same thing and i will thank you for your post... BUT....
There is for me 2 mistakes

1- in your comment you say "Hook up the z terminals of the accelerometers to the analog inputs 0,1, and 4 of the arduino." for me it's wrong and doesn't work... i have to put A0 (hithat) A2 (snare) A3 (Crash) A4 (Bass), and this work much better

2- My Hit Hat doesn't work... :'( When we look to your program they is a line with "int CrashPin = A5;" You never said to put something in A5 analog pin.... And When we look CLOSER to the picture to your system (Step 5, where there are the 4 usb)
we can see that : Top to bottum
1st usb -> 2 wire -> hithat Photocell OK
2nd usb -> 3 wire -> Snare or Bass OK
3rd usb -> 3 wire -> Bass or Snare OK
4th usb -> 4 wire -> accelerometer HITHAT ? Why? in your schema you never put 4 wire. (step 3) I think, i need a wire on the A5 pin .... ?

i put a LED on the photocell this is working, my crash is OK Bass OK , Snare OK

Can you help me to make function the HIT HAT in the TWO ways ?

I need your Help please
Thank you for what you done !!
it's so nice !
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!