kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.03k stars 472 forks source link

a good way to calibrate the magnetometer #311

Open hcklawrence opened 6 years ago

hcklawrence commented 6 years ago

May I ask that is there any better way to calibrate the magnetometer? I have tried to do the figure 8 calibration, but the result can only depends on your luck. is it the problem of my skill or it is a common problem?

screen shot 2018-09-21 at 4 45 46 am

this is one of my best calibration and i cannot do this another time. will there be any system (hardware or software) that I could use to calibrate the magnetometer?

and one more problem, I found that you mentioned about you don't use the soldered board mpu9250 due to different reasons. I am currently using the gy-521 board for my testing. should i instead getting a raw invensense mpu9250 chip for better quality? Thank you so much!

kriswiner commented 6 years ago

I assume you have read this https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration .

Figure eight means move the board in all possible 3D orientations, rotate up, down, left, right sidways, backwards, forwards, tilted up left downright down left up right while rotating slowly (one revolution per second or two. The idea is to sample the entire 3D spherical response surface. if you plot Mx vs My, or Mx vs Mz, or My vs Mz you should see a circu;ar cloud of points centered at the origin.

If your MPU9250 breakout board is not well designed you could have problems but I would try to calibrate what you have first.

This https://www.tindie.com/products/TleraCorp/mpu9250-add-ons-for-ladybug/ is a well-designed MPU9250 breakout board. And there are others https://www.tindie.com/products/onehorse/mpu9250-teensy-3x-add-on-shields/ .

On Sat, Sep 22, 2018 at 11:58 AM lawrence ho notifications@github.com wrote:

May I ask that is there any better way to calibrate the magnetometer? I have tried to do the figure 8 calibration, but the result can only depends on your luck. is it the problem of my skill or it is a common problem?

[image: Screenshot] https://camo.githubusercontent.com/f55958e6807bcdf345f44d19d3b9a8032a395392/68747470733a2f2f696d6775722e636f6d2f612f52677551495372 this is one of my best calibration and i cannot do this another time. will there be any system (hardware or software) that I could use to calibrate the magnetometer?

and one more problem, I found that you mentioned about you don't use the soldered board mpu9250 due to different reasons. I am currently using the gy-521 board for my testing. should i instead getting a raw invensense mpu9250 chip for better quality? Thank you so much!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/311, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qjpG98UcPwyFPsejJqhm-FjXgBInks5udog_gaJpZM4W1ZYc .

hcklawrence commented 6 years ago

I assume you have read this https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration . Figure eight means move the board in all possible 3D orientations, rotate up, down, left, right sidways, backwards, forwards, tilted up left downright down left up right while rotating slowly (one revolution per second or two. The idea is to sample the entire 3D spherical response surface. if you plot Mx vs My, or Mx vs Mz, or My vs Mz you should see a circu;ar cloud of points centered at the origin. If your MPU9250 breakout board is not well designed you could have problems but I would try to calibrate what you have first. This https://www.tindie.com/products/TleraCorp/mpu9250-add-ons-for-ladybug/ is a well-designed MPU9250 breakout board. And there are others https://www.tindie.com/products/onehorse/mpu9250-teensy-3x-add-on-shields/ . On Sat, Sep 22, 2018 at 11:58 AM lawrence ho @.***> wrote: May I ask that is there any better way to calibrate the magnetometer? I have tried to do the figure 8 calibration, but the result can only depends on your luck. is it the problem of my skill or it is a common problem? [image: Screenshot] https://camo.githubusercontent.com/f55958e6807bcdf345f44d19d3b9a8032a395392/68747470733a2f2f696d6775722e636f6d2f612f52677551495372 this is one of my best calibration and i cannot do this another time. will there be any system (hardware or software) that I could use to calibrate the magnetometer? and one more problem, I found that you mentioned about you don't use the soldered board mpu9250 due to different reasons. I am currently using the gy-521 board for my testing. should i instead getting a raw invensense mpu9250 chip for better quality? Thank you so much! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#311>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qjpG98UcPwyFPsejJqhm-FjXgBInks5udog_gaJpZM4W1ZYc .

Thank you so much for your quick respond! I have read the article. I guess I am going too fast in doing the figure eight. I will try harder to calibrate them again. Thank you!

hcklawrence commented 6 years ago

and one more problem, should I pass a set of kalman filtered 9D datas to Madgwick filter for better quaternion result? or just use raw, well calibrated data to Madgwick filter will be great? Since I can still see noise in data after calibrated. Thank you!