cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS1 - how to validate the data received from the gyroscope?

jg_spitfire
Senior

Hi, what is the correct way to validate the data from a gyroscope? we are receiving data but we don't know if the values are correct

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @jg_spitfire​ ,

In rest condition, the gyro output should be close to zero (00h), in two's complement.

In other words, the parameter G_TyOff (Angular zero rate level) should be as close as possible to zero.

But in reality it might not be exactly zero. In fact, in the datasheet p.12, it is declared to be in the range ±30dps at FS = ±2000 dps.

So. The conversion formula form LSB (digits) to milli degree per second (mdps) is the following one (lsm9ds1_reg.c:(

float_t lsm9ds1_from_fs2000dps_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 70.0f);
}

I might then anticipate your question about the accelerometer... ;) In this case, when you place the LSM9DS1 in flat (and rest) position, with the Z axis pointing out of the plane, should be close to 0g along X and Y axis and to +1g along Z axis (Earth gravity).

-Eleon

View solution in original post

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @jg_spitfire​ ,

In rest condition, the gyro output should be close to zero (00h), in two's complement.

In other words, the parameter G_TyOff (Angular zero rate level) should be as close as possible to zero.

But in reality it might not be exactly zero. In fact, in the datasheet p.12, it is declared to be in the range ±30dps at FS = ±2000 dps.

So. The conversion formula form LSB (digits) to milli degree per second (mdps) is the following one (lsm9ds1_reg.c:(

float_t lsm9ds1_from_fs2000dps_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 70.0f);
}

I might then anticipate your question about the accelerometer... ;) In this case, when you place the LSM9DS1 in flat (and rest) position, with the Z axis pointing out of the plane, should be close to 0g along X and Y axis and to +1g along Z axis (Earth gravity).

-Eleon