ENDOR implementation using STM32 microcontroller

The development of a simple device for the generation and control of radio frequency pulses, intended for experiments on pulsed electron nuclear double resonance (ENDOR), is presented. The device is implemented on a 32-bit microcontroller based on the Arm Cortex-M processor (STM32 family). The functionality of the device has been tested on an Elexsys E580 FT EPR spectrometer (Bruker, Germany) operating in the X and Q frequency bands. Within the limits of the developed device functionality it appeared to be compact and inexpensive, and comparable in performance to commercial devices.


Introduction
Electron-nuclear double resonance spectroscopy (ENDOR) is a technique for manipulating nucleus magnetic moments by electron paramagnetic resonance (EPR) sensitivity.ENDOR was originally developed to study weak hyperfine interactions between electrons and nuclei [1,2].As the technology has improved, pulsed ENDOR protocols have been increasingly used, broadening the range of applications.For example, quantum memory protocols are currently being developed and quantum logic operations are being performed on the electronic nuclear subsystem [3,4].The basic concept of ENDOR is to use radiofrequency (RF) pulses in addition to microwave (MW) pulses to manipulate the nuclear spins.In general, ENDOR combines the EPR and nuclear magnetic resonance (NMR) techniques, using the electron spins for detection.Typical protocols used in ENDOR experiments are Davies and Mims sequences, as well as ELDOR-detected NMR and ESEEM (electron spin echo envelope modulation) spectroscopy [5][6][7][8].Generally, ENDOR measurements are realized in advanced EPR spectrometers [9,10] equipped with additional devices that are complex and expensive.In particular, commercial Fourier Transform (FT) EPR machines of the Elexsys series (Bruker, Germany) have been widely used.These spectrometers require the following equipment, including an RF generator (typical range 1-200 MHz), an RF amplifier (100 W and higher), a MW resonator with an ENDOR coil, a switch for receiving RF pulses, and a controller.Bruker uses a DICE unit in their systems, which combines a controller and a frequency synthesizer.But this is a very expensive part of the ENDOR system (including additional blocks such as powerful amplifiers, RF synthesizers, etc.).Therefore, many researchers develop home-made spectrometers or their accessories with the ability to generate RF pulses [11,12].
Our laboratory has an Elexsys E580 EPR spectrometer operating in the X and Q frequency bands, but lacks the capability to perform ENDOR experiments.In order to perform ENDOR experiments, we design a module that allows the generation and control of RF pulses synchronized with MW ones.These features are implemented on the STM32 series microcontroller.an RF amplifier and a PTS 160 synthesizer used as an RF signal source.Note that the PTS 160 has been widely used in home-built EPR spectrometers previously [13].Moreover, despite the outdated circuitry of the PTS synthesizer, it has sufficiently good parameters for the implementation of ENDOR and has proven to be a good source of a harmonic signal.In addition, ENDOR measurements require a special resonator with wound RF coils.For this purpose, we used the commercial Bruker's resonators designed for X and Q frequency bands.
The independent measurements on the Elexsys E680 (X, W) spectrometer were used as reference data.The spectrometer is equipped with a commercial DICE I unit and allows to perform pulse ENDOR.The ENDOR data obtained both using the commercial DICE unit and the home-made RF control module show a comparable quality.These experiments show that the developed device is well suited for the tasks set and can be used for the ENDOR experiments in absence of a DICE unit.One of the advantages of the applied approach is a very low interference with the operation of the spectrometer due to the use of the signal from the PatternJet for synchronization and due to the direct feeding of the resulting RF pulse to the wound inductors in the cavity.
In this work, we present the details of the implementation of a device capable of generating and controlling the RF pulses, which is also simple enough to be repeated.

Design of the control module
The implementation of ENDOR involves the formation of an RF pulse at a given time.The RF pulse is formed by modulating a harmonic signal generated by a frequency synthesizer.This pulse is applied to the Helmholtz coils wound in EN4118MD4 (X-band) or EN5107D2 (Q-band) cavities.The generated B 2 field is perpendicular to the external magnetic field B 0 and the MW field B 1 [14].The RF and MW channels are synchronized, and the MW field is turned off at the moment the RF field is applied.The RF pulse affects the nuclear spins.Following the evolution of the spin system, the change in the nuclear subsystem is transferred to the electron spins, which is then detected.A PTS 160 synthesizer is used as the source of the RF signal in this work.It generates a harmonic signal of a given frequency.In ENDOR spectroscopy, the RF pulses are used in combination with MW pulses.Therefore, the main challenge is to generate and to control the RF pulses.Note that the frequency of the signal generated by the PTS is determined by the digital code on the 50-pin Amphenol connector www.programmedtest.com/index.html, which can be set by a microcontroller.In our case, we used the STM32F103CBT6.The advantages of this microchip are sufficient speed (72 MHz), the large number of outputs (37) to control the PTS synthesizer, and an affordable price.More information can be found on the manufacturer's website www.st.com/en/microcontrollers-microprocessors/stm32f103. Figure 1 shows a block diagram of the RF pulse control implementation.
The operation procedure is quite simple.First, the PatternJet II of the Elexsys E580 (the standard pulse shaper in the Elexsys spectrometer) generates rectangular modulation pulses, which are the basis for the generation of MW pulses.In the interval between the MW pulses (depending on the type of ENDOR, either Mims or Davies), a pulse is generated that we call the SYNC pulse.This SYNC pulse is sent to the STM32 which is listening for this pulse.When the pulse is received, a pre-recorded subroutine of the microcontroller is initiated.The microcontroller then generates a TTL register for the PTS 160.According to this register, a signal of the corresponding frequency is generated, which is fed to the switch located on the control module board.The role of the switch here is to generate a certain analog of a rectangular pulse, which modulates a harmonic signal and forms an RF pulse.The generated RF pulse is fed through the amplifier and noise suppressor to the coil in the cavity.The output of the coil is loaded with 50 Ohms.Note that changing the generator frequency takes some time.According to the specification for the PTS 160, the switching time is 5-20 µs.For a reliable frequency change, the SYNC pulse can be generated either in advance (before the MW pulses are formed) or after the entire pulse sequence (since the shot repetition time is rarely less than 1 ms).Since ENDOR spectra are usually recorded with a large number of accumulations, it has been found that the moment of application of the SYNC pulse (before the MW pulse sequence begins or between the pulses) does not affect the result obtained.
Microcontroller subroutines are written in the Keil environment, which is free for small codes www.keil.com.The number of subroutines is determined by the user's needs.Currently we use two routines: 1. Nutation.This subroutine is needed to find the optimal duration of the RF pulse before performing ENDOR.It involves recording the electron spin echo signal as a function of the RF pulse duration at a given frequency (the nuclear resonance frequency).The pulse duration sweep is in the range of 0.5-100 µs.A subroutine of the microcontroller allows signal accumulation.Since the sensitivity of NMR on certain nuclei is often quite low, it is necessary to accumulate the echo signal at a given frequency.This is achieved by keeping the synthesizer frequency fixed during the accumulation cycle.When the number of cycles exceeds the specified accumulation limit, a new command for the next frequency is applied to the synthesizer input.This is how the accumulation process works.The accumulation limit and a number of other parameters can be set in the XEPR environment (the main program for controlling Elexsys machines).Figure 2 shows the schematics of the main components of the control module.module U1 (see Fig. 3).The frequency and amplitude are controlled by the generated register (a set of TTL states at the outputs of connector X1 at a given time) (Fig. 2a).The board is powered by 5 V, which can be supplied either by the ST-Link programmer or by the PTS 160 synthesizer itself.To convert the voltage from +5 V to +3.3 V, a TPS76333DBVR converter with a rather high efficiency (90%) was used.The ST-Link programmer has a USB connector for connecting to a PC.
The oscillations generated by the PTS 160 synthesizer are fed to the control board U1 via the SMA connector X2, the modulated signal is taken from the BNC connector X3 (Fig. 2b).The RF switch DA5 is used as a modulator, the capacitors C5. ..C8 in combination with DA5 are DC filters.The switch DA5 based on the HMC544AETR was chosen for its excellent bandwidth (0-4 GHz), response time (30 ns) and internal matching of 50 Ohms.The STM32F103CBT6 microcontroller (DD4) is a register driver that responds to input control pulses coming from the X4 input SMA connector (see Fig. 2c).
Figure 3 shows an image of the U1 control board.LED1 indicates that the microcontroller is powered (+3.3 V), LED2 indicates that the PTS 160 is connected to the network and that the synthesizer is working.Inverters 74HC04D (T2-T4) are used to invert the low-voltage states of the register and bring them to the TTL level, as well as for the correct operation of the DA5 switch (see Fig. 2).

Testing of the developed control module
The following presents the experimental results obtained with the developed system.All measurements were performed on a test coal sample.It should be noted that this device has been developed for a spectrometer that is not equipped to carry out ENDOR.Therefore, in order to show the performance of the device in the X band, the Elexsys E680 spectrometer (X, W band) was used as a reference.The latter has Bruker's commercial ENDOR implementation system (based on DICE I).For the Q-band ENDOR, the Elexsys E580 was used, which is not equipped with a commercial DICE unit.
Figure 4 shows the results obtained using the developed control module and DICE.That is, instead of the DICE unit of a commercial spectrometer, the developed control module U1 was used, while all other blocks were kept the same.For the Q-band there was nothing to compare with due to the unavailability of a reference machine.Therefore, we provide a comparison with the ENDOR spectrum taken from the Bruker user's manual [20] (see Fig.   Figure 4a shows the time dependence of the stimulated echo signal (Mims protocol) on the duration of the RF pulse at a frequency of 14.6 MHz.This is the so-called nutation experiment to determine the optimal duration of the RF pulse.In this protocol, three MW pulses form an stimulated echo signal.Between the 2nd and 3rd MW pulses, the RF pulse is applied at the resonant frequency of protons (14.6 MHz in a magnetic field of 342.4 mT).The echo signal is recorded as a function of the RF pulse duration.The initial RF pulse duration was 1 µs.The duration of the RF pulse was increased in steps of approximately 150 ns.This figure also includes a comparison with a nutation experiment performed with the commercial DICE ENDOR unit (black line).It can be seen that the developed module allows to determine the optimal pulse duration with high accuracy.The optimal RF pulse duration for the inversion of the proton magnetic moment is about 7 µs.
Figure 4b shows a comparison of the X-band ENDOR spectra.It can be seen that in both cases a signal is observed at 14.6 MHz corresponding to weakly coupled protons near the electron spin in a magnetic field of 342.4 mT.Periodic modulation of the main signal at 14.6 MHz is due to artifacts of the Mims ENDOR.The period of these oscillations depends on the delay between the first and second MW pulses [5].The signals obtained with the developed module and DICE unit are in good agreement.
Figure 5 shows the Q-band Mims-ENDOR spectra.In this experiment, a signal is observed at a frequency of 50.9 MHz, which corresponds to the Larmor frequency of the precession of proton nuclei in a magnetic field of 1195.36 mT. Figure 5 shows that there is a good repeatability of the result using the developed device.

Conclusions
In this work, a relatively simple device for the generation and control of RF pulses has been developed.The main element of this device is the STM32 microcontroller, and the operability of the module has been tested using Bruker Elexsys E580 (in X and Q bands) and Elexsys E680 (in X band, equipped with DICE ENDOR unit) spectrometers.The data obtained with the developed module and the commercial DICE unit are in good agreement.This proves that this module can be actively used in ENDOR experiments.In fact, the device does not depend on the type of spectrometer and can be synchronized with any pulsed EPR instrument.
It should be noted that the device has some drawbacks.The disadvantages are: the lack of TRIPLE and STOHASTIC modes.Unlike the traditional ENDOR, the TRIPLE ENDOR implies the use of two RF channels.One channel is used as a traditional ENDOR with pulse frequency sweep, and the second channel uses RF pulse(s) at a specific resonant frequency of the nuclear spins whose contribution is to be suppressed.The TRIPLE mode can be easily realized with a second PTS synthesizer or with modern multichannel frequency synthesizers.The STOHASTIC mode is currently more difficult to implement because it requires a frequency meter with a synchronization function to the software package.Therefore, these problems can be solved in principle and don't affect the main result of this work, namely the implementation of the ENDOR setup on almost any EPR spectrometer at minimal cost.

Figure 1 .
Figure 1.Implementation scheme for RF control.

2 .
ENDOR.This is the main program.It records the echo signal as a function of the frequency of the RF pulse.The frequency sweep is in the range 0.1-159 MHz for PTS 160 (determined by the type of synthesizer used).
The control circuit of the PTS 160 synthesizer is implemented on the board of the control Magnetic Resonance in Solids.Electronic Journal.2023, Vol. 25, No 1, 23101 (8 pp.)

Figure 2 .
Figure 2. Electrical circuits of the control module.(a) TTL register diagram for the PTS input to generate harmonic signal with a specific frequency.(b) Scheme for creating RF pulse using a SPTD (Single Pole Double Throw) switch HMC544AETR (DA5).(c) Diagram of the STM32F103CBT6 pins involved.

Figure 3 .
Figure 3. Picture of designed control board U1 for RF pulses generation with highlighted the main parts.T2-T4 are TTL forming units.

Figure 4 .
Figure 4. Implementation of X-band Mims-ENDOR.The signals obtained with the developed module U1 are highlighted in red, the signals obtained with the commercial DICE ENDOR unit (Bruker, Germany) are highlighted in black.(a) Nutation experiment at RF of 14.6 MHz.(b) Dependence of the electron spin echo on the frequency of the RF pulse.
Figure4shows the results obtained using the developed control module and DICE.That is, instead of the DICE unit of a commercial spectrometer, the developed control module U1 was used, while all other blocks were kept the same.For the Q-band there was nothing to compare with due to the unavailability of a reference machine.Therefore, we provide a comparison with the ENDOR spectrum taken from the Bruker user's manual [20] (see Fig.4-5 on page 4-8).