cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL Faulty Reading?

Nick Rogers
Associate II
Posted on June 12, 2017 at 12:28

Hi,

I'm investigating the use of the LSM6DSL in a future project (to replace our use of the LSM6DS3) and I have been testing the STEVAL-MKI178V1 evaluation part.

There appears to be some strange signal on the Z axis of the accelerometer (that was not present on the older LSM6DS3), have I just received a faulty part?

I've attached pictures of 30s of measurement data from the 6 axes (gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z) with the sensor in 3 different orientations. The strength of the rogue signal always seems to be constant (around 100 LSB, or 6 mg at our scale).

The sensor is configured to be in high performance mode, 104 Hz output data rate, +-2g full scale.

Thanks,

Nick

#lsm6dsl #accelerometer
5 REPLIES 5
Miroslav BATEK
ST Employee
Posted on June 14, 2017 at 14:27

It is unexpected behavior. Are you using FIFO?

Do you have another piece to try?

Nick Rogers
Associate II
Posted on June 14, 2017 at 14:31

Hi Miroslav,

Yes I am using the FIFO, and I am emptying it every 1 second which corresponds to the decay of the signal. I only purchased a single part for evaluation purposes so I do not have any alternative hardware to try.

Posted on June 14, 2017 at 14:49

I think there will be something wrong in the sensor configuration. It seems to me that timestamp data are added to the Z axis data, so it creates the saw shape signal. Can you please share your sensor configuration? I can try to replicate the issue.

Posted on June 14, 2017 at 14:55

Reset routine:

 // Set CTRL3_C to:
 // 1 : Reboot enable
 // 1 : Block data update enable
 // 0 : Interrupt activation level (0=high)
 // 0 : Push pull/open drain on INT1/2 (0=push pull)
 // 0 : SPI interface mode (0=4 wire)
 // 1 : Register increment enable for multibyte
 // 0 : Endianness (0=bigendian)
 // 1 : Software reset enable
 // 1100_0101 : 0xC5
 write_register(INEMO_CTRL3_C, 0xC5);
 
 write_register(INEMO_FUNC_CFG_ACCESS, 0x00);
 write_register(INEMO_SENSOR_SYNC_TIME_FRAME, 0x00);
 write_register(INEMO_FIFO_CTRL1, 0x00);
 write_register(INEMO_FIFO_CTRL2, 0x00);
 write_register(INEMO_FIFO_CTRL3, 0x00);
 write_register(INEMO_FIFO_CTRL4, 0x00);
 write_register(INEMO_FIFO_CTRL5, 0x00);
 write_register(INEMO_ORIENT_CFG_G, 0x00);
 write_register(INEMO_INT1_CTRL, 0x00);
 write_register(INEMO_INT2_CTRL, 0x00);
 write_register(INEMO_CTRL1_XL, 0x00);
 write_register(INEMO_CTRL2_G, 0x00);
 write_register(INEMO_CTRL3_C, 0x00);
 write_register(INEMO_CTRL4_C, 0x00);
 write_register(INEMO_CTRL5_C, 0x00);
 write_register(INEMO_CTRL6_C, 0x00);
 write_register(INEMO_CTRL7_G, 0x00);
 write_register(INEMO_CTRL8_XL, 0x00);
 write_register(INEMO_CTRL9_XL, 0x00);
 write_register(INEMO_CTRL10_C, 0x00);
 write_register(INEMO_TAP_CFG, 0x00);
 write_register(INEMO_TAP_THS_6D, 0x00);
 write_register(INEMO_INT_DUR2, 0x00);
 write_register(INEMO_WAKE_UP_THS, 0x00);
 write_register(INEMO_WAKE_UP_DUR, 0x00);
 write_register(INEMO_FREE_FALL, 0x00);
 write_register(INEMO_MD1_CFG, 0x00);
 write_register(INEMO_MD2_CFG, 0x00);
 // Set CTRL3_C to:
 // 0 : Reboot enable
 // 1 : Block data update enable
 // 0 : Interrupt activation level (0=high)
 // 0 : Push pull/open drain on INT1/2 (0=push pull)
 // 0 : SPI interface mode (0=4 wire)
 // 1 : Register increment enable for multibyte
 // 0 : Endianness (0=bigendian)
 // 0 : Software reset enable
 // 0100_0100 : 0x44
 write_register(INEMO_CTRL3_C, 0x44);�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

Configuration routine:

 // Set CTRL1_XL to:
 // 0100 : ODR_XL[3:0] = 0100, 104Hz in normal or high performance mode
 // 00 : FS_XL[1:0] = 00, +-2g full scale
 // 10 : BW_XL[1:0] = 10, 100Hz antialiasing bandwidth
 // 0100_0010 : 0x42
 write_register(INEMO_CTRL1_XL, 0x42);
 // Set CTRL9_XL to:
 // 00 : always zero
 // 11_1 : Zen_LX, Yen_XL, Xen_XL = 1, all axes enabled
 // 0 : SOFT_EN = 0, soft iron correction disabled
 // 00 : always zero
 // 0011_1000 : 0x38
 write_register(INEMO_CTRL9_XL, 0x38);
 // Set CTRL2_G to:
 // 0100 : ODR_G[3:0] = 0100, 104Hz in normal or high performance mode
 // 01 : FS_G[1:0] = 01, 500dps full scale
 // 0 : FS_125 = 0, Gyro full scale 125dps disabled
 // 0 : always zero
 // 0100_0100 : 0x44
 write_register(INEMO_CTRL2_G, 0x44);
 // Set CTRL10_c to:
 // 00 : always zero
 // 11_1 : Zen_G, Yen_G, Xen_G = 1, all axes enabled
 // 0 : Disable embedded functions
 // 0 : Disable pedometer reset
 // 0 : Disable significant motion detect
 // 0011_1000 : 0x38
 write_register(INEMO_CTRL10_C, 0x38);
 // Set FIFO_CTRL3 to:
 // 00 : Always zero
 // 00_1 : DEC_FIFO_GYRO = 001, no gyro decimation
 // 001 : DEC_FIFO_XL = 001, no decimation
 // 0000_1001 : 0x09
 write_register(INEMO_FIFO_CTRL3, 0x09);
 // Don't put data from external sensor into the FIFO.
 write_register(INEMO_FIFO_CTRL4, 0x00);
 // Set FIFO_CTRL5 to:
 // 0 : Always zero
 // 010_0 : ODR_FIFO_[3:0] = 0100, FIFO ODR 104Hz
 // 110 : FIFO_MODE_[2:0] = 110, continuous mode
 // 0010_0110 : 0x26
 write_register(INEMO_FIFO_CTRL5, 0x26);�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

piotrek700
Associate
Posted on September 11, 2017 at 01:37

Hello Nick,

Did you solved your issue? I'm asking because i have similar problem.

Br Piotr