I'm doing a project where I want to start and stop recording of accelerometer data set up to measure the vertical acceleration Z axis of a car's suspension movement when it hits a pothole. I want to be able to do FFT on the accelerometer data and try to find a "pattern" that represents a pothole event so I can detect potholes from other events just as car door slamming shut, etc...
My question is I'm not sure what sampling rate I would need to be sampling to get the SHM of the suspension when it hits the pothole. Right now I just have my accelerometer a KXPS5-3157 in analog mode connected to my Arduino and I have a button that you hold in to have it log data, when you let go of the button it will stop logging and start a new session. I do this so I can press and hold the button right before I drive over a pothole to get the data.
Should I use Timer1 for example? I think I would need accurate timing with the acceleration data to make it meaingful? Since Acceleration is with time, I'm not sure what sampling rate or how to make the Arduino do like 1 sample/sec or 10 samples/sec. It seems like the frequency of the pothole with the suspension operations in the 5 to 10HZ range of mechanical motion. Rarely anything after 13HZ dies out fast below 3dB so it can be ignored.
Any idea on how to detect pothole events? Not even sure FFT would be the right direction. I want to plot the data from the serial port, but plotting it right now I just have acceleration with no time reference???? I think I need a time reference with the data