LSM9DS1 icon indicating copy to clipboard operation
LSM9DS1 copied to clipboard

LSM9DS1 Gyro lsb value

Open aktorh opened this issue 3 years ago • 6 comments

According to the datasheet, lsb of gyro is 8.75 mdps/lsb for +-245 dps. 245/32768 gives 7.4768 mdps. Its also different for +-500 and +-2000 dps. Which one we should use?

aktorh avatar Jan 09 '22 21:01 aktorh

Use the one stated in the data sheet. The reason for the difference is that the scale factor is apparently non-linear. But I don;t really understand why this should be the case. According to ST, one should use their spec numbers...but you can ask them yourself for the why...

On Sun, Jan 9, 2022 at 1:53 PM aktorh @.***> wrote:

According to the datasheet, lsb of gyro is 8.75 mdps/lsb for +-245 dps. 245/32768 gives 7.4768 mdps. Its also different for +-500 and +-2000 dps. Which one we should use?

— Reply to this email directly, view it on GitHub https://github.com/kriswiner/LSM9DS1/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKRI3JWKD4LRSMID44TUVH7TXANCNFSM5LSKNEVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

kriswiner avatar Jan 09 '22 22:01 kriswiner

Sorry, the reason is likely that 245 dps is not exactly right for the full range also...so probably closer to 286 dps full range, etc...again, ask ST what;s going on here...

On Sun, Jan 9, 2022 at 2:06 PM Tlera Corporation @.***> wrote:

Use the one stated in the data sheet. The reason for the difference is that the scale factor is apparently non-linear. But I don;t really understand why this should be the case. According to ST, one should use their spec numbers...but you can ask them yourself for the why...

On Sun, Jan 9, 2022 at 1:53 PM aktorh @.***> wrote:

According to the datasheet, lsb of gyro is 8.75 mdps/lsb for +-245 dps. 245/32768 gives 7.4768 mdps. Its also different for +-500 and +-2000 dps. Which one we should use?

— Reply to this email directly, view it on GitHub https://github.com/kriswiner/LSM9DS1/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKRI3JWKD4LRSMID44TUVH7TXANCNFSM5LSKNEVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

kriswiner avatar Jan 09 '22 22:01 kriswiner

OK. i will ask them :)

aktorh avatar Jan 09 '22 22:01 aktorh

While waiting answer from ST , i checked official ST drivers and found this. float_t lsm9ds1_from_fs245dps_to_mdps(int16_t lsb) { return ((float_t)lsb * 8.75f); }

float_t lsm9ds1_from_fs500dps_to_mdps(int16_t lsb) { return ((float_t)lsb * 17.50f); }

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

from source file (line 113) https://github.com/STMicroelectronics/lsm9ds1/blob/2d4d0282f4628c4eee820d55a48b8d3d8494e7c3/lsm9ds1_reg.c

aktorh avatar Jan 11 '22 07:01 aktorh

I got the answer from stm : "Hi, you can refer to the datasheet or to the C drivers on Github.

In order to convert from LSB to physical units (in this case dps), you have to multiply the raw data (in LSB, obtained concatenating for example the OUT_X_H_G and the OUT_X_L_G, and casting the result into int16_t). Then, you have simply to multiply for 8.75, since the sensitivity is already expressed in milli-dps (so, no need to divide for 1000)

float_t lsm9ds1_from_fs245dps_to_mdps(int16_t lsb) { return ((float_t)lsb * 8.75f); }"

aktorh avatar Jan 12 '22 10:01 aktorh

Yes, same answer I got. But the unanswered question is why? ANyway, the LSM6DS1 is way obsolete. The LSM6DSM is a much better accel/gyro.

On Wed, Jan 12, 2022 at 2:14 AM aktorh @.***> wrote:

I got the answer from stm : "Hi, you can refer to the datasheet or to the C drivers on Github.

In order to convert from LSB to physical units (in this case dps), you have to multiply the raw data (in LSB, obtained concatenating for example the OUT_X_H_G and the OUT_X_L_G, and casting the result into int16_t). Then, you have simply to multiply for 8.75, since the sensitivity is already expressed in milli-dps (so, no need to divide for 1000)

float_t lsm9ds1_from_fs245dps_to_mdps(int16_t lsb) { return ((float_t)lsb * 8.75f); }"

— Reply to this email directly, view it on GitHub https://github.com/kriswiner/LSM9DS1/issues/20#issuecomment-1010878959, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKTFWGBJRLJ6VCP63PTUVVIAPANCNFSM5LSKNEVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

kriswiner avatar Jan 12 '22 17:01 kriswiner