OR/16/030 Raspberry Pi magnetometer: Difference between revisions
m 1 revision imported |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{OR/16/030}} | {{OR/16/030}} | ||
[[Image: | [[Image:OR16030_raspberry.jpg|thumb|right|300px| Raspberry Pi computer attached to a three-axis magnetometer.]] | ||
The launch of affordable, yet powerful, credit-card sized computers such as the Raspberry Pi, along with the falling cost of sensors and components for collecting geophysical data, has given rise to a new wave of interest in programming and self-built electronic systems. Taking advantage of these developments, we describe our efforts to build a three-axis magnetic field sensor which is primarily designed for use in schools. It is based on high-quality fluxgate magnetic sensors and employs a Raspberry Pi computer to act as the data acquisition and logging system. | The launch of affordable, yet powerful, credit-card sized computers such as the Raspberry Pi, along with the falling cost of sensors and components for collecting geophysical data, has given rise to a new wave of interest in programming and self-built electronic systems. Taking advantage of these developments, we describe our efforts to build a three-axis magnetic field sensor which is primarily designed for use in schools. It is based on high-quality fluxgate magnetic sensors and employs a Raspberry Pi computer to act as the data acquisition and logging system. | ||
Line 12: | Line 12: | ||
===Instrumentation=== | ===Instrumentation=== | ||
[[Image: | [[Image:OR16030_variationchart.jpg|thumb|right|300px| Variation in the Horizontal (upper panel) and Vertical (middle panel) components of the magnetic field for five days from 28 October to 2 November 2015. Difference between GDAS1 and Raspberry Pi sensors in the H and Z component and the temperature variation (exaggerated x10) are also shown (lower panel).]] | ||
The new Raspberry Pi magnetometer system consists of three main components: (i) a sensor head, (ii) a data acquisition and logging system and (iii) software required to run, collect and transmit the measured data. The sensor head consists of three FLC100 fluxgate coil magnetometers from Stefan Mayer Instruments in Germany. These miniature magnetometers have an inherent output accuracy of about 0.5 nT at 0.1–10 Hz. Thus the sensors can easily measure natural magnetic variations from the effects of the Sun on the ionosphere, such as the daily solar-quiet current, as well as magnetospheric pulsations and geomagnetic storms. The instruments measure short-term ''variations'' very accurately but the ''absolute'' level is only approximate. | The new Raspberry Pi magnetometer system consists of three main components: (i) a sensor head, (ii) a data acquisition and logging system and (iii) software required to run, collect and transmit the measured data. The sensor head consists of three FLC100 fluxgate coil magnetometers from Stefan Mayer Instruments in Germany. These miniature magnetometers have an inherent output accuracy of about 0.5 nT at 0.1–10 Hz. Thus the sensors can easily measure natural magnetic variations from the effects of the Sun on the ionosphere, such as the daily solar-quiet current, as well as magnetospheric pulsations and geomagnetic storms. The instruments measure short-term ''variations'' very accurately but the ''absolute'' level is only approximate. |
Latest revision as of 14:03, 8 July 2016
Thomson, Alan W P. 2016. Geomagnetism review 2015. British Geological Survey Internal Report, OR/16/030. |

The launch of affordable, yet powerful, credit-card sized computers such as the Raspberry Pi, along with the falling cost of sensors and components for collecting geophysical data, has given rise to a new wave of interest in programming and self-built electronic systems. Taking advantage of these developments, we describe our efforts to build a three-axis magnetic field sensor which is primarily designed for use in schools. It is based on high-quality fluxgate magnetic sensors and employs a Raspberry Pi computer to act as the data acquisition and logging system.
In December 2014, the British Geological Survey and Lancaster University won an STFC Public Engagement grant (number ST/M006565/1) to build and deploy ten Raspberry Pi magnetometers to secondary schools across the UK. The primary aim of this project is to encourage students from 14 to 18 years old to look at how sensors can be used to collect geophysical data, in order to promote a wider understanding of physical phenomena, such as space weather.
One of the reasons for doing this now is because, as a society, we are increasingly reliant on space-based technologies such as satellite global navigation systems and communication relays. Although there are visible effects during large geomagnetic storms, e.g. the aurora, these are relatively difficult to observe in the UK due to sub-auroral latitudes, clouds and light pollution. However, the change of the magnetic field associated with auroral displays can be measured at ground level.
A second aim of the project is to provide scientifically useful data on the spatial and temporal variation of the magnetic field across the UK during geomagnetic storms.
Instrumentation

The new Raspberry Pi magnetometer system consists of three main components: (i) a sensor head, (ii) a data acquisition and logging system and (iii) software required to run, collect and transmit the measured data. The sensor head consists of three FLC100 fluxgate coil magnetometers from Stefan Mayer Instruments in Germany. These miniature magnetometers have an inherent output accuracy of about 0.5 nT at 0.1–10 Hz. Thus the sensors can easily measure natural magnetic variations from the effects of the Sun on the ionosphere, such as the daily solar-quiet current, as well as magnetospheric pulsations and geomagnetic storms. The instruments measure short-term variations very accurately but the absolute level is only approximate.
The output connections from each magnetometer are wired back to a 17-bit digitiser directly connected to the Raspberry Pi computer. The digitiser converts the analogue voltage output to a digital value, which the Raspberry Pi computer records along with the time of acquisition. The system also includes an analogue thermocouple on the sensor head to measure ambient temperature and an LED to show the unit is powered on. Software written in the Python language is used to read and record the values of the magnetic field from each component. The data can be recorded to the internal SD card and transferred once per hour across the internet.
Performance
The magnetometers were located about 100 m from the Eskdalemuir observatory’s GDAS1 scientific instrument to which they were compared. Data were recorded at a cadence of 5 seconds for several weeks. An example of the variation and residuals (i.e. differences) between the data recorded by the Raspberry Pi system and the GDAS1 scientific instrument are shown below.
Note the short period fluctuations between the instruments match very well and these are the signals that we are most interested in. Longer periods correlate with temperature.
The temperature corrected residuals show an approximately Gaussian distribution with a mean of zero and a standard deviation of less than 0.8 nT, meaning the system can perform well within the nominal accuracy requirements we set (i.e. less than 1 nT).