loading

I've always wanted to learn how to play a drum kit, but my parents never let me because 'it takes up too much space' and 'it makes too much noise'.

So now, many years and some electrical knowledge later, I've decided to make my own electronic drum kit!

This project is pretty easy to make and you do not really need any special knowlegde or skills.

Step 1: What You'll Need

Here's what you'll need to make 4 drums:

- 4x Piezo

- 4x CD

- Mouse pads (enough to cut 8 circles as big as the CD)

- Arduino + USB cable

- 4x 1M Ohm resistor

- PCB or breadboard

- some wire


Optional:

- 4x 3.5mm plug

- 4x 3.5mm socket

Step 2: Soldering Piezos

The first step is to solder long wires to the piezos.

My piezos came with a little metal cap and short wires. You can cut the metal cap of and simply solder longer wires to those short little wires.

If you chose to use plugs and sockets, you obviously have to solder your plug to the other side of your wire.

Step 3: Breadboard/PCB

After you soldered wires to your piezos it's time to connect everything.

Connect the resistor to the wires of the piezo as shown in the diagram above. Then connect the GND wire of the piezo to GND on Arduino. Connect the other wire of the piezo to an analog pin on your Arduino. (If you're using plugs and sockets, you obviously use the wires of the socket and not the wires of the piezo)

When you're not using all of the analog pins, you should connect the 'empty' pins with GND. Otherwise you might get false values because of noise.

You can either connect everything on a breadboard as shown in the diagram. Or you can solder everything on a piece of PCB like I did.

Step 4: The Drum Pads

Now that everything is soldered, it's time to make the drum pads.

Take your CD and put it on the mouse pad. Draw a circle around the CD and then cut it out. Next stick the piezo to the CD with a piece of tape.Once that's done you'll need to glue the mousepads to the CD. I used a tiny bit of super glue. Make sure the glue doesn't get on the piezo! It'll ruin your piezo. I had to learn that the hard way.

ruined piezo

Use a bit of glue on the edges of the CD and stick the plastic part of the mouse pad to it. Do the same for the other side. The foam sides of the mouse pad have to be on the outside.

Use some extra glue around the part where the wires stick out of the drum pad to close it nicely.

Step 5: Connect With PC

That's pretty much it. Everything has now been put together and the only step left is to connect everything with the computer.

There are a few possible ways to connect. After some research and trying different programs I found Ardrumo (Mac OS X only) the easiest to work with. Simply load the sketch to your Arduino and then open Ardrumo and Garageband.You can choose different drums in Ardumo as you can see in the video in the first step.

But like I said, this is not the only possible way to connect. There are a lot of other ways, for example using Hairless as explained in this Instructable. Just play around a bit and find a method that suits your needs :)

This is the code for Ardrumo. Download Ardrumo by clicking here.

/*
 * Ardrumo sketch
 *
 * Use with the Ardrumo software here:
 * <a href="http://code.google.com/p/ardrumo/" rel="nofollow"> <a href="http://code.google.com/p/ardrumo/"> <a href="http://code.google.com/p/ardrumo/"> <a href="http://code.google.com/p/ardrumo/" rel="nofollow"> <a href="http://code.google.com/p/ardrumo/" rel="nofollow"> http://code.google.com/p/ardrumo/
</a>
</a>
</a>
</a>
</a>
 * This is designed to let an Arduino act as a drum machine
 * in GarageBand (sorry, Mac OS X only).
 */

#define LEDPIN     13     // status LED pin
#define PIEZOTHRESHOLD 5  // analog threshold for piezo sensing
#define PADNUM 6          // number of pads

int val;

void setup() {
  pinMode(LEDPIN, OUTPUT);
  Serial.begin(57600);   // set serial output rate
}

void loop() {

  // Loop through each piezo and send data
  // on the serial output if the force exceeds
  // the piezo threshold
  for(int i = 0; i < PADNUM; i++) {
    val = analogRead(i);
    if( val >= PIEZOTHRESHOLD ) {
      digitalWrite(LEDPIN,HIGH);  // indicate we're sending MIDI data
      Serial.print(i);
      Serial.print(",");
      Serial.print(val);
      Serial.println();
      digitalWrite(LEDPIN,LOW);
    }
  }
}

This is the code for Hairless. The code is from an Arduino Xylophone Instructable.

//Xylophone
//Adapted for an ArduinoMega 
//from Jenna deBoisblanc and Spiekenzie Labs initial code

//*******************************************************************************************************************
// User settable variables
//*******************************************************************************************************************

int pinRead;
char pinAssignments[16] ={
  'A0','A1','A2','A3','A4','A5','A6','A7','A8','A9','A10','A11'};
byte PadNote[16] = {
  57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72};         // MIDI notes from 0 to 127 (Mid C = 60)
int PadCutOff[16] = 
{
  400,400,200,800,400,400,400,400,400,400,400,400,400,400,400,400};           // Minimum Analog value to cause a drum hit
int MaxPlayTime[16] = {
  90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90};               // Cycles before a 2nd hit is allowed
#define  midichannel 1;                              // MIDI channel from 0 to 15 (+1 in "real world")
boolean VelocityFlag  = true;                           // Velocity ON (true) or OFF (false)

//*******************************************************************************************************************
// Internal Use Variables
//*******************************************************************************************************************
boolean activePad[16] = {
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};                   // Array of flags of pad currently playing
int PinPlayTime[16] = {
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};                     // Counter since pad started to play
byte status1;

int pin = 0;     
int hitavg = 0;
//*******************************************************************************************************************
// Setup
//*******************************************************************************************************************
void setup() 
{
  Serial.begin(57600);                                  // SET HAIRLESS TO THE SAME BAUD RATE IN THE SETTINGS

}
//*******************************************************************************************************************
// Main Program
//*******************************************************************************************************************
void loop() 
{
  for(int pin=0; pin < 16; pin++)                          //
  {
    //int pin = 3;
    //   for (pinRead=0; pinRead < 16, pin++){
    hitavg = analogRead(pinAssignments[pin]);  
    //Serial.println(hitavg);   
    // read the input pin

    if((hitavg > PadCutOff[pin]))
    {
      if((activePad[pin] == false))
      {
        if(VelocityFlag == true)
        {
          //          hitavg = 127 / ((1023 - PadCutOff[pin]) / (hitavg - PadCutOff[pin]));    // With full range (Too sensitive ?)
          hitavg = (hitavg / 8) -1 ;                                                 // Upper range
        }
        else
        {
          hitavg = 127;
        }
        MIDI_TX(144,PadNote[pin],hitavg); //note on

        PinPlayTime[pin] = 0;
        activePad[pin] = true;
      }
      else
      {
        PinPlayTime[pin] = PinPlayTime[pin] + 1;
      }
    }
    else if((activePad[pin] == true))
    {
      PinPlayTime[pin] = PinPlayTime[pin] + 1;
      if(PinPlayTime[pin] > MaxPlayTime[pin])
      {
        activePad[pin] = false;
        MIDI_TX(144,PadNote[pin],0); 
      }
    }
  } 
}

//*******************************************************************************************************************
// Transmit MIDI Message
//*******************************************************************************************************************
void MIDI_TX(byte MESSAGE, byte PITCH, byte VELOCITY) 
{
  status1 = MESSAGE + midichannel;
  Serial.write(status1);
  Serial.write(PITCH);
  Serial.write(VELOCITY);

}

Step 6: Have Fun!

That's it!

Everything is now connected and put together.

Have fun and annoy your parents with your new drum kit! :)

<p>Could anyone please help with the code for Hairless. I want to assign different pin readouts to different midi channels... According to the code written above, all piezzo signals join into one channel... I hope anyone can help. :) Thanks!</p>
Hey there, I am on windows with hairless, but I am getting sounds of piano but not drums. Can please solve this...sorry for noob questions
<p>Hey there. I'm just finishing the project on win 10. You can install tryout version of Ableton LIVE, it works great (you have to install loopMIDI, to create midi breadge and Hairless to connest midi to Ableton LIVE. My issue that remains is how to assign different midi channels in output. I tried useing 3 oiezzos, I get different tones, but I do not know, how to assign different instruments to a single piezzo since the signal from all piezzos comes to the same channel to Ableton LIVE... I hope first part helps a bit :D</p>
<p>Hello dear, I would like to know if there is any way to go through the midi port in receiving the messages of edrums, add messages of electrical piezo and all send it to the port midi out.</p><p>The intention is to make a trigger for edrums.</p>
<p>hey buddy nice one! Is it possible to use it with ableton as well?</p>
<p>Hi there! I found your project by far the simplest &amp; hassle free. Congrats and thx so much for sharing it with us. But I got totally puzzled at one central point : isn't it supposed to create a Midi drumpad ? MIDI is universal, so whatever software you use inside, it should be compatible to Windows &amp; Mac both. Pl. clarify. Thx a lot in advance!</p>
<p>It seems my Arduino is not communicating with Ardrumo. I selected the &quot;Serial Input Device&quot; in the Ardrumo drop down menu to match the port I am using in Arduino. The Serial Monitor is getting readings when I hit the piezo but no sound happens in Ardrumo. Is there somewhere I can learn more about the software side of this?</p>
<p>hey guys... i wanted to try this out .. thats why i used to test this project with 1 piezo.. but when i hit the piezo that i connected to analog pin it sounds the crash cymbal. and when i connected the piezo to analog pin 2 it didnt change the sound... same to the other pins .</p>
<p>Same happened to me. Someone plz help</p>
<p>hi, i love the project you made. I was just thinking if you happen to know how to write codes for a pedal switch controlled hi hat?</p>
<p>how connect windows pc and what are the softwares plz help me</p>
<p>would it matter if i used 240K ohm resistors instead? i have a whole bunch lying around </p>
<p>You can just use 4 of them in series to get &lt;~ 1M Ohm</p>
<p>exit status 1</p><p>'MIDI_TX' was not declared in this scope</p><p><u>code for Hairless help me pls</u></p>
<p><a href="http://www.amazon.in/Electronic-Transducer-Acoustic-Mandolin-Ukulele/dp/B01K6YBSOQ?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=1d084597-de87-4acc-aeeb-6685df2934f9" rel="nofollow">http://www.amazon.in/Electronic-Transducer-Acousti...</a></p><p>Can i use these sensor plz reply.</p><p>Thx</p>
<p>Can I get a better schematic and explanation of what to do for the wiring in step 3? Everything else I understand perfectly fine, but I don't know much about circuitry and trying to find resources for a project like this is difficult at best and I don't know how I'm supposed to read step 3. The picture included looks different from the diagrams and I just don't know what I'm looking at. :(</p>
<p>I can help you I guess, I'm not sure which part you didn't understand. LEt's try; The greens are cables. you will connect them starting from a0 to the a3. the legs of speakers are important. You should be carefull about their colors. You should just make it how the picture shows. Take your equipments and connect everything exactly with the same holes. Sorry, maybe this is a bad answer but you can ask me, if it doesn't help.</p>
<p>can i plug 8 drum pads or more......pls tell me</p>
<p>hey guys... i wanted to try this out .. thats why i used to test this project with 1 piezo.. but when i hit the piezo that i connected to analog pin it sounds the crash cymbal. and when i connected the piezo to analog pin 2 it didnt change the sound... same to the other pins .</p>
<p>I have made it. It creates sound. </p><p>But i have a problem. I am Windows, loopMIDI, Hairless and addictivve drum. But when i hit the piezo it plays two instrument on the addictive drum. Like when I tap my first piezo, it plays the snare and the Hanging toms together. What to do???</p><p>I also tried this on EZDrums, the same problem occurs.</p>
<p>because it's too sensitive o.o, you have to isolate each pad. (i guess)</p>
<p>I tried that, but that did not work. I have the same problem</p>
<p>I tried that, but that did not work. I have the same problem</p>
<p>Great project. But when i try to verify the code for hairless it says &quot;serial was not declared in the scope&quot;. What to do?</p><p>And with harless should I have to use the GarageBand software?</p><p>Colde you please help me to use this prototype on windows properly, please.</p>
<p>Hi, awesome stuff there! i just have a couple of questions about this:</p><p>1) In Ardrumo's sound library, can you download/insert your own files/sounds? (i want to make this a sort of midi controller pad)</p><p>2) (this links in quite nicely with Q1) Could i use buttons instead of piezos because piezos would only play the sound according to the length of the vibrations (momentary?) whereas buttons would hold the note e.g. A riff recorded on guitar would be played until it finishes.</p><p>p.s. if the plans dot work for my midi controller pad idea, I'll still make the drums :)</p>
<p>thanks for this! I assumed that more than one resistor was needed to connect the piezo. Are your ones sensitive enough to tap with fingers or do you need to whack them with sticks?</p>
They are sensitive enough to be played by hand or stick. A firm tap with a finger works as well.
<p>ta ! I've got a uno and some piezos so I'll have a go. Just like to give a plug to the free mozzi code which takes an uno to the limit for synthesis on uno. My first project on uno was to take a voice input and transform it into a dalek (robotic) voice. Ring modulation. Mozzi meant that I only needed to write a few lines of code. Multiply two numbers, basically. Wonderful. No midi, no sample playback, but if you want to use your pads to make a huge range of sounds direct from the arduino, take a look! </p>
Thanks I'll definitely check it out!
<p>This looks awesome! Thank you so much taking the time to share this project and especially for continuing to offer help to people with who post their issues in the comments.</p>
<p>This looks awesome! Thank you so much taking the time to share this project and especially for continuing to offer help to people with who post their issues in the comments.</p>
Hi, nice video. Can you connect more than 4 Pads? I want to Trigger some drums for a recording
Six if you use Ardrumo, or as many as you have analog pins if you use Hairless
<p>how much would it cost?</p>
That depends on what you have already laying around! I had all the items spare from other projects or from old products, so it didn't cost me anything. All the items in step 1 link to a webshop, so you can easily see for yourself how much it would cost you.
<p>I have completed the project but am getting delay in drums</p><p>Please tell how to fix it</p>
<p>I'm not sure what causes the delay. You could try and change the baud rate to 115200. Or maybe if you are using very long wires or high resistors that can cause a delay too.</p><p>I vaguely remember I had issues with a delay as well but I honestly can't remember right now what I did to fix it. See if you can connect with TonnyD. He was having the same problem as you and maybe he found a way to fix it.</p>
Hey bro... Please contact me on hmngtm@gmail.com
Hey sir please do some reply regarding what I have reply of your suggestion in my earlier post, really want some suggestions to nullify this problem.... Please see to it
<p>Not a sir. I am a girl ;) Sorry for not replying earlier but my job doesn't give me a lot of free time to try and recreate your problem. I honestly don't know how to solve it. Based on your pictures the only obvious thing I can come up with is that the piezos are either taped too tightly to the cardboard, or the fact that they are all on the same cardboard, is causing a problem. If you hit one piezo, the others will sense vibration as well, because they are on the same surface. Can you take two piezos and connect them, without taping them to any surface whatsoever? Only connect them to the Arduino with a couple of wires, nothing else. See if it then still has the problem you're experiencing.</p>
I m sorry mam... :) and yes I tried it too it is still making the same sound and showing channel 2 only on all the piezo in hairless....
Hello <br>I have built this successfully but still facing a problem that my all the piezo are producing only one sound.... So please tell me how to assign individual sounds to each piezo while I am using FL Studio as my working software... Please anyone who know how to fix it, help me...out
<p>The whole thing is designed to have each piezo produce a different sound. If you are using Ardrumo, simply select a different sound for each drum. If you are using Hairless, use the serial monitor to see if every piezo is sending a different note. Also make sure the drumpads aren't glued together too tightly. This might make them go of even though you don't hit them.</p>
Hey I have tried all the suggestions provided by you for my question about the same tone produced with each piezo and these are some snapshots I have taken regarding my problem please see to it and please suggest any solution and what I have noticed in hairless is each tap on any of the piezo gives me the velocity and pitch for ch 2 only... So I think here it is the problem.... Please see to it
<p>Hi guys! </p><p>I have a big problem... I built the circuit and a little pad to test it but I HAVE A LOT OF DELAY... Im only using one pad, I'm using a 1M resistor, and a 3cm piezo mounted in a breadboard. Im using 56700 baud, and I tried with 256000, but its the same... </p><p>For the MIDI conversion im using Hariless MIDI, loopMidi, and fl studio 10 with adictive drums....</p><p>what could be the problem?</p>
<p>Its a great project. But, how do i play it in windows os..?</p>
<p>Ardrumo doesn't work on Windows. Hairless does and is also explained in this Instructable</p>
<p>Hi, will the Ardrumo code work for Logic Pro X? Also, the drop-down menus for the drum sounds in your video, are they Garageband drum sounds? Can you load in samples from anywhere? Thanks</p>
<p>I haven't tried the Ardumo code with Logic Pro X, but I think it should work because Ardrumo basically turns it into a MIDI instrument. </p><p>The dropdown menus in the video are not Garageband. It's Ardrumo. Ardrumo sends out a MIDI value based on the sound selected. This value can be read by for example Garageband but also by other programs.</p>
<p>I haven't tried the Ardumo code with Logic Pro X, but I think it should work because Ardrumo basically turns it into a MIDI instrument. </p><p>The dropdown menus in the video are not Garageband. It's Ardrumo. Ardrumo sends out a MIDI value based on the sound selected. This value can be read by for example Garageband but also by other programs.</p>

About This Instructable

121,586views

480favorites

License:

More by anouskadg:Dr. Who Tardis - IoT Door Sticker in Illustrator Galaxy Sneakers 
Add instructable to: