Fruit Drums with Circuit Playground’s Capacitive Touch Sensors - LEKULE

Breaking

14 Mar 2018

Fruit Drums with Circuit Playground’s Capacitive Touch Sensors

Want to play the drums but only have a pile of (slightly moldy) vegetables and fruits? Say no more. This project is for you

Why?

After a few days of confident air drumming in the car, I figured it was time to pick up the sticks again and get my chops back. Unfortunately, my bank account didn't agree. As a maker, it's always more fun to make it yourself, anyway. Seeing as I didn't have much more than a few ripe bananas, there weren't many options.

Having learned of Adafruit's Circuit Playground supporting capacitive touch, I knew it was the perfect candidate for my virtual drumset. With just a few clicks, I was able to get jammin' in no time. What's even better is that I wasn't just limited to percussion. Suddenly, I was a multi-instrumentalist.


Jammin'

How?

You see, the Circuit Playground is an Arduino-compatible platform with tons of built-in sensors and Neopixels in a small, user-friendly package. With an extensive library and example code, this makes these projects great for kids and beginners alike. One of the great features built in is its capability for capacitive touch.

Capacitive touch is found everywhere now and is a standard technology behind touch-sensitive smartphone and tablet screens. Adafruit designed the Circuit Playground pads so that they could be incorporated into a capacitive-touch system.

When a finger comes in contact with a capacitive-touch pad, it increases the capacitance by changing the dielectric constant of the surrounding air and by creating additional capacitance in parallel.
Using a built-in library, the CP can sense changing capacitance, and we can easily utilize this data within our code. Attaching alligator clips to the pads lets you extend the capacitor's reach to other materials that are at least slightly conductive.


The circuit playground. Image from Adafruit

Using an example sketch provided by Adafruit, the Circuit Playground transmits individual MIDI signals to your computer via the CP's USB cable upon every capacitive touch. MIDI stands for Musical Instrument Digital Interface. This type of communication will talk to software instruments within an audio program and play whichever instrument is selected.

Note that there are up to 127 possible MIDI notes but only a handful of capacitive touch pads on the Circuit Playground. The example sketch utilizes MIDI channel 10 and primarily controls percussion instruments like our fruit drums. You can play around with the MIDI values, 0 - 127, and learn to trigger more than just percussion instruments, like the piano I added!

While I used Apple's Logic for great software instruments, Adafruit also recommends Hydrogen or any other free MIDI program.


Creating a fruit loop within my music program


Grab your nearest semi-conductive friend and get jammin'!

No comments: