5
$\begingroup$

I am using the MPU6050 in conjunction with an Arduino and Jeff Rowberg's i2cdev library, and my project requires that the gyro rate outputs be more precise than the default setting, which is 1/16.4 of a degree (+/-2000 deg/sec range). The gyro outputs can be changed with mpu.setFullScaleGyroRange(uint8_t range) for which I passed in MPU6050_GYO_FS_500 for range to get a higher precision

In this project, I also need the YPR position, which I obtain through mpu.dmpGetQuaternion(&q, fifoBuffer) and mpu.dmpGetGravity(&gravity, &q) and mpu.dmpGetYawPitchRoll(ypr, &q, &gravity).

The problem is with the new gyro output range, the YPR position changes drastically when the MPU is being rotated and slowly catches up again once the MPU is held still. I think there is an error in the filter that combines the gyro and accel data that is making the gyro to sensitive. Maybe the DMP is dividing the GYRO rate data by the default sensitivity factor (16.4) when it should be dividing by the new one (131)?

How can I get accurate YPR readings without delay?

Here is a screenshot of the data. The axis aren't labeled, but the x-axis represents about 16 seconds of time. The blue line is the gyro rate data, and the pink line is the roll position of the MPU. The graph shows two rotations of the MPU.

Screenshot of gyro rate and roll position data

$\endgroup$
1
  • $\begingroup$ Try decreasing the sensitivity or integrate the gyroscope angular rate yourself using the dt computed from a single pass of your control loop then check. Then use a complementary or Magwick filter to fuse the sensor data to get your orientation $\endgroup$ Commented Apr 12, 2017 at 8:29

1 Answer 1

1
$\begingroup$

I'm having a similar issue and think it may be that when set to the more sensitive scale (250dps), your gyro readings are clipped. I.e. you turn at a rate of 400dps, but the gyro's output has a max value of 250dps, hence the YPR output values lag reality until the small proportion of accel fed in to stop gyro drift (presuming this is the technique) gradually corrects it. Guess Guess.

$\endgroup$
1
  • $\begingroup$ That could make sense, but no, I'm not rotating the mpu anywhere near that speed. I'ts been a few months now, did you ever figure it out? $\endgroup$
    – Ember
    Commented Sep 30, 2017 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.