05-16-2021 05:25 PM
Hi all,
I am trying to improve the accuracy of the accelerometer and gyro readings from BMI160 by using the FOC.
For the accelerometer, I noticed that the offsets change depending on the orientation: I tried g on x axis, g on y axis and then g on z axis.
Is there an explanation to this?
Many thanks
Solved! Go to Solution.
06-07-2021 04:33 AM
Hi,
I don't know your application with BMI160. For static offset calibration, our common suggestion is save value in your flash but not BMI160's NVM, because NVM have wirte times limitation.
If you could check that accel static offset will not change along with product liftime, you can save value in NVM. It's decided by your application.
Best regards.
08-22-2021 06:15 PM
Hi Yanchao,
I am struggling with the offsets.
I did as you suggested saving the offsets given by bmi160_start_foc() in my local flash then applied them to the raw data - this didn't work for me.
I tried to learn the offset myself. I put the device on a flat surface, g is on z axis, I read the raw data on x and y for X time (I did 5 to 10 seconds). The avergare over this period of time is the offset. I've been appliying it as follows: a = ((a_raw - offset)*g)/sensitivty. This method didn't work for me either.
The only way for me to get sensible results is to use the FOC. I am not sure what I am missing here?
Can you please help me?
Many thanks
Kind regards
08-23-2021 03:47 AM
Hi katie,
I think your methord is right, maybe some mistake you didn't get.
Please show me your log, the offset value before and after offset compensation. Before offset compensation, the accel output value offset is lagger.
Best regards.
08-29-2021 11:09 AM
Many thnaks for your feedback.
It does work now.
Kind regards
10-02-2021 06:08 PM
Hi Katie,
Could you share your code snippet for FOC?
Nick