2017-06-08 07:57 AM
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?
Thanks,
André
2017-06-12 05:30 AM
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.
2017-06-12 06:37 AM
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
:(
2017-06-13 12:21 AM
Hi,
Thanks for testing. I suspect a soldering problem too. We will ask a subcontracter to make us some boards.
Thanks,
André
2017-06-13 02:17 AM
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.