Homemade Electronic Drum Kit With Arduino Mega2560




Posted in TechnologyArduino

Introduction: 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.

Circuits Contest 2016

Second Prize in the
Circuits Contest 2016

Step 1: 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

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

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

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

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

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

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

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.



Email: victorherrero16@gmail.com

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...

2 People Made This Project!


  • Spotless Contest

    Spotless Contest
  • Microcontroller Contest

    Microcontroller Contest
  • Space Challenge

    Space Challenge

We have a be nice policy.
Please be positive and constructive.




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


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

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

2 replies

Yes you can, you just need a midi interface

Is this the same code and schematic?

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.

1 reply

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.

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

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.


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

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)

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

1 reply

U can go and watch this video:-


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!

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!

1 reply

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

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

1 reply

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

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

1 reply

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