Introduction: Homemade Electronic Drum Kit With Arduino Mega2560

Picture of Homemade Electronic Drum Kit With Arduino Mega2560

This is my Arduino Project. How to build an e-drum kit with Arduino?

Hello dear reader!

-Why doing such a Project?

First of all because if you like these kinds of things, you will enjoy the work process really much. Second, because its really cheap compared to real e-drum kits and you will be able to save a huge quantity of money. Anyway, lets move on to the main part of this article.

Step 1: Materials

Picture of Materials


- Wood.

You will need different measures of wood. I used 16mm and 10mm MDF for the Drum pads and then 5mm plywood for the Cymbals.

I highly recommend MDF for making this project because of its ease while working with it

- Arduino Mega.

I used an Arduino Mega 2560 because I included 9 components. Otherwise you can use an Arduino UNO, which is cheaper.

- USB m/m cables.

To connect the sensors to the Arduino board you will need either USB or Jack cables. Jack cables are better in this case, but you will save money if you get the USB ones. Apart from the cables you will also need to get their respective female connectors.

- EVA rubber. (Commonly known as swimming pool floor)

- Sensors. Piezos and a photocell.

The piezos are the sensors for the Pads and Cymbals. The photocell will work as a HiHat pedal.

- Resistors, Protoboard/Breadbord, electric cable, pin Headers.

- MIDI connector and MIDI to USB cable.

- Screws, nuts and butterflies

- Pet screen

- *E-drum structure


- Jig Saw

- Sander / Sand paper

- Drill

- Screwdrivers

Step 2: Drum Pads

Picture of Drum Pads

Use the Jig Saw to cut a basic shape from the 16mm MDF. This will be the bottom of our Pads. I recommend you to cut them with a regular shape so it looks better in the end. After this, cut a ring from the 16mm MDF with the same size as the bottom of the Drum pads.

Once you have cut as many bottoms and rings as you need, it is time to move on to the next step.

Step 3: Head Membrane

Picture of Head Membrane

To attach the head membrane to the pads, you will need to cut two more rings, which will be in charge of holding and tensing the membrane.

The first membrane-hoop needs to be from a smaller MDF than the bottom and first ring of the Pads. It has to be a bit thinner than the first pad, but you can only cut from the inside part, so that the outside edge of the membrane-ring matches with the outside edge of the first ring.

The second membrane-hoop has to be higher than the first membrane-hoop and his inside edge has to coincide with the inside edge of the first ring.

Once you have cut these two hoops, it is time to cut the membrane from our pet screen. You can choose the number of sheets of pet screen for making the membrane. I used 4 sheets for each membrane so I could play harder without breaking them.

With a hot glue gun, draw the shape of the first membrane-hoop, leaving some space between the hoop and the glue, on the four sheets put together earlier, so that they stay fixed. After that cut the membrane around the hot glue to get your first membrane. Repeat the process, as many times as membranes you want.

To tense and fix the membrane to the membrane-hoops, you will have to drill some holes through the first membrane-hoop and the pet screen, as the picture above shows. The membrane will go situated between the two membrane-hoops.

Step 4: Finishing the Drum Pads

Picture of Finishing the Drum Pads

Now it is time to screw the whole Pad together. Use the screws, the washers and the nuts. You can see the finished Pad on the picture below. Don’t screw the bottom now! You have to put the sensors first!

The sensor goes on the bottom of the Pad and “connected” to the membrane through a trigger pyramid. Anyway, you can adapt the Piezo-Sensor however you want.

Step 5: Cymbals

Picture of Cymbals

The cymbals are made out of a sheet of 5mm plywood and the EVA rubber. The EVA rubber is used to decrease the noise while hitting the cymbal.

You will have to cut (3) triangles of the plywood. And drill 2 holes on them. One of the holes is for the stick of the structure and the other one works to get the cables from the Piezo-Sensor through.

Step 6: Hi-hat Pedal

Picture of Hi-hat Pedal

For making the Hi-hat pedal you will need a photocell and a left foot sandal. Remove the band of your flip-flop and put an elastic one instead.

Drill the sandal through and make some space for the sensor on the front part of the bottom of the sandal.

After that, you will have to weld the cables to the photocell and to the connector (usb/ Jack) situated in the back of the sandal.

Step 7: Kick / Bass Drum Pedal

Picture of Kick / Bass Drum Pedal

For making the Kick pedal there are many options.

If you want to do my Kick pedal variation, you need some Wood, screws, some EVA rubber and finally, the Piezo-Sensor

Make an inclined wood structure and put the piezo sensor on it. Cover then the whole pedal with the rubber to isolate the sensor.

Step 8: Circuit

Picture of Circuit

Every component should be now connected to a cable (usb/jack). You will have to connect those cables to a female adaptor and then to the breadboard.

Sensors usually need to be connected to the arduino board through resistors.

The Piezo-Sensors need a 1MOhm resistor between the analog input and the ground pin. The photocell works perfectly without resistor, but if you don’t want to overcharge it, then you should use a 10KOhm resistor and connect it between the analog input and the 5V pin.

Finally you will have to connect the MIDI adapter, which goes connected to the TX0 pin, the ground pin and to the 5V pin. You will have to connect the adapter with two 220KOhm resistors. One of them will go to the TX0 pin and the other one to the 5V pin.

Step 9: Arduino Code

The original code was written by Evan Kale but it has been edited and modified by me. It contains some Spanish concepts, so if you have any questions please let me know.



See Evan Kale's original work:

Step 10: Structure and Other Things

If you want to build a homemade structure too, i recommend you to use PVC. However, you will save a lot of time and work if you get a second hand drum structure. This way you will only have to adapt your Pads to the hook of that structure.

About the connection to a computer/mobile device, you will have to buy a MIDI interface or a MIDI to USB cable. You can find them on amazon, aliexpress...


DanielB809 (author)2017-12-29

Hi Victor,

first: GreatWork! Awesome!

But i have the same problem as many others posted:

When i hit a piezo, notes of other channels are also get fired.

You already commented this problem with the suggestion, that maybe cables are touching each other. But in my case i did the following try:

1. Set NUM_PIEZOS to 1, START_SLOT to 0, Plugged in one Piezo at Analog0 --> No Midi

2. Set NUM_PIEZOS to 2, START_SLOT to 0

Plugged in one Piezo to Analog0 and NO Piezo to Analog 1 --> Notes of both Slots are triggered.

Plugged in NO Piezo in Analog0 and one Piezo to Analog 1 --> same result.

Do you have further suggestions what could solve my problem?

Best regards from germany


cardcathouse made it! (author)2017-11-26

Hi! I have really enjoyed doing this project in my free time, but I have encountered a problem which has had my head aching for some time now. I have integrated everything described above minus the midi port (which I won't be using) and the photocell, and used Ableton Live 9 plus LoopMidi with Hairless to get the drum sounds, however I seem to be getting double notes whenever I hit the piezo hard. I've read you commented this could be happening because some cables are touching each other in the circuit, but after double checking and rearranging the circuit, I still have the same problem. I really haven't touched anything in the code besides modifying VELOCIDAD_SERIAL to make it work with Hairless, so what could be causing this? I would really appreciate your help :-)

(I attached a photo of my circuit for reference)

WadeE6 (author)2017-11-22

will this code create a midi note off after a pad is hit, or will it be always on.

RhaegarTargaryen made it! (author)2017-11-07

Hey dude.That's a nice project but i have a problem. I tried to make it but it seems that the arduino doesn't sent a midi note. I checked it with MIDI-OX.That happens when i test it with a breadboard an only one piezo(i dont know if there's a problem because i plug only one). If you have any suggestions or any other helpful tips on how to solve it, i would be glad to hear them :)

Try to connect it directly to the arduino in itself. And write a code that just sends one note, don't copy the one i used, otherwise it won't work. Once you get the piezo going, try 2 at the same time.

Thanks for the help! I did some troubleshooting after taking your advice and i came to the conclusion that i need to use hairless-midiserial(it's a program,idk if you know it). I tested it with one piezo and it works! I will try to connect all the piezos and i should be ok.

RendelB (author)2017-11-12

Hi Sir can i use this for my ipad garage band? because I have no drum software for my laptop. So I decided to use ipad instead of software. Thanks

victorh88 (author)RendelB2017-11-14

Yes you can, you just need a midi interface

RendelB (author)victorh882017-11-14

Is this the same code and schematic?

ikonono (author)2017-10-15

Hi Victor, I'm experiencing two interesting scenarios and would deeply appreciate your advice:

1. HiHat Photocell cuts out all sound:

When the photocell threshold triggers the HiHat open note (46) it "cuts out" all sound (including the other piezos) after about 6 seconds of repeated triggering. This doesn't happen when it's on the Hihat closed note (42) so my assumption is that the photocell lets through too many volts, when it goes above the threshold, and saturates.

2. Multiple notes triggering on hard hits:

When hitting "hard", each piezo triggers the sound assigned to it plus the one that directly follows it on the note map. For example, A0 triggers both A0 and A1's notes and so does every other piezo in that same order. The piezos are not in contact with one another so it is not caused by vibration. I used Midi Loupe to see what is happening and it showed that two notes are being triggered at once.

Have you experienced any of these problems and do you have advice for fixing them? Thanks.

victorh88 (author)ikonono2017-10-15

I experienced both of the problems... The first one might be due to the resistance that the photocell has. Try to get another one, with a different resistance and check if that is what causes the problem.
The second one might be the circuit in itselve. Check out if there are any connectors touching eachother.

GabrielCastillo (author)2017-07-27

Hi guys, I am doing this amazing project and I was wondering what software did you used to actually produce sound? like what it's the program that you use for the drumkit to sound

GabrielCastillo (author)2017-07-27

Hi victorh88, I´m building your project, it is amaizing, I have a question tho, Could you tell me what was the software that you used to play the demo? I mean the MIDI software.


MichaelG641 (author)2017-06-26

Same with 2 sounds of cymbal.. rim vs bell.

MichaelG641 (author)2017-06-26

Hi how do account for the 2 sounds of the hihat? Hitting it open and hitting it closed? It cant be a on off thing (foot down vs foot up).
It needs a two states; hit while open and hit while closed. ... can't do that worth a thong (flipflop as you guys call it)

JanA69 (author)2017-05-15

I have Arduino Uno .I couldn't program it. please give me a code for that

ParthK23 (author)JanA692017-06-08

U can go and watch this video:-

JuanF46 (author)2017-05-12

Hola, me gustó mucho tu trabajo y quisiera hacerlo, pero tendría que pedirte ayuda con algunas cosas del código de arduino porque tengo poco conocimiento. Si las pudieras responder harías posible mi proyecto :). Estas son mis dudas: 1) El foto sensor activa el sonido como si le pegaras al hi hat abierto o hace que los golpes al hi hat suenen abierto? 2) Si reemplazo el fotosensor con un pedal de bombo con un fin de carrera (que puedo soldarlo para que este siempre abierto y al pisarlo se cierre o viceversa), tendría que hacer alguna modificación en el código? 3) Hay alguna parte del programa que me permita controlar con "cuanta fuerza" tengo que pegarle a cada pad para que suene mas o menos fuerte una vez conectado? (para que quede bien configurado según el material que use y todo eso). Bueno esas serian mi dudas, si tenes tiempo de responderlas te lo agradecería muchísimo. Saludos desde Buenos Aires!

ikonono (author)2017-04-26

When defining the number of piezos, does the photocell also count as a piezo? e.g. if I have 8 piezos and a photocell, will the NUM_PIEZOS be 8 or 9? Thanks for sharing this project!

victorh88 (author)ikonono2017-05-03

No, it does not count as a piezo... It is defined by itself below.

RodrigoS143 (author)2017-04-15

Can I use a real hihat pedal from an electronic drum kit for this project?

victorh88 (author)RodrigoS1432017-05-03

Of course you can! You just need to adapt the code and that is it...

17mdickman121 (author)2017-04-05

What is the purpose of a photo sensor in the analog loop of the circuit?

victorh88 (author)17mdickman1212017-04-11

It works as the hihat pedal... You need to put it on the loop, otherwise it would not work

ChipSkater (author)2017-03-19

Do you think it would also be possible to have two arduino nanos to handle the input and then send the data to a raspberry pi that figures out which sound to play as a 'standalone' solution?

victorh88 (author)ChipSkater2017-03-20

I don't think it is possible... you should at least try out if it works. The code might be the hardest part...

DaakuR1 (author)2017-03-11

can it run independent like a normal drum module without having connecting it to computer with only flashdrive with sound files in it?

victorh88 (author)DaakuR12017-03-12

You would need to change the code a little bit... I don't actually know how it should look like. It is possible, but also hard.

EjH4 (author)2017-02-24

On the off chance you get this comment, what MIDI did you use? Thanks!

victorh88 (author)EjH42017-02-25

haha of course i get it... I used a "neusonik im/one". its actually the cheapest interface to connect your device with "apple" in general... if you don´t want to spend that much money, you can get a MIDI/USB cable which costs around 15$/ Euros... ask me anything u want to know about it!! :))

EjH4 (author)victorh882017-02-26

I was planning on getting this one: with a MIDI to USB cable. Will it work/Is it necessary? Also, how do I connect the MIDI interface to the arduino? And is there a way to reduce the size of the code to work for my Arduino Uno or should I just try to rewrite it? Thank you for responding ^-^

victorh88 (author)EjH42017-02-26

you don't actually need that interface if you just want to connect it with your computer... Just the midi to usb should be enough... You connect the cable/interface to a female midi connector, as it is represented on the scheme of the circuit. If you want to use an arguing uno, you just have to reduce the number of piezos in the upper part of the code... As I don't remember the whole code, I recommend you to check it, in case there is written the number of piezos again. Don't know if you actually will understand what i mean xD. Anyway, as I said, let me know about your progress. Have a nice one!

JetS2 (author)2016-12-04

awesome! how did you connect the arduino to your computer? do you need a different usb driver for that?

Eric Brouwer (author)2016-12-02

Congratulations on your 1st prize. Well done.

victorh88 (author)Eric Brouwer2016-12-02

haha! Thanks so much!

abheyvir (author)2016-11-30

better you should make a video also.

ashokr (author)2016-10-18

hi victorh88 ,

i really love the project.. and i made it till the circuit and tested the circuit, and i am getting some noise and all the drums making same sound ..

midi to the amp.. humming noice

all piezo elements making same sound

no code modification

any help from ur end..

victorh88 (author)ashokr2016-11-05

There might be a problem on the circuit... Check if there are any cables touching. Try to upload a different code from another person and try theirs out. I'm sorry I can't do much for you..

ashokr (author)victorh882016-11-06


Carlos Russo (author)2016-11-03

Hi! Great project! What is the MIDI software you're using while playing in the demo video? Congrats!

omnommaster (author)2016-10-04

What photocell did you use?

Polymorph (author)omnommaster2016-10-16

Just about any photocell should work. Just test the resistance with your foot up and your foot down. Then select a resistor halfway between, on the log scale.

To clarify: On the logarithmic scale, halfway between 1k and 100k is 10k. Halfway between 1k and 10k is 3.3k. Halfway between 1k and 1M is 33k. I'm using standard resistor values.

victorh88 (author)omnommaster2016-10-04

You can use any photocell with a value between 10-100 KOhm. Depending on its value it will work better with a resistor.

If you test the LDR with a simple Led blink code, you will see if a 10KOhm resistor is needed or not...

omnommaster (author)victorh882016-10-04

So something like this would work?

victorh88 (author)omnommaster2016-10-04

Yes absolutely! I would buy some 10KOhm 'normal' resistors too, just in case...

omnommaster (author)victorh882016-10-04

Okay, thank you.

victorh88 (author)2016-10-03

Let me know if you would like to see a video of it working!

victorh88 (author)victorh882016-10-05

Check out the video on the top of the post! I'm really bad playing the drums so don't judge me pls... thx

Polymorph (author)victorh882016-10-16

Learn by doing! Fantastic. I bought a couple of partial Guitar Hero drumkits to do the same with. Building it entirely from scratch is impressive!

Ace Gambit (author)victorh882016-10-05

Totally! I'd love to hear how it sounds

About This Instructable



More by victorh88:Videography: How to Film and Edit a Nice Video?Homemade Electronic Drum Kit With Arduino Mega2560
Add instructable to: