cancel
Showing results for 
Search instead for 
Did you mean: 

I am using LSM6DSL and getting values for gyroscope but values are changing very frequently while sensor is kept in rest

Mkuma.4
Associate II

My register configuration are

(0x10, 0x60)

( 0x16,0x70)

(0x11, 0x60)

(0x12,0x40)

I am getting values like (0, 5, 7, 65534, 65535, 567) for the all the axis , while my sensor are in rest. 

1 ACCEPTED SOLUTION

Accepted Solutions
TBomb.1
Senior II

Hi, do 0, 5, 7, 65534, 65535, 567 values refer to (roll, pitch, yaw; roll, pitch, yaw)?

If you convert them in two's complement, they should all be close to 0 (65534, 65535 are FFFE and FFFF), except the 567 that is a bit high, but since the ZRL ±3 dps and sensitivity is 4.375 mdps/LSB, 567 means 2.48dps, in line with the declared 3dps typ in the datasheet.

You can find the conversion formula on Github drivers:

float_t lsm6dsl_from_fs125dps_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 4.375f);
}

https://www.st.com/resource/en/datasheet/lsm6dsl.pdf

https://github.com/STMicroelectronics/lsm6dsl/blob/ce42c76176cdbc8f66491113c47ff961095840f3/lsm6dsl_reg.c

Tom

View solution in original post

1 REPLY 1
TBomb.1
Senior II

Hi, do 0, 5, 7, 65534, 65535, 567 values refer to (roll, pitch, yaw; roll, pitch, yaw)?

If you convert them in two's complement, they should all be close to 0 (65534, 65535 are FFFE and FFFF), except the 567 that is a bit high, but since the ZRL ±3 dps and sensitivity is 4.375 mdps/LSB, 567 means 2.48dps, in line with the declared 3dps typ in the datasheet.

You can find the conversion formula on Github drivers:

float_t lsm6dsl_from_fs125dps_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 4.375f);
}

https://www.st.com/resource/en/datasheet/lsm6dsl.pdf

https://github.com/STMicroelectronics/lsm6dsl/blob/ce42c76176cdbc8f66491113c47ff961095840f3/lsm6dsl_reg.c

Tom