Different angle reading from 5 MPU6050

Hi All,

I have 5 different MPU6050 on one mechanic. I'm using Jeff's DMP6 code and I am especially interested in pitch and roll values from "OUTPUT_READABLE_YAWPITCHROLL".

I already calibrated All 5 MPU with "MPU6050_calibration.ino" All sensors gives me "0 degree" when they placed in horizontal position, with package letters facing up. Also I'm getting "90 degree"(almost) they placed vertical.

When i place sensors in for example 45 degree all of them shows different angles between 43-47, this error follows me in different angles. i have no error on vertical and horizontal planes but there is a non lineer error occurs between 0-90 degree and its not same for all. Supply voltage and ambient temperature is same for all and i read sensors from 5 different comport.

I suspect for calibration process and try a lot of time to calibrate each other but nothing changed. DMP6 code works perfect, there is no freeze or connection problem but this difference makes me crazy >:(

When used as a tilt gauge, and using that primitive calibration procedure, the sensor accuracy is +/- 2 degrees at best.

So 43-47 degrees is to be expected for your test.

For a much better calibration process, study this tutorial/overview:

Hi J,
Thanks for your reply. Actually i'm a little bit surprised about the sensor accuracy issue. Now i'm studying tutorial which you advice and i saw a formula.

CalibratedData = ( unCalibratedData – Offset ) / Scaling Factor

Now i understand i dont have any Scaling factor. When i use simple calibration process, that code gives me only 1 position offset data. In reality we have 5 position more. Because of that missing points i never calculate scaling factor.

You could see below Face up readings are almost perfect because that is my calibration position. Other readings are not accurate.

Device Face Up Face Side Face Down 70 degree 110 degree

1- 89,98 179,83 1,11 70,77 108,03
2- 89,99 178,35 0,70 71,93 109,30
3- 89,97 178,08 0,73 71,45 109,05
4- 89,98 179,40 2,08 70,73 108,24
5- 89,97 178,95 0,48 70,78 108,33

Thanks for your help, I'll try more complicated calibration issue and I'll post again.

the scale factor is based upon the sensitivity setting you made.

I'd apply offsets to the accelerometers during the process of using scale factors but not the gyros. For the gyros, I apply offsets on the step before I use the gyro info in a complimentary filter.