2021-04-15 05:52 AM
How can I determine the offset values? After determining I will use the following example.
Solved! Go to Solution.
2021-04-16 06:32 AM
Hi @Iakgu.1 ,
for the gyroscope, you have no dependency of the zero rate level (G_TyOff parameter in the datasheet, p. 9) offset with the position, so you can simply acquire the gyro output in a steady condition in order to evaluate the residual post solder offset, and compensate it in post processing.
For the accelerometer, you have to take into account the gravity field: in this case it would be better to know your position, in order to understand the portion of earth gravity offset along each axis. However, you could think to place the LSM6DSO in a steady condition (regardless the actual position of the device in space), and use the high pass filter (datasheet p.58) to cut the 1g gravity from each axis. In this way the residual contribution to the output would be given by the offset.
For a general overview on the available firmware calibration libraries running on STM32, you can refer to the X-CUBE-MEMS1 package, especially the MotionAC accelerometer calibration library and the MotionGC gyroscope calibration library.
-Eleon
2021-04-16 06:32 AM
Hi @Iakgu.1 ,
for the gyroscope, you have no dependency of the zero rate level (G_TyOff parameter in the datasheet, p. 9) offset with the position, so you can simply acquire the gyro output in a steady condition in order to evaluate the residual post solder offset, and compensate it in post processing.
For the accelerometer, you have to take into account the gravity field: in this case it would be better to know your position, in order to understand the portion of earth gravity offset along each axis. However, you could think to place the LSM6DSO in a steady condition (regardless the actual position of the device in space), and use the high pass filter (datasheet p.58) to cut the 1g gravity from each axis. In this way the residual contribution to the output would be given by the offset.
For a general overview on the available firmware calibration libraries running on STM32, you can refer to the X-CUBE-MEMS1 package, especially the MotionAC accelerometer calibration library and the MotionGC gyroscope calibration library.
-Eleon
2021-04-16 07:21 AM
Thank you for your answer. Please confirm if I got it right. @Eleon BORLINI
I will take measurements while the device is stationary.
if the gyroscope measures 10, 20, 30 dps in three axes, I will subtract 10, 20, 30 dps from the values I read after each measurement.
For the accelerometer, I will first apply a high pass filter. I'll take measurements later.
If the measured values are 10,20,30 mg, I will apply these values to the offset registers of the accelerometer.
The values I write to the offset registers will be automatically subtracted from the values to be measured in the future.
2021-04-16 07:24 AM
Hi @Iakgu.1 ,
basically yes, even if for the accelerometer a check in a known condition, for example flat in X and Y (where you know that the 1g gravity vector should be equal to 0 in ideal case) would be very useful.
-Eleon
2021-04-16 07:26 AM
thank you again @Eleon BORLINI