Using a piezo as pressure/flex sensor?

Has anyone used a piezo as a flex/pressure sensor?

I have a couple of instruments that use a similar setup, but all are analog electronics.
Here are a couple:
http://www.ciat-lonbarde.net/tetrazzi/index.html
http://www.ciat-lonbarde.net/sidrazzi/index.html

They have wood (or metal) bars that you press and it registers the pressure and applies as either an envelope or modulation (depending on how you have it wired up).

I have done some DIY stuff involving this, building it into a drum:

A video:

So I want to incorporate something similar (piezos on the back of metal bars) but to drive an Arduino. I thought about using some flex/pressure sensors, but those are considerably more expensive, and I don't know if they could be mounted under a metal bar (and still put out reasonable numbers).

Also I know that you need to condition/limit piezo output for sending it into an Arduino. I've used this before:
http://leucos.lstilde.org/wp/2009/06/piezo-transducer-signal-conditioning/

That rectifies, flattens, and limits the piezo input like crazy. Primarily for percussion triggering. That would render a pressure type setup useless. So could I just throw a 5.1v zener between the + and the Arduino analog input?

Well I just used 3 47k resistors. Use two as a potential divider from +5V to GND and connect the common point to one side of the piezo sensor. Wire the other side of the piezo sensor to an analog pin. The third 47k resistor goes in parallel with the sensor to limit the voltage and set the sensitivity.

The high value of the 47k resistors should protect the pin protection diodes from overload. The value of the one in parallel sets the sensitivity (increase it for more voltage).

You realize the output is AC only? The bandwidth is set by the parallel resistor and the inherent capacitance of the piezo element.

What do you mean by AC only? As in like audio (above and below the point defined by the 47k resistors (presumably 2.5v?)).

With that setup do you get increasing values if you just press it slowly and hold it? Or does it only register 'bonks'?

When you distort a piezo material it generates a field. However it cannot sustain any current and the voltage dissipates via leakage and input-impedance of your amplifier. So at DC there is no effect, just a transient pulse.

So if I press the piezo, I'll get a higher voltage reading, but if I hold it, it drifts back down to where it started (2.5v)?

You lost me at the DC/transient pulse part though.

kriista:
So if I press the piezo, I'll get a higher voltage reading, but if I hold it, it drifts back down to where it started (2.5v)?

That's right. The higher (or lower) voltage reading may only persist briefly, especially with a resistor as low as 47k in parallel with the piezo element.

Will increasing the size slow the leaking?
Would it be at the expense of also slowing the rate at which it can increase?

Ideally it would respond quickly, but if I hold it pressed, it should stay up there as long as possible.

Relatedly, do the more conventional pressure/force sensors act similarly? (leaking once you have it press/held).

kriista:
Will increasing the size slow the leaking?

Yes.

kriista:
Would it be at the expense of also slowing the rate at which it can increase?

No.

kriista:
Relatedly, do the more conventional pressure/force sensors act similarly? (leaking once you have it press/held).

The ones based on strain gauges don't 'leak', they can report continuous pressure.

That's good news.

Is there a point of diminishing returns then? Like why wouldn't I just use something massive like 1M?

kriista:
So if I press the piezo, I'll get a higher voltage reading, but if I hold it, it drifts back down to where it started (2.5v)?

You lost me at the DC/transient pulse part though.

I use DC in the informal sense of indefinite response. A transient is a response to a sudden change that eventually levels off to normal again (like a bell ringing after it is hit). The piezo elements have a transient response but no DC response (in practice). A well-engineered piezo material might have a very long lasting response if its terminals are open circuit (so that the charge can't redistribute) but it not then easy to measure... Strain guages work by physical distortion changing the resistance of a fine arrangements of wires, and resistance can be measured without changing it.

kriista:
That's good news.

Is there a point of diminishing returns then? Like why wouldn't I just use something massive like 1M?

By all means use 1M. If you find the device over sensitive, put a capacitor in parallel with it.

Traditionally, that is to say before piezo sensors became available to the masses, they were conditioned with what are known as charge amplifiers. Piezoelectric transducers are capacitive in nature, therefore the term, charge amplifier. A charge amplifier can be simplified to an op-amp with a capacitor instead of a resistor in the feedback loop.

The critical property of a charge amplifier is its time constant. Since piezo devices are electrically capacitive, they are a dynamic device and if you want to be able to maintain a "DC" output for a certain time, you must use a charge amplifier with a longer time constant. Obviously, the trade-off for better DC response is a reduction in bandwidth, but usually a compromise that satisfies the needs can be made.

So, long story short, depending on how you want to use a piezo sensor, it might make sense to condition it with a charge amplifier. For example, if you want to use it to measure something that is slowly changing you would use a longer time constant than for something that changes rapidly. Simply stated, the larger the feedback capacitor, the longer the time constant.

Maybe TMI, but I thought it appropriate to mention, at least. :slight_smile: