Introduction: Pringle Can MIDI Drums
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...
Step 1: Ingredients!
First and foremost, you'll need 4 snack-sized Pringles cans in your favourite flavours. The other components are:
- Arduino Micro, Sparkfun Pro Micro or compatible (5V, 16MHz variant)
- 4 x Piezoelectric elements (see below)
- 1 x PNP small-signal transistor (BC558, 2N3906, or similar)
- 5-pin DIN socket
- 5 x 10K resistors
- 2 x 220 Ohm resistors
- 470 Ohm resistor
- 78L05 voltage regulator
- 1 x 22uF and 1 x 1uF electrolytic capacitor (10V or greater voltage rating)
- 100nF capacitor
- Red LED
- 1N4001 diode (or similar)
- 9V (PP3) battery and battery clip
- Prototyping board (7 x 4.5cm approx)
- Assorted 0.1" pitch PCB headers and sockets
- Double-sided adhesive tape
- Hook-up wire, solder, etc.
About the piezo transducers
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.
Step 2: Make the Drum Pads
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.
Step 3: Assembling the Circuit 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.
Attachments
Step 4: MIDI Output Circuit
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).
Step 5: Pad Inputs Circuit
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.
Step 6: Power Supply Circuit (optional)
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.
Step 7: Programming and Testing
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:
- Arduino software download page:
- Arduino Micro page:
- Sparkfun's hook-up guide: https://learn.sparkfun.com/tutorials/pro-micro--fi...
- Note that the latest versions of the Arduino IDE have support for the Micro board built-in, so you won't need to add extra board support files.
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:
- The status LED will blink any time a trigger input is sensed on the A0-A3 pins. If this isn't working, re-check the wiring to the piezo sensors. You can simulate a trigger input by temporarily linking one of A0-A3 to the +5V supply with a piece of wire; the status LED should flash quickly for as long as a high voltage level is detected on any input.
- If the status LED is being triggered, but you're getting no MIDI action, check the polarity of the wiring to the DIN socket. The drum trigger transmits on MIDI channel 1, but it can be helpful to use a synth that can be set to MIDI "Omni" mode to avoid confusion.
- You can also plug the circuit into the MIDI In on a computer and use a 'MIDI Monitor' program (often built into sequencer or DAW software) to show any received Note On and Note Off messages.
Attachments
Step 8: In Use
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... .
Step 9: Update - Using MIDI Over USB
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.
- Firstly, you'll need to install the MIDIUSB library: from the Arduino IDE menu select Sketch -> Include Library -> Manage Libraries ... to bring up the library manager. Search for "MIDI" - you should find one called MIDIUSB, and when you select it an 'Install' button will appear.
- Next, download the drumtrigger_midi.ino file from this page, and open it up in the Arduino IDE. It should build and download onto your board without trouble.
- The Arduino should be attached to the computer via the USB port (exactly as it is for programming). When the sketch is running your computer should detect a USB MIDI device, which will send MIDI notes when the drum pads are tapped.
- If you're struggling to get this to work there's a tutorial on the Arduino site which has a simpler circuit.
- You can also drive GarageBand on iOS devices by connecting the Arduino USB port via the Camera Connection Kit (which is in fact a general iOS USB adapter).