It's been a while since I updated this project, coz life got in the way and I didn't have access to an oscilloscope to actually know what I was trying to measure. Fortunately, now I do. Before I write about those measurements, let's talk about the pads.
Realistically, I'm not going to build a whole drumset (for several reasons, including no time and no room for that). Since the whole thing will just be a toy for me anyway, I decided to make it a finger drumset instead. Much more manageable.
Following that decision, I noticed that the piezos seem to react quite differently whether they're enclosed in some kind of pad or not. Since I'm not going to use them bare, I'd better experiment with pads right away. I built simple pads by sandwiching the piezos between round pieces of cheap Amazon mousepads. The pads have a diameter of about 6 cm, the piezos are 35 mm diameter, and I glued the whole thing together with spray glue. It's ugly but I don't care :p
Thanks to the oscilloscope, I can stop hypothesizing about the signals and make clean measurements. The questions I want to answer at the moment are the following:
- When I strike a pad with a finger, how does a typical piezo signal look like? How much does it bounce? How long does it take to get back to zero volts? What's the maximum voltage reached?
- Is there any significant difference across piezos?
- What's the influence of striking hard or normally?
- How fast can I strike a pad?
- What is the influence of the resistor value at the pad's output?
To answer that, I hit the pads and looked at their outputs. I did some measurements with no resistor at the output (i.e. only with a 3.3 V Zener diode) and some with the resistor.
Pad stroke, no output resistor
On the picture below, the rows are three independent measurements. The left column shows the whole signal, including the decay to zero, and the right column is a close-up of the initial peaks.
The same measurements with other pads are not significantly different (which is a relief). A typical signal has two major bounces at the beginning (max about 2 V, the Zener doesn't even clip), a series of lower bounces, and then decays to zero in as long a 500 ms. It's interesting that the second signal is quite different, at least I know that it won't be all the time the exact same shape.
Pad stroke, with output resistor
I used to put a 1 MΩ resistor at the output, but a lower value allows the piezo to discharge faster. With 100 kΩ, the voltage returns to zero about 40 ms after striking. With 10 kΩ in 10 ms. At 1 kΩ, the piezo stops outputting anything, so I settled for 10 kΩ.
The screenshots below show six independent measurements (top row: hard strokes, bottom row: normal strokes). This time, there's the 10 kΩ resistor at the output.
Unsurprisingly, the normal strokes generate a smaller voltage than the strong ones. And the main difference with the earlier screenshot is that the signals go back to zero much quicker. Apart from that, the general shape is similar.
Using a single finger, I can strike a pad twice within a 100 ms interval. With two fingers, 60 ms. Of course I wouldn't be able to sustain a drum roll with my fingers at that speed, a 60 ms period makes 1000 bpm... But that gives an idea of a worst-case scenario. I probably won't generate successive strokes faster than 60 ms, and the signal returns to zero in about 10 ms. So there isn't much chance that the signal would still be bouncing from a first stroke when a second one happens. That's good because it will make debouncing in software easier. I'm thinking of just detecting the first peak, and then discarding any other peak that occurs within the next 50 ms or so.