9 years, 1 month ago.

Please tell me how to get degree by MPU-6050.

I can connect MPU-6050 to mbed by I2C, and get raw data.

But I can't transform raw data to degree.

Should I integrate raw data in time?

Please tell me how to transform raw data to degree!

2 Answers

8 years, 10 months ago.

You can use DMP. MPU6050 has feature to integrate output of acceleration sensor and gyro sensor, and calculates angles by filter like Karman filter. That is DMP. Please see my project ported from arduino library. https://developer.mbed.org/users/syundo0730/code/MPU6050_Example/

9 years, 1 month ago.

Yes, you need to integrate over time.

A gyro will give you a rate of turn not a heading. To get a heading (or technically a heading change) you need to integrate the rate of turn over time.

The result will drift over time, if you leave it stationary the average output won't be 0. You can sanity check pitch and roll by measuring which direction gravity is in, there is no easy way to compensate for heading drift.

Thank you for answering!

Drifting is difficult for me to handle.

Can Kalman filter solve it? Or other filter?

posted by Takeru Wako 12 Nov 2015

About the only way to prevent an IMU from drifting is to use a better IMU. A kalman filter can reduce noise but it can't remove drift unless you can constrain the solution in some other way.

posted by Andy A 12 Nov 2015

Thank you very much for your advice. I served as a reference.

posted by Takeru Wako 13 Nov 2015