DRUM TRIGGER
The DIY USB MIDI drum trigger from your bench
Watch trailer

BUT WHY?

Do you want to have something you can record your drumplay on your PC with? Do you want it small so you can store it easily when not used? Do you want it silent so your play will not disturb anybody around? Do you think the available drumpads are either too toy-like or too pricey as I do? Are you into DIY, and your soldering iron is your weapon of choice?

If you love drums, and answered to questions above with a head-nodding "yes", these pages are meant for you.

This project is not intended to create a top-notch commercial gadget. This is rather the offspring of a very interesting experiment. Take it as a low-cost but fairly functional alternative to commercially available drum triggers/pads. Hope that this project will inspire YOU to create something even more fantastic.

THE MAGIC BEHIND

The basis is a programmable microcontroller with at least 8 analog inputs and a couple of piezo elements used as sensors. A piezo works like a close range microphone. If you hit it, it will generate some changing voltage. We need the microcontroller to pick up that voltage change, determine its characteristics and send MIDI messages to PC over USB. Then a music software in PC (DAW) can play various samples (drums, etc.) when those MIDI messages arrive. Arduino Micro was picked here because of its availability, relatively low price, size, and enough analog inputs to build a multi-sensor trigger.

HOW HITS ARE DETECTED

The microcontroller is periodically reading the values from its analog inputs (where the sensors are connected), one by one, to determine the current amplitude on each of them. We refer to a read value from an analog input as a "sample". Once the amplitude on an analog input reaches a certain value (the threshold), the program in the microcontroller starts to analyze upcoming samples. The input's maximum and the maximum of steepness - the amplitude difference between previous sample and current one - is recorded during a short period of time. Once the specified number of samples are read, it is determined whether it was an actual hit, based on the maximum amplitude and steepness, and the corresponding MIDI signal with the computed velocity is sent over to PC. To prevent erroneous re-trigger of the pad, the program at this point waits until the signal on the input goes below threshold again.

CHALLENGES

There were a couple of challenges to tackle during the development of hardware and software. The first was to find out whether the idea would work. A one-sensor setup was created first to record various hit styles, double hits, hand hits and drumstick hits. The recorded samples were then analyzed to find out how to detect a hit reliably.

Once the basic program was in place, and a two sensor setup was being tested, new problems arose. The first was the slowness of reads. While a one-sensor setup worked like a charm, once the program started to read multiple analog inputs, read speed dropped dramatically. Based on various sources, the Arduino Micro has only one A/D circuitry, which is multiplexed to its analog inputs (a switch controls which analog input is connected to A/D). This switching seemed to consume more time than expected. Fortunately it was possible to solve the problem by setting the A/D converter for a less accurate, but quicker read.

Another problem arose from the single A/D feature. Inside, the A/D process works by switching the multiplexer to the input the program wants to read, then charging a little capacitor with the input, and after some time the capacitor is disconnected from the input and the charge in it is measured. Quick switching and reading of inputs seemed to cause that the capacitor had not enough time to discharge before next read, thus a hit on one pad triggered the others randomly. The solution to that was to connect an analog input to ground, and reading that input between every other input read, to short out the capacitor. In test build it worked, but when the board was fully assembled, the read of that grounded input seemed no longer necessary. Either the grounded pin is enough, or if all pins are connected to something, all analog reads are correct (and the theory about the capacitor not having time to discharge is wrong). Anyways, the pin connected to ground is left in the designs, just in case. You can use it as an extra input if you wish... (but tell me if it works without the grounded pin, please :) )

A WORD ABOUT CROSSTALK

The biggest challenge perhaps, was to eliminate crosstalk. The first crosstalk-like behavior was due to the shared A/D circuitry mentioned above. A bigger issue was a more interesting one. Once you hit something, the vibrations will propagate via the material the pads are installed to. Let it be a rod, or in this case, the whole construction of the bundled 6 pads. Like sound waves travel via air and water, it can travel via solid materials. To mitigate this, simple adhesive rubber pads were installed under each drumpad, to raise them above the back plate. Also the drumpads were cut to be smaller than the actual "holes" on the construction, so they don't get as much vibration from the sides.

This was of course not enough as a hit on a drumpad is enough to send the other drumpads flying. Not visible to naked eye, but the slow-mo videos revealed that this is happening.
Couple of thicker metal plates were installed (glued - i am not sure about its durability, so screwing could be a better alternative) under the backplate, to increase the construction weight, which is limiting its ability to resonate and to be as jumpy as it was.

The final countermeasure was to implement a simple algorithm to the hit detection: only those hits are considered a real hit, which are similarly hard than the most hard hit on the drumpad. Others are considered just crosstalks. This worked good enough for my taste, but has the drawback that you cannot hit one pad lightly and an other very hard at the same time - the former will be considered to be a crosstalk and not trigger MIDI event. The crosstalk detection is applied only to the first 6 pads (the bundled ones to a single construction) and can be turned off entirely.

THE CONTROLLER

The controller is designed as a separate board, so it can be used with different kinds of triggers - either with the bundled 6 pads described below, separate pads attachable to a drum stand, sensors installed to real drums, or other. This allows you to experiment with it just by a couple of pads before you start building something more complicated.

There are 4 stereo jack sockets, providing connection of 2 sensors each. Each input is treated with a circuitry meant to filter out voltage peaks greater than 5V (using a Zener diode), before entering the analog input of the microcontroller, to provide some sort of protection of damage by overvoltage.

There is also a 5th jack to provide connectivity to 2 simple switches (one used for hi-hat pedal, the other one triggers a MIDI event when pressed - you can set up your DAW to do whatever you want on this event).
An RJ-45 type socket is used to connect another 3 switches (one for preset switch, one for toggling velocity detection, and one for custom functionality) and 3 knobs (potentiometers) to control parameters you want in your DAW.

In the center, there is a socket accepting an Arduino Micro board, so you don't need to solder the Arduino itself and leave it reusable if you get bored with this project.

To make the board you can use a PCB manufacturing service or you can do it yourself by toner transfer/hand drawing, use the provided PCB design in resources section, or create your own.
If you go with the provided design, you will need these components:

  • 1x PCB board (single layer is OK) (see size in design)
  • 8x 1MΩ Resistors
  • 8x 5,1V Zener Diodes
  • 5x 3.5mmm stereo jack connectors (TRS)
  • 1x RJ-45 socket
  • 1x female pin header (at least for 24 pins)
  • 1x Arduino Micro

You need to upload the provided program (see resources section) to your Arduino to make things work, this can be done normally via the Arduino IDE.

THE PADS

The pads themselves consist of the piezo element, and a thin metal sheet to distribute vibrations from the whole pad to the piezo, sandwiched between two 5mm plastic foams. Hot glue can be used to keep everything in place. The foam I used is PE (I guess), find one which is not too soft and bounce off drumstick hits nicely. Remember that the foam will probably not last too long (depending on how hard you will hit them). Try to experiment with rubber or other material to find a better alternative.

Don't forget to solder wires to the piezo first. If you have an unused UTP cable lying around, you can remove the outer insulation and use its twisted pairs for this purpose as I did. You will need around 50cm long wires, if you plan to use them in the 6 pad bundle described below. Solder the striped (white-ish) wire to the outer circle (-), and the full color wire to the center (+).
Also, make sure the wires are exiting the area of the pad on the center of the shorter side of pad, if you plan to use them in the 6 pad bundle described below.

THE 6 PAD BUNDLE

To build a bundle you will need 6 drum pads mentioned above, around 2 meters of 1x1 square aluminium (hollow), a metal sheet (i used steel, but aluminium might work as well), couple of screws (around 24; I used screws which you find in PC cases - M3 and #6-32 UNC - the latter is better), 4-6 rubber pads for the foots, 24 small rubber pads to raise the drum pads above the black plate sheet.

Start off with cutting the metal pieces to their corresponding sizes and shapes. Don't forget to drill the holes (around 6mm diameter) to the side of each center-piece aluminium where the sensor wiring will go. Also cut out (drill a hole, then make the shape) a ~10mm long piece from the bottom side of the ends of center-piece aluminiums, it will come handy when putting them into place with the wires inside.

Secure each aluminium piece to place with screws, to avoid them to fall off/move. To do this job, you will need to drill holes through the base plate and the aluminium pieces. The holes needs to be a bit smaller than the diameter of screws, then the screws will bite in to material by themselves. I glued the aluminium pieces in place with a small drop of superglue, so they remain in place during drilling. To place the pads and do the cabling, you will need to separate the aluminium pieces again (otherwise it could be hard to achieve), lead the cables through the holes and hollows of the aluminium pieces, and secure the pieces with the screws again. When all done, add the rubber pads to the build. Finish with soldering the cables to connector board, and securing the connector board to place (glue or screw in). The connector board PCB design is here. It is a simple board with 3 stereo jack sockets. Solder the striped wires (-) to the sleeve pins, and the color wires (+) to the tip and ring pins of the connectors.

THE CONTROL BOARD

The design of a small addition to the build, attachable to the 6 pad bundle, consisting of 4 potentiometers and 3 switches, is available in resources section.
The latest two potentios should be different types (one linear, the other non-linear, or with a groove in the center position, etc), so you could switch between them using a small switch.
To build this you will need these components:

  • 1x PCB board (single layer is OK) (see size in design)
  • 4x 10KΩ Rotary potentiometers
  • 3x Push buttons
  • 1x RJ-45 socket
  • 1x 1P2T SPDT Miniature Slide Switch

...AND MORE

And now, use your imagination to attach sensors to drum kicks, or anything else you want to make a MIDI drum trigger. ;)

RESOURCES

You can find all the resources here to build your own drum trigger for free of charge.
Please bear in mind that this material and sowftware is provided to you AS-IS, without any warranty. Use them at your own risk.

If in any doubt or you think there is information missing, feel free to contact me via social network linked on the bottom of the page.

The Controller

Controller Schematics Controller PCB design (EAGLE) Software for arduino (source)

A program for your PC, so you can tweak the parameters of the controller via USB

Controller program for PC (Windows binary) Controller program for PC (source)

UI board

The additional board with 3 knobs and 3 switches, connectable via the RJ-45 cable.

UIboard Schematics UIboard PCB design (EAGLE)

6 pad bundle connection

The board to be attached to the 6 pad bundle, to provide easy connection to controller.

6 pad bundle connection board PCB design (EAGLE)