A control unit for a pulsed NQR-FFT spectrometer

This paper describes the development of functional and algorithmic methods to automate pulsed NQR-FFT radiospectrometer. Module controlling this device is based on a programmable logic device (PLD). The objective of this work is to develop a control unit for operational control and setting all required parameters portable NQR radiospectrometer. Radiospectrometer control module is designed as a block structure, which includes the main board, LCD, controls and ports IO. The sample unit tested in complex with frequency synthesizer and NQR radiospectrometer pulse sequences shaper. The test results showed the device matching its functionality to all regulations that apply to this class of relaxation and pulsed resonance spectroscopy equipment.


Introduction
The development of a wide range of radio spectroscopic nuclear resonances research methods in semiconductors, defects and impurities in vertical multilayer semiconductor structures has caused the development of high-precision electron paramagnetic (EPR), nuclear magnetic (NMR) and quadrupole (NQR) resonances measurement equipment [4,7].
Possibility of observation and registration of very weak nuclei spin inducing signals, which in many cases lower noise show the uniqueness of such equipment. Despite the high sensitivity and multi functionality continuous wave (CW) NQR spectrometers characterized by a large weight, dimensions, high cost and require special training service [14]. Also, the long duration of the experimental time is their major drawback. A more promising modern devices which operate on the basis of pulse technique with Fast Fourier Transform (FFT) of the spin induction signal [6,7]. With a pulsed method of research on spectral characteristics of NQR, additional information follows from the measured values of spin-spin and spin-lattice relaxation times. In addition, pulsed NQR spectroscopy provides a reduction in the observation time in comparison with stationary methods. The large number of settings and controls in these devices to some extent complicates the work is not trained scientists and researchers. This paper shows the developed functional and algorithmic methods for automated pulsed NQR-FFT spectroscopy in a control unit for a radiopectrometer. Implementation of the proposed device by developing a universal NQR radiospectrometer control module based on programmable logic device (PLD).

Hardware implementation methods
The main objective of this work is to develop a portable NQR radiospectrometer control module, which enables the implementation of operational control and configure all required parameters [8].
Typically devices of this type are created on the basis of single-chip microcomputers (MCUs), such devices have definite advantages and disadvantages. In our case it is better to use the PLD, this will allow the implementation of parallel algorithms with operational and quick change system configuration settings at any time [1]. This allows to use our pulsed Fourier radiospectrometer control and automation module not only for NQR but for the EPR, NMR, the double resonances relaxation studies, etc. In order to develop the unit used Complex Programmable Logic Device (CPLD) MAX®II EPM1270 [9]. This integrated circuit (IC) based on the principle of LUT-based architecture and contains of 980 micro cell, which is equivalent to 1270 base logical elements. As signal delay time in IC chip is about 6.2 ns, the data of spectrometer settings are read and transmitted to the data bus interface in nearly real time. Functional block diagram and schematic diagram of the control unit for a pulsed NQR-FFT spectrometer are shown in Fig. 1 and Fig. 2. An integrated circuit U3 performs basic functions by software algorithms and it is the core of the proposed device. External USB JTAG programmer provides CPLD configuration. Operational information of radiospectrometer status and main system settings are displayed on the LCD character display HG1 (4×20 characters) based on the controller HD44780. Buzzer LS1 and bar graph HG2 are used for sound and light indications respectively. LED scale contains 24 placed normal to the menu navigation button SMD LEDs and shows the angle of the encoder RE1 rotation. The matrix keyboard S1-S16 (4×4) is used to input data of radiospectrometer parameters settings. Values of configuration data are stored in serial flash memory AT45DB321D U8. The device operation is controlled by instructions from the CPLD.

. Circuit diagram of the control unit for a pulsed NQR-FFT spectrometer
Digital temperature sensor U10 DS18B20 is connected to the CPLD on the 1-Wire interface and it controls the temperature of the radiospectrometer measuring cell. It has an operating temperature range of -55°C to +125°C and user-configurable resolution. The selected resolution of conversion temperature is 0,125°C [3]. To measure the frequency there are two channels frequency meter that have the option of adjusting the input sensitivity by changing the threshold comparator operation А1 (Fig. 1). The conversion periodic signals in pulses of rectangular shape and matching of signal voltage levels Schmitt trigger U1 provides. Real-time clock U2 based on chip DS1302 and CR2032 lithium battery BT1 implemented in the device also. Availability these units can quickly record not only the NQR resonance spectra, but time and temperature of the experiment, which is particularly important in the study sample with the temperature dependence of the parameters of the spectra also [11].
Transfer of commands for performing device provides 4-bit external interface bus (EIB) with a data transfer rate of 180 Kbps. This parallel bus provides to transmit code of parameters values to the system board spectrometer. Data is transmitted to a digital frequency synthesizer, pulse sequence programmer, RF power amplifier, receiver, digitally controlled filters and other functional hardware units of a pulsed NQR-FFT spectrometer.
Subsystem power supply for the CPLD and functional units of radiospectrometer consists of green mode electronic control circuit U4, main and standby (VSB) linear voltage regulators (U7 and U9) and electronic switch on P-channel MOSFET IRF9640 (Q5). The proposed solution allows realizing standby mode and compatibility of the developed device with an external ATX standard power supply. Manage external power supply is provided via the port «P_on». Optocouplers are used for isolation by direct current. As the selected IC contains an embedded core voltage regulator (1.8 V), the power supply system of spectrometer control unit forms the same voltages for the MAXII core -Vcore = 3,3 V and I/O banks -Vio = 3,3 V.
An external clock generator Y2 operated at a frequency of 50 MHz and provides formation clock and synchronous pulses for the digital part of the developed device.

Software implementation
The algorithm of NQR-FFT radiospectrometer control module software was designed by methods of simulation and development of very large-scale integrated circuits and systems on a chip Quartus II Web Edition by Altera Corporation [16]. It is shown in Fig. 3. The first stage of the algorithm is the initialization inputoutput devices, read data from the temperature sensor and RTC ICs. The next stage is reading data settings from the external Flash-memory and writes this data to the CPLD registers. In this case, the basic parameters of the device settings are displayed on the LCD and the data is transmitted to the external interface bus.
Created menu contains of four pages of settings that all blocks of a pulsed NQR-FFT spectrometer. Entering to main menu and changing it settings pages are provided by the encoder. The data is entered from the matrix keyboard. In general, the proposed algorithm provides the ability to configure DDS synthesizer, select the type of NQR excitation sequences, set parameters of high-frequency channel of the spectrometer and systems management. When data is entered and the "Menu" is pressed again is verified the condition of data storage. If condition is satisfied, the new data is written to flash memory and transmitted to interface bus. Then the display is shown the main screen.
Implementation of the algorithm is feasible method of graphically complex syntactic programming [5,12]. Some subprogrammes are developed using the hardware description language Verilog HDL [15]. This includes procedures for the LCD display, real time clock and pulse width modulation controller. Figure 4 shows the proposed finite-state machine (FSM) diagram for LCD initialization. As the data transfer controller is performed by means of the 8 bit data bus, the process of transfer the basic and service information bits is realized according to the following operations sequence [2]:  set the value of the RS,  send data byte value to the I/O bus [7..0],  set the value of the Е = 1,  set the value of the Е = 0,  set the data bus [7..0] in a high impedance.  Decoded signal is information about the direction and angle of rotation encoder axis. All communication with the DS18B20 begins with an initialization sequence that consists of a reset pulse from the master followed by a presence pulse from the DS18B20. During the initialization sequence the bus master transmits the reset pulse by pulling the 1-Wire bus low for a minimum of 480 μs. When the DS18B20 detects this rising edge, it waits 15 μs to 60 μs and then transmits a presence pulse by pulling the 1-Wire bus low for 60 μs to 240 μs [3].
Other procedures and functions are implemented by means Megafunction using Library of Parameterized Modules (LPM) [10]. Decoding of quadrature signals from the encoder output provides subprogramme for scanning encoder data (Fig. 5). Fig. 5. Encoder signal processing: aphase A, bphase B, cdata, d -

counter increment/decrement, ecounter value
Registers of the storage of spectrometer parameters data settings implemented on the basis of a LPM_DFF Megafunction (parallel register).
Uploading of data in registers is carried out according to the code on the address bus. So created memory array of 4-bit LPM_DFF modules allows you to store 108 bits following values configuration settings: DDS carrier frequency, duration pulse excitation and transition, the pause between pulses, type of excitation sequences, transmitter power, bandwidth and gain of the NQR spectrometer RF channel. Parameters of generated NQR radiospectrometer control code sequences transmitted to the interface bus are shown in Table 1.
Final stage of work included compilation (modeling, simulation) software and debug it in Quartus II Web Edition. Volume of used CPLD hardware resources was 1268 (99.84%) of 1270 possible.
To monitor emergency situations (transmitter output amplifier overload, overheating spectrometer units, deviation and unstable supply voltages, etc.) envisaged serial 1-Wire port that receives a signal error. If these parameters are deviated from normal, triggered light indication and on LCD display blinking symbol "E!", then protective system blocks the operation of the spectrometer. Two separate channel of frequency meter have the ability to individual settings threshold of sensitivity. The indicator bar graph scale is designed as an additional PCB (5) on which placed hardware decoders and LEDs drivers. External digital temperature sensor (10) is placed in the radiospectrometer measuring cell. The DS18B20 output temperature data is calibrated in degrees IAPGOŚ 4/2015 p-ISSN 2083-0157, e-ISSN 2391-6761 Celsius. The 1-Wire bus requires an external pullup resistor of approximately 5kΩ; thus, the idle state for the 1-Wire bus is high. For programming CPLD and debugging developed firmware using standard Altera USB-Blaster download cable. The cable sends configuration data from the PC to a typical 10-pin header (9) connected to the CPLD JTAG interface. The sample unit tested in complex with frequency synthesizer and NQR-FFT radiospectrometer pulse sequences shaper [13]. The main window of the LCD shows the operating mode of the spectrometer and the excitation pulse parameters. The right side of the LCD is shown an operating temperature of the testing sample and the time of experiment. To see more information about setting up and operation of the spectrometer must go to the main menu page.

Conclusions
The proposed a control unit for a pulsed NQR-FFT spectrometer. Main hardware and software implementation methods of device are based on the use of programmable logic device.
Algorithm of the proposed software for CPLD is designed using syntax modeling of logical structures dynamic modes tools. This software implements operational control and configure all required parameters of radiospectrometer.
The test results showed the a spectrometer control unit matching its functionality to all regulations that apply to this class of relaxation and pulsed resonance spectroscopy equipment.