2021-07-28 01:15 AM
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
Solved! Go to Solution.
2021-07-30 12:49 AM
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
2021-07-28 05:23 AM
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
2021-07-29 02:21 AM
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.
But you can see these values are different than those define values which are mentioned in the example code.
So could you clarify please?
2021-07-30 12:49 AM
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
2021-08-02 12:20 AM
Ohh ok thanks for the information.