# Piezo Vibration Sensor on external interrupt

**URL:** <https://community.sparkfun.com/t/piezo-vibration-sensor-on-external-interrupt/37354>\
**Category:** Force & Weight\
**Created:** [July 20, 2019, 1:32am UTC](https://community.sparkfun.com/t/piezo-vibration-sensor-on-external-interrupt/37354 "2019-07-20T01:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LEDLIT1](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LEDLIT1](https://community.sparkfun.com/u/LEDLIT1)\
**Post date:** [July 20, 2019, 1:32am UTC](https://community.sparkfun.com/t/piezo-vibration-sensor-on-external-interrupt/37354/1 "2019-07-20T01:32:43Z")

</div>

Using an Arduino Nano or Teensy 3.6 - Is there a way to trigger an external interrupt using an analog Piezo Vibration Sensor? I have been reading and searching about possibly using an analog comparator , but I haven’t found any examples of it working.

---

<div class="post-metadata">

**Author:** ![TS-Chris](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-chris/32/6057_2.png) [@TS-Chris](https://community.sparkfun.com/u/TS-Chris)\
**Post date:** [July 22, 2019, 8:38pm UTC](https://community.sparkfun.com/t/piezo-vibration-sensor-on-external-interrupt/37354/2 "2019-07-22T20:38:25Z")

</div>

If the output you’re getting from the piezo is large enough to register as a logic high, you might be OK with no additional circuitry. (Other than a resistor to limit voltage)

An analog comparator (op-amp) might be a better choice though since you can adjust where your signal begins and noise ends. Plus, you get a nice solid single voltage output from the comparator rather than a varying analog signal.

Give it a try without the comparator, if it works, great! If not, you’re probably going to want to build a comparator circuit with an op-amp and use the output from that to trigger your interrupt.

---

<div class="post-metadata">

**Author:** ![LEDLIT1](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LEDLIT1](https://community.sparkfun.com/u/LEDLIT1)\
**Post date:** [July 25, 2019, 12:34am UTC](https://community.sparkfun.com/t/piezo-vibration-sensor-on-external-interrupt/37354/3 "2019-07-25T00:34:26Z")

</div>

Thank you. I will try both.
