Modular low-cost 3D printed setup for experiments with NV centers in diamond

With the advent of quantum technology, the need for affordable, flexible and robust laboratory experiments not only for students, but also at high school level is increasing. Here, for the first time, we report on a simple modular 3D printed low-cost (<250 €) setup which fulfils these needs for quantum sensing experiments based on nitrogen-vacancy centers in diamonds. Commercially available setups for optically detected magnetic resonance in microdiamonds used as quantum sensor for magnetic fields are not only beyond the reach of any high school (>10 000 €), but also have shortcomings from a didactical point of view, as all the components of the setup are hidden within a ’black box’, doomed to be successful ’plug and play’. In contrast, our open-source experimental kit consists of optical components that are placed inside 3D printed open-framed cubes, that can be arranged freely on a grid. This modular and flexible design can provide an inquiry-based learning experience both at undergraduate and high school level.


Introduction
Quantum physics will play a key role in future technology developments. Especially the socalled second quantum revolution is expected to transform various industrial sectors [1,2]. Hence, there is a strong need to teach this topic not only at undergraduate level, but also at high school [3]. Nitrogen-vacancy (NV) centers in diamonds are a unique quantum system for this purpose [4]. The NV centers are optically stable and well shielded within the crystal lattice to allow for manipulation of the quantum states using a simple green laser and microwaves at room temperature. Their wide popularity in science [5] and industry regarding their important role for qubits [6] and quantum sensing [7] makes them a relevant and useful topic for different levels of expertise -from education to research.
First teaching experiments at graduate level [4] have been put forward to reduce the complexity and costs to meet the average research lab requirements, as commercially available experimental kits are beyond the scope of undergraduate labs budgets. However, to reach high school level, even more efforts to reduce costs and at the same time increase the flexibility of the setup are in need. In this paper, such a setup for experiments with NV centers in microdiamonds is presented: All mechanical, optical and electronic components can easily be sourced, e.g. from hardware stores (see table A1). For the optical setup, the existing open source modular platform UC2 [8] is used and adapted to demonstrate quantum sensing. The individual components are placed within 3D-printed cubes, that can be freely arranged on a grid. All necessary information and component lists are published open source and welcome discussion and improvements. 4 Such a modular setup is well suited for an educational setting, as students can implement different experiments by choosing and rearranging the cubes in a flexible manner. In particular, as all components are placed inside 3D-printed open framed cubes, pupils can touch the cubes without the danger to demolish sensible optical components (see figure 3). Flexibility and robustness of the experimental setup are important prerequisites for such an inquiry-based learning environment. Students get a sketch of the optical setup and a script with the physical background. Based on these instructions, they need to select and arrange the cubes in the correct configuration by themselves. In case they need assistance, the students are free to ask the supervisor or the teacher. When students are supported adequately during their activities, learning can be highly effective using this approach [9].
A Michelson and Mach-Zehnder interferometer, as well as a quantum eraser based on the same cube platform have already been implemented in a similar manner. Further insights in the design process of the cubes and the provided teaching material can be found in [10].

Theory
The NV center in diamond consists of a vacancy combined with a neighboring substitutional nitrogen atom. In figure 1(a) the NV center inside the diamond crystal lattice is depicted. As a result of the vacancy and substituted nitrogen, there are five unpaired electrons in the NV center, that can be easily excited. This NV center is referred to as NV 0 center. For quantum sensing application a NV center with an additional free electron, which creates a negatively charged NV − center, is more relevant. In the following, the term NV center is always referred to this negatively charged NV − center.
The energy levels scheme of the NV center is depicted in figure 1(b). The ground ( 3 A) and excited state ( 3 E) are split into a triplet state with spin quantum numbers m s = 0, ± 1. Without an external magnetic field the m s = −1 and m s = +1 states are degenerate. In addition to the ground ( 3 A) and excited states ( 3 E), there is a metastable singlet state ( 1 A) with a higher lifetime of about 200 ns at room temperature [11] compared to the 10 ns [12] of the triplet state. The probability of decay via the intermediate state is strongly dependent on the electron spin state.
A green laser, with a typical wavelength of 532 nm, can excite the electrons from the ( 3 A) state into the ( 3 E) state. After a loss of energy due to vibrations in the continuous vibronic side bands, the electrons decay to the ground state. The energy is released as photons in a wavelength range of 650-750 nm. Both excitation by laser and emission of fluorescence tend to preserve the value of the spin quantum number m s .
The key feature of a NV center is the dependence of the fluorescence intensity on the spin state. Microwave excitation with a frequency of 2.87 GHz causes a spin transition from the m s = 0 to the m s = ±1 ground state ( 3 A). This in turn results in a spin-maintaining excitation into the m s = ±1 ( 3 E) state. From this spot, a possible transition to the singlet state ( 1 A) gains decisive importance. Instead of contributing to the emission process, the electrons decay with ). An arbitrary magnetic field in each NV center illustrates the orientation with respect to the NV-axis by the angle α. (b) A transition from the triplet ground state ( 3 A) to vibronic sublevels (gray) in the triple exited state ( 3 E) is induced by a green laser (typical 532 nm, green arrows). The red fluorescence, emitted from the excited to the ground state, here zero-phonon-line at 637 nm, is indicated by the red arrow. A transition from ( 3 E) m s = ±1 to singlet ( 1 A) state is more probable (strong) than the transition from ( 3 E) m s = 0 to ( 1 A) (weak). This results in a change in fluorescence intensity depending on the spin state, since the transition via the singlet state (dark state) is nonradiative (dark). The splitting of the m s = ±1 ground state (bottom right) due to an external magnetic field B is proportional to 2γB || , where B || is the projection of the magnetic field along the NV center orientation.
increased probability over the nonradiative intermediate state ( 1 A) to the ground state ( 3 A). For this reason, the singlet state ( 1 A) is also called dark state. Due to the higher lifetime in this state, the electrons cannot be excited again immediately. Thus, excitation by microwaves of the appropriate frequency leads to a reduction in fluorescence relative to a NV center in the m s = 0 state. In conclusion, the magnetic spin resonance can be optically detected by a change in the fluorescence intensity. This, consequently, is called optically detectable magnetic resonance (ODMR).
The ground state spin Hamiltonian, neglecting all hyperfine interaction, is given by [12,13] hDS hE S S g B S, 1 where z is parallel to the NV center axis, D and E are the zero-field splitting (ZFS) parameters, S 2 x , S 2 y and S 2 z represent the spin operators, g the Landé g-factor and μ R the Bohr magneton. D ≈ 2.87 GHz is due to spin-spin interaction of the unpaired electrons, and E depends on the strain inside the crystal [13]. For microcrystals a splitting of a few MHz can be expected. For the triplet state with S = 1, the corresponding 3 × 3 matrix representation of the Hamiltonian (1) has three eigenvalues, corresponding to m s = {−1, 0, +1} [14].
Similar to the Zeeman effect, the spin states with m s ≠ 0 are sensitive to external magnetic fields resulting in a split of the energy levels for an increasing magnetic field (see figure 1(b)). The resonant frequency ν for m s = +1 or m s = −1 is given by where γ = gμ B /h ≈ 28 GHz T −1 denotes the linear change in the splitting due to the magnetic field for E = γB || . In this simplified linear model for small magnetic fields, only the magnetic field component B || along the orientation of the NV center axis affects the splitting. Due to the structure of diamond lattice there are, in principle, four different orientations of the NV-axis possible, as shown in figure 1(a). For a diamond sample with more than one NV center, the occurrence of the four directions is randomly distributed. For such an ensemble a maximum of eight resonances can be observed.

Implementation
As a platform for our experiments, we chose the open source project UC2 [8]. It is a 3Dprinted experimental toolkit for optic experiments with a focus on different microscopy techniques. The setups are designed as several 3D-printed cubes with different insets, like lenses or mirrors. One of the major advantages of this approach is the adaptability of the insets. For our purpose, we adapted the cube idea and customized the insets.
As the initial setup is based on a basic fluorescence microscope, it consists of six cubes containing different optics and mechanics. To achieve the spin manipulation, an additional microwave source is needed. Magnetic sensing experiments are further realized by adding a cube that creates an external magnetic field and one that captures the ODMR signal on an oscilloscope.

Cubes and optics
In the schematic drawing in figure 2 the proper arrangement of the cubes is depicted. A cube is held in place on a 6 × 4 base plate by four sphere magnets attached to screws on the bottom of the cube ( figure 3(a)). This simple design offers sufficient positional accuracy [10] while being easily assembled and disassembled. A color scheme for the cube components has been devised [10] to guide the experimenter. For instance, all parts to be adjusted by the students are printed in red.
A diode pumped solid state laser module at a wavelength of 532 nm is used for excitation. Since the aim is to work in an undergraduate lab (and in schools), a class 2 laser with an output power smaller than 1 mW is chosen for safety reasons. The laser mount consists of a 3D-printed kinematic mount. Since the plate holding the laser is connected to the two adjusting screws by spherical magnets no additional springs are needed.
The laser beam is reflected by a 45°-fixed dichroic mirror in the adjacent cube with a cuton wavelength of 600 nm. A basic microscopy objective (4x, NA 0.1) focuses the laser onto the microdiamond sample. By moving a lever connected to the objective the focus plane can be easily adjusted. No high precision is needed here, since the depth of focus is large, due to the low magnification.
A selection of three microdiamonds are glued directly onto a microstrip line (figure 3(f)). On one side, it is terminated by a 50 Ω resistor, and on the other, a coaxial cable is soldered directly onto the micro stripline connecting the microwave source.
The micro stripline is fixed to a 3D-printed xy-translation stage (figures 3(d) and (e)), that is used to move the diamonds into the laser focus. By a set of non-ferromagnetic screws, the central part of the stage, which is held by small rubber bands, can be adjusted. This choice of materials reduces the effects of stray magnetic fields in the vicinity of the microdiamonds.
After bringing a diamond in focus, the fluorescence of the NV centers is collected by the microscope objective, transmitted through the dichroic mirror and detected on a photodiode.

Photodetector
The photodetector design uses readily available and low-cost through-hole components to increase the accessibility of the entire project. The design goal from an educational perspective is to be able to observe the reduction in fluorescence intensity directly, i.e. a dip of a few percent in a DC signal at a sweep rate of ≈10 Hz (see section 3.3), while avoiding any complex detection schemes, like balanced detection or lock-in amplifiers.
The fluorescence is focused by a simple acrylic lens with a focal length of 30 mm onto a photodiode (BPW34). To reduce stray light incidents on the photodiode, the lens itself is placed within a 3D-printed tube assembly (see figure 3(a)). The generated photocurrent is converted by a transimpedance amplifier and an additional line-driving amplifier (both based on a TL082, see schematic in figure B1) into a usable voltage, that can be displayed on an oscilloscope.
The fluorescence intensity incident on the photodiode itself is limited by design choices necessary for the intended application, like low-cost optics, low-NA microscope objective and limited laser power (<1 mW). A photocurrent of ≈40 nA can be expected on an optimally aligned setup. So a high amplification is required. Due to the high impedance JFET input and thereby low input noise current density of a TL082, it is a good option in this low light situation. Since it is not rail-to-rail compatible, two 23 A batteries with 12 V are used to provide the symmetric voltage within the small aluminium enclosure.
Due to the high amplification, the frequency response of the photodetector is limited. A circuit simulation suggests a delay of 300 μs between dips in light intensity and output voltage at the scan rate of 11.3 Hz. This corresponds to a shift in frequency of the ODMR of 1.36 MHz. This shift can be neglected for the intended application.
Furthermore, a special precaution is needed to reduce unwanted interference in order to detect the dip of only a few percent in the fluorescence intensity. To suppress electromagnetic interference by the 50 Hz mains frequency, shielding is necessary. For this purpose an aluminium housing, which encloses the circuit board and batteries as well as leaving an opening for the photodiode, is used effectively. An additional source for interference (≈14 kHz) is the switching power supply of the laser module (Roithner Laser, CW532-001F). Therefore, the laser is powered directly by two AA batteries. To reduce the noise level even further, the sampled signal is averaged by the oscilloscope over typically four acquisitions.

Microwave source
An off the shelf RF evaluation board based on the Analog Devices ADF4351 Wideband Synthesizer with integrated VCO is employed as the microwave source. It is connected via the Serial Peripheral Interface (SPI) to a STM32F446RE microcontroller unit on a Nucleo-64 development board. Power to both boards can be supplied by any universal serial bus (USB) port. A range of 2.87 GHz ± 200 MHz is swept in ascending frequencies and discrete steps at a repetition rate of 11.3 Hz, as depicted in figure 4. During each step the output is on for a time t a at a frequency f n after which a reconfiguration of the synthesizer leads to a constant off time of t b − t a = 92 μs. The cycle time is chosen as t b = 440 μs resulting in a duty cycle of t a /t b = 79%. At each step the frequency increases by 2 MHz until it reaches the last frequency step of 3.07 GHz and wraps around to 2.67 GHz.
The synthesizer is set to its minimum output power and only one connection of the differential output is used which results in an output power of −7 dBm. It is passed via an optional 2 dB attenuator to a broadband amplifier module, delivering 20 dBm up to 3.2 GHz through a coaxial cable to a microstrip line.

Diamond microcrystals
As diamond samples we chose microcrystals by Adámas Nanotechnologies with a diameter in the range of 150 μm. The crystals are produced by the high-temperature high-pressure method and contain a high concentration of NV − centers in the order of 2-3 ppm. The high NV concentration and size result in a strong fluorescence, reducing the requirements on optics and detection and, furthermore, allowing an easy alignment, since the crystal and fluorescence can be seen with the naked eye (see figures 3(c) and (e)).
The microdiamonds are directly glued onto the copper microstrip line (see figure 3(f)) using commercial cyanoacrylate adhesive. To avoid additional fluorescence no solder mask is used on top of the microstrip line. Due to the relatively large size of the microcrystals it is possible to manipulate the crystals by hand using a tooth pick and without the need for a microscope. For best results of the ODMR signal the microdiamonds should not be covered by cyanacrylate.

External magnetic field
To further reduce the complexity of the entire setup, a permanent magnet (NdFeB, N45) of cylindrical shape (d = 10 mm, h = 8 mm for ODMR and h = 10 mm for the all-optical magnetic field sensor experiments) is used as a source for the external magnetic field. A cube with an inset for a centered nut holds a threaded rod with a magnet at its end, as shown in figure 3(b). By turning the rod by hand, the distance between the magnet and the diamond can be varied. Since the rod has a regular M6-threading, which has a pitch of 1.0 mm, it is convenient to read the distance in mm-steps.
For calibration of the external magnetic field strength at the microdiamond, an integrated linear Hall sensor (A1302, Allegro Microsystems) is used. During experiments, the magnetic field strength is measured as a function of the distance between the magnet and the diamond. For this purpose, the Hall sensor is placed in a pocket provided underneath the microstrip line ( figure 3(d)). It has a distance of 2 mm to the diamonds, so the field can be extrapolated. The magnetic field can be varied up to 180 mT at the diamonds. A cylindrical permanent magnet exhibits no homogeneous magnetic field but is axially symmetric. Since the rotation of the magnet is centered along the diamonds, the magnetic field should be axial orientated and radial components can, in principle, be neglected. This assumption should hold in particular for the stronger field. In case of weak fields approaching 0 mT spurious fields may dominate.

Affordable, flexible and robust: experiencing the physics of NV centers in class
While the mathematical theory of NV center physics is beyond the reach of high school, and non-trivial at an undergraduate level, experiments open the way to a phenomenological understanding of four important aspects: (1) The fluorescence signal, (2) Fluorescence signal within a microwave field, (3) Influence of an external magnetic field to the fluorescence signal, and (4) a simple magnetic field sensor. In such a way, simply on a phenomenological level, it becomes clear how the fluorescence signal of the NV center can be used to realize a magnetic field sensor. After this experience, the technical term 'Optically detected magnetic resonance (ODMR)' might be introduced to link to a more theoretical framing of the experiment.

The fluorescence signal
In the first step, one of the diamonds has to be moved into the focus of the laser spot. To avoid direct exposure to the eye, this procedure can be imaged using a smartphone camera, as shown in figure 5. An individual diamond can be identified in the images on the microstrip line. A red filter film glued into the optic cube is used to block out the green laser and to observe the bright red fluorescence live on the smartphone once the laser hits the microdiamond. By replacing the smartphone cube with a 45°-mirror cube the fluorescence can now be directed towards the photodiode (see figures 2 and 3(a)). During alignment, the voltage of the photodiode is inspected on the oscilloscope in DC mode. The photodetector should be kept just below saturation to achieve the best possible contrast in the OMDR signal. Since the fluorescence intensity depends strongly on each individual microdiamond, some tend to saturate the detector. By slightly misaligning the mirror, the signal can be reduced to a reliable value.
The fluorescence from the microdiamond is bright enough to be seen at ambient light condition through a red filter film, as shown in figure 3(c). This feature makes the quantum sensor setup highly suitable for educational settings, like classrooms. It also allows optionally for fine adjusting the fluorescence signal without the aid of the smartphone camera.

Fluorescence signal within a microwave field
For measuring an ODMR spectrum the photodiode voltage is recorded on the oscilloscope in AC mode by triggering the start signal provided by the microcontroller marking the start of the microwave tuning sequence. Furthermore, the trigger pulses can be used to convert the timescale to the frequency range. In figure 6 a typical oscilloscope measurement of the ODMR signal is depicted. To suppress high-frequency noise we used averaging acquisition over four intervals. Two dips in the fluorescence signal at around 60 ms are clearly visible, indicating the magnetic resonance. After converting the time axis into frequency values, the resonances appear at 2.87 and 2.88 GHz. The depth of the signal is 270 mV, which corresponds to a relative dip around 3% of the total signal.
For the measurement shown in figure 6, the magnetic cube was removed from the setup. So, no additional magnetic field is applied, however, the energy levels of the m s = +1 and m s = −1 are already split. This can be explained by ZFS and residual magnetic fields. Due to the magnets in the base plate and metallic screws in the vicinity of the diamonds a minor residual magnetic field is to be expected. However, the ZFS has a significantly larger effect. In our case, we measured a splitting in the range of 20 MHz between the two dips. For further experiments, a ZFS of E ≈ 10 MHz for the spin states m s = +1 and m s = −1 is estimated.

Influence of an external magnetic field to the fluorescence signal
An even stronger splitting of the ODMR resonances, like the classical Zeeman effect, is possible by introducing an external magnetic field. Therefore the magnetic cube is added to the setup, as seen in figure 3(b). A cylindrical magnet placed at the end of a M6-threaded rod is moved towards the sample in 1 mm-steps. The 1 mm-step is convenient, since this matches one full lateral rotation of the magnet and thus the lateral part of the magnetic field vector is unchanged. At each position, the photodiode voltages and trigger signals, similar to figure 6, are recorded. Simultaneously, the voltage at the Hall sensor was measured. In 90 steps the magnetic field was thereby varied from 0.1 to 5.9 mT. The microwave frequency was tuned from 2.67 to 3.07 GHz to cover the whole splitting process. By stacking the normalized colorcoded signal strength of the individual ODMR spectra against the corresponding magnetic field, as shown in figure 7, the results are best visualised. It is easy to identify the position of The eight resonances can be attributed to the four different orientations of the NV center in the diamond crystal. For weak magnetic fields only the parallel part of the magnetic field vector with respect to the NV center has an impact on the frequency shift. Since a microdiamond is randomly placed on the microstrip line, all orientations cover a different angle with the magnetic field vector. Every orientation creates respectively a peak for the m s = +1 and m s = −1 transition, resulting in overall eight distinguishable dips.
As the magnetic field tends to zero the convergence of ZFS is shown clearly. The microdiamond at hand showed a ZFS of E ≈ 10 MHz. For an increasing magnetic field, where E = γB, the equation (2) tends to be a linear function. The fitted values for D and γ fit are depicted in table 1.   For NV center 1 the maximum shifting can be seen, at which a slope of γ fit = 23.4 GHz T −1 for m s = +1 and γ fit = −22.6 GHz T −1 for m s = −1 was calculated. Compared to the theory parameter of γ = ± 28 GHz T −1 for a parallel magnetic field vector, the values are slightly below that. This implies the smallest angle between the NV center axis and the magnetic field vector. In contrast NV center 4 is orientated almost orthogonal towards the magnetic field, since the slope is around zero and no notable shifting can be seen. Based on cos fit a g g = ( ) the orientation of the NV centers with respect to the magnetic field vector can be calculated, as listed in table 1. Due to the high degree of crystal symmetry the orientation of the magnetic field with respect to the randomly orientated microdiamond based on the measured angles is ambiguous. However, the angles given in table 1 agree with the tetrahedral structure within the limits of the fit.
The B || component for the NV2, NV3 and NV4 is increasingly smaller and results in a smaller frequency shift. Furthermore, NV2, NV3, NV4 have different absolute slope values for the m s = +1 and m s = −1, since the linear approximation is only valid for the weak magnetic field regime, i.e.| |    . However, consequently increases for NV2, NV3 and NV4, resulting in the shift not to be linear anymore. This can be seen in the decreasing R 2 values for the fits indicating a less optimal linear fit.
To further reduce the costs of the setup, a simple beam splitter can be used instead of the comparatively expensive dichroic mirror, if a colour filter is placed in front of the photodiode to filter out the reflected green laser light. Figure 8 shows a comparison between these two options. Both with and without the applied magnetic field, the low-budget option still yields an acceptable result. The decrease in contrast is caused by additional incident laser light on the photodiode due to a less effective filtering of the colour filter film.

A simple magnetic field sensor
Another interesting magnetic sensor application of the NV center can be demonstrated by measuring the absolute fluorescence intensity as a function of the magnetic field in the absence of a microwave field. Due to the spin-mixing effect [12,15] the fluorescence intensity reduces with an increasing magnetic field.
For this purpose, the photodiode voltage is monitored with a voltmeter only, while the permanent magnet was moved in mm-steps away from the diamond sample. The resulting measurement is depicted in figure 9. To achieve the maximal magnetic field, the magnet was placed as close as possible to the sample. In this configuration, a magnetic field in the range of 180 mT in the sample plane was achieved. An intensity decrease of approximately 10% for a rising magnetic field until about 60 mT can be observed. For a higher magnetic field the intensity stabilizes and shows no significant change up to 182 mT. The dip for small magnetic field is assumed to relate to residual magnetic fields in the setup and additional spin interactions [16].
The ground and excited state level-anticrossing (GSLAC and ESLAC) [17] at 102.4 mT and 52 mT, respectively, cannot be observed due to the random orientation of the microdiamond that results in a non-negligible orthogonal magnetic field components with respect to the NV center axes.
This experiment is in particular suited for an instructional purpose of a magnetic field sensor, due to its simplistic completely battery-powered setup without the need of a microwave source and an oscilloscope.

Conclusion and outlook
In this contribution, an affordable, flexible and robust experimental toolkit for magnetic quantum sensing experiments based on NV centers in diamonds is presented. A focus lies on accessibility and flexibility of the individual parts of the setup, and on a low-cost approach (below €250). All necessary optical parts are carefully price-optimized and have been placed in seven 3D-printed freely placeable cubes. Due to this open design, the cubes provide an explorative and robust learning environment. In simple experiments, it is possible to detect ODMR signals and deduce from an energy level splitting the external magnetic field strength due to the Zeemann effect. In such a way, for the first time, quantum sensor experiments become accessible even at the high school level.
As an open source, open hardware and open educational resource, this project welcomes collaboration and looks forward to further development.

Acknowledgments
This work is funded as part of the BMBF project O3Q (FKZ 13NI5388) and we wish to acknowledge cooperation with Rüdiger Scholz, Kim-Alessandro Weber, Lara Lindloge, Jonas Homrighausen, Umutcan Bektas, Simon Klug, Nils Haverkamp and Alexander Pusch.

Data availability statement
The data cannot be made publicly available upon publication because the cost of preparing, depositing and hosting the data would be prohibitive within the terms of this research project. The data that support the findings of this study are available upon reasonable request from the authors.
Appendix A. List of parts Table A1. List of parts used for experimental setup shown in figure 2. The CAD-files for 3D printing and additional details can be found on the project's website (See footnote 4).

Part
Supplier and part number Price