I am trying to amplify a piezo sensor per the instructions found at the link below. I am not trying to trigger a buzzer only print to the serial monitor whether the vibration was detected or not. I am a NOOB with respect to circuits and unable to understand why my circuit is not working.

The piezo is either giving a positive (sensing) reading or giving a negative (not sensing) reading depending on where the poteniometer is set. There is no state where-if all is quiet-the piezo is quite and if there is a vibration the piezo senses it and reports to the serial monitor. I see from the blog that if the piezo get stuck on a state to lower the feedback resistor of the op-amp from 220k to 160k but again, there is never a case where it is working then get struck in state. It is always stuck in a state!

The blog post mentions a 0.1uf capacitor in the hand-drawn sketch but the Fritzing diagram shows a 10uf capacitor. I am using the 10uf capacitor. Will switching out the 10uf for a 0.1uf capacitor test potentially damage the Arduino? Is this the cause of the +-state of the piezo? Do I just have a wiring flaw? Any advice is appreciated.

Here is a link to the post including the Fritzing diagram. http://davidhoulding.blogspot.com/2014/02/high-sensitivity-vibration-sensor-using.html

Here is a picture of my circuit. enter image description here

And the Sketch...

int DurationMillis = 1000;

void setup() 
void loop()
    Serial.println("I felt that");
  Serial.println("I don't feel anything...");

1 Answer 1


You write,

The blog post mentions a 0.1uf capacitor in the hand-drawn sketch but the Fritzing diagram shows a 10uf capacitor. I am using the 10uf capacitor.

The Fritzing diagram in the high-sensitivity-vibration-sensor at davidhoulding.blogspot.com shows a 10μf capacitor connected from +5V to ground on the breadboard. This is a reasonable thing to do, to avoid power supply glitching on that board. It is ok to add an 0.1 μf capacitor in parallel (that is, in addition to, and connected to the same busses) to the 10μf if you want to suppress some noise as well.

The last diagram in the blog, an “updated circuit diagram showing the refinements for reducing the gain to avoid op-amp output lockup, and DC decoupler on the input”, also shows an 0.1 μf capacitor connected between the piezo node and the first op amp input. This will block any DC voltage coming out of the piezo from going into the op amp input. It's likely that any capacitor from 0.05 μf up to 0.5 μf will work just as well there. A smaller coupling capacitor is suitable for higher frequency inputs, and a larger one for lower frequencies. The presence or absence of that capacitor probably isn't the problem with your circuit. Looking at your circuit photo, the wiring looks ok[*]. Perhaps try substituting a different piezo element, or a signal generator if you have one, or a low voltage from a pot varied up and down, to generate a signal into your op amp and comparator stages to see if they are working. If they aren't working, substitute for the LM358.

[*] Although I can't see if the 220KΩ resistor goes to +5 or to pin 1. Also is your comparator output connected into digital pin 8 on the Uno? It looks more like 9 or 10 in the photo. Also, as a personal preference I'd attach the Arduino end of the ground wire to a pin next to the +5 instead of to the ground next to Aref.

  • jwpat7, Thanks so much for your advice. I was able to confirm that the piezo element was working by using the Knock sketch that is included in the Arduino IDE. I finally received a new LM358 dual-op amp (from the slow boat from China). Using the new LM358 chip solved the problem. My piezo amplifier is working!
    – GBG
    Nov 30, 2016 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.