Accelerometer Arduino UNO ADXL326 Frequency Detection

Hi! I'm trying to build a device with an ADXL326 accelerometer. I would like to detect the rapid movement of the accelerometer by first detecting frequency and setting a threshold. If frequency surpasses the threshold frequency, then I would like to print a message that rapid movement has been detected. Does anyone have any leads on how to do that? I have so far gotten an analog and voltage reading for the x,y,and z axis. How would I proceed?

Select the sensor bandwidth to be at least twice the highest vibrational frequency you want to detect (800 Hz maximum in X and Y), and measure away.

Frequency analysis can be accomplished by autocorrelation or Fourier transform techniques.

Note: Arduino ADCs have only one channel, which limits the sample rate.

Why frequency? Why wouldn't detecting large accelerations be adequate?

If you really need to change from time domain signals into frequency domain signals, Fast Fourier transform - Wikipedia is the tool to use. I think there's a library or two:

https://create.arduino.cc/projecthub/abhilashpatel121/approxfft-fastest-fft-function-for-arduino-fd4917

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.