  Nitrogen-vacancy (NV) quantum defects in diamond are sensitive detectors of
magnetic fields. Due to their atomic size and optical readout capability, they
have been used for magnetic resonance spectroscopy of nanoscale samples on
diamond surfaces. Here we present a protocol for fabricating NV-diamond chips
and for constructing and operating a simple, low-cost quantum diamond
spectrometer for performing nuclear magnetic resonance (NMR) and electron spin
resonance (ESR) spectroscopy in nanoscale volumes. The instrument is based on a
commercially-available diamond chip, with an ion-implanted NV-ensemble at a
depth of ~ 10 nm below the diamond surface. The spectrometer operates at low
magnetic fields (~ 300 G) and requires standard optical and microwave
components for NV spin preparation, manipulation and readout. We demonstrate
the utility of this device for nanoscale proton and fluorine NMR spectroscopy,
as well as for the detection of transition metals via ESR noise spectroscopy.
We estimate that the full protocol requires 2-3 months to implement, depending
on the availability of equipment, diamond substrates, and user experience.
