# Improving piezo element sensitivity using op-amp

Hi,

I am using a piezo element hooked up with Arduino (as in the example here):

Also, as in the example code provided (‘knock’) I am using piezo to read value (or current generated) making Arduino trigger other things… like playing sounds.

I would like to understand if the sensitivity of piezo module could be increased. Ideally requiring a less of a knock if piezo was placed against a thicker surface.

From what I gathered, it seems an op-amp could be used to amplify the signal coming from piezo?
I would like to know if the one as per image attached could work the current piezo element generates.

What other ways the sensitivity of piezo element could be increased?

Thank you so much for sharing your insights and the knowledge!

Try increasing the 1M resistor, or omitting it.

Piezo's are charge sources, the higher their load resistance the larger the voltage they can
produce, within limits.

The SparkFun op-amp input impedance is 20K which will knock-down the piezo output voltage. So in the end I don't know if you'll end-up with more signal or less.

A basic [u]non-inverting amplifier[/u] will have very high input impedance. (Since the piezo doesn't have a DC current path you'll need to add a 1M or 10M resistor to ground at the op-amp's +input to keep the input from "floating".)

Google "piezo knock sensor amplifier" for lots of circuit ideas.

valiauga:
From what I gathered, it seems an op-amp could be used to amplify the signal coming from piezo?

You gathered wrong.
A piezo with 1Megohm resistor is so sensitive that it can detect a pin dropping on a desk where the piezo is mounted on.
The problem is the crude “piezo knock sensor” example code.
Try this sketch.
Leo…

``````// 1" Piezo with 1Megohm resistor across, connected to A0 and ground
int threshold = 100; // alarm threshold from 1 (very sensitive) to 1023
int alarmDuration = 100; // alarm duration in milliseconds

const byte piezoPin = A0;
int rawValue; // raw A/D readings
int piezoValue; // peak value
const byte ledPin = 13; // onboard LED and/or buzzer on pin 13

void setup() {
analogReference(INTERNAL); // remove this line if too sensitive
Serial.begin(115200); // set serial monitor to this baud rate
pinMode (ledPin, OUTPUT);
}

void loop() {
piezoValue = 0; // reset
for (int x = 0; x < 250; x++) { // multiple A/D readings
if (rawValue > piezoValue) {
piezoValue = rawValue; // store peaks
}
}
if (piezoValue) { // if > 0
Serial.print(F("Piezo value is "));
Serial.println(piezoValue);
if (piezoValue >= threshold) {
Serial.print(F("Knock was over the threshold of "));
Serial.println(threshold);
digitalWrite (ledPin, HIGH);
delay(alarmDuration);
digitalWrite (ledPin, LOW);
}
}
}
``````

DVDdoug:
The SparkFun op-amp input impedance is 20K which will knock-down the piezo output voltage. So in the end I don't know if you'll end-up with more signal or less.

A basic [u]non-inverting amplifier[/u] will have very high input impedance. (Since the piezo doesn't have a DC current path you'll need to add a 1M or 10M resistor to ground at the op-amp's +input to keep the input from "floating".)

Actually it seems to be worse than that, its got 10k input impedance?

Note that opamps don't usually have input protection diodes, which for CMOS chips serve to
clamp piezo output voltage to safe values. Adding backwards diodes to the supply rails might be advisable in
this amplication as piezo elements can generate large voltages without clamping circuits.