Is there a MEMS sensor that could direct output pitch roll and yaw?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-17 6:20 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-21 12:26 AM
Hi @BChao​ ,
all ST gyroscopes outputs pitch, roll and yaw, not in physical units such as radians or degree per second (dps), but in LSB. Inertial measurement units do the same too. You have then to convert the LSB into dps according to the datasheet sensitivity. A typical conversion formula (for the LSM6DSO, that you can find on Github lsm6dso_reg.c) is:
float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 4.375f;
}
In this way (i.e. working in the digital domain), you can select different full scales, with different resolutions. So, the output is not the direct physical measure but you can just apply the conversion formula to get it. If you want to calculate the angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-21 12:26 AM
Hi @BChao​ ,
all ST gyroscopes outputs pitch, roll and yaw, not in physical units such as radians or degree per second (dps), but in LSB. Inertial measurement units do the same too. You have then to convert the LSB into dps according to the datasheet sensitivity. A typical conversion formula (for the LSM6DSO, that you can find on Github lsm6dso_reg.c) is:
float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 4.375f;
}
In this way (i.e. working in the digital domain), you can select different full scales, with different resolutions. So, the output is not the direct physical measure but you can just apply the conversion formula to get it. If you want to calculate the angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-21 6:11 PM
​By apply the conversion, I could only get the angular velocity(degree per second). My question is can I get the Euler angle such as pitch, roll, and yaw direct from the IMU output, it definitely not the same as angular velocity(degree per second).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-22 1:01 AM
Hi @BChao​ ,
roll, pitch and yaw are, by definition, angular rates (see for example here:(
- Pitch is the rotation of a vehicle about the transverse axis.
- Roll is the rotation of a vehicle about the longitudinal axis.
- Yaw is the rotation of a vehicle about the vertical axis.
So, the answer to your first question is correct, since roll, pitch and yaw are angular speed.
Unfortunately, ST (but I'm pretty sure also other vendors) doesn't have pure (euler) angular sensors.
Usually, in order to calculate these angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis. More details: dt0060-exploiting-the-gyroscope-to-update-tilt-measurement-and-ecompass-stmicroelectronics.pdf
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 2:37 PM
Simple open-source sensor fusion example for the LSM6DS1 here, outputs Euler angles...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-06 3:34 AM
Thanks a lot :D
