-
Notifications
You must be signed in to change notification settings - Fork 190
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
does calibrateMPU6050 method push biases to hardware register? #57
Comments
yes..you can push them to registers but I found this to be more trouble
than it was worth...
…On Wed, Feb 22, 2023 at 9:33 PM audi0615 ***@***.***> wrote:
Hi.
I have a question regarding calibration method.
In MPU6050BasicExample.ino, I found that calibrateMPU6050 is done in
setup() and the biases are subtracted to accel & gyro data again in loop().
does this mean the calibrateMPU6050 method only calculate the biases
without pushing them to hardware register?
—
Reply to this email directly, view it on GitHub
<#57>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKTSJ3WOSSYF4YDHEXTWY3ZDTANCNFSM6AAAAAAVFFSCVM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks Mr. Winer But do you mean that it is supported in MPU6050 but not recommended? The calibrateMPU6050 method is pushing them to registers as shown below. If this works, then it seems there is no need to subtract them from accel and gyro data. ` // Push gyro biases to hardware registers // Push accelerometer biases to hardware registers |
Not sure this is supported for the MPU6050. I recommend you look in the
data sheet and verify.
You can also try both methods (in line and via register writes) and
verify which works.
You can also read the offset registers to verify that the calibration data
is properly stored there after calibration.
What I am saying is that I did all of this years ago and chose to correct
for calibration bias in the main loop. YMMV.
…On Wed, Feb 22, 2023 at 10:54 PM audi0615 ***@***.***> wrote:
Thanks Mr. Winer
But do you mean that it is supported in MPU6050 but not recommended? The
calibrateMPU6050 method is pushing them to registers as shown below. If
this works, then it seems there is no need to subtract them from accel and
gyro data.
` // Push gyro biases to hardware registers
writeByte(MPU6050_ADDRESS, XG_OFFS_USRH, data[0]);// might not be
supported in MPU6050
writeByte(MPU6050_ADDRESS, XG_OFFS_USRL, data[1]);
writeByte(MPU6050_ADDRESS, YG_OFFS_USRH, data[2]);
writeByte(MPU6050_ADDRESS, YG_OFFS_USRL, data[3]);
writeByte(MPU6050_ADDRESS, ZG_OFFS_USRH, data[4]);
writeByte(MPU6050_ADDRESS, ZG_OFFS_USRL, data[5]);
// Push accelerometer biases to hardware registers
writeByte(MPU6050_ADDRESS, XA_OFFSET_H, data[0]); // might not be
supported in MPU6050
writeByte(MPU6050_ADDRESS, XA_OFFSET_L_TC, data[1]);
writeByte(MPU6050_ADDRESS, YA_OFFSET_H, data[2]);
writeByte(MPU6050_ADDRESS, YA_OFFSET_L_TC, data[3]);
writeByte(MPU6050_ADDRESS, ZA_OFFSET_H, data[4]);
writeByte(MPU6050_ADDRESS, ZA_OFFSET_L_TC, data[5]);`
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKQ3GJYMQWP2AUZUAVTWY4CRHANCNFSM6AAAAAAVFFSCVM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks Mr. Winer. I could find a document which confirms the MPU6050 has the hardware offset registers. I would verify which works, thanks again. |
Hi.
I have a question regarding calibration method.
In MPU6050BasicExample.ino, I found that calibrateMPU6050 is done in setup() and the biases are subtracted to accel & gyro data again in loop().
does this mean the calibrateMPU6050 method only calculate the biases without pushing them to hardware register?
The text was updated successfully, but these errors were encountered: