A magnetometer is a device used to measure magnetic fields. In a smartphone, it is used for navigation applications as well as to determine the orientation of smartphones. In science, the smartphone magnetometer can be used to perform a large number of experiments on electromagnetism.
Discover FizziQ
How to measure it in class
FizziQ displays the three components of the magnetic field and its norm in microteslas, and gives access to the raw field, untouched by the operating system.
Steps:
- Locate the magnetometer in the smartphone: move a small magnet along the edges of the device and spot where the measurement shoots up, usually toward the top of the casing.
- Calibrate the sensor by tracing a large figure 8 in the air with the smartphone, a gesture that makes it explore all orientations and allows it to correct its zero offset.
- Move away from metal tables, radiators and speakers, then record the reference value of the Earth’s field, about 47 µT in metropolitan France.
- Gradually bring a bar magnet closer and plot the decrease of the field as a function of distance: it is very fast, in 1/d³ for a dipole, at distances large compared with the size of the magnet.
- Check with an aluminum or copper object that the sensor does not react: only ferromagnetic materials and electric currents modify the measurement.
Scientific activities on this topic
The magnetometer in smartphones can be tricky to use because smartphone operating systems constantly recalibrate the values given by the sensor to adapt them to user demands. For this reason, we recommend using the raw magnetic field accessible in FizziQ to take measurements of the magnetic field value.
A large number of experiments can be done with the smartphone magnetometer:
- Biot-Savart law
- Determining magnetic latitude
- Searching for metal objects buried in sand or detecting sunken ships
- How a compass works
- Measuring a speed with magnetic markers
Learn more
There are several types of magnetometers, each with different characteristics and uses. Smartphones use Hall effect or magnetoresistive magnetometers. In a Hall effect sensor, the magnetic field deflects the charge carriers of a current flowing through a thin semiconductor plate, which causes a transverse voltage proportional to the field to appear. In a magnetoresistive sensor, it is the electrical resistance of a stack of ferromagnetic layers that varies with the direction of the field. In both cases, three elements oriented perpendicular to one another make it possible to measure the three components of the field.
Common uses of the magnetometer include:
-
land and marine navigation, using Earth’s magnetic fields to determine direction
-
geological studies, to measure the magnetic fields associated with rocks and minerals
-
analysis of the magnetic properties of materials for industrial applications such as electric motors, permanent magnets and data storage devices
-
scientific research, to study magnetic phenomena in the natural environment, such as auroras and solar storms
A sensor that measures everything, not just the Earth
This is the point that ruins the most measurements in class. The magnetometer does not measure “the Earth’s field”: it measures the vector sum of all the fields present at the location of the sensor. The field of a metal table leg, a radiator, a speaker or the flap magnet of a protective case adds to that of the Earth. Since the Earth’s field is only about 50 µT, a nearby ferromagnetic object largely dominates it. Hence two reflexes: move away from metal structures, and calibrate the sensor by tracing a figure 8 in the air.
Orders of magnitude
Earth’s field: 25 to 65 µT depending on latitude, about 47 µT in France. Resolution of a smartphone magnetometer: it can reach 0.1 to 0.3 µT on some devices, but depends heavily on the sensor and the system. Measurement range: a few thousand µT before saturation. Refrigerator magnet on contact: 5,000 to 10,000 µT. Neodymium magnet on contact: up to 500,000 µT. Medical MRI: 1.5 to 3 T, or 1.5 to 3 million µT. Field of a neuron in the brain, measured in magnetoencephalography: on the order of 10⁻⁸ µT, out of reach of a smartphone.
Formula
The magnetometer provides three measurements, one per axis. The norm of the field is deduced from them:
B = √(Bx² + By² + Bz²)
where:
- B: intensity of the total magnetic field (µT, with 1 T = 10⁶ µT)
- Bx, By, Bz: components of the field along the three axes of the sensor (µT)
In a Hall effect sensor, the measured voltage is proportional to the field and to the current:
U_H = (R_H × I × B) / e
where:
- U_H: Hall voltage (V)
- R_H: Hall constant of the material (m³/C)
- I: current flowing through the plate (A)
- B: component of the field perpendicular to the plate (T)
- e: thickness of the plate (m)
The azimuth of magnetic north, when the smartphone is flat, is calculated from the two horizontal components:
θ = arctan(Bx / By)
The exact convention depends on the orientation of the device’s axes; with the usual axes (x to the right, y toward the top of the screen), the azimuth is zero when the top of the phone points north.
Application examples
-
A smartphone’s compass combines the magnetometer and the accelerometer: the latter locates the vertical, which makes it possible to project the measured field onto the horizontal plane even when the device is tilted.
-
The magnetometers of space probes have mapped the field of Jupiter, ten thousand times more intense than that of the Earth, and demonstrated that Mars no longer has a global field.
-
In archaeology, a magnetometer towed over a site reveals filled-in ditches and potters’ kilns, whose fired clay has retained a remanent magnetization, through anomalies of a few tens of nT.
-
The closure sensors of a laptop or a tablet case are Hall effect sensors that detect the flap magnet.
-
A magnetometer placed under a road counts vehicles by detecting the disturbance of several µT produced by their metallic mass.
-
In an electromagnetism lab, the Biot-Savart law is verified by measuring the field at the center of a coil: for 100 turns of 5 cm radius carrying 0.5 A, about 630 µT are expected, far above the Earth’s field.
FAQ
Q: Why do you have to trace a figure 8 with your phone before measuring? A: This gesture makes the sensor explore all possible orientations. The software then compares the values obtained and deduces the zero offset due to the metal parts of the phone itself, which it subsequently subtracts. Without this calibration, the measurement can be off by several tens of µT.
Q: Does the magnetometer measure only the Earth’s field? A: No, it measures the TOTAL field at its measurement point. The Earth’s field, that of nearby magnets, that of metallic masses and that of electric currents add up vectorially. That is why you must work far from any metal structure if you want to characterize the Earth’s field.
Q: Can a powerful magnet damage the magnetometer? A: The sensor itself is not destroyed, but a strong magnet can durably magnetize the neighboring metal parts inside the phone and skew all subsequent measurements. A new calibration generally corrects the problem.
Q: Why doesn’t my measurement change when I bring an aluminum can closer? A: Because aluminum is not ferromagnetic. Only iron, nickel, cobalt and their alloys, as well as magnets and electric currents, produce a detectable field. It is a good way to have students sort magnetic and non-magnetic metals.
Q: Raw field or corrected field, which to choose? A: The corrected, or “calibrated”, field is constantly adjusted by the operating system so that the compass remains stable; it is good for finding your way, bad for measuring. For any quantitative experiment, you must select the raw magnetic field in FizziQ.
Related concepts
Earth’s Magnetic Field - Magnetic Inclination - Magnetic Declination - Compass - Teslameter