09-16-2025 04:48 AM
I’m facing a frequency shift problem while using the ADXL355 accelerometer with an ESP32 S3. Here’s the setup and issue:
Sensor: ADXL355
MCU: ESP32 S3
Interface: SPI
Output Data Rate (ODR): Tested at 1000 Hz and 2000 Hz
Observation:
When I set ODR = 1000 Hz, time step = 1 ms, and FFT Δt = 1 ms, the FFT shows the correct frequency.
When I increase the ODR (e.g., 2000 Hz), even after adjusting the timestamp and FFT Δt according to the ODR, the FFT shows an incorrect frequency.
Known vibration: The surface has a vibration of 50 Hz, but the sensor sometimes shows ~60 Hz depending on the ODR.
I suspect it might be related to aliasing, SPI timing issues, or internal filtering of the ADXL355.
I am mentioning the ESP32 code below, along with my LabVIEW backend, which processes the data and computes the FFT.
Questions:
Has anyone seen a similar frequency shift issue with ADXL355 or ESP32?
Could this be caused by timing/sampling inaccuracies at higher ODRs despite adjusting timestamps?
Any suggestions on how to get accurate frequency readings for higher ODRs?
Thanks in advance!
CODE:
09-17-2025 02:14 AM
Hi Muhammad,
could you please downconvert your VI for LV2019 and attach again?
While doing so: please make sure there is some useful default data in a string indicator connected to the TCP read string so we can simulate the calculations with your data! (The whole string conversion loop looks overly complicated.)
Can you verify the sample rates of your sensor device?
09-17-2025 06:07 AM - edited 09-17-2025 06:08 AM
The File for Labview 2019 is attached below
09-17-2025 06:34 AM - edited 09-17-2025 06:42 AM
Hi Muhammad,
muhammadsauddar@gmail.com wrote:
The File for Labview 2019 is attached below
You forgot to set some useful default data!
Please provide some typical data as delivered from TCPRead…
Just a suggestion, based on assupmtions:
09-17-2025 10:37 AM - edited 09-17-2025 10:43 AM
Hi Muhammad,
Me me me! haha. I recently finished my project with ADXL 355. Are you polling for Data Ready? It can be done using SPI or IO pin. To fix my issue, I only read my data when it was signaled ready as ADXL can have +- 5% variation. Another mistake I was making was confusing my SPI's rate of read with ODR. I was polling information with SPI at Xkhz and used that as dt which was wrong.
Final thing I implemented to handle this +-5% drift was a "dt" counter, this counter packaged dt information between the two data ready signals. Later before processing data on PC side, I averaged dt of all (4096) samples and used that value as dt for waveform building.
Edit: my ODR was 4khz for +-2g. Tip: I used a tone generator app on my phone to validate the frequencies up to higher 1900Hz. I discovered this by accident, my application also used a microphone and while calibrating frequencies for it, I realized that ADXL355 was also behaving ALMOST like a microphone (It was reacting to speech). It may not react the same way for +-4g or +-8g range.
Hope some of this helps you.