1
\$\begingroup\$

I'm looking for a very simple measurement circuit to measure vibrations with a piezo elment and an arduino device. I want to read positive and negative values.

I have this sensor: http://www.seeedstudio.com/wiki/Grove_-_Piezo_Vibration_Sensor

I know that this sensor module only gives me digital output. But I want to measure the vibration amplitudes and the frequency. So I would use just the piezo element.

I found a lot examples, from very simple to high accurate. But most of them cutting of the negative values. E.G. http://www.learningaboutelectronics.com/Articles/Piezo-knock-sensor-circuit.php

And in the example above, there is no protection for the arduino. I also found statements, that the arduino needs no protection reading a piezo sensor at analog pin, because of the low current. And the analog pins are protected against higher voltages.

I want just a simple circuit to read negative and positive values from that piezo element. My arduino device use 3.3V input voltage. The piezo sensor can have in extrem up to 70-90V.

What is the minimum configuration to set up such a measurement circuit? I don't need highest accuracy. It should be as easy as possible. It is just for test purpuses. I think I have to use an voltage divider with two equal high resistences to set a DC offset for measuring the negativ values. But what else do I need for a minimal working example?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Measuring the negative part of the signal will increase the circuits complexity. Why do you think there is useful information in the negative part of the signal which is not in the positive part also? You seem to plan to sample the signal using the Arduino's analogue-to-digital-converter (ADC). What frequency do you expect the signal to be? AFAIK, a piezo sensor can produce a signal which is far too fast for an Arduino's ADC, so the samples may be aliases, and hence too inaccurate to tell you much. A reason piezo sensors may be sampled digitally is it's possible to sample much faster. \$\endgroup\$
    – gbulmer
    Feb 9, 2016 at 12:14
  • \$\begingroup\$ @gbulmer I want to simply see the vibrations of a machine like a washing machine or a motor. How would you sample the digital output? But then I need to know the amplitude in advance to set up the sensivity with the pontentiometer right? If the sensitivity is too high and the vibration is to strong, I would get all the time a binary 1 as measurement value. And if the sensitivity is to low and the vibration is too weak I wouldn't recognize the vibration, right? \$\endgroup\$
    – CPA
    Feb 9, 2016 at 12:29
  • 1
    \$\begingroup\$ "But then I need to know the amplitude in advance to set up the sensivity with the pontentiometer right?" No, the signal is crossing zero at each cycle. So the frequency information is still available in a digital stream. Amplitude is lost. "If the sensitivity is too high and the vibration is to strong, I would get all the time a binary 1 as measurement value." No, wrong assumption; zero crossings give frequency to a digital signal. "And if the sensitivity is to low and the vibration is too weak I wouldn't recognize the vibration, right?". Yes. However, with a pizeo sensor, that is unlikely. \$\endgroup\$
    – gbulmer
    Feb 9, 2016 at 12:52
  • \$\begingroup\$ @gbulmer Ah ok, right. Thanks a lot! The sensor is connected to an arduino device. The device sends the measured data to a raspberry pi with windows iot running on it. Would you run the FFT (to get the frequency) directly on the arduino or on the raspberry pi? Is there any problem when I'm transferring the data first to the Pi? \$\endgroup\$
    – CPA
    Feb 9, 2016 at 13:14
  • \$\begingroup\$ It would be better to ask a second question for that, and keep this question focused on its current scope. In that new question, explain what you are intending to use the measurements for. I have seen code published to do an FFT at a couple of KHz on an Arduino, but I have never tried to use it. In general, it is much easier to get a system working by using far too much computer power, and then optimise it, than get a system working using barely enough computer power. So I'd use the R-Pi to get it working. \$\endgroup\$
    – gbulmer
    Feb 9, 2016 at 13:24

1 Answer 1

5
\$\begingroup\$

Using almost any article posted on the Internet, about sensing a piezo sensor digitally will provide the frequency of the vibration. This has the huge advantage that a digital pin can be sensed about 1000 times faster than the ADC.

A problem with using the ADC to sample the actual signal is the Arduino ADC is so slow that the the samples my suffer aliasing (the signal is sampled below the Nyquist-Shannon criteria), and give very unreliable information.

The signal voltage from the piezo sensor will oscillate about zero. That will be detected by a digital sample, recovering the frequency.

Protect the MCU's pins using a resistor and diode, connecting the signal to the pin via the resistor to the MCU pin, and to ground via the diode. I'd probably use a Schottky diode to stop the signal going much below ground.

Further, protect the input from the potentially very high voltages with a zener diode (3.3V for a 3.3V MCU, 5V/5.1V for a 5V MCU) also tied to ground, so that the signal can't rise above the Arduino pin's operating range.

While it might be okay to rely on the ESD protection diodes, relying on the ESD diode for protection is going beyond the spec of the device. Further, I know a guy who damaged several arduino pins, using a piezo sensor. It isn't worth saving a few pence.

schematic

simulate this circuit – Schematic created using CircuitLab

If you really want to sample the amplitude, then put a low-pass filter in too. I would probably stick with the digital input (in that circuit) for frequency, and use a second ADC pin to try to measure amplitude.

It isn't clear exactly what motors you wish to measure. For something like a washing machine, at say 1200rpm spin, that is 20 Hz. So a low pass filter at 100Hz+, and sampling at 1KHz+ should be good enough. That should be within the capabilities of the Arduino.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.