Engineering and Technology
Quantitative, high-sensitivity measurement of liquid analytes using a smartphone compass
M. Ferris and G. Zabow
The study addresses whether a smartphone’s built-in magnetometer can be repurposed for quantitative analyte sensing using magnetic actuation, providing an optics-free alternative that works with opaque or autofluorescent samples. The context is the rise of smartphone-based diagnostics, which largely rely on camera-based optical methods requiring attachments and are susceptible to optical interferences. The purpose is to pair a smartphone magnetometer with analyte-responsive smart hydrogels that mechanically actuate upon exposure to a target, moving a small magnet relative to the phone’s sensor to transduce concentration-dependent signals. The importance lies in enabling low-cost, portable, quantitative testing without added electronics or power, potentially outperforming optical methods for challenging samples and expanding access in resource-limited settings.
Prior smartphone sensing has focused on camera-enabled optical modalities, including mobile microscopy and colorimetric, spectroscopic, fluorescence, reflectance, SPR, chemiluminescence, and polarimetry measurements, led by significant efforts from Ozcan and Fletcher. Smartphone magnetometers have seen little use beyond compass functionality. Smart hydrogels can swell/shrink in response to stimuli (e.g., glucose, pH, temperature), and bilayer hydrogel architectures are known to amplify small material strains into large motions analogous to Timoshenko bimetallic strips. Earlier magnetic-hydrogel sensors used homogeneous hydrogels and required strong magnets or sensitive magnetometers because magnet motion was small. This work leverages bilayer geometries to amplify magnet displacement, enabling detection with standard smartphone magnetometers. The glucose-responsive hydrogel chemistry is based on boronic acid formulations (GSH2.0) with improved selectivity; pH-responsive acrylic acid-based hydrogels are also established in the literature.
Design: A T-shaped hydrogel actuator is fabricated with an inert horizontal segment for clamping and a vertical bilayer segment for actuation. The bilayer consists of an inert hydrogel layer and a responsive smart hydrogel layer (glucose-responsive boronic acid or pH-responsive acrylic acid). A thin, disc-like ensemble of Nd2Fe14B microparticles (silica-coated to prevent corrosion) is embedded near the tip of the bottom inert layer and magnetized out-of-plane. The actuator is placed in a 3D-printed phone attachment containing a liquid well and aligned so the embedded magnet lies above the smartphone magnetometer (Moto E 2020 and Google Pixel 2 demonstrated). Upon exposure to analyte, differential swelling/shrinking causes the bilayer to curl, moving the magnetic disk away from the magnetometer and changing the measured Bz field. Materials and fabrication: Nd2Fe14B (~5 µm) particles are silica-coated via a Stöber TEOS process. Glucose-responsive hydrogel (derived from GSH2.0) precursor contains AAm, 3-APB, DMA, BIS, and LAP at final molar composition 73.3% AAm, 8.8% 3-APB, 15.9% DMA, 2% BIS. Inert glucose-layer hydrogel uses AAm, DMA, BIS (90% AAm, 8% DMA, 2% BIS) tuned to match initial swelling. pH-responsive hydrogel uses AAm, AA, PEGDA700 with DMPA initiator (79.3% AAm, 20.5% AA, 0.2% PEGDA700), paired with an inert layer (99.8% AAm, 0.2% PEGDA700). PEG porogen (0.4 g/mL) can be introduced to increase porosity and speed. Hydrogels are photopolymerized (365 nm UV) in nitrogen in a 0.5 mm deep PDMS T-mold; the Nd2Fe14B particles are positioned into a local disk with an external magnet during curing. The embedded particles are magnetized by brief exposure in a 3 T MRI bore. Actuators are conditioned by cycling between baseline and activated solutions. Platform assembly and operation: The actuator is clamped to the phone attachment well so the magnetic disk initially sits near and above the phone magnetometer. Analyte solution (buffered for glucose tests; unbuffered for beverage pH tests) is added to the well. The smartphone magnetometer app records Bz over time. Geometry (length L ~16 mm, thickness h ~0.65 mm, initial magnetometer depth Z0 ~5 mm) and magnet properties determine sensitivity. Characterization: Glucose sensing is tested by cycling between 0 and 20 mM and by stepwise concentration increases to build dose-response curves. pH sensing is characterized across pH 4–5 buffers and validated on two phone models. Noise is assessed across smartphones with and without actuators attached and during actuation. Sensitivity enhancements are evaluated by increasing magnetic loading (PDMS disk infused with NdFeB particles) and by decreasing magnetometer distance (Gauss probe). Real-world tests include diluted wines for glucose content and beverages for pH. Theory and calibration: For small deformations, bilayer curling vertically displaces the magnetic disk by approximately 3εL^2/(4h), amplifying motion over uniform hydrogels by a factor ~L/h. The magnetic disk field at the magnetometer and its change with displacement yield ΔBz scaling with magnet moment (Md), geometry (L^2/h^2), and inverse square of distance (Z0^-2). Optimal disk radius is Ropt ≈ 2^(1/3) Z0 for maximal ΔBz. Calibration curves are approximately linear over operating ranges; larger curlings require full calibration or extended models.
- Proof-of-concept smartphone magnetometer sensing with bilayer magnetic hydrogels enables optics-free, quantitative analyte detection for opaque liquids.
- Glucose platform: Reversible response between 0 and 20 mM glucose with average ΔBz ≈ 87 µT and ~20 min response time; repeatable over three cycles with endpoint standard deviation ≤0.5% of total response.
- Dynamic range spans several orders of magnitude; glucose calibration approximately linear over two orders of magnitude (R^2 = 0.985).
- pH platform: Approximately linear response from pH 4 to 5 (R^2 = 0.989). Repeatability within ~1% on Moto E; cross-device reproducibility around −3% between Moto E and Pixel 2. Response speed improved ~2× by adding PEG porogen and an additional ~2× by thinning the bilayer.
- Detection limit: Single-digit micromolar glucose detected (three replicates), already comparable or superior to many optical and electrochemical sensors, with potential extension to nanomolar sensitivity via geometric/magnetic optimization.
- Noise analysis: System noise dominated by intrinsic smartphone magnetometer noise (~0.1 µT S.D. of residuals). Adding the actuator does not appreciably increase noise; noise does not change during actuation.
- Sensitivity enhancements: Increasing magnetic loading (PDMS disk with higher NdFeB volume fraction) increased ΔBz by ~10× with minimal noise penalty (~10–15% increase). Reducing magnet-to-sensor distance from ~5 mm to ~1 mm increased measured field by ~50×.
- Real samples: Distinguishable glucose content among diluted wines (sangria > pinot grigio ≈ champagne brut). Beverage pH measurement consistent with benchtop pH meter (orange juice ~pH 4.00 > root beer ~4.42 > coffee ~4.96 in acidity), producing larger ΔBz for lower pH.
- Cost and practicality: Estimated material costs per actuator ≈ $0.16 (glucose) and $0.03 (pH). Platform uses only phone hardware plus low-cost 3D-printed attachment and replaceable hydrogel strip. Dynamic ranges up to four orders of magnitude and single-digit µM detection demonstrated.
The work demonstrates that pairing bilayer smart hydrogels with a smartphone magnetometer enables sensitive and quantitative analyte sensing without optics or external electronics. The bilayer geometry converts modest hydrogel strains into amplified magnet displacements (~3εL^2/4h), significantly increasing ΔBz at the smartphone sensor compared to homogeneous hydrogels. Theoretical analysis shows ΔBz scales with magnet moment and geometry (∝ L^2/h^2) and inversely with sensor depth (∝ Z0^-2); an optimal magnet radius exists to maximize signal. Empirically, the platform exhibits linear calibrations for glucose and pH over relevant ranges, repeatable cycling with ≤0.5–1% variability, and cross-device reproducibility, validating robustness. Noise is dominated by the phone magnetometer rather than the hydrogel assembly, indicating that improvements through geometry (longer/ thinner actuators), increased magnetic loading, and reduced sensor distance can further lower detection limits into the nanomolar regime. Demonstrations on real beverages show applicability without complex sample preparation. Compared to optical smartphone assays, this magnetics-based approach works with opaque or scattering liquids and is less susceptible to ambient lighting and autofluorescence, expanding use cases for field and home diagnostics.
This study introduces an optics-free smartphone sensing platform that uses the built-in magnetometer and bilayer magnetic hydrogels to transduce analyte-induced swelling into measurable magnetic field changes. It achieves large dynamic range, approximately linear calibration for glucose and pH, repeatable operation, and single-digit micromolar glucose detection with potential nanomolar scalability. The approach is low-cost, portable, and adaptable to diverse analytes via hydrogel chemistry, with prospects for multiplexing using vector magnetometer readings. Future directions include: (i) enhancing sensitivity by optimizing bilayer geometry (longer, thinner actuators) and magnetic loading; (ii) reducing response times via increased porosity, thinner gels, and advanced fabrication (3D printing, spin coating); (iii) improving mechanical robustness (crosslink optimization, interpenetrating networks, inorganic fillers) and antifouling; (iv) expanding to additional targets (ions, metabolites, enzymes, proteins, nucleic acids) and alternative actuator motions (buckling, twisting) for larger dynamic ranges; and (v) developing strategies to mitigate interferents and exploit multi-axis signals for selectivity and multiplexing.
- Current response times are on the order of tens of minutes; faster actuation requires increased porosity and thinner bilayers.
- Sensitivity is limited by the depth of the phone’s magnetometer (~3–5 mm), constraining ΔBz for a given geometry; not all phones have the same sensor placement.
- Intrinsic noise is dominated by the smartphone magnetometer (~0.1 µT), setting a floor for detection limits unless geometry/magnetics are optimized.
- Hydrogel selectivity is imperfect (e.g., boronic acid gels respond to pH, ionic strength, temperature, and other sugars); interferents must be co-monitored or chemistries refined.
- Large curlings introduce angular reorientation and lateral motion of the magnet; simple linear models break down and require prior calibration or full modeling for accurate quantification.
- Residual buffers and sample carryover in the well can bias subsequent measurements without proper rinsing; potential artifacts from geometry (e.g., observed inflection point) need design refinement.
- Thinner or more porous hydrogels may be mechanically weaker and require reinforcement strategies.
Related Publications
Explore these studies to deepen your understanding of the subject.

