2025-02-14 03:52 AM
Hi, I’m working with the IIS3DWB accelerometer to acquire single-axis data (Z-axis) using the following setup:
I have attempted different methods to read the Z-axis data. First, I tried reading the Z-axis high (0x2D) and low (0x2C) registers using a timer with auto-increment. I also tried using 1AX_TO_3REGOUT mode and reading all 6 registers (0x28 to 0x2D) using a timer with auto-increment.
I then configured the sensor with the following register settings:
write_register(IIS3DWB_CTRL1_XL, 0x00); // Power Down
write_register(IIS3DWB_CTRL6_C, 0x03); // Single Axis Mode (Z-Axis)
write_register(IIS3DWB_CTRL1_XL, 0xA4); // Power On, Full Scale 16g, 26.667 kHz ODR write_register(IIS3DWB_CTRL3_C, 0x44); // BDU and Auto Increment Enabled write_register(IIS3DWB_CTRL8_XL, 0xF4); // High-pass and Low-pass Filters
write_register(IIS3DWB_CTRL4_C, 0x01); // 6 Consecutive Single Axis Values
write_register(IIS3DWB_CTRL5_C, 0x20); // Wraparound Rounding
After setting up the above configuration, I attempted burst reading of the registers to acquire data.
I noticed that the RMS values are accurate at lower frequencies but start to become inaccurate at higher frequencies above 800 Hz. Additionally, even when the input amplitude remains constant, the output RMS values differ across different frequencies.
I suspect that using FIFO might help in achieving more accurate RMS calculations at higher frequencies, but I am unsure how to configure it correctly in single-axis mode.
Has anyone faced similar issues or successfully implemented high-frequency RMS calculations using IIS3DWB? Any insights on optimal FIFO settings or alternative approaches would be greatly appreciated!
Thanks in advance!
2025-02-14 09:59 AM
Can you share more details?
What is the RMS that you expect and what is the RMS that you are getting?
If I understand correctly, you are polling the sensor, therefore downsampling? Example polling at 800Hz?
Is the device in steady conditions? (if not please try to measure the RMS in steady conditions)