mag3110 method of calibration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mag3110 method of calibration

Jump to solution
1,582 Views
2394343453
Contributor I

Dears:

              When I was in debugging mag3110, because our equipment is the on-board equipment, calibration, so unable to manually draw a figure 8 so I want to seek advice, is there any other method of calibration.

BRS

Labels (1)
0 Kudos
1 Solution
911 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello 大史,

It will be hard to implement the calibration in the hardware because the calibration parameters change depending to the environment. Basically, calibration takes matrix manipulations so integrate it in the firmware. How do you interface with the MAG3110? By the way you can port the calibration to your android project. C & JAVA languages are very closed.

View solution in original post

0 Kudos
6 Replies
911 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello 大史,

What's your application? What kind of accuracy do you target? We need more information about your project to give you a hand.

Thanks,

Anthony

0 Kudos
911 Views
2394343453
Contributor I

Hello Anthony,

                our  equipment  was installed int the car,  so it can't to draw 8 to calibration.   I know a  circle algorithm,  can you introduced to me?   and  send  the circle algorithm code to me?

                look forward to you apply. 

BRS

0 Kudos
911 Views
anthonyduhamel
NXP Employee
NXP Employee

Hi 大史,

You can have a look at the NXP Sensor Fusion​, we provide a full and open source project for electronic compass.

As the application is embedded in a car, you can NOT run the full 3D compass because you have 2 axis only.

The Sensor Fusion provides different algorithms for electronic compasses and IMUs. In your case, you can use the 2D Automotive Compass which needs a 2D calibration: instead of drawing a 8 it takes only a circle as you mentioned.

sensor fusion.PNG

Code samples are available on our website.

You have to check the

void fRun_3DOF_B_BASIC(struct SV_3DOF_B_BASIC *pthisSV, struct MagSensor *pthisMag, int32 loopcounter, int16 ithisCoordSystem)

function in the fusion.c file.

Anthony

0 Kudos
911 Views
anthonyduhamel
NXP Employee
NXP Employee

大史,

If you want to understand the algorithm, I attached a document about magnetic calibration.

The algorithm is based on an ellipsoid (ellipse in 2D) recognition. When the ellipsoid parameters have been extracted, the algorithm transforms the scattershot  into a sphere (circle in 2D) with mathematical operations.

Capture.PNG

Anthony

0 Kudos
911 Views
2394343453
Contributor I

Hello  Anthony:

                       Thanks for your kind reply.   our  project is android,  where we can set the calibration code,  BSP or HardWare ?

BRS

0 Kudos
912 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello 大史,

It will be hard to implement the calibration in the hardware because the calibration parameters change depending to the environment. Basically, calibration takes matrix manipulations so integrate it in the firmware. How do you interface with the MAG3110? By the way you can port the calibration to your android project. C & JAVA languages are very closed.

0 Kudos