Last updated on June 5th, 2010
I've had a long time interest in learning the drums. Unfortunately, I don't have the space for a full-sized real kit, and I'm simply too cheap to throw down the money for a decent set. What I really wanted was something inexpensive and simple that I could pound out beats on and learn to develop my rhythm.
Through some 'net research, I quickly discovered that piezo elements could be hacked and used as triggers. Others have managed to use PIC microcontrollers or similar hardware to read triggers and send MIDI output signals to other devices. Naturally, this approach seemed to point at what I was wanting...but it would need some customization.
While MIDI is great and flexible, I really wanted something that would allow me to play arbitrary electronic drum sets/kits. Because I don't own a single MIDI device, I decided that a PC would be the perfect sound generator. I had already done a few projects that use the serial port on a PIC, so this seemed like the way to go.
In Spring 2010, I decided that I either needed to upgrade the drum kit to be more compatible with my current computing hardware, or to get rid of it. I chose the former! I embraced MIDI and retrofit a small USB compatible microcontroller into the existing case. Ghetto modernization at its finest.
In spring of 2010, the project was revived yet again, and MIDI over USB capability was finally added to the project. I obtained a Teensy++ USB AVR controller board (free!) from PJRC and, after rearranging things and spending more time with the Dremel, mounted it on a circuit board inside the existing case.
The AVR was wired directly to the pins on the PIC, as were the power supply pins (so that the ghetto drum now draws its power from USB). The PIC still functions as before and controls the trigger LED and serial port, but I haven't actually tested the serial port in some time.
I wrote some firmware in C for the AVR board using LUFA and, since the computer interface is all just MIDI now, wrote a Pd patch to demo the drum with a bunch of synth drum kits. I demonstrated this at Dorkbot in Portland one Monday evening in 2010 with medium sized 4x2 mousepad board I built a few years ago.
The final circuit at the heart of the Ghetto Drum system uses a Teensy++ USB AVR board to read 8 inputs from external triggers and send trigger bytes to a PC as MIDI over USB. As of 2010, plugging the Ghetto Drum 2.0 into a USB port will register a USB MIDI device from which trigger data will be received as note on/off events on MIDI channel 1 (zero based).
The legacy PIC16F84 circuit is still in place and reads the same triggers. The PIC sends trigger bytes to a PC via RS232 (serial port) and toggles the trigger LED on and off.
Originally, I had written a miserable DirectX app for Windows, but I've long since scrapped that for more general/open tools. I now prefer using Pure Data for sound generation, and it can handle MIDI easily, as well as the [comport] external for reading from the serial port.
An op amp circuit changes the piezo trigger signals into nice little square pulses for the Teensy and 16f84. A MAX232 chip is used to provide the necessary voltage level shifting that the PC serial port expects.
The whole thing was built on a copper clad perf board with point-to-point wiring. A SyQuest parallel port backup drive was scrapped and used to house the final project. 8 female RCA jacks were mounted to the SyQuest case, along with a DB9 connector for the serial port connection and an LED used as a trigger indicator. The original switch, power supply jack, and power supply from the SyQuest drive were kept intact and recycled for use in the Ghetto Drum system.
If you look closely at the pictures of the circuit, you may notice that the two op amp chips are seated directly next to one another. In my not-so-brilliant attempt to save space, I mounted the IC sockets for the op amps too close together. This required shaving down some of the ceramic housing with a Drimmel tool -- I wouldn't recommend this approach, but it worked.
USB retrofit - Ghetto 2.0:
Circuit:
Final box/case:
Inputs/misc:
There are currently no sounds available for download. Sorry! Check back later and maybe I'll post something.
PIC code - The following code is what runs the PIC16f84 inside the ghetto drum system. It was written in straight C for the c2c compiler and the PIC16F84 from Microchip. It is ugly, but it seems to get the job done.
AVR Firmware - The code attached below is the firmware for the Teensy++ USB MIDI retrofit from 2010. You will need LUFA 100219 to compile this, available at Dean Camera's four-walled cubicle (or this direct link: LUFA-100219.zip).
Much/all of the op-amp portion of the ghetto drum circuit was borrowed from this circuit (image hosted locally because apparently tripod has problems with off-site image linking?) from this page. Props to Hal for donating the sweet ass SyQuest drive case that became the final project housing. He also provided some great brainstorming sessions and actually thought the project was cool (for once!). Oh yeah, and I should really thank this guy for putting out and supporting a free C compiler for the PIC. I first stumbled on the idea of using piezo elements as triggers on this page (link is apparently dead :(), but I'm sure there are many others out there like it. Thanks to Paul at PJRC for hooking me up with a free Teensy++ with a bad pin or two. Lastly, thanks to Nappybread for supporting the project ideas and pushing me to get the thing finished.
The project is complete and there's almost nothing left to do! ...Almost.
Mostly, I need to make a video of the Ghetto Drum in action.
It could be nice to build a very small, portable, piezo finger-pad. My current 4x2 cut-up-mouse-pads grid has a few problems with spurious triggers when hitting hard, mostly due to the solid core (cat5) cable I used. Getting some physical isolation/buffering would help when I'm feeling more mechanically inspired.
I should probably use the infinity foot pedal hack as a kick drum, or build something similar.
A velocity indicator of some kind would be REALLY valuable to the project, but it would probably require a whole new design that uses A/D and peak detectors. This will probably not happen until I'm inclined to build version 3 of the Ghetto Drum, which may be never. :)