Author Options:

Using a piezo as a vibration sensor Answered

Hi, I'm thinking of getting a piezo sensor like this one http://www.meas-spec.com/product/t_product.aspx?id=2474 to measure the frequency of the vibrations of any surface I attach it to, using a micro like an arduino or pic. However I haven't come up the circuitry to make this happen, any ideas?



To do THAT, you need to run the signal through a shaping circuit - a comparator would be ideal, especially one with a very low voltage threshold.

Now you'll get a consistent train of pulses of varying period, but fixed height.

Don't forget the "90V" output "gotcha". Add a diode clamping network to the supply rails on the front end, or you'll regret it at some point....


"A small AC and large voltage (up to +/-90V) is created when the film moves back an forth. A simple resistor should get the voltage down to ADC levels. Can also be used for impact sensing or a flexible switch."

So in short... you read the voltage across the pins with the ADC onboard your arduino.


This page gives you the code you need to run on an arduino to use a piezo as a vibration sensor.

Google is wonderful, eh?

Wow, and you even have a "pro" tag next to your name. The knock example only measures if analog voltage produced by the sensor is larger than a threshold. Whant a I want to measure is not whether an object is vibrating, but the frequency of oscillation.

Patronizing comments like "google is wonderful" dont help anybody

Have you looked at the frequency measurement library for arduino? It counts the number of highs in a set period then uses that to work out the frequency.


Without meaning to sound rude, we get a lot of questions from people looking for a handout, not doing a bit of research before asking a question they could find answers for easily themselves. Usually they get a helpful response poking them in the right direction. Unfortunately it's one of "those" days, so you got a more sarcastic reply than normal. Sorry.