Piezo "Knock" Sensors as Digital Input

Hey folks.

So if I want to get as many knock/vibration sensors into the Arduino as possible, I will have to use many as digital inputs, so I was hoping someone could offer thoughts on the simple schematic of:

Piezo -> parallel out to both 5.1v Zener Diode (oriented from ground to v+), 1Mohm Resistor -> from parallel, splitting to negative rail to ground, positive rail to analog (and what I hoping to make digital) input.

This circuit works very well as analog, but I'm wondering if there's any ways to tweak it for a specific 5V output for digital in. Should I buy piezos that are rated at higher than 5v (like maybe 12 or 15v) so that the Zener knocks out everything beyond 5.1 and passes a nice, fat, compressed, 5V signal? Or is there some resistor trick that might work better? Any thoughts or experience are welcome and much appreciated.

I've been playing drums for about 12 years, the last 3 of which has been predominantly on an electric kit (Yamaha DTX-IIs), but I want to be able to have a compact electric padset next to my acoustic kit, so I'm gonna build one around the Arduino. I figure MIDI takes 1 pin (with the other two MIDI connections being ground and +5V @ 220ohm), I want to be able to "scroll" between 4 different kits / soundbanks, so I'll have 2 other digi pins for 2 SPST switches (giving me 4 states), and that leaves me 10 digi ins and 6 analog ins equaling 16 pads / potential simultaneous sounds. The sounds will be synthesized / assigned samples either in the Yamaha module or in my computer (SuperCollider or some DAW), and that's that.

Thanks again,


Why don't you do like edrum.info and use a 4051 to multiplex the different channels?

Like so: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1171463483 http://www.fluidforms.at/de/CassiusHow.php http://www.arduino.cc/playground/Learning/4051

We're trying to make the same thing you are, so we might be able to work together on this. We've been looking at edrum.info, and he's using 7 direct channels and 8 more multiplexed over a 4051. The Cassius uses a MC14067 which does the same but for more channels. The code couldn't be easier. Edrum.info's analog boards are pretty easy, and they should play well together with the Arduino.

Are there any reasons multiplexing is bad? Apparently the Arduino can work with up to 63 sensors... That makes for a HUGE drumkit :)