cancel
Showing results for 
Search instead for 
Did you mean: 

Gyroscope sensitivity scale factor

ssena.1514
Associate III

Hi,

Let me know ,how to calculate the sensitivity scale factor of gyroscope sensor l3gd20 ?

From the example code I found that

#define L3G_Sensitivity_250dps  (float)114.285f    /*!< gyroscope sensitivity with 250 dps full scale [LSB/dps] */

#define L3G_Sensitivity_500dps  (float)57.1429f    /*!< gyroscope sensitivity with 500 dps full scale [LSB/dps] */

#define L3G_Sensitivity_2000dps  (float)14.285f     /*!< gyroscope sensitivity with 2000 dps full scale [LSB/dps] */

So how these sensitiivity values are obtained(i.e 114.285,57.1429 & 14.285) .

Kindly inform me.

Board - stm32f401 discovery.

Keil Ide.

Regards

Satyabrata Senapati

1 ACCEPTED SOLUTION

Accepted Solutions
TBomb.1
Senior II

Hi, they are just the inverse of the datasheet sensitivities:

sensitivity 8.75 milli dps/ LSB --> 1/sensitivity = 114.285 LSB/dps

sensitivity 17.50 milli dps/ LSB --> 1/sensitivity = 57.1429 LSB/dps

sensitivity 70 milli dps/ LSB --> 1/sensitivity = 14.285 LSB/dps

so you'll probably have in your code something like ROT=(1/SENSITIVITY)* (out_h*256+out_l)

Tom

View solution in original post

4 REPLIES 4
TBomb.1
Senior II

Hi, sensitivities should be reported in the device datasheet, in the Mechanical characteristics table.

https://www.st.com/resource/en/datasheet/l3gd20.pdf

You can also check on Github In ST standard C MEMS drivers for l3gd20 --> l3gd20h_reg.c

The conversion formulas from LSB to dps are here reported:

float_t l3gd20h_from_fs245_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 8.75f);
}
 
float_t l3gd20h_from_fs500_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 17.50f);
}
 
float_t l3gd20h_from_fs2000_to_mdps(int16_t lsb)
{
  return ((float_t)lsb * 70.0f);
}

Tom

ssena.1514
Associate III

Thanks .

As per your information I got ​the sensitivity from datasheet as 250dps = 8.75,500dps = 17.50 and 2000dps = 70 and unit is mdps/digit.

B​ut you can see these values are different than those define values which are mentioned in the example code.

So could you clarify please?

TBomb.1
Senior II

Hi, they are just the inverse of the datasheet sensitivities:

sensitivity 8.75 milli dps/ LSB --> 1/sensitivity = 114.285 LSB/dps

sensitivity 17.50 milli dps/ LSB --> 1/sensitivity = 57.1429 LSB/dps

sensitivity 70 milli dps/ LSB --> 1/sensitivity = 14.285 LSB/dps

so you'll probably have in your code something like ROT=(1/SENSITIVITY)* (out_h*256+out_l)

Tom

ssena.1514
Associate III

Ohh ok thanks for the information.