chipKIT: TouchClamp click drum machine


In this project I will use the VS1053-based MP3 Click as a drum machine, with the TouchClamp Click as input device, and some jars acting as drum pads. One chipKIT UNO32 is used to control the whole musical instrument, the software being written in Arduino IDE. The required chipKIT core was installed via the boards manager.

This blog post is more than two years old.

Initially I wanted to use the Flip & Click board, but I had to change my mind: even in version 1.6.9 of Arduino IDE the I2C library for SAM processors is flawed, and there’s no way to issue a repeated start command. As the Flip & Click is inspired from the Arduino Due, a board that was discontinued from the line of products, it looks there’s little chance to see a fixed I2C library soon. I think the only way is take some time and fix it myself…

Anyway, this leaves me with little options. I need an Arduino or Arduino compatible board that works with 3.3V as both the TouchClamp and the MP3 click boards are 3.3V devices. That board should also be compatible with the Arduino Uno Click shield that I plan to use. The final choice went to the chipKIT UNO32, which was already in my inventory. I know that this little board was replaced by the chipKIT uC32 – no big deal, just use whichever board you have.

If you don’t like the chipKIT range, another good candidate for this project is the 3.3V version of the Arduino Pro 328. All you have to do is to adjust the SPI clock divider accordingly. For your information, the Sparkfun part no. is DEV-10914.

So, here’s what I used: chipKIT UNO32, Arduino Uno click shield, MP3 click and TouchClamp click:

chipKIT UNO32, Arduino Uno click shield, MP3 click and TouchClamp click

Drum machine parts: chipKIT UNO32, Arduino Uno click shield, MP3 click and TouchClamp click

The pin definition used in the software below require the TouchClamp to be placed in the first socket, with the MP3 click the second socket.

TouchClamp click drum machine

TouchClamp click drum machine

Connections to the jars or “drum pads” are made using some wires with crocodile clips on both ends. No soldering necessary. The TouchClamp click offers seven plated holes for clamps, with an eighth button right on the click board. As such it allows for a small drum arrangement. I went for a typical rock setup, with a bass drum, a snare drum, low-, mid- and high-tom and two cymbals. It looks like this:

Drum pads arrangement

Drum pads arrangement

In the picture above the glass bottles act as cymbals and the compressed air can in the front is the bass drum. The black can is the snare drum, the yellow one is the floor tom. The two blue cans on the last row are the mid- and high tom drums.

Normally the bass drum and the hi-hat cymbal are played using foot switches. Unfortunately I had none of those, so everything here is played by hand only. But I leave this option open, it’s extremely easy to change the code if you add the missing foot switches.

That’s all for the hardware side…

1 2 3

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.