I have connected my STM32 nucleo-f413zh dev board with the Sparkfun ICM20948 via I2C. Now my raw values for acceleration when the system is at rest are acc_x =0.750m/s^2, acc_y =-0.320m/s^2, and acc_z =12.85m/s^2. Now after using a digital filter, I found that my new acc_x =0.350m/s^2, acc_y =-0.120m/s^2, and acc_z = 8.50 m/s^2.
I rotated the axis at which it was laid to rest and found that it was still consistent, that is with the “y-axis” being the new “z-axis”, the values were consistently similar with acc_y = 8.48 m/s^2 and acc_z= 0.3 m/s^2. Similarly, the process was repeated for the axis as well, and a similar result was observed.
My question is why is the accelerometer consistently showing me similar wrong values? Do you think there is something wrong with the code?
Also, I can provide the code if required.
You’ll need to calibrate the sensor; take a look at https://github.com/jremington/ICM_20948-AHRS which should suit it just fine
Hi Russell, thanks for your response. I am thinking as I was using DMP functions, Would I still be required to calibrate the sensor? Also, as what I am doing is for a mass-produced item, do you think having the calibration on each module performed manually is possible? If you have any suggestions please let me know.
Now my raw values for acceleration when the system is at rest are acc_x =0.750m/s^2, acc_y =-0.320m/s^2, and acc_z =12.85m/s^2. Now after using a digital filter, I found that my new acc_x =0.350m/s^2, acc_y =-0.120m/s^2, and acc_z = 8.50 m/s^2.
Neither set of values are correct. The raw accelerometer data are integers, not scaled to any units.
If you want help with code, please post the code, using code tags.