Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Cellphone Magnetometers as Biosensors

magnetometer illustration

Illustration shows how a smartphone magnetometer can measure a host of biomedical properties in liquid samples using a magnetized hydrogel.

Credit: K. Dill/NIST

The Technology

Nearly every cellphone has a built-in compass, or magnetometer, that detects the direction of Earth’s magnetic field, providing critical information for navigation. NIST researchers have now developed a technique that uses a cellphone magnetometer for an entirely different purpose —measuring the concentration of glucose, a marker for diabetes, with high accuracy.

The same technique could someday be used at home to rapidly and cheaply measure a host of other biomedical properties for monitoring or diagnosing human disease. The method also has the potential to detect environmental toxins.

To use the cellphone compass as a medical diagnostic, a small well containing the solution to be tested is clamped to the mobile device. The well also contains tiny magnetic particles attached to or embedded in a strip of hydrogel — a polymeric material that swells when immersed in water. The hydrogel is engineered to expand or contract in the presence of glucose or a change in pH level. (Changing pH levels can be associated with a variety of biological disorders.) As the hydrogel expands or contracts, the magnetic particles move closer to or farther from the cellphone’s magnetometer, which registers the movement as a change in magnetic field strength.

Advantages Over Existing Methods 

At-home test kits already provide an accurate measure of glucose levels in a drop of blood. But the higher sensitivity of the cellphone magnetometer, able to record glucose concentrations as small as a few millionths of a mole, may enable routine testing using saliva, which contains a much lower concentration of the sugar.

In addition, the cellphone magnetometer can measure pH levels with the same sensitivity as a thousand-dollar benchtop meter but at a fraction of the cost. A home brewer or baker could use the magnetometer to quickly test the pH of various liquids to perfect their craft. An environmental scientist could measure the pH of groundwater samples on-site with higher precision than a litmus test strip could provide.

Engineered or “smart” hydrogels are inexpensive, relatively easy to fabricate, and can be tailored to react to a host of different compounds that scientists, technicians or laypeople may want to measure. Because the technique does not require any electronics or power source beyond that of the cellphone nor require any special processing of the sample, it offers an inexpensive way to conduct testing, especially at sites that have minimal laboratory resources.

Improving the sensitivity of the magnetometer measurements would have several benefits. For instance, it might allow detection of DNA strands, specific proteins and histamine — a compound involved in the body’s immune response — at concentrations as low as a few tens of nanomoles (billionths of a mole). Measuring histamine, which now requires a 24-hour urine collection and sophisticated laboratory analyses, could potentially be done at home or in a clinic without onerous sampling requirements.

To make the cellphone measurements a commercial success, engineers will need to develop a method to mass-produce the hydrogel test strips and ensure that they have a long shelf life. The hydrogel strips should also be designed to respond to additional chemical targets that are of interest for environmental and agricultural monitoring.

Key Papers

Mark Ferris and Gary Zabow. Quantitative, High Sensitivity Measurement of Liquid Analytes using a Smartphone Compass. Nature Communications. Published online March 30, 2024. DOI: 10.1038/s41467-024-47073-2

Contacts

Created April 25, 2025, Updated April 28, 2025