FGM-3h Geomagnetic Fluxgate magnetometer UK data with Arduino
In summer 2013 I purchased a fluxgate magnetometer from Speake & Co for monitoring the earth's geomagnetic field. Their FGM-3h sensor is extremely sensitive and can measure the 100nT diurnal variation in the Earth's magnetic field.
The sensor is buried approx 60cm deep in the ground in my back garden near Southampton, UK. This is to isolate it from daily temperature variations which would otherwise swamp the reading we are trying to make.
The sensor is connected via a long shielded cable to an Arduino Mega 2560 inside the house. Connected to the Arduino Mega is a circuit of my own devising.
- A 5v precision reference is used to power the FGM-3h fluxgate magnetometer. This prevents daily temperature variations from changing the supply voltage which can interfere with the readout. A precision reference is an order of magnitude more stable than a normal 5v regulator. This reference is fed from a 9v regulator, which is also used to power the arduino.
- A GPS module is also attached to the arduino. The output of the FGM-3h is sampled for 5 seconds, and the pulses from the sensor counted by the Arduino. The GPS PPS (pulse per second) is used to time this sample period far more accurately and with greater stability and less jitter than the crystal supplied with the arduino.
- Clock interrupts are used as the counting mechanism on the Arduino.
- The Arduino is modified to enable the watch-dog timer to restart the device if there is a problem.
- An ethernet interface is connected to the Arduino so that the data can be transmitted to a database stored on my website to produce the real-time graphs below.
- Geomagnetic readings are taken about 3 times per minute.
- Readings consist of a count of pulses from the FGM-3h over a set period of seconds. This figure is transmitted to the website. This web page then calculates the variation in nano Tesla.
- A DHT-22 temperature sensor is buried with the FGM-3 to provide temperature and humidity data underground
Source code example sketch
Here is a sample sketch for reading the FGM-3h magnetometer that simply counts the pulses from the FGM-3h and sends the result down the serial port.
I'm using a much more complex program in my observatory which includes an internet connection and a GPS for good timing.
There are a number of limitations with the system at present
- The data is not stored locally, therefore if the internet connection is lost, a "jump" will appear in the data
- The FGM-3h sensor is not sufficiently isolated from local effects. If a car parks on the nearby driveway it can cause the reading to "step" and "jump".
- The sensor is only roughly calibrated. The zero position on the chart (scale is in nano Tesla) is arbitary.
Select date range for geomagnetic field data to display:
Current data range: 5 days.
Last update: 2016-12-03 00:17:32
Data averaged over 10 minute intervals;
RED = Sensor Temperature, C
BLUE = Field, nT