FG-3+ Fluxgate Magnetometer Station
After years away from magnetometry, I recently built a new monitoring station based on the FG-3+ fluxgate sensor from Speake & Co. The goal: a 24/7 geomagnetic monitoring pipeline with software-based temperature compensation, real-time calibration against USGS reference data, and automated artifact correction.
The Hardware
The core sensor is an FG-3+ fluxgate, connected to an Arduino Duemilanove via a 10k 1% resistor and 0.1μF capacitor. The Arduino measures the sensor’s frequency output (proportional to magnetic field strength) and a 10k NTC thermistor for temperature reading. The sensor is oriented East-West to capture the Y-component of the geomagnetic field.
What makes this build different from my earlier FGM-3 setup is the approach to temperature compensation. Rather than trying to thermally stabilize the sensor (burying it underground, voltage regulation chains, etc.), I chose to measure temperature precisely and subtract the thermal drift mathematically. This is a software-first approach that dramatically simplifies the hardware.
The Data Pipeline
The system runs as a three-stage pipeline, capturing data 24/7 with no manual intervention:
- Arduino (Sensor) — Reads the FG-3+ frequency output and thermistor, computes raw nT values and temperature in Celsius, and serves both via serial USB.
- Raspberry Pi (Logger) — Runs a Python serial logger as a systemd service, writing CSV files and an InfluxDB time-series database. Exposes a REST API on port 8904 for historical queries. The Pi also backfills SWPC planetary Kp index data every 5 minutes for storm context.
- PC (Dashboard) — A Plotly Dash web application on port 8050 that polls the Pi API, applies temperature compensation and calibration in real-time, and displays five interactive panels: Magnetic Field (nT), Rate of Change (nT/s), USGS Reference (nT), Temperature (°C), and Sensor Frequency (Hz).
The Dashboard
The real-time dashboard is a Plotly Dash application that combines all monitoring and calibration into a single interactive interface:
Control Panel:
- TC / Scale / Offset / Tbase — Manual parameter inputs with live recalculation
- Auto TC — Automatic temperature coefficient regression
- Auto Cal — Automatic USGS scale/offset fitting
- Auto Tbase — Automatic baseline temperature setting
- Step Correct — Automatic step artifact detection and correction
Display Panels:
- Magnetic Field (nT) — Primary trace with Kp index color overlay and USGS reference comparison
- Rate of Change (nT/s) — First derivative of pre-correction nT, useful for spotting step events
- USGS BSL (Stennis Space Center, MS) — Live data from the USGS reference station for calibration comparison
- Temperature (°C) — NTC thermistor reading from the sensor enclosure
- Sensor Frequency (Hz) — Raw FG-3+ oscillator frequency
Window Options: 1 Hour, 6 Hours, 12 Hours, 24 Hours, 3 Days, 7 Days, and All. The date picker allows browsing historical data. Multi-day views use server-side downsampling for performance.
Kp Overlay: A color bar on the nT chart showing SWPC planetary Kp index (3-hour resolution, 7 day history). Green = quiet, yellow = unsettled, orange = active, red = storm, purple = extreme.
Temperature Compensation
Fluxgate sensors in this price range are sensitive to temperature variations. The FG-3+ has a temperature coefficient (TC) of roughly 240-280 nT/°C. Without compensation, daily temperature swings of even a few degrees completely swamp the ~50 nT geomagnetic signals we’re trying to detect.
The solution is a linear correction applied in software:
nTcorrected = (nTraw − TC × (T − Tbase)) × scale + offset
Where TC is the temperature coefficient in nT/°C, T is the current temperature, Tbase is a reference temperature, and scale/offset map the corrected values to the USGS reference frame. The TC is computed via direct linear regression of raw nT vs temperature during quiet geomagnetic periods (Kp ≤ 2). This produces a stable, repeatable value regardless of the data window selected.
Auto TC computes this regression automatically on the current data window, while Auto Tbase sets the baseline temperature to the window mean.
USGS Calibration (Auto Cal)
To convert raw sensor readings into meaningful absolute field values, the dashboard calibrates against the USGS real-time magnetometer chain (Stennis Space Center, MS station, approximately 350 miles away). A single-variable linear regression fits scale and offset parameters on the TC-corrected data:
USGSY = scale × nTcorrected + offset
Because the sensor polarity is inverted relative to the USGS convention, the scale factor is negative (approximately −0.158). The Auto Cal toggle continuously refits these parameters as new data arrives.
Step Artifact Correction
The FG-3+ occasionally exhibits step discontinuities caused by the sensor’s internal feedback loop jumping between metastable states. These artifacts can shift the baseline by hundreds of nT, corrupting hours of data if left uncorrected.
The Step Correct algorithm detects these events automatically by analyzing the rate of change (dH/dt) of the raw nT signal. It identifies candidate events, applies harmonic lock rejection (rejecting the 2nd harmonic mode where frequency doubles), frequency shift discrimination (≥3 Hz shift), and snap-back rejection. Valid steps are then corrected by shifting the post-event data to match the pre-event baseline, starting from the transition onset rather than the stable point so the ramp itself is corrected.
This feature is critical. Without it, the temperature compensation and calibration would be fighting constantly shifting baselines. With it, the data stays clean for days at a time.
Results
The station has been running continuously since May 2025. With temperature compensation and step correction active, the system reliably captures:
- The solar quiet (Sq) daily variation pattern
- Geomagnetic storms from G1 (Kp 5) through G4 (Kp 8+)
- Sudden storm commencements (SSCs)
- Substorm activity
Comparisons with the USGS Stennis Space Center reference station show strong correlation despite the 350+ mile separation, confirming the validity of the software compensation approach.
FGM-3 Fluxgate Magnetometer (Florida)
Before the FG-3+ station, my first fluxgate was based on the FGM-3 sensor, deployed at my home in Florida. This was a significant step up from the compass magnetometer.
The FGM-3 is sensitive enough to detect the Earth’s geomagnetic field and its variations. The only drawback is temperature sensitivity, as with most fluxgate sensors in this price range. My approach then was hardware-based: additional voltage regulation, tantalum capacitors, and burying the sensor four feet underground in a sealed PVC pipe.
For controlling temperature induced errors as well as local magnetic disturbances on the FGM-3 I buried the sensor four feet under the Florida sand about one-hundred feet behind the house. The sensor was aligned in the East-West orientation (Y axis). I used a shielded cable for connecting the sensor to the electronics in the house. The FGM-3 was inserted inside a water sealed PVC pipe before burying. The second cable seen in the image below is for powering the calibration coil which I made for the FGM-3. The cylindrical coil was made to be twice as long as the FGM-3 and just a bit larger in diameter to allow the insertion of the sensor. In this manner, I’m able to test/calibrate the sensor despite it being four feet below ground. A small battery (few volts), variable resistor and ampmeter is all that’s needed to calibrate the FGM-3. As an example of the low currents needed I normally calibrate the sensor with 50uA of current which with the coil in use generates about ~35nT through the axis of the sensor.
I have to admit that I wasn’t sure what to expect after setting this magnetometer up for the first time. I figured that I’d be able to detect strong solar storms with it, but that most of the weak activity would be missed. Well, I was pleasantly surprised. Below is a typical 48 hour plot during a quiet geomagnetic period (zoomed in). I have labeled the times of the day where interesting activity has occurred. The sinusoidal pattern seen during the daylight hours is called the solar quiet day variation (Sq), and is a natural geomagnetic field diurnal perturbation which is generated by the ionospheric dynamo.
These perturbations are small, in the order of say 50nT peak-to-peak or less. In the above plot my magnetometer was set to the most sensitive setting. On this setting and using the calibration coil at 50uA generating 35nT the output of the meter is about 3/4 full scale. Therefore, one can estimate that on the first day in the above plot the peaks where at about 20nT from center. These are small variations indeed!
Below is another example of the Sq pattern. The two pulses to the far left are 35nT calibration signals (from the calibration coil) to give an idea of the strength of these daily variations.
There’s no doubt that this magnetometer is capable of detecting even small geomagnetic storms. Below is an example of a somewhat active day. On July 22, 2009 Earth was impacted by a solar wind stream which at times reached Kp 6 levels. At around 0245UTC the storm commencement was detected and the ensuing oscillations where also recorded.
Compass Magnetometer
My first foray into geomagnetic monitoring was a simple compass magnetometer, inspired by a design from AuroraWatch. All of the parts were acquired from Radio Shack or Wal-Mart.
The Sun with its immense energy stores and close proximity to Earth is a great celestial object to monitor at all wavelengths. One can monitor activity on the Sun via indirect means. More precisely, it is possible to detect solar activity by monitoring the Earth’s magnetic field. It’s also possible to detect solar activity such as solar flares by monitoring Very Low Frequency (VLF) signal paths which use the Ionosphere as a means of propagation. Check out my SID receiver page.
The electromagnet is a reed relay coil from Radio Shack (275-233). The op-amp is a 741 wired as a current-to-voltage amplifier. The three 150ohm resistors are wired in parallel because the IR LED is very current hungry, and wiring the resistors in parallel increases their total power dissipation.
I have included a picture of the completed magnetometer and the power supply. I used a kit box to enclose the components and keep ambient light out of the light gate. As stated, I used a 200 ohm reed relay coil for the electromagnet. I have placed a North arrow in the image to allow for a better idea of where the components should go.
The following image is the finished dual polarity power supply that is required to power the Op741. The IR LED is very current hungry so I had to use a 1.2 amp transformer to provide adequate power to the circuit.
The recording device is a DI-194RS. This A/D is capable of connecting to a computer with the use of a serial cable. This is ideal for prolonged unattended recordings.
The compass magnetometer is surprisingly sensitive, capable of detecting a human body at a distance of around three meters. Thunderstorms tend to cause the magnetometer to behave very erratically. Furthermore, during geomagnetic storms the meter readings are all over the place. The following two images show an example of a solar event being detected by a magnetometer. The first image is from the USGS Fluxgate Magnetometer in Gakona Alaska for August 30, 2006. The second image is from my homemade compass magnetometer for roughly the same time period.
Thanks for reading, and have fun!












Russell
Fat Quarters no longer has kits. Their electronics store is closed. Might want to update this website.
Brett Davis
I would love to discuss this experiment in greater details if you have time? My email is. We are working on a project which uses magnetometers and would like some assistance and feedback.