Pringle Can MIDI Drums

76,061

497

53

Published

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.

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:

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.

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).
Circuits Contest 2016

Runner Up in the
Circuits Contest 2016

2 People Made This Project!

Recommendations

  • Water Contest

    Water Contest
  • Clocks Contest

    Clocks Contest
  • Creative Misuse Contest

    Creative Misuse Contest

53 Discussions

Good day, sir !

I was trying to make this project (this drum thing is kinda cool, just sayin'), only that I'll be using an Android phone for the drum synth. I'll be using an Arduino Micro, too. Guess I'll not be needing DIN "things" anymore, or should I ? Any tips, suggestions, or recommendations? I would really appreciate it.

PS: Will I need to modify the codes in the sketches to match it to my Android phone? I'm pretty new to all this stuff, hehe

0
user
L'Ours

8 months ago

Hi,
Fantastic project, I had a lot of fun doing it. A little trouble in the end, Could you help me ?
I made it with 9 pads:

- 6pads from A0 to A5 on one side, and when I plug only one and hit it, It sometimes trigger the entry beside, example: I plug the snare, hit, and I can Hit snare and hi-hat, or even both. Where could that come from ?

- On the other side, I use the entry 4, 6, 8, 9, 10, 12 (analogic) but put Resistance only for 4, 8, 12 (no resistance left:-) and only track 8 is working. This time perfectly, no noise from the entry beside.

Thanks for your help.

3 replies

Found it !!

Was the programming, the analogic on pin 4, 6, 8, 9, 10, 12, are called differently in the programme: Respectively A6 to A11. After the correction every track works well.

HI Sir Can you please help me to make like this. I want 9 pads or whole set of drums for this project. Can you help me the code and schematic thanks.

You'll need to wire the extra pads up to analogue input pins of the Micro.

There are 6 input pins called "A0" to "A5", but there are another six available which are shared with the digital pins. They are shown in the picture at

https://www.arduino.cc/en/uploads/Main/ArduinoMicr...

labelled "4/A6", "6(PWM)/A7", "8/A8" and so on.

You'll need to change the code in "drumtrigger.ino". For 9 pads:

* Line 13 change to "const int NCHANNELS = 9;"

* Line 14 (inPins) - add extra values between the { and } for your nine chosen input pins, e.g. " { A0, A1, A2, A3, A4, A5, A6, A7, A8 }"

* Line 15-22 (midiNotes) - add extra MIDI note values here, for your extra channels (9 values in total). Make sure you separate the values with commas. The "// C3, Kick" bit is a code comment - you don't need to add these, although it may help you later.

* Line 23 (thresholdLevel) - add 5 more values here so there are 9 entries in total. You can use the default value (30) to begin with, and adjust it later if the sensitivity is wrong.

* Line 24 (maxLevel) - add 5 more values to make 9 in all. Again, start with 400, and change it if the sensitivity for "full velocity" is wrong.

That's all, the rest of the code should work unchanged.

Hope that helps.

Ian

0
user
void2

1 year ago

Hello, I love this project. I'm attempting to make this but instead I'm using the Uno. I have no problem uploading the code to the board but after it's uploaded nothing is happening. I'm not getting any output from garage band. Any help?

1 reply

Hi Ian, Thank you for making this awesome project! I'm having trouble connecting it to a device.

The MIDI to USB cable I'm using is here:

https://www.amazon.com/VicTsing-Cable-Converter-K...

I am trying to connect the drum set to either an iPhone or my PC. I think that the problem is coming from the OTG adapters I am using since nothing happens when the iPhone is plugged in. Also, the MIDI cable only lights up when I plug it into a PC. Even then, it doesn't display an input or output light when I tap on the drums (though the LED does). Additionally, I can see in the photos included in the tutorial that you are only connecting the Arduino to the input socket of the MIDI adapter. Do I need to do anything to the output socket?

The two adapters I am using are here:

https://www.amazon.com/VicTsing-Cable-Converter-K... https://www.amazon.com/VicTsing-Cable-Converter-K...

I would assume that the problem is coming from the USB to lightning setup or the MIDI cable, but maybe I'm missing something? Any help would be appreciated.

Hi Ian, I'm from Argentina. I'm trying to make this, as I found it to be motivating for learning some things about Arduino, and electronics. I haven't found a store nearby that sells the DIN socket. Do you believe I can use the data bus from a USB cable to make the connection to my computer? And most important, that my computer will be able to make the sound? Thank you in advance, and I apologize if my english's bad, it's been a while since I've had to use it.

1 reply

Hi,

I have just added a new "Step 9" to this Instructable which explains how to use a USB connection instead of the DIN socket version. You will need to download some software for the PC to make the drum sounds - if you're interested in recording your own music search for "DAW" (Digital Audio Workstation) software.

Thanks

Ian

Hi

I have downloaded a MIDI application for my pad.

So, how to connect the output of Pringle Can MIDI Drums to the pad ?

Probably via the USB port, but which wiring ?

Many thanks

Jean-Claude from France

1 reply

For an iPad, if you have Apple's Camera Connection Kit you can connect the Arduino to it using the Kit's USB adapter and a USB lead. I have added a new Step 9 to the Instructable which explains how. You need to use the 'drumtrigger_midi.ino' file from Step 9, not the one from Step 7, when programming the Arduino.

Thanks

Ian

Hi,

I have finished the system, but it doesn't work.

The led flashes according pression on the sensor. So, it's not so bad...

In fact, I think I have found the reason.

I have connected the output directely in a audio amplifier input.

When I read the instructable you mention MIDI signal, which normaly is a logical signal and not analogic.

Could you confirm that ?

If I am right, could you give me a link to a simple and free MIDI player for a pad.

Many thanks for your help

Jean-Claude from France

I want to implement the project with an Arduino Uno. I replaced Serial1 with Serial but I have problems uploading. I also corrected the port.

What else besides the Serial and port do I have to modify?

ผมไม่สามารถลงโปรแกม drumtrigger.ได้ และไม่มีความรู้เรื่องโปรแกมและ midi เลย กรุณาช้วยฉันด้วย ผมต้องการทำให้สำเร็จ

error while compiling

7:24: error: 'void MIDI_setup()' was declared 'extern' and later 'static' [-fpermissive]

any hints?

1 reply

Are you using a very new version of the Arduino IDE? (I'm using 1.6.7) Or do you have any 3rd-party MIDI libraries installed?

As a workaround, you could try changing "MIDI_setup" to something else (e.g. "MIDI_setupX") everywhere in drumtrigger.ino

Thanks

Ian