cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a MEMS sensor that could direct output pitch roll and yaw?

BChao
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

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

​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).

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

KWine
Senior

Simple open-source sensor fusion example for the LSM6DS1 here, outputs Euler angles...

Thanks a lot :D