Modern smartphones have internal magnetic sensors that can detect magnetic fields. Learn more about how the output of these sensors can be useful in finding north, identifying the direction of the earths’ magnetic field, identifying poles of magnets and checking compliance with air shipment regulations.
In our earlier article, The Earth is a Magnet, we described the earth’s magnetic field. As most of us know, we can measure the direction of this field with a compass to figure out which way is north. Most smartphones come preloaded with a compass application that does exactly that.
While most folks aren’t using this compass to figure out which way to go, they are using magnetic information indirectly. When using an iPhone for directions, the phone considers not only the GPS sensor data, but also the magnetometer and accelerometers. That’s part of how it can tell which direction you are pointed in.
The magnetic field sensed by the internal compass is not actually pointing to the north pole. In fact, unless you live near the equator, it is probably pointing mostly down into the ground!
Here at K&J Magnetics in Pennsylvania, USA, the magnetic field points north, but also in a downward direction. It’s angled about 67 degrees down! That means it’s pointing down much more than it is pointing north.
There are a few applications that work well to detect the earth’s 3-dimensional magnetic field. We demonstrate a few in the video below.
Curious about the strength and direction of the magnetic field near you? Consider the 3 globes at right.
For a better view of these maps, with spinning globes and more explanation of these terms, check out our page dedicated to Earth's Magnetic Field.
You can also use the same apps to measure the magnetic field near a neodymium magnet. You can’t measure very strong magnetic fields very close to the phone – the sensor isn’t able to measure fields that strong. Plus, you want to be careful not to get too close to the phone, or it could magnetize parts in it and/or mess up the compass calibration.
These applications can also help identify the poles of your magnet. Below, we demonstrate how to use a few of these apps to identify the poles on an iPhone 5.
Don’t get a magnet too close to the phone, or it can temporarily mess up the calibration of the compass.
In our article about Shipping Magnets, we describe the air shipment regulations pertaining to shipping magnets via air. We also described a few ways of how to estimate it, though the surest way is to actually measure it with a special, very sensitive magnetic instrument. Even though the sensors inside a smartphone are not sensitive enough to measure this directly, we can use them to estimate whether a package might meet these requirements.
If you can measure a magnetic field of 2 milligauss or more (0.002 gauss or 0.2 microTesla) at a distance of 7 feet from your package, the IATA (International Air Transport Association) says it must be labeled as a Dangerous Good. We typically try to package magnets to be below this limit, avoiding the necessity of shipping as a Dangerous Good. Can we measure this weak magnetic field with an iPhone?
Unfortunately, no. The tiny measurement is beyond the resolution that the sensor is capable of.
However, if we place the smartphone at some closer distance, we might be able to infer the field strength farther away. Considering how the field strength drops off near a disc magnet (formula found in Surface Fields 101), we figure that a magnet that has a 2 milligauss (0.2 μT) at 7 feet should have a strength of 20 milligauss (2 μT) at about 39 inches away. This, the sensors can detect.
We are assuming that your package of magnets will have a magnetic field that drops off in this way. It’s not perfectly accurate in every situation, but it’s a fair approximation.
In the video below, we measure the field strength of a few magnets in a few different configurations, both below and above the limit. The output of the iPhone at 39 inches away, and an air shipment milligauss meter at 7 feet is shown.
From the theory and experimentation described above, we found that using the iPhone this way provides a decent estimate of whether or not a box of magnets would pass this air shipment requirement. Measure the field strength without a magnet neaby, and then measure the change when you introduce the magnet at 39" away from the phone. If your shipment shows less than a 2 μT change with the phone at 39” away from the box, it will probably be less than 2 milligauss at 7 feet away.