Measuring Biomarkers Using Cellphone’s Built-In Compass

A regular cellphone magnetometer can be used to accurately measure blood glucose levels

by | May 11, 2024

Nearly every modern cellphone has a built-in compass, or magnetometer, that detects the direction of Earth’s magnetic field, providing critical information for navigation. Now a team of researchers at the National Institute of Standards and Technology (NIST) has developed a technique that uses an ordinary cellphone magnetometer for an entirely different purpose—to measure the concentration of blood glucose, a biomarker for diabetes, with high accuracy.

The same technique—which uses the magnetometer with magnetic materials designed to change their shape in response to biological or environmental cues—could rapidly and cheaply measure a host of biomarkers for monitoring or diagnosing medical conditions. The method also has the potential to detect environmental toxins, said NIST scientist Gary Zabow.

The Strategy

In their proof-of-concept study, Zabow and fellow NIST researcher Mark Ferris clamped a cellphone to a tiny well containing the solution to be tested and a strip of hydrogel (a porous material that swells when immersed in water). The researchers embedded tiny magnetic particles in the hydrogel, which they had engineered to react either to the presence of glucose or to pH levels by expanding or contracting. Changing pH levels can also be associated with a variety of biological disorders.

magnetometer illustration
The illustration shows how a smartphone magnetometer can measure biomedical properties in liquid samples using a magnetized hydrogel. | Credit: K. Dill/NIST

As the hydrogels enlarged or shrunk, they moved the magnetic particles closer to or farther from the cellphone’s magnetometer, which detected the corresponding changes in the strength of the magnetic field. Employing this strategy, the researchers measured glucose concentrations as small as a few millionths of a mole (the scientific unit for a certain number of atoms or molecules in a substance). Although such high sensitivity is not required for at-home monitoring of glucose levels using a drop of blood, it could enable routine testing for glucose in saliva, which contains much lesser concentrations of blood sugar.

The researchers reported their findings in the March 30, 2024 edition of Nature Communications.

An Inexpensive and “Smart” Technique

Engineered, or “smart,” hydrogels like the ones the NIST team employed are inexpensive and relatively easy to fabricate, Ferris said, and can be tailored to react to a variety of biochemical compounds that researchers may want to measure. In their experiments, he and Zabow stacked single layers of two different hydrogels, each contracting and expanding at different rates in response to pH or glucose. These bilayers amplified the motion of the hydrogels, making it easier for the magnetometer to track changes in magnetic field strength.

As the technique does not require any electronics or power source beyond that of the cellphone nor calls for any special processing of the sample, it offers an inexpensive way to conduct testing—even in low-resource settings and/or remote areas.

Future efforts to improve the accuracy of such measurements using cellphone magnetometers may even detect DNA, specific proteins, and immune system molecules at concentrations as low as a few tens of nanomoles. This could have substantial benefits: For instance, measuring histamines, typically detected in urine at concentrations ranging from about 45 to 190 nanomoles, would ordinarily require a 24-hour urine collection and a sophisticated laboratory analysis. 

Hassle-Free, Reliable At-Home Diagnosis

“An at-home test using a cellphone magnetometer sensitive to nanomolar concentrations would allow measurements to be done with much less hassle,” said Ferris. More generally, enhanced sensitivity would be essential when only a small amount of a substance is available for testing in extremely dilute quantities, Zabow added.

Similarly, the team’s study suggests that a 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 a baker could use the magnetometer to quickly test the pH of various liquids to perfect their craft, and an environmental scientist could measure the pH of groundwater samples on-site with higher accuracy than a litmus test strip could provide.

Engineers will need to develop a method to mass produce the hydrogel test strips with long shelf-life to make the cellphone measurements a commercial success, Zabow said. Ideally, he added, the hydrogel strips should be designed to react more quickly to environmental cues to speed up measurements. 

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

Related Content


Editor's Choice