Hi,
I've used this basic tutorial to test my vibration sensor.
Everything is working as expected but I don't understand the output of the sensor. Basically, when I don't touch it, it's around 260.
According to the datasheet, I guess it is the charge sensitivity (in pC/g)?
How to do if we want to retrieve the frequency ? Or some output more readable.
Thanks for your guidance
What a crap tutorial.
First off their is no resistor in seriese with the LED, that will damage your Arduino pin. Then the code is wrong for making the Analogue input pin into a ground, it actually controls digital pin 0 not analogue pin 0.
So, put a 220R resistor on the output pin before connecting it to the LED. Wire the vibration sensor to a ground pin not A0.
Even then the voltage from this sensor will go negative and damage your analogue pin.As I said it is a crap page.
Hi Grumpy_Mike,
Thanks for your help. Do you have any other tutorial then if it's a crappy one ?
And still, do you know the output unit and/or how to get a frequency from it?
EDIT:
I've used this tutorial then with a piezo sensor.
But I want to know the frequency of my sensor...
For frequency measurement you have to detect a maximum, edge, zero crossing or otherwise unique point in every cycle. Then measure the time between two such points.
Do you have any other tutorial then
Not that I know of. But a few years ago I did some measurements with a vibration sensor. Depending on the amount of vibration you can use one of two circuits shown here. One is simply passive and the other has an op-amp to make the signal bigger.
Note both these circuits contain a capacitor to filter out the AC component from the sensor to just give a measure of the amount of vibration not any frequency information there might be. The other attachment is a .3gp movie of the output of the bottom circuit on a scope. I found that it took quite a lot of vibration to get anything out and then it tripped rather quickly to full output. My impression was that it was more an "overload" sensor than a proportional one. The tests show the sensor mounted on the same board as a motor with an eccentric weight. I varied the voltage to this motor to get it to run at different rates. I was trying to get an intermediate value but as I said it was very touchy.
The gaps in the scope trace are an artifact of the interaction between the scope's trace and the video's frame rate, they are not real but a stroboscopic illusion.
Vibration.3gp.zip (101 KB)
Thank you both for your explanations!