Skip to main content
Visitor II
June 8, 2017
Question

LSM9DS1 Gyroscope does not work?

  • June 8, 2017
  • 3 replies
  • 955 views
Posted on June 08, 2017 at 16:57

Hi all,

I am testing a LSM9DS1 module to replace a L3GD20. I get readouts for the gyro, the accellerometer and the magnetometer. However when I turn my pcb I can see value changes on the accellerometer and the magnetometer but the gyroscope signals (despite some noise) do not change. When I disable the individual gyroscope outputs then these go to 0 so I read the right registers. I also tried changing output rates, bandwidth and so on without success. I also tried the selftest, that doesn't change the gyro outputs either. Is my part broken?

0690X00000603rqQAA.jpg

Thanks,

André

    This topic has been closed for replies.

    3 replies

    ST Employee
    June 12, 2017
    Posted on June 12, 2017 at 14:30

    If the self-test doesn't make any change in the output values the sensor could be broken.

    I think there is also possibility that the sensor is not properly configured. You can share your register settings and I can check it.

    Visitor II
    June 12, 2017
    Posted on June 12, 2017 at 15:37

    Hi,

    Here are the settings for gyro/accellerator (I don't want any filtering for the gyro) and magnetometer:

    /* Write to CTRL_REG1_G to activate gyro and accelerator */

    ctrl1_g = LSM9DS1_OUTPUT_DATARATE_3;

    ctrl1_g |= LSM9DS1_FULLSCALE_250;

    ctrl1_g |= LSM9DS1_BANDWIDTH_4;

    i2c_writeByte(1u, GXL_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG1_G_ADDR, ctrl1_g);

    i2c_writeByte(1u, GXL_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG2_G_ADDR, 0x00u); /* OUT_SEL */

    i2c_writeByte(1u, GXL_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG3_G_ADDR, 0x00u); /* HPF2 */

    i2c_writeByte(1u, GXL_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG4_ADDR, 0x38u); /* Enable gyro X, Y and Z */

    i2c_writeByte(1u, GXL_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG9_ADDR, 0x02u); /* Enable fifo */

    ctrl1_m = 0x40u | 0x1Cu; /* High performance, 80Hz */

    i2c_writeByte(1u, MAG_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG1_M_ADDR, ctrl1_m);

    i2c_writeByte(1u, MAG_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG2_M_ADDR, 0x00u); /* Full scale 4 gauss */

    i2c_writeByte(1u, MAG_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG3_M_ADDR, 0u); /* Enable XY continuous mode */

    i2c_writeByte(1u, MAG_I2C_SLAVE_ADDRESS7, LSM9DS1_CTRL_REG4_M_ADDR, 0x0Cu); /* Enable Z continuous mode */

    Reading is done by using the data ready in the status register.

    I have tried several other settings. Is it possible that a soldering problem could be the cause? We have made 4 pcb's but only 1 is working. The others have a short under the LSM9DS1. The part is really difficult to mount

    :(

    ST Employee
    June 13, 2017
    Posted on June 13, 2017 at 09:17

    The configuration seems ok to me, I use your settings for the gyro and I was able to get the data.

    It could be soldering issue.
    Visitor II
    June 13, 2017
    Posted on June 13, 2017 at 09:21

    Hi,

    Thanks for testing. I suspect a soldering problem too. We will ask a subcontracter to make us some boards.

    Thanks,

    André