I am using a 3-axis LIS2D12H accelerometer interfaced with NRF51832 through the SPI interface.
The sensor has a sampling-rate from
1 Hz
to5.376 KHz
which is happening at sensor only.I am taking sensor data at
400 Hz
by setting register values in the sensor.I am implementing an FFT algorithm in microcontroller over a raw sensor data received by the 3 axes, for vibration analysis.
I can have resolution of FFT from
64
to2048
.
Q: My confusion is how should I sample it at microcontroller for FFT? There are FFT functions in ARM cortex which I am using.
Shall I take raw samples in buffer and sample them or shall I take each reading from sensor and sample them individually?
If that is the case how shall I select sampling frequency at microcontroller level and/or at what rate microcontroller shall read data?