tockn / MPU6050_tockn

Arduino library for easy communication with MPU6050
226 stars 89 forks source link

Drifting on MPU6050 #9

Open 3DPJamie opened 6 years ago

3DPJamie commented 6 years ago

Hello, great job, works nice. sorry if my issue is unrelated but I am trying to make a self-balancing robot and I am getting drifting on gyro angle like it is initially 0.01 degree and after a couple back and forth movements the gyro angle becomes 0.20 in stationary position.. is this fixable or totally my own issue?

thank you for your time!

note: in README.md exaple codes, the #include does not include .h so I got issues while uploading. if you can change them to #include would be better :)

ghost commented 6 years ago

Hi! Yea, drift is a common problem with accelerometers and gyroscopes. What you can do to minimise it is to:

I hope these tips help!

(Btw there might be a better equipt library for the mpu6050. I myself am working on one, but its still under development (it has methods, like getAccelXMedian()...)

joaomcarlos commented 4 years ago

Did anyone find a solution for this?

I keep on getting drift and makes it quite unusable.

Some axis increase gyro angle by almost 1 angle per second :/