ZHomeSlice / Simple_MPU6050

Going Live
MIT License
86 stars 24 forks source link

Quaternion Z drift #18

Closed danielstuart14 closed 2 years ago

danielstuart14 commented 2 years ago

After fiddling around with the sensor, I found out that the Z component of the quaternion has a pretty noticeable drift. With the sensor layed flat in a table, if I raise it by 30 centimeters and then get it back to the table, it reports a value different of zero for the Z. (If I keep doing this, the value continues to increase)

Any ideas why? My thought is that it isn't compensating the gravity really well (as on my setup gravity is almost 100% on the Z component)

danielstuart14 commented 2 years ago

image I'm using the esp32 example, with the print function modified to show only the quaternion

danielstuart14 commented 2 years ago

Tested with another device, everything okay. Probably a defective one