1

Apologies but I didn't happen to find ultimate answer to this.

I'm trying to make a simple piezo sensor (https://www.sparkfun.com/products/10293) which triggers something (e.g. a sound or lights up a LED) when it's pressed. This is similar to Arduino "Knock Lock" project.

However, I see there are 2 different basic ways to connect the piezo as vibration sensor:

Way 1) [as in Arduino project]

  • Piezo + to 5V
  • Piezo - to A0
  • 1MΩ Resistor between A0 and GND

Way 2) [as in many other references on the internet]

  • Piezo + to A0
  • Piezo - to GND
  • 1MΩ Resistor between A0 and GND

I tried both and have very different behaviours.

Way 1 seems working correctly: analogRead(A0) returns a value related to how strong the vibration is, and then decays to almost 0 (I expected 0 but it stays to 50-60ish).

Way 2 provide more of an impulse-type response, and stays at 400ish after triggered.

Are these behaviors correct and what's the proper way for piezo sensor?

Using Arduino UNO powered via USB.

kuma
  • 111
  • 2

0 Answers0