Thoughts on interfacing piezo vibration sensor

Some time ago I purchased a MiniSense 100 Vibration sensor. Probably had some project in mind, but it happened that it dived in to drawer among other “to do” things.  I thought it’s time to try few things with it. Piezo sensor MiniSense 100 is very sensitive with pretty good frequency response and is linear (±1%). As you can see high sensitivity is achieved with 0.3 gram inertial mass at the end of film. As there is a hole in the mass you probably can screw in additional mass and thus increase sensitivity even further.

piezo vibration sensor

Probably there is no need to explain where such sensor would be useful. These could be vibration/ motion sensors, impact sensors and other areas where motion and acceleration is involved. Normally sensitivity is 1V/g. Where g is standard gravity or also known as standard acceleration due to free fall and is equal to 9.80665m/s2. As mechanical device it also has resonant frequency at 75Hz. At this point sensitivity reaches 5V/g.

The problem is that sensor output can reach over ±90V on high accelerations or when it is vibrating are at resonant frequency. You cannot plug it directly to microcontroller or other circuit and expect it to work correctly. It can potentially damage sensitive parts. Here is a quick test with oscilloscope. Just attached sensor leads to probe set to x10 scale and you can see how easy with simple flip peak voltage reached almost 100V at positive side and -46V at negative swing. Total you get 144V and you could get more on stronger impact.

piezo vibration sensor test with oscilloscope

 Also you can see that sensor output is sine wave that rapidly decays. If you attach sensor directly to microcontroller it where input voltage is limited to 5V or 3.3V you can get undesired results. So, how to make this sensor usable with digital electronics? First of all we have to deal with signal conditioning.

If we look at Piezo film based transducer we will see that it can be seen as ideal voltage source and series capacitor. From datasheet we know that capacitance is 244pF.

piezo vibration sensor model

Now we have interesting situation. If we connect transducer to any external load like resistor or oscilloscope (which also has input resistance) we get high pass filter. If we want to do quality signal measurements, we need to take this in to account. Let’s say we want the cut off frequency to be at 2Hz. At this point the magnitude of Piezo signal will fall to 0.707 level or -3dB. Using simple formula we can find load resistor:

R = 1/(2πfC) = 1/(2*π*2*244*10-12) = 326MΩ

This means that in order to get low frequency response you need high resistance load or input of next stage. Next stage would be signal buffering. In order to ensure our filter to be effective, we need that buffer input impedance were even higher than load resistor. If you take LM741 operational amplifier you will see that input resistance is about 2MΩ. So this would shift filter’s cut-off frequency to higher frequency and measuring slow signals would become problematic. You should look for low bias current operational amplifier. For instance Linear Technology has LTC6240 which input resistance is 1012Ω. It could be a good candidate. Then signal conditioning would look like:

piezo sensor buffered

Here we have buffered sensor with low cutoff frequency. If you need to measure weak vibrations then sensor will output low voltage. Then probably would be a great idea to add some gain to amplifier:

piezo sensor with op-amp

If we would like to scale 1V/g to 5V/g then we would need a gain of 5. We could choose resistors as follows:

R3 = 1MΩ; R2 = 250kΩ.

Since piezo transducers can output high voltage signal it is good practice to include diode protection at the input. You should choose Zener diodes according to signal level. For instance, if you work with 5V signals, then 5.1V Zener should be fine:

piezo sensor with zener protection

These above circuits are useful if you need to get some quantity measurement. This means the intensity of vibrations. By connecting this circuit to ADC you can get different values according to acceleration level. But sometimes you might only need to trigger circuit when any vibration is present. Simple application can be alarm. To achieve this you can simply connect piezo element drectly to microcontroller or other digital circuit by leaving protection diodes only:

piezo_direct

All you need is to capture any activity on output and trigger event. Many projects use something similar. There may be some low pass filtering added before output to smooth spikes. Simple RC filter works fine.

But more civilized way of triggering events would be by using simple comparator. By using a potentiometer on negative input there would be possible to adjust the threshold of triggering pulse. Such configuration could be used to connect to microcontroller external interrupt pin. This way MCU could be woke up only then when comparator pulse is generated instead of constantly monitoring ADC and triggering events in software. Simple schematic would look as follows:

piezo vibration sensor with comparator

Practically don’t expect to do precise measurements with these vibration sensors. They are great for detecting accelerations shocks, vibrations. Also they are cheap comparing to accelerometers. So if your application requires simple sensing these might be great choice and money saver.

12 Comments:

  1. Hi,

    My project would benefit from precisely your last diagram and statements. I want to wake my MCU when a vibration at a set pot threshold is measured. I have only just started work on this and I am looking in to the usage of comparators (previously I have just been using analogue but this is no use for waking my MCU as it would require digital input). My question is, how do I go about selecting the correct comparator in this case?

  2. You can look for any general purpose comparator. For instance LM311 or LM339.

  3. Hi,
    I’m trying to output a max of 3.5V from my sensor into a Microcontroller. In this case, would I simply have to replace the 5.1V Zeners above into 3.1V Zeners?

    Also, I’m a little confused as to what the signal conditioning amplifier circuit is doing (LTC 6240 example). Does it simply act as a filter, or does it also somehow reduces the high voltages that may enter the microcontroller?

  4. Yes for up to 3.5V signals you should chose like 3.1V zeners.
    As for opamp – see signal filtering section. We need operational amplifier with very high input resistance it order to detect low frequency signals. Otherwise signals are filtered with high pass filter due to piezo nature. In other hand, Op amp serves as signal buffer that protects sensor from further circuit influence..

  5. Awesome, thanks for the reply!
    I’m working on a project that uses the sensors to sense vibrations of moving cars only! I guess it means I don’t actually have to worry about conditioning the signal.
    Do you happen to know what I should look at to sense vibration strength of only cars, and NOT weaker vibrations (bikes,people)?

  6. Probably go with comparator and potentiometer to find perfect spot.

  7. Oh, and lastly, is the 320M R1resistor calculated somehow? The resistance seems a bit high.

  8. Such resistor is used because piezo sensor has a series capacitance of 244pF. With resistor they form high pass filter. so as you may see in formula above, for 2Hz high pass filter this si 320Mohms. But if you only want only to detect vibration, probably lower value resistor will do fine. With potentiometer you will be able to rise sensitivity if needed. I guess you need to experiment what works best.

  9. Great design and well presented thank you. My question is that you have indicated “not to expect to do precise measurements with these vibration sensors”. That is precisely what I want to do though, very high quality and precise measurements. What device do you suggest I use to achieve this using your well designed circuit.

  10. Hi! I am trying to do a project with mini sense 100 to analyze the vibrations in a car to determine the road condition. Should I probably use the same resistor and op-amp specs as you to get optimum results?

  11. dear sir,
    plz give me the coding for interfacing of pic18f4550 with minisense100 vibration sensor

  12. I’m planning on using the piezo sensor to detect vibration in a drain(it’ll sense the “water vibration” )and then send the signal to a microcontroller, to make sure the sensor senses only the water vibration, will a CMRR be a good idea…..?

Leave a Reply

Your email address will not be published. Required fields are marked *