Saturday, February 25, 2017

Piezo activated Drumlights - The Prototype

One of my colleagues is member of the Adelaide Samba drumming club - SaSamba. I guess he was a bit jealous of the feathered samba dancers getting all the attention during a gig. So he brought up the idea of a sound/drumming activated light system for the band.

We aimed to get the set-up ready for the Adelaide Fringe parade. The parade takes place at night with plenty of opportunity to show off different sorts of lights.
Prototypes in assembly
For the first prototype I used an electret microphone with a pre-amplifier. With the right threshold tap and claps would activate the LED strips I had hooked up to it. It was only 5 RGB Led's on the test strip, but I was pushing my luck driving them directly from an Arduino Nano GPIO. An n-channel Mosfet is needed for safely sinking the current required for meter long strips.
The other trouble with this approach was the cross-talk between drums. Without fancy FIR filters identifying particular drums there was no reliable way of lighting only the drum being hit. In a band surrounded by screaming crowds an omni-directional electret microphone is definitely not the way to go.

After a conversation with Pix at the Adelaide Hackerspace I decided to switch to a contact-mic based approach, using a piezo as a knock sensor. Piezos can produce very large voltages in open circuit conditions, so I loaded this one with a 1MOhm resistor tacked directly onto the disk. Soldering on piezos is tricky, have to use flux, a hot iron and be quick. The disk acts as a heat sink and cools down pretty fast.

The piezo outputs only a few millivolts with this load (16-20 out of the 1024 max on the Arduino ADC range). This could be improved with pre-amp (opamp configured as a charge amplifier), however it is sufficient for thresholding and briefly flashing the LED's on drum hits.
Heatshrink as enclosures
My drummer colleague tested this with the whole band and it shows pretty good isolation as well. We went on to make 10 of these on protoboard and incorporated an overkill DPAK Mosfet (30V, 58A). These were covered in heatshrink and used with a lipo at the fringe parade in front of around 70,000 people. I wonder how many appreciated the fudging that went into making them.