Ever wanted to unleash your inner rock god, but couldn't find the space to put a drum kit? Frustrated at trying to play GarageBand with fat fingers? Or just someone who can't stop eating crisps? Whichever it is, this is the project for you!
This Instructable will show how to make a set of mini drum pads using Pringles tins, an Arduino, and some piezo sensors, which will trigger any MIDI device or computer drum synth. The pads are velocity-sensitive and as easy to play as drumming your fingers. Let the fun begin...
First and foremost, you'll need 4 snack-sized Pringles cans in your favourite flavours. The other components are:
What you're looking for is just a piezo element - not in a plastic case, and not with any attached electronics to make it into a beeper or sounder. I've used a couple - LS03807 from CPC, and YU85G from Maplin, with good results. The latter is bigger in diameter which will make playing with two fingers easier. If you can, get ones with ready-soldered wire connections - the bare discs are tricky to solder neatly.
Begin by eating all the Pringles. I found that getting a child to help made this much quicker.
Wipe clean the inside of the tin and give the lid a wash to remove all grease. When dry, attach the piezo to the centre of the lid using double-sided tape, ensuring the whole metal disc is attached firmly.
Drill a small (5mm) hole in the side of the tin, poke the wires through it to the outside, then attach the lid to the can. For building the prototype, I soldered a 2-way 0.1" socket to the leads, which plugs onto a matching header on the board.
The circuit is simple enough to put together on a breadboard, but I've made a soldered version for robustness. The complete schematic is attached as file midi-trigger.pdf, but you may find it easier to construct in individual stages, as shown in the following three steps.
The pictures and circuit sketches show a 24-pin Pro Micro clone (see
https://www.sparkfun.com/products/12640). Note that an Arduino / Adafruit "Micro" board has a different pinout, although the signal names are the same.
This bit of the circuit uses a transistor connected to the TXD (serial output) from the Arduino to drive the MIDI output, as shown in the circuit. Make sure you get the C, B and E connections on the transistor the right way round - the BC558 and many other transistors are connected as shown in the sketch, but some other types can vary.
I found there's a lot of conflicting information on the Internet about how MIDI is wired to a 5-pin DIN socket, so follow the photo when wiring up: the red wire is the '+' connection (to R2 in the circuit) and black is the '-' (to R3).
Each pad is connected directly to one of the Arduino's analog inputs (A0-A3), with a 10K resistor connected to ground as shown. You'll need a connector of some sort to allow the pads to be unplugged while assembling the rest of the board.
You can power the Arduino over its USB connection, plugging it in to a computer or a power bank. For maximum portability, though, I added a simple voltage regulator to run it from a 9V (PP3) battery. Current drain is about 50mA, so if you're going to use it a lot a rechargeable PP3 is a good idea. I included a removable jumper (JP1) so the regulator circuit can be disconnected when the Arduino is being powered from USB during programming.
In the circuit D1 is an "idiot diode" and will prevent the circuit from being destroyed should the battery be connected the wrong way round by mistake - this is surprisingly easy.
Also shown in the circuit here is a status LED connected to the D2 pin on the Arduino. The firmware flashes this whenever a trigger is detected. This is also completely optional, but can be a really useful troubleshooting aid.
If you're new to Arduino it's a good idea to get the Arduino IDE set up and working with a simple example program first. Here are some useful links:
If you included a status LED (see previous page), the attached file blink.ino will toggle it on and off every second. If this is working you can download drumtrigger.ino, which is the complete drum trigger program in one file.
The impatient among you can just upload it to the Arduino, plug everything together, and go!
If things aren't quite working right, try the following tips:
With a bit of luck, you can plug it straight in to a MIDI drum synth and start playing. The four pads transmit kick drum, snare, closed hi-hat and open hi-hat note values according to the General Midi specification (see "General MIDI Level 1 Percussion Key Map" at https://www.midi.org/specifications/item/gm-level... ).
In the first picture I'm using Apple's GarageBand on an iPad via a Yamaha i-MX1 MIDI interface. For newer iOS devices with a Lightning port, a standard USB-to-MIDI cable plugged into Apple's Camera Connection Kit adapter works fine.
If the MIDI channel or note values aren't right for your intended use, you can edit drumtrigger.ino to suit. Change the value of MIDI_CHANNEL or the values in midiNotes, respectively. To convert from note names to numbers there are many handy charts on the 'net e.g. http://www.midimountain.com/midi/midi_note_numbers... .
A number of comments have asked if the drum trigger can be connected directly to a computer, without a separate MIDI interface.
If you are using an Arduino based on the 32U4 chip (a Leonardo, a Micro, or the Sparkfun Pro Micro I used) this is easy with a few changes to the Arduino sketch.