Vibration Sensor on Domino

I hav the sensor as i detailed in my previous posts plugged into one of the analog ports on a fez domino connection shield (the one with the rj45 socket).
I want to read that it is picking up that there is some sort of vibration is affecting the sensor.

I dont seem to be able to pick up that it is happening.

I am using an analogin on an analog pin to read the sensor and determine if it is being interrupted by vibration.
I actually used the code provided by Errol.
Unless it is not provding a high enough change in voltage to be picked up.

I also noticed trhat the sensor is 5v and i thought that analog pins only run at 3.3v.

Do you have any suggestions for other alternatives to this specific model?

Many Thanks for your prompt reply

Ade

The Link to the sensor

http://www.dfrobot.com/wiki/index.php?title=Analog_Piezo_Disk_Vibration_Sensor_(SKU:DFR0052)

I have a phidget piezo vibration sensor, it already includes all the electronics (op amp).
See here : http://www.robotshop.com/ca/productinfo.aspx?pc=RB-Phi-12&lang=en-US
However, My project changed, and I neved had to use it ::slight_smile: So I don’t have any code for it.

Basicaly, just power it using 5vdc, connect the analog pin to an input analog pin on your fez board, and monitor the value. If a have a chance, I will try co connect it someday and give it a try, but that shouldn’t be too difficult.

Have Fun :smiley: !

ok so I suggest you ignore the code you got earlier and work on something simpler.

while(1){
debug.print (an.Read());
thread.sleep(10);
}

Something like that to write out the values you see and see how that changes based on what the sensor sees. That way you can get actual feedback on what values you’re seeing and that might help you understand what the sensor is reporting.

Also, how are you powering the device? Are your pin connections correct from the 3-pin sensor - you must get POWER, GND and ANALOG IN correct based on the device’s pinouts (I can’t remember if the pinouts are plug-compatible with the shield you are using but you MUST verify that). I have no idea what the sensor is, whether it will work with 3v3 instead of 5v input, but certainly the Fez can only take 3v3 as the maximum input on the Analog In - this might mean the sensor is not ever going to work on a Fez, although I seriously doubt it as it seems very “passive”.

The bad news for you is that nobody seems to have one already that they can share their experiences with it. They’re cheap, but it’s still $10 to get one posted to me. Plus I don’t have a need for it (when does that ever stop me hehe) otherwise I’d give one a whirl to see if i can help out.

Edit: I also wanted to point out that the real use of a piezo sensor like this is to see when the vibration level changes significantly. You would need to calibrate specific values to figure out what that means for your machinery, and it won’t be very accurate - for instance if it was on a car you may never detect whether the car is running at idle or running at higher revs for instance; you may only be able to detect that the level of noise detected has changed from a level associated with the car off to the car running. Really the only way to do this is to empirically sample the data from the device and look at how it changes in your desired environment. Also worth noting that these are often used in “knock” sensors so you may want to try the sensor on your workbench and knock on the bench to see how the data changes.

Is the sensor mounted on the machine or on the ground close to the machine? This will make a big difference.

The analog pin should be 5v tolerant but will max out the reading at 3.3v. Post the output of Brett’s test program.

It looks like the module has an on board amp and can be powered up to 25v. Power it with 3.3v and see what happens. Set your analog pin scale to 1024 to see a good swing.

If you don’t have a 'scope, use a multimeter. Put it on the lowest range AC and see if you pick anything up. You need to determine the voltage swing of the sensor to know if you need an amp or not.