]https://www.ee.iitb.ac.in/web/people/kasturi-saha/

# High dynamic-range and portable magnetometer using ensemble nitrogen-vacancy
centers in diamond

Himanshu Kumar<EMAIL_ADDRESS>Department of Electrical Engineering,
Indian Institute of Technology Bombay, Mumbai, India  Dasika Shishir
Department of Electrical Engineering, Indian Institute of Technology Bombay,
Mumbai, India  Maheshwar Mangat  Department of Electrical Engineering, Indian
Institute of Technology Bombay, Mumbai, India  Siddharth Tallur  Department of
Electrical Engineering, Indian Institute of Technology Bombay, Mumbai, India
Kasturi Saha<EMAIL_ADDRESS>[ Department of Electrical Engineering,
Indian Institute of Technology Bombay, Mumbai, India  Center of Excellence in
Quantum Information, Computing Science and Technology, Indian Institute of
Technology Bombay, Mumbai, India  Center of Excellence Semiconductor
Technologies (SemiX), Indian Institute of Technology Bombay, Mumbai, India

###### Abstract

Nitrogen vacancy (NV) centers in diamonds have been explored for realizing a
wide range of sensing applications in the last decade due to their unique
quantum properties. Here we realize a compact and portable magnetometer with
an ensemble of NV centers which we call the Quantum MagPI (Quantum
Magnetometer with Proportional Integral control). Including the sensor head
and associated electronics, our sensor assembly can fit inside 10x10x7 box and
control electronics in 30x25x5 box. We achieve a bandwidth normalized
sensitivity of $\sim$
$10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$. Using closed-
loop feedback for locking to the resonance frequency, we extend the linear
dynamic range to $200\text{\,}\mathrm{\SIUnitSymbolMicro T}$ ($20\times$
improvement compared to the intrinsic dynamic range) without compromising the
sensitivity. We report a detailed performance analysis of the magnetometer
through measurements of noise spectra, Allan deviation, and tracking of nT-
level magnetic fields in real-time. Additionally, we demonstrate the utility
of such a magnetometer by real-time tracking the movement of the elevator car
and door opening by measuring the projection of the magnetic field along one
of the NV-axes under ambient temperature and humidity.

Quantum sensors based on negatively charged nitrogen vacancy centers in
diamond (NV-) centers have been extensively used to sense magnetic fields
relevant to various scientific and industrial applications such as monitoring
large currents in a bus bar of an electric vehicle Hatano  _et al._ (2022);
Kubota  _et al._ (2023) and sensing magnetic fields in high pressure anvil
cells Hilberer  _et al._ (2023). Such applications are enabled by the
viability of NV- centers for wide operating temperature range from
sub-$1\text{\,}\mathrm{K}$ to $1000\text{\,}\mathrm{K}$ Liu  _et al._ (2019)
and pressures up to $130\text{\,}\mathrm{GPa}$ Hilberer  _et al._ (2023).
Similarly, high sensitivities achievable with NV- of up to
$1\text{\,}\mathrm{pT}$ Schloss  _et al._ (2018); Fescenko  _et al._ (2020)
has made it possible to detect very weak magnetic fields emanating from very
small currents in biological samples Arai  _et al._ (2022); Barry  _et al._
(2016); Hansen  _et al._ (2023). However, more widespread use of the NV-
center depends heavily on the portability and compactness of the sensor. The
NV- sensor size depends on various factors like the laser, microwave power
used for excitation, bias magnet arrangement, the properties of the diamond
used, and finally the fluorescence collection optics and the sensing
electronics. In general, the parameters that lead to better sensitivity also
increase the size of the sensor. For example, the sensitivity of the NV- based
sensor improves by a factor of $\sqrt{P}$, where $P$ is the excitation laser
power. Hence, a laser with higher power can improve the sensitivity. However,
such lasers are bulky. Similarly, collection efficiency can be improved by
using optics of higher numerical aperture, which in-turn increase the size of
the sensor. In the past, extensive work has been done to make NV- centers as
portable and compact as possible, while still maintaining the high sensitivity
of the sensor. In Ref. Wang  _et al._ (2022), Liu. et. al. obtained a magnetic
field sensitivity of
$21\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$ on a sensor head
of 4x4x3 dimensions. Sturner et. al. in Ref. Stürner  _et al._ (2021) has
reported a sensor head size of 3x3x2 while maintaining a sensitivity of
$0.34\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$. This is the
most sensitive portable NV- magnetometer ever. The smallest NV- centered has
been reported by Donggyu Kim et. al. Kim  _et al._ (2019), where, the
microwave source, photo detector, and optical filters have been integrated
into a very small area of 200x200μ using CMOS technology. However, the
reported sensitivity is only
$32\text{\,}\mathrm{\SIUnitSymbolMicro}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$
due the extremely small size of the sensing elements. Another approach to
miniaturize the sensor is to place the diamond on a fiber head, which imparts
flexibility to the sensor head. This approach has been taken in Refs., Patel
_et al._ (2020); Zheng  _et al._ (2020); Kuwahata  _et al._ (2020) with the
best reported sensitivity of
$0.31\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$ in Ref. Patel
_et al._ (2020).

Further, the use of NV- centers in portable applications, especially field
applications such as geological sensing or oil and gas sensing, is limited by
the magnetic dynamic range of the sensor. The dynamic range of an NV- center
in an open-loop configuration is approximately $0.1\Gamma/\gamma_{e}$ Dasika,
Parashar, and Saha (2023), where $\Gamma$ is the NV- line-width of the
optically detected magnetic resonance spectrum, and $\gamma_{e}$ is the
electron gyromagnetic ratio. On the other hand, the sensitivity of the sensor
improves by a factor of $1/\Gamma$. This implies that it is desirable to have
lower linewidths for better sensitivity, however a lower linewidth compromises
the dynamic range of the sensor. For example, a typical linewidth of
$1\text{\,}\mathrm{MHz}$ has a dynamic range of only around
$3.5\text{\,}\mathrm{\SIUnitSymbolMicro T}$. Resonance shift due to
temperature shifts in NV- correspond to
$2.6\text{\,}\mathrm{\SIUnitSymbolMicro T}\text{\,}{\mathrm{K}}^{-1}$.
Therefore, a change in temperature of $1.3\text{\,}\mathrm{K}$ can put the NV-
sensor out of it’s dynamic range in the open loop configuration in addition to
the effects of any stray fluctuating external magnetic fields. In this work we
report a portable, feedback stabilized NV- sensor (dubbed as Quantum MagPI)
with a sensor head size of 10x10x7, a sensitivity of
$10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$ and a dynamic
range of $200\text{\,}\mathrm{\SIUnitSymbolMicro T}$, with all electronics
enclosed in a standard rack mountable box that can operate in ambient
conditions. Our sensor is resistant to changes in temperature and other non-
magnetic disturbances because of close-loop feedback tracking.

The NV- center is a color defect in the diamond crystal, formed when one of
the carbon atoms is replaced by nitrogen and the adjacent atom is knocked out
from its lattice site. Negatively charged NV centers (NV-) are unique because
their ground and excited state are spin-triplet states ($S=1$) and their
quantum state can be initialized and manipulated via optical pumping and
microwave (MW) field Rondin  _et al._ (2014). The ground state of NV- is a
spin-1 ($S=1$) system, with $m_{s}=0$ and $m_{s}=\pm 1$ separated by a zero-
field splitting of $\sim 2.87$ GHz. When pumped with $532\text{\,}\mathrm{nm}$
green laser, NV- goes to excited state, emitting red fluorescence
($637\text{\,}\mathrm{nm}$) while radiatively decaying to ground state. These
transitions are spin conserving. Also, there exists an alternate non-radiative
decay path to ground state, transferring the spin population from $m_{s}=\pm
1$ to $m_{s}=0$ state, which enables optical polarization of the NV- to
$m_{s}=0$ state. A MW field enables state transfer of the population from
$m_{s}=0$ to $m_{s}=\pm 1$ at resonance which can be mapped by measuring the
photo-luminescence (PL) intensity also known as optically detected magnetic
resonance Rondin  _et al._ (2014). With the application of a magnetic field,
the degenerate states $m_{s}=\pm 1$ are split by Zeeman splitting, which leads
to a change in the resonance frequency of $m_{s}=0$ to $+1$ or $-1$
transition. In addition, the interaction of electron spin with nitrogen
nuclear spin leads to further splitting into two (15N) or three (14N) hyper-
fine levels. In this work, we have utilized a chemical vapor deposition (CVD)
grown 100 orientation diamond sample DNV- B1TM of size 3x3x0.5 by Element-6,
$\sim 1.1$ ppm ${}^{13}C$ concentration, substitutional nitrogen concentration
([$N_{s}^{0}$]) $\sim 0.8$ ppm, [$NV^{-}$] concentration $\sim 0.3$ ppm.

A $525\text{\,}\mathrm{nm}$, $1.2\text{\,}\mathrm{W}$ compact multimode fiber-
coupled laser (FL-525-1200) from Lasertack GmbH is used for optical
excitation. The output beam from the fiber is collimated with a fixed focus
collimator and the fiber collimator is mounted on $30\text{\,}\mathrm{mm}$
cage XY translator (CXY1QA) with the help of mounting adapter (AD11F). The
diamond is glued on an omega loop antenna printed on a thin substrate (Rogers
RO4350BTM). Two $25\text{\,}\mathrm{mm}$ lenses are used to focus the light
emitted from the diamond, followed by a $600\text{\,}\mathrm{nm}$ long pass
filter (AT600lp) to reject the green light. Finally, the red fluorescence is
collected onto Thorlabs photo-detector (DET36A2). The complete assembly is
cage-mounted to form a compact sensor head. A hundred-turn current-carrying
coil ($7\text{\,}\mathrm{cm}$ radius) is used to apply a homogeneous bias
field. To further improve the footprint of the device, a $3\times 3$ array of
$$3\text{\,}\mathrm{cm}$\times$3\text{\,}\mathrm{cm}$$ permanent magnets
(Neodymium
$$1\text{\,}\mathrm{cm}$\times$1\text{\,}\mathrm{cm}$\times$2\text{\,}\mathrm{mm}$$)
is symmetrically glued on both sides of the sensor head.
The electron spin resonances are driven by MW generated using a compact MW
synthesizer (Windfreak SynthHD(v2)), amplified by three 8.8 dB low noise
compact Minicircuits MW amplifiers (ZX60-P33ULN+) connected in cascade to
provide a gain of 26.8 dB followed by a circulator (PE8432) to prevent damage
due to power reflection from the antenna. The MW carrier signal is frequency-
modulated (FM) by the modulation signal applied at the analog trigger signal,
configured to generate the FM signal with a Python interface. The FM signal
frequency is given by $f=f_{c}+f_{dev}\sin(2\pi f_{m}t)$, where, $f_{c}$ is
the MW carrier frequency, $f_{dev}$ maximum frequency deviation, and $f_{m}$
is the modulation rate.
The experimental control is implemented with the Redpitaya STEMlab 125-14 FPGA
board as illustrated in Fig. 1, and an open-source library (PyRPL) is utilized
to perform lockin homodyne demodulation, data acquisition, and closed loop
tracking of NV resonances. The fluorescence signal from the photo-detector is
fed to the trans-impedance amplifier (Edmund optics $\\#59-178$) and measured
by the Redpitaya board. A high-pass filter is applied to the signal to remove
the DC offset. The demodulated quadratures are readout using the Redpitaya
scope modules, and data is transferred to the computer over the ethernet
interface. For closed-loop tracking of the resonance frequency, the phase
between modulation and demodulation is adjusted such that the entire signal is
in one of the quadrature. The signal quadrature is input to a proportional-
integral (PI) controller, which generates an error signal to lock at the
resonance frequency. The output of PI controller is added with an analog adder
to shift the DC level of the modulating signal, which in turn shifts the MW
frequency.

The optically detected magnetic resonance (ODMR) spectrum is obtained by
sweeping the MW frequency and observing the in-phase quadrature as illustrated
in Fig. 2(a), the signal in the other quadrature is minimized by adjusting the
phase difference between modulation and demodulation. The sensitivity of the
magnetometer characterizes the minimum detectable magnetic field after an
integration time of $1\text{\,}\mathrm{s}$, and is given byBarry  _et al._
(2016):

$\eta_{esr}=\frac{\sigma\sqrt{\tau}}{\gamma_{e}\frac{dV_{lockin}}{df}|_{max}},$
(1)

where $\sigma$ is the standard deviation of the ODMR spectrum, $\gamma_{e}$ is
the electron spin gyromagnetic ratio, $\frac{dV_{lockin}}{df}|_{max}$ is the
maximum slope, and $\tau$ is the integration time (for detailed calculation
see supplementary information I). The maximum slope is calculated by fitting
the ODMR curve with the derivative of a Lorentzian function [Fig. 2(c)] and
finding the point where the slope of the derivative Lorentzian is maximum. For
the ODMR spectrum in Fig. 2(c) the maximum slope is
$2.20\text{\,}\mathrm{nV}\text{\,}{\mathrm{Hz}}^{-1}$, $\sigma$ is
$15\pm$3\text{\,}\mathrm{\SIUnitSymbolMicro V}$$, integration time is
$10\text{\,}\mathrm{ms}$, and the sensitivity is
$10\pm$3.5\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$$. The
shot-noise limited sensitivity is given byDréau  _et al._ (2011):

$\eta_{shot-noise}=P_{F}\frac{1}{\gamma_{e}}\frac{\Delta\nu}{C\sqrt{R}},$ (2)

where $P_{F}$ is the numerical factor resulting from the line shape of the
resonance, $\Delta\nu$ is the linewidth, $C$ the ODMR contrast, and $R$ is the
photon detection rate. For Lorentzian line shape, $P_{F}=4/3\sqrt{3}$. For out
ODMR spectrum, contrast is 0.15%, linewidth is $1.0\text{\,}\mathrm{MHz}$,
photon rate $R$ is
$7.5\text{\times}{10}^{14}\text{\,}\mathrm{p}\mathrm{h}\mathrm{o}\mathrm{t}\mathrm{o}\mathrm{n}\mathrm{s}\mathrm{/}\sec$,
and the photon shot-noise limited sensitivity is
$0.7\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$.

The performance of the magnetometer is further analyzed with noise power
spectral density (PSD). The PSD plots are shown in Fig, 3(a). PSD plots are
obtained by setting the microwave frequency at resonance (magnetically
sensitive), away from resonance (magnetically insensitive), and without laser
excitation (electronic noise). The noise power is given by:

$\sigma^{2}=\int_{-\infty}^{\infty}|x(t)|^{2}dt=\int_{-\infty}^{\infty}|X(f)|^{2}df,$
(3)

where $\sigma$ is the standard deviation, $x(t)$ is the signal, and $X(f)$ is
its Fourier transform.

Figure 1:  Schematic of the experimental setup.

Figure 2: (a) FM ODMR spectrum of the demodulated signal. Four pairs of
resonances, each corresponds to $m_{s}=0$ to $m_{s}=\pm 1$ transition of one
of the crystallographic axes of NV center ensemble including the three
hyperfine transitions due to 14N nuclear spins. The spectrum is obtained at
$1\text{\,}\mathrm{kHz}$ modulation frequency, -3 dBm MW power at signal
source, $400\text{\,}\mathrm{kHz}$ maximum frequency deviation,
$10\text{\,}\mathrm{ms}$ lockin time constant, and $700\text{\,}\mathrm{Hz}$
input high pass filter frequency. (b) Normalized integrated ODMR spectrum of
the spectrum in (a) (for details, see supplementary information I), (c)
Zoomed-in ODMR spectrum corresponding to resonance peak in the range
$2.845-$2.860\text{\,}\mathrm{GHz}$$. The extracted linewidth of each
hyperfine level is $\sim$1\text{\,}\mathrm{MHz}$$

.

Figure 3:  (a) Noise spectral density plot. Fifty time-traces were acquired at
$1.9\text{\,}\mathrm{k}\mathrm{s}\mathrm{a}\mathrm{m}\mathrm{p}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{/}\sec$,
$10\text{\,}\mathrm{ms}$ lockin integration time, $1\text{\,}\mathrm{kHz}$
modulation frequency, and $f_{dev}$ of $400\text{\,}\mathrm{kHz}$, for
magnetically sensitive, insensitive, and laser off case. (b) Magnetic field
tracking with square-wave test field. The MW frequency is set to resonance
frequency. The time-traces are acquired at
$1.9\text{\,}\mathrm{k}\mathrm{s}\mathrm{a}\mathrm{m}\mathrm{p}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{/}\sec$,
$25\text{\,}\mathrm{ms}$ lockin integration time, $1\text{\,}\mathrm{kHz}$
modulation frequency, and frequency deviation of $400\text{\,}\mathrm{kHz}$.
Inset figure shows the histogram and the fitted Gaussian distribution of the
fluctuations for one second duration. (c) Dynamic range comparison of the
closed-loop and the open-loop measurement. Figure 4: Allan deviation
measurement. The confidence intervals are calculated by the $\chi^{2}$
statistics Riley and Howe (2008). Olive-colored plot indicates open-loop
magnetically sensitive, red-colored magnetically insensitive, brown color
closed-loop PI output, and blue color is the error in the PI output. The
proportional and integral gains for the closed-loop case are -50 and -2.5,
respectively.

The magnetic noise spectral density is obtained by taking the fast Fourier
transform (FFT) of time trace data acquired and normalized (see supplementary
information II), scaled by the zero-crossing slope (ZCS), and the gyromagnetic
ratio of the ODMR curve. Fifty time traces each for one second were acquired
for magnetically sensitive case, magnetically insensitive case, and laser
excitation turned off to acquire the electronic noise floor. The mean noise
floor within $10\text{\,}\mathrm{-}$$100\text{\,}\mathrm{H}\mathrm{z}$ of the
magnetometer is
$9.52\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$.

The sensitivity of the magnetometer is also determined by applying a square-
wave test magnetic field as illustrated in Fig. 3(b). A 100-turn current-
carrying coil ($5\text{\,}\mathrm{cm}$) is placed in the vicinity of the
magnetometer, and the coil field is calibrated by sweeping the DC current in
the test coil and observing the shift in the resonant frequency of the ODMR
spectrum. The calibration constant of the coil is derived by the linear
fitting of the frequency shift vs. DC current and extracting the slope of the
linear fit (see supplementary information III). The extracted slope is
$137\text{\,}\mathrm{kHz}\text{\,}{\mathrm{A}}^{-1}$, which translates to
$4.9\text{\,}\mathrm{\SIUnitSymbolMicro T}\text{\,}{\mathrm{A}}^{-1}$ when
scaled by the gyromagnetic ratio. The coil is driven with a modulated current,
generating a magnetic field of $\sim$ $50\text{\,}\mathrm{nT}$, and the MW
frequency is set to the ZC point of the ODMR spectra. Hundred synchronous
eight-second time traces were acquired at the sampling rate of
$1.9\text{\,}\mathrm{k}\mathrm{s}\mathrm{a}\mathrm{m}\mathrm{p}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{/}\sec$
and offset-corrected and averaged in time domain. The fluctuation in the
detected magnetic for a $1\text{\,}\sec$ window is shown in the inset of Fig.
3(a). The standard deviation of the fluctuation is $11\text{\,}\mathrm{nT}$,
which translates to a sensitivity of
$12\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$.

The linear dynamic range of the magnetometer for the open loop and the closed-
loop Clevenson  _et al._ (2018) cases is compared in Fig. 3(c). The MW
frequency is set to resonance frequency for the closed-loop case, and the
lockin output is sent to the digital signal processing based PI controller
implemented on the FPGA. The PI output signal generates an error signal to
shift the frequency of the MW signal generator to track the resonance
frequency. The dynamic range for closed-loop case in the order of
$\sim$$200\text{\,}\mathrm{\SIUnitSymbolMicro T}$ compared to open-loop case
of $\sim$$10\text{\,}\mathrm{\SIUnitSymbolMicro T}$, a $20\text{\,}\times$
improvement in the dynamic range without compromising the sensitivity. The
dynamic range is limited by the maximum frequency deviation ($f_{dev}$)
possible with the MW signal generator, in this case, $5\text{\,}\mathrm{MHz}$.
The dynamic range can be pushed further by using the signal generators with
higher $f_{dev}$.

The sensor performance was further analyzed with Allan deviation measurements.
The previous methods (eq. (1) and Fig. 3(a,b)) to calculate the sensitivity
assume that the noise is white within the integration time. But, for longer
averaging time, diverging noise sources are present due to the dependence of
experimental parameters on ambient conditions.

The overlapping Allan deviation measurement Riley and Howe (2008) was
performed for three different cases: open-loop magnetically sensitive case,
oper-loop magnetically insensitive case, and the closed loop case. The signal
was recorded for a $10\text{\,}\mathrm{min}$ duration as illustrated in Fig.
4. The Allan deviation, $\sigma(\tau)$, times the integration time
$\sqrt{\tau}$ gives the sensitivity at given $\tau$. The magnetically
insensitive measurement represents the drifts due to the laser source,
($\sigma(\tau)\times\sqrt{\tau}$) is flat over $100\text{\,}\mathrm{s}$
integration time, which implies noise is white in frequency Riley and Howe
(2008). In magnetically sensitive measurement, the flat portion of the plot is
$\approx$10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$$
confirming the sensitivity obtained from previous measurements. At larger
$\tau$, $\sigma(\tau)$ deviates due to the dependence of resonance frequency
on temperature ($\approx
74\text{\,}\mathrm{k}\mathrm{Hz}\mathrm{/}\deg\mathrm{K}$) Schirhagl  _et al._
(2014). The Allan deviation measurement was also performed for the closed-loop
feedback case, which overlaps with the magnetically sensitive open-loop case.
The error signal from the PI controller has $-\frac{1}{2}$ slope, showing that
the signal has a white phase noiseRiley and Howe (2008), implying that the
drifts are transferred to the PI output to reduce the error in the lockin
quadrature.

Figure 5:  (a) Photograph of magnetometer placed $60\text{\,}\mathrm{cm}$ away
from the door of the elevator on the second level of the four-story building
along with the control electronics box. Inset figure shows the schematic of
the sensor head with magnet array used to provide the bias field (b) Temporal
response of the magnetometer when the elevator moves from ground level to
third level of the building with the magnetometer placed at second level. The
data is acquired at the sampling rate of
$1.9\text{\,}\mathrm{k}\mathrm{s}\mathrm{a}\mathrm{m}\mathrm{p}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{/}\sec$,
and $40\text{\,}\mathrm{ms}$ lockin integration time. A Gaussian filter with
$\sigma=50$ is applied to raw data.

As an application, the magnetometer was utilized to detect the real-time
magnetic field generated by the movement of an elevator from the ground level
to the third level and the door opening. The magnetometer was placed on the
second level and $60\text{\,}\mathrm{cm}$ away from the elevator door of a
four-story building (each level is $3.35\text{\,}\mathrm{m}$ above the other,
and the elevator door height is $2.28\text{\,}\mathrm{m}$). A photograph of
the device is shown in Fig. 5(a), and the inset shows the schematic of the
sensor head. The device was operated in closed-loop feedback control mode, and
the PI controller generates a PI signal to lock the magnetometer output at the
maximally sensitive resonance point in response to the external magnetic
field. Fig. 5(b) illustrates the response of the magnetometer, as the elevator
moves to the first level from the ground level. The change in magnetic field
is observed in real time. When the elevator reaches the second level, the
largest change in the magnetic field is observed because the elevator car is
nearest to the device. Also, a change is observed when the door opens due to
the magnetic field generated by the door opening mechanism. Upon reaching the
third level, the response returned to the same level as the first level since
the distance from the device was approximately the same. A similar response is
observed when the elevator returns to the first level from the third level.

In conclusion, we have realized a novel portable magnetometer with $\sim
10\text{\,}\mathrm{n}\mathrm{T}\mathrm{/}\sqrt{\mathrm{Hz}}$ sensitivity while
at the same time extending the dynamic range beyond the intrinsic range by
locking the frequency to the NV resonance that can be operated under normal
temperature and humidity conditions. We characterized the magnetometer for
metrics such as magnetic noise density, sensitivity, linear dynamic range, and
stability. The sensitivity can be further improved by engineering the diamond,
laser noise cancellation, and efficient collection of photons emitted from the
diamond. Our work paves the way for applying the portable magnetometer in a
wide variety of industrial applications in the near future.

## acknowledgment

K.S. acknowledges financial support from DST Quest Grant
DST/ICPS/QuST/Theme-2/2019/Q-58, IIT Bombay Seed Grant 17IRCCSG009 and SERB
power research grant SPG/2023/000063. The authors acknowledge support from
staff and access to facilities at the Wadhwani Electronics Lab (WEL),
Department of Electrical Engineering, IIT Bombay for building the system
reported in this work. H.K acknowledges funding from the Prime Minister’s
Research Fellowship. The authors acknowledge insightful discussions with Dr.
Madhur Parashar, IIT Bombay, and Prof. Saikat Ghosh, IIT Kanpur.

## References

  * Hatano  _et al._ (2022) Y. Hatano, J. Shin, J. Tanigawa, Y. Shigenobu, A. Nakazono, T. Sekiguchi, S. Onoda, T. Ohshima, K. Arai, T. Iwasaki, and M. Hatano, “High-precision robust monitoring of charge/discharge current over a wide dynamic range for electric vehicle batteries using diamond quantum sensors,” Scientific Reports 12, 13991 (2022).
  * Kubota  _et al._ (2023) K. Kubota, Y. Hatano, Y. Kainuma, J. Shin, D. Nishitani, C. Shinei, T. Taniguchi, T. Teraji, S. Onoda, T. Ohshima, T. Iwasaki, and M. Hatano, “Wide temperature operation of diamond quantum sensor for electric vehicle battery monitoring,” Diamond and Related Materials 135, 109853 (2023).
  * Hilberer  _et al._ (2023) A. Hilberer, L. Toraille, C. Dailledouze, M.-P. Adam, L. Hanlon, G. Weck, M. Schmidt, P. Loubeyre, and J.-F. m. c. Roch, “Enabling quantum sensing under extreme pressure: Nitrogen-vacancy magnetometry up to 130 gpa,” Phys. Rev. B 107, L220102 (2023).
  * Liu  _et al._ (2019) G.-Q. Liu, X. Feng, N. Wang, Q. Li, and R.-B. Liu, “Coherent quantum control of nitrogen-vacancy center spins near 1000 kelvin,” Nature Communications 10, 1344 (2019).
  * Schloss  _et al._ (2018) J. M. Schloss, J. F. Barry, M. J. Turner, and R. L. Walsworth, “Simultaneous broadband vector magnetometry using solid-state spins,” Phys. Rev. Appl. 10, 034044 (2018).
  * Fescenko  _et al._ (2020) I. Fescenko, A. Jarmola, I. Savukov, P. Kehayias, J. Smits, J. Damron, N. Ristoff, N. Mosavian, and V. M. Acosta, “Diamond magnetometer enhanced by ferrite flux concentrators,” Phys. Rev. Res. 2, 023394 (2020).
  * Arai  _et al._ (2022) K. Arai, A. Kuwahata, D. Nishitani, I. Fujisaki, R. Matsuki, Y. Nishio, Z. Xin, X. Cao, Y. Hatano, S. Onoda, C. Shinei, M. Miyakawa, T. Taniguchi, M. Yamazaki, T. Teraji, T. Ohshima, M. Hatano, M. Sekino, and T. Iwasaki, “Millimetre-scale magnetocardiography of living rats with thoracotomy,” Communications Physics 5, 200 (2022).
  * Barry  _et al._ (2016) J. F. Barry, M. J. Turner, J. M. Schloss, D. R. Glenn, Y. Song, M. D. Lukin, H. Park, and R. L. Walsworth, “Optical magnetic detection of single-neuron action potentials using quantum defects in diamond,” Proceedings of the National Academy of Sciences 113, 14133–14138 (2016), https://www.pnas.org/doi/pdf/10.1073/pnas.1601513113 .
  * Hansen  _et al._ (2023) N. W. Hansen, J. L. Webb, L. Troise, C. Olsson, L. Tomasevic, O. Brinza, J. Achard, R. Staacke, M. Kieschnick, J. Meijer, A. Thielscher, H. R. Siebner, K. Berg-Sørensen, J.-F. Perrier, A. Huck, and U. L. Andersen, “Microscopic-scale magnetic recording of brain neuronal electrical activity using a diamond quantum sensor,” Scientific Reports 13, 12407 (2023).
  * Wang  _et al._ (2022) X. Wang, D. Zheng, X. Wang, X. Liu, Q. Wang, J. Zhao, H. Guo, L. Qin, J. Tang, Z. Ma, and J. Liu, “Portable diamond nv magnetometer head integrated with 520 nm diode laser,” IEEE Sensors Journal 22, 5580–5587 (2022).
  * Stürner  _et al._ (2021) F. M. Stürner, A. Brenneis, T. Buck, J. Kassel, R. Rölver, T. Fuchs, A. Savitsky, D. Suter, J. Grimmel, S. Hengesbach, M. Förtsch, K. Nakamura, H. Sumiya, S. Onoda, J. Isoya, and F. Jelezko, “Integrated and portable magnetometer based on nitrogen-vacancy ensembles in diamond,” Advanced Quantum Technologies 4, 2000111 (2021), https://onlinelibrary.wiley.com/doi/pdf/10.1002/qute.202000111 .
  * Kim  _et al._ (2019) D. Kim, M. I. Ibrahim, C. Foy, M. E. Trusheim, R. Han, and D. R. Englund, “A cmos-integrated quantum sensor based on nitrogen–vacancy centres,” Nature Electronics 2, 284–289 (2019).
  * Patel  _et al._ (2020) R. Patel, L. Zhou, A. Frangeskou, G. Stimpson, B. Breeze, A. Nikitin, M. Dale, E. Nichols, W. Thornley, B. Green, M. Newton, A. Edmonds, M. Markham, D. Twitchen, and G. Morley, “Subnanotesla magnetometry with a fiber-coupled diamond sensor,” Phys. Rev. Appl. 14, 044058 (2020).
  * Zheng  _et al._ (2020) D. Zheng, Z. Ma, W. Guo, L. Niu, J. Wang, X. Chai, Y. Li, Y. Sugawara, C. Yu, Y. Shi, X. Zhang, J. Tang, H. Guo, and J. Liu, “A hand-held magnetometer based on an ensemble of nitrogen-vacancy centers in diamond,” Journal of Physics D: Applied Physics 53, 155004 (2020).
  * Kuwahata  _et al._ (2020) A. Kuwahata, T. Kitaizumi, K. Saichi, T. Sato, R. Igarashi, T. Ohshima, Y. Masuyama, T. Iwasaki, M. Hatano, F. Jelezko, M. Kusakabe, T. Yatsui, and M. Sekino, “Magnetometer with nitrogen-vacancy center in a bulk diamond for detecting magnetic nanoparticles in biomedical applications,” Scientific Reports 10, 2483 (2020).
  * Dasika, Parashar, and Saha (2023) S. Dasika, M. Parashar, and K. Saha, “Mapping AC susceptibility with quantum diamond microscope,” Review of Scientific Instruments 94, 053702 (2023), https://pubs.aip.org/aip/rsi/article-pdf/doi/10.1063/5.0138301/17148139/053702_1_5.0138301.pdf .
  * Rondin  _et al._ (2014) L. Rondin, J.-P. Tetienne, T. Hingant, J.-F. Roch, P. Maletinsky, and V. Jacques, “Magnetometry with nitrogen-vacancy defects in diamond,” Reports on Progress in Physics 77, 056503 (2014).
  * Dréau  _et al._ (2011) A. Dréau, M. Lesik, L. Rondin, P. Spinicelli, O. Arcizet, J.-F. Roch, and V. Jacques, “Avoiding power broadening in optically detected magnetic resonance of single nv defects for enhanced dc magnetic field sensitivity,” Phys. Rev. B 84, 195204 (2011).
  * Riley and Howe (2008) W. J. Riley and D. A. Howe, “Handbook of frequency stability analysis,”  (2008), 10.6028/NIST.SP.1065.
  * Clevenson  _et al._ (2018) H. Clevenson, L. M. Pham, C. Teale, K. Johnson, D. Englund, and D. Braje, “Robust high-dynamic-range vector magnetometry with nitrogen-vacancy centers in diamond,” Applied Physics Letters 112, 252406 (2018), https://pubs.aip.org/aip/apl/article-pdf/doi/10.1063/1.5034216/14514188/252406_1_online.pdf .
  * Schirhagl  _et al._ (2014) R. Schirhagl, K. Chang, M. Loretz, and C. L. Degen, “Nitrogen-vacancy centers in diamond: nanoscale sensors for physics and biology,” Annual review of physical chemistry 65, 83–105 (2014).