Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: How to reduce piezo bounce for analog input

  1. #1
    Junior Member
    Join Date
    Mar 2017

    How to reduce piezo bounce for analog input

    Hi all,

    I'm making an electric drumset using basic piezos and a teensy 3.2. I've got it working well enough for slow playing, as long as I adjust some variables to ignore piezo activity in between notes, but I'd like to be able to play fast as well. My setup is close to this for each piezo:

    The only difference with my setup and that diagram is that I don't use zeners at all, and I have a high-resistance resistor splitting the input signal and sending part of it directly to ground. I was hoping that putting the resistor there would reduce noise overall and also would make the piezo stop bouncing so much, but it isn't working quite as effectively as I was hoping (although, maybe I should try lower-ohms?)

    There are a couple ways I've been trying to approach this through software, each with it's own issues:
    1) Delay between notes: This works, but I want to be able to play pretty fast, and my teensy misses notes if I wait very long after each strike to start analogRead()-ing again. If I make this value too small I get false triggers, too large I get skipped notes.
    2) Increase my minimum read value: This also works, but while I can play very fast after doing this, I also have to hit the pad pretty hard. I don't really want to be wailing on this drumset all the time cause it will wear down pretty fast and because I want to be able to make the drumset velocity sensitive at some point, and I don't really want my softest sound to come from a hard strike on the pad

    My current thought is, perhaps there is a way to reduce the "bounce" caused by a piezo? If I could reduce the "after-shocks" of triggering the piezo significantly, then I'd be able to wait for less time between notes before reading again, as well as be able to reduce the minimum analog reading that I'm willing to process (so I could process softer sounds too). I'll attach an image so you can see what I mean about the after-shocks. Note that this image is of a double-strike with a drumstick, so there are supposed to be two peaks, just not like, 12 peaks
    Click image for larger version. 

Name:	double_piezo_strike.jpg 
Views:	91 
Size:	48.5 KB 
ID:	10291

  2. #2
    Junior Member
    Join Date
    Mar 2017
    I eventually figured this out. The main issue I was having is that I was using way too high of a resistance value for my parallel resistors. Reducing it to more like 40kOhm (from 2MOhm) helped with both duplicate triggers on one piezo, as well as stopping false triggers / cross-talk on other piezos.

    The value you want to use in your own projects is going to depend on what materials your piezo is attached to, as how strong of a kineticpulse you want to trigger the piezo. For instance, if you want something like your voice to activate the trigger, you will want a parallel value that is somewhere in the millions, e.g. 2MOhm. For something like a drumstick striking a hard surface that the piezo is glued to, you will want a value that is more like 20kOhm. If you want to actually tap the piezo itself, you'll want an even lower value.

    You can figure out what parallel resistance to use, by programming your Teensy to output the value it is reading on its analog pin with the Serial.println function, then by mapping the wave form with the serial plotter. You are going to want to put a delay of some amount in your loop() function so that the pulse doesn't fly off the edge of the graph in less than a second. There is a maximum value to your teensy input, so you can adjust the piezo sensitivity via the parallel resistance until the loudest thing that you want to have trigger your piezo gives you just under the maximum value possible in the serial plotter of the arduino ide.

    I've actually finished up my drumset by now, and have a pretty thorough blog post that covers this in case anyone else is struggling with the same. It's at

  3. #3
    Senior Member Projectitis's Avatar
    Join Date
    Feb 2018
    New Zealand
    Sometimes I wish there was a 'like' button. I'm not currently working with piezo, but good on you for coming back and adding that info for others to find. Also a very thorough project post! Where's the video of you playing the final product?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts