My goal is to be able to measure subtle surface vibrations, and record the frequency in Hz.
As of now I've had the best luck using a piezo element, but if anyone has a better suggestion I'd be happy to hear.
I'm looking to pick up vibrations on a flat surface in the range of 20-100 Hz, but these would not be very strong vibrations so I'm thinking I'll need a relatively sensitive sensor. I've tried to follow some of the tutorials on this forum, but most projects do not output the actual frequency, or are too coarse in their measurements. So any help in this matter will be greatly appreciated
Are you looking at air vibrating on a flat surface, or is the material that has a flat surface vibrating? If it is the surface, is the vibration parallel to the flat surface or is it at right angles to the surface.
A 1" piezo disk stuck to a desk, and read with 1.1volt Aref enabled, can easilly detect a pin dropping on the other end of the desk. Is that sensitive enough?
Frequency can be measured by measuring the time interval between two zero crossings of a sine wave.
<=20Hz can be problematic. You need a high value (>20Megohm) load resistor across the piezo, and short/shielded wires.
Leo..
A pin dropping at the other end of the desk would be good enough for my needs. This will be my first time working with this kind of sensor, do you have an example of this set up or code used?
Vinterwoo:
This will be my first time working with this kind of sensor...
Try this sketch. Read the comments.
See if you get a nice sine wave.
Leo..
/* experimental vibration sensor
* 1" piezo connected to A0 and ground
* stuck to the object with e.g. blu-tack
* two equal high value resistors (1-10 Megohm)
* one from A0 to ground and one from A0 to 5volt
* keep wiring short (<10cm)
* use the serial PLOTTER, set to 115200 baud
*/
const byte piezoPin = A0;
int rawValue;
void setup() {
Serial.begin(115200);
}
void loop() {
rawValue = analogRead(piezoPin);
if(rawValue < 511 || rawValue > 513) { // some deadband
Serial.println(rawValue);
}
delay(2);
}
I'm looking to measure the surface vibrations, not air along the surface. Though I am unsure of the angle of the vibrations
Look for multiple phases because of variations in density if the surface is wooden. Also see reflections from the edges of the surface, just like wave reflections in a pond of water.