FGA Logger Sensor Calibration Procedure
Sensor calibration procedure is only available for firmware version 1.02 or later.
Why Do We Need to Calibrate Fluxgate Sensors?
1. Offset (Zero-Field Error)
Even in a zero magnetic field, a fluxgate outputs a non-zero signal due to:
- Core remanence
- Electronics offsets
- Asymmetries in the sensing coils
Effect if uncalibrated: The measured field is shifted, producing a constant heading or field error.
Calibration fixes: Subtracting the DC offset so zero field really reads zero.
Since a true zero magnetic field is difficult to achieve, this document proposes a simpler calibration method based on comparing measurements taken with different sensor axis orientations.
In an ideal case, the measured magnetic field magnitude should be identical regardless of which axis orientation is used. Any observed differences are used to estimate and correct sensor offset errors.
Offset error can be fixed using parameters:
S1_X_OFFSET
S1_Y_OFFSET
S1_Z_OFFSET
2. Scale Factor Errors (Gain Mismatch)
Each axis (X, Y, Z) has slightly different sensitivity because of:
- Manufacturing tolerances
- Core permeability variation
- Analog gain differences
Effect if uncalibrated: The field magnitude is distorted and headings become elliptical instead of circular when rotating the sensor.
Calibration fixes: Normalizing gains so all axes respond equally to the same field.
Gain error can be fixed using parameters:
S1_X_GAIN
S1_Y_GAIN
S1_Z_GAIN
While offset calibration can be performed using the method described here, proper gain calibration requires professional equipment and is not addressed in this document.
The FGA Logger provides the capability to compensate both sensor offset and gain using the formula:
S1_X = (X_VAL - S1_X_OFFSET) * S1_X_GAIN
How to Apply Calibration Parameters to FGA Logger
-
Make sure the SD card is FAT32 formatted
-
Make sure there is a
config.txtfile on the SD card with calibration parameters
Example of calibration parameters with default / ideal values:
S1_X_OFFSET=10000
S1_X_GAIN=1.0
S1_Y_OFFSET=-10000
S1_Y_GAIN=1.0
S1_Z_OFFSET=0
S1_Z_GAIN=0.5
S2_X_OFFSET=40
S2_X_GAIN=1.4
S2_Y_OFFSET=50
S2_Y_GAIN=1.5
S2_Z_OFFSET=60
S2_Z_GAIN=1.6
- Hold the multifunction button and power the device ON
LEDs will indicate that SD card configuration has been loaded by lighting on/off in sequence.
- The serial console will output information with parameter values that were read from the SD card — this confirms that the procedure succeeded.
Example console output:
Config: reading from SD card
config.txt found.
Input 1: Offset(x,y,z): 0, 0, 0
Gain(x,y,z): 1.00000000, 1.00000000, 1.00000000
Input 2: Offset(x,y,z): 0, 0, 0
Gain(x,y,z): 1.00000000, 1.00000000, 1.00000000
Timestamp_ms,B1x_nT,B1y_nT,B1z_nT,B1v_nT,B2x_nT,B2y_nT,B2z_nT,B2v_nT,Lat_deg,Lon_deg,Alt_m,SIV,Fix,HDOP_m
9648,64555.26,-23249.89,2992.34,68679.64,109.97,-1852.41,2666.81,3248.91,0.0000000,0.0000000,0.000,0,0,0.00
Calibration parameters are stored permanently inside the FGA Logger device.
How to Calibrate Sensors
-
Before starting calibration, make sure calibration parameters on the FGA Logger are set to default values (follow the procedure above)
-
Use the following procedure to get sensor calibration parameters for each axis
Axis X Calibration
Place the fluxgate magnetometer sensor in a magnetic field.
Align the sensor so that you get a strong response on the X axis and read the value Xp.
Example data:
29905,27553.65,1053.99,22170.34,35381.33
30005,27547.41,1055.65,22166.55,35374.14
30105,27547.66,1054.99,22169.61,35376.23
30205,27540.91,1050.56,22167.12,35369.29
30305,27549.23,1053.85,22167.19,35375.91
Average value: Xp = 27553
Now rotate the sensor 180° so the X axis is inverted, and read Xn.
Example data:
66605,-27296.96,516.04,21844.24,34965.14
66705,-27295.70,510.82,21839.32,34961.01
66805,-27298.24,493.04,21844.23,34965.80
66905,-27307.43,488.12,21846.38,34974.25
67005,-27300.68,485.41,21843.88,34967.39
Average value: Xn = -27296
Calculate Offset
Use the formula:
X_offset = (Xp + Xn) / 2
Example:
X_offset = (27553 + (-27296)) / 2
X_offset = 257 / 2
X_offset = 128.5
Apply Offset
Set the calibration parameter in the SD card configuration:
S1_X_OFFSET=128.5
Repeat for Other Axes
Repeat the same procedure for:
- Y axis
- Z axis
For sensor:
- S1 (Input 1)
- S2 (Input 2) — if a second sensor is connected
Apply Calibration
After calculating all offsets:
- Update the
config.txtfile on the SD card - Insert the SD card into the logger
- Power ON the device while holding the multifunction button
The FGA Logger will load and store the calibration parameters.
Calibration Complete
Your sensor offsets are now compensated and the logger will output corrected magnetic field measurements.