Meaningful data from an MPU6050

Hello, I have currently managed to get an MPU6050 working with my arduino uno using the MPU6050 I2C library. As far as I know, the data coming from the arduino isn't the angular velocity and angle data. How do I go about turning this data into the angular velocity and angle data so I can use it in a complementary filter? I looked in the reference page for the MPU6050 library and I set the limits to 1000 degrees/sec for the gyro and 8g for the accelerometer. I then found the relevant values associated with those limits (32.8 and 2048 respectively). I thought you just had to multiply the current data value by these numbers to get the angular velocity and angle data. This was wrong and now I'm stuck for ideas. Any help would be appreciated.

Thanks

The accelerometer measures acceleration and the gyro measures the rate of rotation. Neither provides angles. For a clear overview of how sensors work and how to use them, CHRobotics has a nice set of documents at http://www.chrobotics.com/library

Which MPU6050 I2C library is that ?

I know three things (I'm on my tablet, I can't include all the link now):

  • The Kalman Guide on the Arduino forum, there is a link at the bottom of the first post to code for the MPU-6050.
  • The example code in the Arduino Playground section.
  • The i2cdevlib.

Thank you for your responses.

jremington, I meant to put the g forces instead of angles. I am planning on implementing a complementary filter so I can find out the angle the sensor is at. As far as I know you need the accelerometer g force data and the gyro's rate of rotation.

Peter_n, I am using the I2Cdevlib library to use my MPU6050. I am currently using the demo code supplied in the library.

Thanks :slight_smile: