Here’s a link to my instructable: http://www.instructables.com/id/Drum-Wear-drums-in-your-clothing/
Look at the riders of any city bus. Many of them are plugged into their music players, tapping away to the beat. I propose to augment our natural love of rhythm into a ubiquitous wearable drum system. The target user of this system isn’t only the typical rhythm loving bus rider, but also an amateur drummer. Drum kits are heavy and unwieldy, making them difficult to transport to a jam session. The proposed system can also act as a stand-in for a full drum-kit for quick, impromptu jamming.
I took a pair of jeans and imbued them with two force-sensitive resistors, one on each knee. The left pocket houses a sparkfun box containing an arduino and a breadboard. Wires run through the pant legs to connect the pads to the box. Wiring the pants was surprisingly easy, since as I discovered, electric tape easily adheres to denim.
The two FSRs are hooked into pull-down switches which connect to analog ports of the Arduino. Every time a pad is hit, this Arduino sketch sends the pad ID and the force of the impact through the serial port. A python program running on my machine listens on the serial port and synthesizes sounds corresponding to the data using pyserial and pygame respectively.
This first prototype of Drum Pants is intentionally crude. Aside from increasing this system’s production value, there are a number of limitations that should be addressed. The current prototype requires a computer to synthesize sounds, which greatly hinders portability. By retrofitting the Arduino with a wifi shield, the system could communicate with any wifi-capable synthesizer, such as an Android phone.
Another issue with this system is that it’s built entirely into a pair of pants. This makes putting drum pads into other items of clothing impossible. To address this problem, the pads could wirelessly communicate to the Arduino device. In this case, the pads would be self-contained transmitters that could be placed anywhere. This opens up a wide variety of applications, such as placing the pad onto a pair of shoes to simulate a kick or hi-hat pedal.
Note: this is a mirror of a blog post on my site.
Note: please see the pdf version for illustrations.
Look at the riders of any city bus. Many of them are plugged into their music players. Some of them are actively involved in the music. People drum on their chest and knees, tap their feet on the floor and nod their head to the beat. The goal of the proposed system is to augment our natural love of rhythm into a full drum-kit. The target user of the system isn’t only the typical rhythm loving bus rider, but also an amateur drummer. Drum kits are heavy and unwieldy, making them difficult to transport to a jam session. The proposed system can also act as a stand-in for a full drum-kit for quick, impromptu jamming.
The system is composed of three parts: a series of specialized drum pads, a central Arduino-based processor, and an audio synthesizer.
A drum pad needs to be sensitive to hand-drumming strikes. It’s critical to determine how strong the impact was on the drum head, since the synthesized sound will reflect this information. A piezoelectric sensor can be used to measure the intensity of the impact. Ideally, the pad should be universal enough to serve non-hand drum contexts, like to simulate a kick drum. If this is not possible, a special type of drum pad can be developed for placement on a shoe for example.
A drum pad is a self contained unit. There are a variety of ways to attach the pad to the impact surface. The pad could be stitched onto the knee part of pant legs, glued onto the chest area of a t-shirt, sewn into gloves for clapping, or strapped onto a pair of shoes to simulate a pair of drum pedals.
A drum pad needs to be able to transmit the strength of each drum impulse to the processor in real time. The communication needs to be immediate, since any delay in drum feedback would be a departure from the immediate feedback expected by drummers. Ideally, this communication should occur wirelessly, like through a simple radio protocol. To transmit radio, an RF transmitter chip is required. If wireless is not feasible, the project can be scaled back to use wired drum pads which could be stitched into a pair of pants.
Every time the processor gets a drum impulse signal, it needs to synthesize sound. It’s reasonably easy to create MIDI output without an external board1. However, most people already own headphones with standard 1/4” audio jacks. To use such a jack, it’s necessary to synthesize digital audio, which is significantly more difficult and would require the arduino to synthesize with a dedicated synthesizer chip, such as VMUSIC2, which also provides a 1/4” audio jack. It remains to be determined whether or not this approach would seamlessly mix multiple drum samples played at the same time. In the worst case, the synthesis step can be offloaded to a computer by serial communication.
Best Case Implementation
The drum pad could be implemented based on the Nike+ system for tracking a runner’s speed. This system is composed of a foot pod, placed into the runner’s shoe, and a receiver which can be plugged into an iPod. The transmitter is built out of a nRF2402 radio transmitter and a piezoelectric cell for detecting the strength of the impulse. The receiver contains a nRF2401 chip for communicating with the transmitter. The communication protocol is quite simple. While the foot pod is activated, it transmits a “hello world I am ” message to the receiver in very short bursts. The foot pod is conveniently powered by a tiny lithium battery.
The Nike+ system fits well into the proposed system by taking multiple foot pods and convert each of them into a drum pad. By interfacing with a Nike+ USB to serial adapter3, it should become possible for the Arduino to get readings from the Nike+ receiver.
Worst Case Implementation
There are some potential limitations of the above system. It remains to be seen whether or not the impulse from a hand strike is strong enough to activate the foot pod’s piezoelectric sensor. Also, the Nike+ system is designed for linking one transmitter to one receiver. To adapt it to the proposed system, one receiver should be able to read from multiple transmitters. Whether or not this is easy has yet to be proven. Another issue with piezoelectric based drum systems is that there is “crosstalk” between the piezoelectric sensors. In other words, when one piezo sensor is struck, it gets most of the impact, but other piezo sensors also react4. Force sensitive pad sensors do not suffer from this problem, but it would take an unknown amount of engineering to build it into a Nike+ system as proposed above.
The above implementation relies heavily on Nike+ being a suitable implementation platform. If it’s not, there is ample room to scale back to a simpler design. At the very least, force sensitive resistors can be sewn into the knee area, and wired directly to a lilypad arduino board, also embedded into the same pair of pants.
Simon Says is a contraption which captures a beat on a drum pad, and then continuously replays this beat by tapping a drum stick on the table. By pressing the record button, you can tap along to the beat to add additional notes. Here’s a brief video to illustrate the concept:
Here’s the state machine diagram:
The construction is straight forward. The Rock Band drum pad drives a button connected to a pulldown circuit, which tells the Arduino that there was a beat. Initially the drum pad was made with a piezoelectric element, but the readings were unfortunately too erratic. The drum stick is connected via paper clip to a small servo motor. This motor is fastened into the box that my Arduino shipped with.
The program is somewhat complex. The beats are captured in an array of ticks, where each tick indicates the number of loops iterations that have occurred since the beginning. I also had to write an array merging algorithm for the live capture state, in which the existing beats need to be merged with the newly captured pattern. You can see the sketch here: piezo_knock_tap
For this project, I used a servo motor to control a Nerf gun. I built it and installed it in my HCI lab room. The idea was to have the gun automatically fire at unsuspecting visitors to the room. I left it armed last night and look forward to the results! Here’s a simulation of what will happen to the first person entering my lab room tomorrow morning:
To arm it, one manually cocks the gun, loads a dart and resets the program by pushing the button on the Arduino board. The program then allows 10 seconds for the door to be open before it arms the system. When the system is armed, the servo activates and shoots the gun as soon as the door is opened.
As you can see, I generously used rubber bands and binder clips in this project. I used them to fasten the servo motor to the Nerf gun. I also used them to harness a telephone cable by wrapping a rubber band around the RJ11 connector, carefully inserting jumpers, and applying additional pressure (to ensure contact) with binder clips. This hacked telephone cable stretched from the gun to the door sensor.
Initially I used external power and a transistor to control the gun, but then realized that the Servo I borrowed from Roboclub can in fact be powered by the Arduino directly. The circuit here is dead simple, so I will not include it.
Arduino Sketch: shooter
Not terribly bizarre or interesting, but I was impressed by the size of this BlueSMiRF bluetooth board. It seems small enough to embed into clothing!
There isn’t much to see here yet. I’m working on a version where three LEDs shine through a transparent glass vessel. A motor distorts the water in the vessel, resulting in a cool visual effect. I haven’t found a motor yet, nor a blue LED, so instead, here’s a demo of the basics required for this assignment:
A photo of my breadboard:
And the source code: pulsing_color_mixer