Skip to main content
Visitor II
November 19, 2021
Solved

LSM6DSL data not correct

  • November 19, 2021
  • 2 replies
  • 974 views

Lsm6dsl reads out the data, and the z-axis data is always biased. When the acceleration range is set to 2G, it is placed vertically on the ground, and the z-axis is upward. The data is:

Acceleration [mg]:30.68 106.32 1998.60

the z-axis is down

​Acceleration [mg]:60.21 140.42 409.37

It can be found that the z-axis has an offset. Is this normal after lsm6dsl is powered on and initialized?

    This topic has been closed for replies.
    Best answer by oning.1

    It seems to be a chip problem. After replacing the sensor chip, the problem disappears....thanks anyway

    2 replies

    Visitor II
    November 23, 2021

    Hi, for a device in a flat position, along the z axis you should see +1g when the device is pointing upwards and -1g in case it is pointing downwards.

    Also the typ offset is about 40 mg, and is much higher in your case.

    Are you correctly converting the LSB into physical units (two's complement and sensitivity)?

    float_t lsm6dsl_from_fs2g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.061f);
    }

    Did you check the data also on other devices?

    oning.1AuthorAnswer
    Visitor II
    November 26, 2021

    It seems to be a chip problem. After replacing the sensor chip, the problem disappears....thanks anyway