Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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 12 Nov 2015