Thoughts on interfacing piezo vibration sensor

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

piezo vibration sensor

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

The problem is that sensor output can reach over ±90V on high accelerations or vibrating at the resonant frequency. You cannot plug it directly into a microcontroller or other circuit and expect it to work correctly. It can potentially damage sensitive parts. Here is a quick test with an 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 the positive side and -46V at the negative swing. The total, you get 144V, and you could get more on a more substantial impact.

piezo vibration sensor test with oscilloscope

 Also, you can see that sensor output is a sine wave that rapidly decays. If you attach the sensor directly to the microcontroller where the 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 an ideal voltage source and series capacitor. From the datasheet, we know that capacitance is 244pF.

piezo vibration sensor model

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

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

This means that to get a low-frequency response, you need a high resistance load or input of the next stage. The next step would be signal buffering. To ensure our filter to be effective, we require that buffer input impedance was even higher than the load resistor. If you take the LM741 operational amplifier, you will see that input resistance is about 2MΩ. So this would shift the filter’s cut-off frequency to a higher frequency, and measuring slow signals would become problematic. It would be best if you were looking 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 this:

piezo sensor buffered

Here we have a buffered sensor with a low cutoff frequency. If you need to measure weak vibrations, then the sensor will output low voltage. Then probably would be a great idea to add some gain to the 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 a high voltage signal, it is good practice to include diode protection at the input. It would be best if you chose Zener diodes according to the signal level. For instance, if you work with 5V signals, then 5.1V Zener should be fine:

piezo sensor with zener protection

The above circuits are practical 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 the circuit when any vibration is present. A simple application can be an alarm. To achieve this, you can connect the piezo element directly to the microcontroller or another digital circuit by leaving protection diodes only:

piezo_direct

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

But a more civilized way of triggering events would be by using a simple comparator. 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 the microcontroller external interrupt pin. This way, MCU could wake up only when the comparator pulse is generated instead of continually monitoring ADC and triggering software events. The 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 a great choice and money saver.

12 Comments:

  1. chris mobberley

    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. Vaishnavi Ganesh

    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. sumit bhandekar

    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