Drum Set with Raspberry Pi – Part 1

This is my prelimnary sketch of the drum kit. It's seriously sloppy.
This is my prelimnary sketch of the drum kit! It’s kind of sloppy.

I like music. I like tapping on things with either my fingers or random objects to get a rhythm stuck in my head out in the world. Since my incessant tapping seems to annoy everyone around me, I’ve decided to make my own fake drum set with the Raspberry Pi! I’ll be able to bang on it as much as I want, and maybe it’ll sound more musical than finger-tapping!

I was inspired to make a drum set after seeing some old large cans after my mom had cleaned up the basement a bit, and I figured they could double as drums. I also figured that I could rig my Pi to play audio whenever each ‘drum’ is hit.

I’ve already made a breadboard prototype with all the components, and I have written software in Python 3 that will likely drive the finished project. Since the software is mostly done, now I’m mainly concerned with building the physical project.

This is the prototype breadboard circuit for the drum set. Each button and LED corresponds with a drum.
This is the prototype breadboard circuit for the drum set. Each button and LED corresponds with a drum.

Here’s some details and components about my drum set:

  • Raspberry Pi: Since this project doesn’t require much processing power and I need at least 20 GPIO, I’m most likely going to use my B+ unless I can obtain a Pi Zero soon.
  • Four RGB LEDs: These will be placed inside each drum and will be constantly lit when the kit is in use, and will change color every time the drum is hit. The RGBs hog up the GPIO pins (12 total) and I could just use two single color LEDs in each drum to reduce the total GPIO pins used down to an amount where I could use the Model B Raspberry Pi as opposed to the B+.
  • The “Drums”: AKA the peanut canisters, will be lined up in a row and wired to four digital inputs.
These are the four cans I found, with a Raspberry Pi to scale.
These are the four cans I found, with a Raspberry Pi to scale.
  • Drumsticks: These will probably be makeshift dowels with a padded metallic tip wired up the shaft of the drumstick and connected to ground. Every time the drumstick touches the top of the drum, the pull-up resistor will connect to ground and therefore read low. That’s the simplest way I can think of to sensor read when the drum is tapped, although the idea of each drumstick being physically wired to the unit is cumbersome. I could use some sort of capacitive sensing, but I’m not sure how to do that digitally or easily with the Pi and I would need to do some research and experimentation. It would also be kind of neat to make the drums sensitive to hand-taps.
  • Speakers: The Pi will be wired to one or two speakers via the audio jack that will play a drum sound effect every time the drum is hit. I have a of couple options with the physical speaker: I can make homemade speakers to embed in the drums, attach an old external speaker, or just leave the Pi’s audio output jack accessible from the outside so that the audio output can be decided at the user’s discretion, whether it be headphones or speakers. However, each option has disadvantages; homemade speakers are cheap, simple, and embed-able, but have an extremely low volume level certainly unsuitable for hard core drumming. Standard external speakers, while nice and loud, are either clunky or require external battery power, which makes them hard to embed. Finally, leaving the audio jack open to the user might reduce the drum set’s portability.
  • Audio: The drum sounds effects themselves are actually .wav sound files played by the software. I decided to use the sample drum effects files used in Sonic Pi since there is a good variety. Because every Pi running Raspbian has Sonic Pi installed, the software will transport across any image of Raspbian, forgoing the need to download any .wav or .mp3 files along the code. I might in the future compile my own set of drum sound effects, but for now Sonic Pi provides plenty of variety.
  • Volume Buttons: The drum kit will have two buttons to control volume up and down.
  • Software: I wrote code in Python 3 using the RasPi.GPIO module.
  • ‘Soundschemes’ and ‘Colorschemes’: Since I’m using RGB LEDs and an audio mixer, there are an infinite amount of colors and sounds that can be produced. I’m adding a button to the drum kit that changes the ‘soundscheme’ or the drum tones that are played. Each soundscheme contains four related drum tones. For now, I just picked random Sonic Pi .wav files to make three mock soundschemes. I also added ‘colorschemes’ where a button can change the LED colors of each drum. This function might be removed in the future.

It might be a few weeks before I finish this. Stay tuned for part 2!


2 thoughts on “Drum Set with Raspberry Pi – Part 1

  1. Awesome blog Amanda! You have some really cool projects here. Looking forward to part two of this drum kit!

    Maybe there is a way to mount an accelerator under the can top (er… bottom?) that would look for acceleration spikes when you strike the can with a hard item (like a drumstick). The shock that is detected can play louder for taller acceleration spikes.


    • I’m glad you enjoy reading my blog!

      I really like the idea of using accelerators. Thanks for the tip! They would make the drum set much more realistic sounding by adding dynamics, and also eliminate the need to hook up the drum sticks with pull-up resistors. The kit could even be played with bare hands as well!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s