Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accelerometer calibration #10

Open
robopassio opened this issue Sep 11, 2018 · 11 comments
Open

Accelerometer calibration #10

robopassio opened this issue Sep 11, 2018 · 11 comments

Comments

@robopassio
Copy link

I use this source with an Arduino Uno board, I have a problem with the calibration of the accelerometer. If the initial posture of the board is leaned then there is an offset and it can not get back to the true value after calibrating. I tried to remove the following lines, then the offset dissapeared but I do not know how to calibrate the accelerometer in a right way.
// // Push accelerometer biases to hardware registers
// writeByte(MPU9150_ADDRESS, XA_OFFSET_H, data[0]);
// writeByte(MPU9150_ADDRESS, XA_OFFSET_L_TC, data[1]);
// writeByte(MPU9150_ADDRESS, YA_OFFSET_H, data[2]);
// writeByte(MPU9150_ADDRESS, YA_OFFSET_L_TC, data[3]);
// writeByte(MPU9150_ADDRESS, ZA_OFFSET_H, data[4]);
// writeByte(MPU9150_ADDRESS, ZA_OFFSET_L_TC, data[5]);

Please give me some ideas about this.

@kriswiner
Copy link
Owner

kriswiner commented Sep 12, 2018 via email

@robopassio
Copy link
Author

It is left in an inclined surface (without any motion), then I realize that there was an offset.
The angle offset is reduced when the inclined angle is reduced, so I cannot trust the output angle.
The output is more reasonable when I commented on the above lines. Can you test it again or give me some instructions?
Thanks.

@kriswiner
Copy link
Owner

kriswiner commented Sep 12, 2018 via email

@robopassio
Copy link
Author

Of course, it is fixed in the surface, but a smaller inclined surface will produce a smaller offset in the angle.

@kriswiner
Copy link
Owner

kriswiner commented Sep 12, 2018 via email

@robopassio
Copy link
Author

I mean that I doubt on the calibration of the accelerometer. Why did the output angles deviate an amount (constant offsets) from its true value when I fixed it on a small inclined surface.
I think that the calibration is always true even in an inclined surface as long as it is motionless. However, it seems to depend on the initial lean angle of the surface that the sensor lied on. This is unreasonable because, in some application, the sensor is set up on an arbitrary surface.

@kriswiner
Copy link
Owner

kriswiner commented Sep 12, 2018 via email

@robopassio
Copy link
Author

robopassio commented Sep 12, 2018

Because the offset of the angles is varied depending on the inclined angle of the surface. So I just think that even I put in a slightly inclined surface, the output angles from my sensor still not correct, because it still exists a small offset. Do you agree with me at this point? Otherwise, please explain or give me a solution for this.

@kriswiner
Copy link
Owner

kriswiner commented Sep 12, 2018 via email

@Civilduino
Copy link

Hello, it is the same question I asked in the MPU-6050 repository. This is not a "real" calibration but an offset correction. This method assumes that the surface where the sensor lies is perfectly aligned with the gravity vector and therefore the offset from the readings are subtracted to match the "reality".

However, it is extremely difficult to have an ideal surface aligned to the gravity vector. So the true angle with respect to gravity is hard to obtain unless you have expensive equipment or do a more proper calibration. See the MPU-6050 question.

You are just correcting the angles based on the surface you are using.

@kriswiner
Copy link
Owner

kriswiner commented Jan 7, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants