cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting acceleration and gyro data using LSM6DSO32 chip. But I want to filter this data with internal filters, but I cannot activate the high pass filter of the accelerometer.

Buse
Associate II

I am getting acceleration and gyro data using LSM6DSO32 chip. But I want to filter this data with internal filters, but I cannot activate the high pass filter of the accelerometer. In the code below, I want to send F4 (11110100) data to the CTRL8_XL control register, ie 0x17 register address specified in the datasheet, to set the cutoff frequency as ODR/800, but corruption occurs in the accelerometer data. How can I solve this?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Buse​ ,

No, I was wondering if you tested the LPF2 only, without the HPF enabled, and if you faced the same issue.

My suggestion is to first calibrate the offset (especially along the Z axis, by configuring the offset registers X_OFS_USR (73h), Y_OFS_USR (74h), Y_OFS_USR (74h) of the LSM6DSO32 (see datasheet, p.93). This will set the residual offset as close to zero as possible. Then you can try applying the HPF and see if the resulting data are improving.

-Eleon

View solution in original post

6 REPLIES 6
Eleon BORLINI
ST Employee

Hi @Buse​ ,

Did you also activated the LPF2? And are you facing the same issue also at different ODR / setting different cut-off frequencies? My suspect is that, if the ODR you are using is too low, the risk is that the ODR/800 cut-off frequency is so low that the settling time of the filter could be pretty long and might create some issues at least in the first phases of the data acquisition.

-Eleon

Buse
Associate II

I think LPF2 and HPF can not be enabled at the same time for the accelerometer. For this, I did not enable LPF2. Do I need to enable LPF2? Correct me if I'm wrong. The ODR I use is 104 Hz, but even when I do ODR/2, I see my accelerometer data incorrectly as shown in the figure. I also don't know how to fix this error.0693W00000Kd9gJQAR.png

Hi @Buse​ ,

No, I was wondering if you tested the LPF2 only, without the HPF enabled, and if you faced the same issue.

My suggestion is to first calibrate the offset (especially along the Z axis, by configuring the offset registers X_OFS_USR (73h), Y_OFS_USR (74h), Y_OFS_USR (74h) of the LSM6DSO32 (see datasheet, p.93). This will set the residual offset as close to zero as possible. Then you can try applying the HPF and see if the resulting data are improving.

-Eleon

Buse
Associate II

Hi @Eleon BORLINI​ ,

Thanks for your answer, my problem is solved as seen in the figure below. I sent the value "10000001" ie. 0x81 to the Z_OFS_USR register.

I have 2 more questions on this topic. First question is, do I need to set off-set values within these values, although there is no problem in the X and Y axis? What does this get me? Second question is, How much should I set these off-set values for? Can you explain what it means to be between -127 and 127? I sent 0x81, but I sent it randomly, not on purpose.

Thank you for your help.

-Buse

0693W00000KdgXeQAJ.png

Buse
Associate II

Hi @Eleon BORLINI (ST Employee)​ ,

I have 2 more questions on this topic. First question is, do I need to set off-set values within these values, although there is no problem in the X and Y axis? What does this get me? Second question is, How much should I set these off-set values for? Can you explain what it means to be between -127 and 127? I sent 0x81, but I sent it randomly, not on purpose.

Thank you for your help.

-Buse

HI @Buse​ ,

please consider that the LSB for the offset is defined in the datasheet, p. 72:

0693W00000LxLeYQAV.pngSo, if this bit is 1, the +127 / -127 LSB has to be multiplied to 2^-10g/LSB in order to get the value in g / mg.

In your case, 0x81 = dec 129 = 0.126 g = 126mg.

Similar calculation if USR_OFF_W == 1.

-Eleon