Skip to main content
AK A.1
Associate
Jan 10, 2020 3:39 AM UTC
Solved

Why am I getting zero acceleration values from LSM6DS3 Eval Board (STEVAL-MKI160V1) ?

I am using LSM6DS3 Evaluation Board to get the acceleration and angular velocity data through I2C. I have powered up both Accel and Gyro by writing to the respective control registers and disabled the FIFO. But, when I read the data from Data Out registers (0x28 - 0x2D) of Accelerometer, I am getting zeros along all the 3 axes in all the orientations.

Any ideas on what might be wrong ?

Thank you.

    This topic has been closed for replies.
    AK A.1
    AK A.1Best answer
    Associate
    Jan 14, 2020 4:29 AM UTC

    Hi Eleon,

    Thank you for the suggestion.

    I was setting HP_SLOPE_XL_EN bit in CTRL8_XL register which was enabling the High Pass Filter. This was filtering out the DC Acceleration values. So, I was getting zero Acceleration values. The problem is resolved now.

    Akshay

    4 replies

    Eleon BORLINI
    ST Employee
    Jan 13, 2020 3:46 PM UTC

    Hi @AK A.1​ , do you get zeros also along gyroscope axis (data registers 0x22 - 0x27)? If only the acceleration data are wrong, please check if you well configured the LSM6DS3 device at the beginning of your code, as shown in the AN4650 p 36:

    Write CTRL9_XL = 38h // Acc X, Y, Z axes enabled
    Write CTRL1_XL = 60h // Acc = 416Hz (High-Performance mode)
    Write CTRL10_C = 38h // Gyro X, Y, Z axes enabled
    Write CTRL2_G = 60h // Gyro = 416Hz (High-Performance mode)

    Regards

    AK A.1
    AK A.1AuthorBest answer
    Associate
    Jan 14, 2020 4:29 AM UTC

    Hi Eleon,

    Thank you for the suggestion.

    I was setting HP_SLOPE_XL_EN bit in CTRL8_XL register which was enabling the High Pass Filter. This was filtering out the DC Acceleration values. So, I was getting zero Acceleration values. The problem is resolved now.

    Akshay

    DDale.1
    Visitor II
    Aug 26, 2020 9:05 AM UTC

    Hi,

    About AIS2120SX chip, can you tell me how to initialize it?

    That is, the acceleration from being charged up to being able to read the X and Y axes.

    What is the entire SPI operation?

    It's very difficult to use this chip.

    I tried to initialize the chip, but failed.

    Thanks for any help you can provide!

    Eleon BORLINI
    ST Employee
    Aug 26, 2020 10:10 AM UTC

    Hi @DDale.1​ , I first would suggest you to read carefully the datasheet,

    Then you may be right the chip is not as plug-and-play as almost every other ST sensor, since it is SPI over 32 bit and with polynomial CRC to check the data consistency. I may share you the screen of a labview code for the initialization of a similar chip.

    0693W000002lCHfQAM.png

    0693W000002lCI9QAM.png

    Regards