Hi,
i build up my second OpenXSensor with a GY86 Board instead an MS5611.
I now have problems to understand the calibration of MPU6050 like described in the config description file.
In the description file there is a section:
ensure that the mpu6050 (GY86) is perfectly horizontal and does not move (e.g. put on a table)
That means that i have to mount the board flat to the table right? If i do this my values for ACCX and ACCY differs in great by the configured values of -150 and -160 i get values like 636 and 1200.
On the board are some arrows for X and Y how must i orientate it? For better purpose here is a small picture of my board:
Later in the description you find the part:
rotate mpu6050 in order to get X or Y axis perfectly vertical and do not move. Now, the 3rd number would become much lower (because it does not measure gravity anymore)
So how should i flip it? Im a bit confused because i dont understand what to do here!
Could someone help me?
Understanding problems with MPU6050 calibration
Moderator: rainer
Re: Understanding problems with MPU6050 calibration
It goes over calibrating accelerations.
Most of time accelerations are generated when an object move. Still even when MPU6050 does not move, it measures gravity.
If X and Y axis (draw on PCB) are both perfectly horizontal, then gravity has no impact on those axis and MPU6050 should ideally report two values that are equal to 0. In practice, it is not the case because the MPU6050 has some internal offsets. This is just what we try here to compensate.
So having both X and Y lines horizontal, get the values reported bu MPU6050 as explained in the description and use those values as accX and accY offsets in the config file. During this test, you should get value about 16000 (I think; I am not 100%) for acceleration along Z axis. This is because Z axis is vertical and get 1 g acceleration. So during this first part of the test, we can't measure the Z offset.
In order to know the offset for Z axis, you have to turn MPU6050 by 90° in order to move the Z axis from vertical to horizontal.
In this position, Acc Z should ideally be 0 but again due to offset, it will probably not be the case. Write the value you get for Acc Z while MPU6050 sit in this position (Z axis horizontal) and fill it in your config.h file as Z offset.
Most of time accelerations are generated when an object move. Still even when MPU6050 does not move, it measures gravity.
If X and Y axis (draw on PCB) are both perfectly horizontal, then gravity has no impact on those axis and MPU6050 should ideally report two values that are equal to 0. In practice, it is not the case because the MPU6050 has some internal offsets. This is just what we try here to compensate.
So having both X and Y lines horizontal, get the values reported bu MPU6050 as explained in the description and use those values as accX and accY offsets in the config file. During this test, you should get value about 16000 (I think; I am not 100%) for acceleration along Z axis. This is because Z axis is vertical and get 1 g acceleration. So during this first part of the test, we can't measure the Z offset.
In order to know the offset for Z axis, you have to turn MPU6050 by 90° in order to move the Z axis from vertical to horizontal.
In this position, Acc Z should ideally be 0 but again due to offset, it will probably not be the case. Write the value you get for Acc Z while MPU6050 sit in this position (Z axis horizontal) and fill it in your config.h file as Z offset.
Re: Understanding problems with MPU6050 calibration
Hi,
ok got it!
Thx for your help!
ok got it!
Thx for your help!