Quartz crystal unit (XTAL), also known as crystal oscillator, is a passive electronic component that uses the piezoelectric effect of quartz crystal to generate high-precision oscillation frequency. It is widely used in today's electronic products. However, in the actual production process of crystal oscillators, after the large piece of quartz crystal ground to the designed thickness is cut into small pieces, the size of each piece of quartz crystal is slightly different, resulting in differences in the resonant frequency between different crystal oscillator pieces. After cutting, the actual resonant frequency of the crystal oscillator must be measured and sorted for subsequent processing. Productivity and cost have put forward high requirements on measurement accuracy and sorting speed. Modern dedicated measurement-sorting equipment requires that the grasping, measurement and classification of the wafers be completed within 1 s. Among them, the mechanical movement of the robot arm such as grasping and placing takes up most of the time, so the time left for the crystal oscillator parameter measurement is much less than the mechanical movement time, that is, within 100 ms.
The earliest use of network analyzers at home and abroad to measure the electrical parameters of crystal oscillators is to sort the wafers. However, the network analyzer is an experimental instrument for larger bandwidth and more common applications. Although using a network analyzer to measure the electrical parameters of a crystal oscillator can achieve higher accuracy and indicators, its investment is also quite high. For such practical applications, this article introduces a crystal oscillator resonant frequency measurement system composed of a single-chip microcomputer, a direct digital frequency synthesizer (DDS) chip, and a gain phase detector chip. Compared with a network analyzer, this system has a much lower cost and can meet the measurement speed requirements of the equipment. It has now been applied to actual crystal oscillator sorting equipment.
1 Measurement principle
The electrical behavior of a quartz crystal is similar to the release of an RLC circuit. In link applications, it can be roughly equivalent to the RLC circuit shown in Figure 1.
The impedance value of the equivalent circuit can be expressed as:
Z(s)=[1/(s·C1)+s·L1+R1]‖[1/(s·C0)] (1)
When the frequency of the electrical signal applied to the crystal oscillator is equal to its own resonant frequency, the crystal oscillator is purely resistive and has the smallest impedance value. Using this characteristic, a measurement network can be designed to sweep the crystal oscillator and determine whether the crystal oscillator is resonant based on the changes in the electrical signals at both ends of the measurement network.
2 Description of the technical solution
According to the above measurement solution, the basic design framework of this system is to use the single-chip microcomputer to control the DDS to sweep the crystal oscillator (excitation), obtain the ratio of the voltages at both ends of the measurement network through the amplitude detector, and finally use the ADC on the single-chip microcomputer to collect data (measurement), and send it to the upper PC through the communication module after necessary processing. Such an excitation-response-measurement process can establish a data model of the transmission impedance characteristics of the linear network, which is equivalent to a small network analyzer for the commonly used crystal oscillator frequency band. The composition of the system is shown in Figure 2.
The whole system includes the measurement part (measurement network, AD9852, AD8302), the control and calculation part (Freescale microcontroller) and the communication module part. During measurement, the host PC performs initial settings and simple control on the microcontroller through the communication module, and the microcontroller can automatically control the measurement part to measure the wafer. After obtaining the relevant measurement parameters, the microcontroller will store them and finally submit all the data to the host PC.
2.1 Microcontroller
The microcontroller S12XS128 (hereinafter referred to as S12) used in this system is a 16-bit microcontroller optimized by Freescale for cost-sensitive automotive electronics industrial applications. It is a simplified version of the S12XE series. The maximum bus clock frequency of this microcontroller is 40 MHz, with 128 KB Flash, 8 KB RAM and 8 KB EEFROM. S12 itself has a 16-channel 12-bit ADC, supports 8/10/12-bit conversion accuracy, and the average single conversion time is about 3μs at 10-bit accuracy. In addition, S12 also supports control area network (CAN), local area network (LIN) and serial peripheral interface (SPI) protocols, and has an 8-channel timer with a 16-bit counter.
2.2 Direct digital frequency synthesizer and RF intermediate frequency gain detector
AD9852 is a direct digital frequency synthesizer (DDS) produced by ADI. It integrates two 12-bit high-speed ADCs, has a 48-bit programmable frequency register and a 14-bit programmable phase register, and also has a 12-bit programmable amplitude modulation register. This ensures that AD9852 has extremely high frequency resolution at a system clock frequency of 300 MHz, and the output phase and amplitude are adjustable. At the same time, the output range of the output signal up to 150 MHz also meets the design requirements. The
amplitude-frequency characteristics of the quartz crystal oscillator can be directly measured by another integrated circuit chip AD8302. AD8302 is a special integrated circuit produced by ADI for RF/IF amplitude and phase measurement. Its core components are composed of two precisely matched broadband logarithmic amplifiers and linear multipliers/phase detectors. It can simultaneously measure the amplitude ratio and phase difference between two input signals in the frequency range from low frequency to 2.7 GHz. Figures 3 and 4 show the basic application circuit diagrams of AD9852 and AD8302. [page]
The output of AD9852 is obtained by a current-type ADC output, so a low-pass filter needs to be added in the back stage to filter out high-frequency noise. This part of the circuit is recommended in the AD9852 data sheet and will not be described in detail.
The relationship between the AD8302 output signal VMAG, VPHS and the input signal VINA and VINB is determined by the following formula:
Where VCP is a precision bias voltage generated inside the AD8302 chip, which is used to set the center operating point of the output signal, and its size is 900 mV. When the external circuit of AD8302 is shown in Figure 4, the scales of the output signal are 30 mV/dB and 10 mV/Degree respectively. The amplitude and phase response of the measurement network at the corresponding frequency can be obtained by reading the back-end ADC.
2.3 Communication module
Since asynchronous serial ports are still commonly used in the industry, and more and more PCs no longer retain the 9-pin plug of the serial port, in order to maintain the compatibility of the upper-layer software of the host computer, the serial port still needs to be retained. This S12 microcontroller does not support USB communication, so the CP2102 chip from Silicon Labs was added to the design to convert the serial port of S12 into a physical USB port. In this way, the serial port is still recognized on the PC side, so the programming on S12 and PC can remain compatible.
The system design requires that data collection and upload be completed within 100ms. The workload mainly includes: ①
Data collection of 1000 frequency points. The A/D sampling module of the S12 microcontroller is calculated at a sampling rate of 200 ksps. It takes a total of 5 ms to complete the collection of 1000 frequency points. If each frequency point is estimated by 4 measurements to reduce the error, it will take a total of 20 ms; at the same time, due to the extra overhead required by the entire microcontroller to control AD9852 and the internal ADC scheduling, it can be estimated that the total time to complete the sampling of 1000 points is less than 50 ms.
② The total amount of data sent to the PC is 1000×16 (12-bit A/D sampling + 4-bit zero padding) = 16,000 bits. CP2102 can support a baud rate of up to 921 600. At this rate, the entire transmission time is 17.4 ms. With the additional overhead of calling programs, the time consumption of the data transmission part is within 30 ms.
In summary, the overall time consumption can be controlled within the required 100 ms. On the other hand, in order to adapt to the high baud rate of 921 600, the crystal oscillator frequency selected outside the microcontroller is 14.745 6 MHz. At this frequency, the corresponding SCI baud rate control register frequency division value is an integer to reduce the communication clock frequency deviation.
3 System workflow and software implementation
When the system is working, the general data acquisition and analysis process is shown in Figure 5.
[page]
3.1 Initialization of MCU and AD9852
The initialization of MCU mainly involves setting the system clock, SCI, ADC and other related registers, configuring the SCI baud rate to 921 600, the ADC clock frequency to 7.372 8 MHz, the resolution to 12 bits, and the sample-hold circuit to zero before each sampling.
The configuration of AD9852 can be configured with serial or parallel interface. Here the system uses the parallel interface configuration, which has the advantage of relatively simple configuration and the disadvantage of occupying more MCU I/O. The initialization settings of some control registers of AD9852 are listed in Table 1.
When configuring registers, the I/O of the microcontroller is operated according to the timing requirements in the AD9852 data sheet, which will not be repeated here.
3.2 Operation state machine and measurement process
The entire measurement process of the system is a finite state machine, which mainly includes: standby state (Standby), receiving command state (ReCMD), configuring AD9852 state (Configuring), measuring state (Measuring) and data uploading state (UploadDate). The state transition diagram is shown in Figure 6.
The measurement process of the system can be summarized as the calculation of the frequency word (FTW), configuration of AD9852, A/D sampling, and cyclic acquisition. The
calculated frequency word FTW here is a 48-bit register of AD9852. This register directly controls the output frequency of AD9852. Its output frequency has the following relationship:
Where fREF is the frequency value of the external high-precision crystal oscillator of AD9852, and Multiple is the PLL multiplication factor of AD9852.
After receiving the configuration command, the system calculates the initial FTW value and △FTW value according to the start scanning frequency value. Then write the FTW value into the register of AD9852. After the AD9852 outputs a stable frequency, A/D sampling begins. After repeated measurements, the average value is stored in the storage area. After completing the measurement of this frequency point, update FTW=FTW+△FTW, and then repeat the above process until the measurement of 1000 frequency points is completed.
4 System Test
Figure 7 is a simple simulation test platform: the upper electrode is fixed on a micrometer, the distance between the upper and lower electrodes is adjusted by twisting the knob, and the quartz wafer is placed between the upper and lower electrodes.
The host computer uses a test program written in LabVIEW to communicate with the microcontroller and display the uploaded data, as well as the resonant frequency of the crystal oscillator, as shown in Figure 8. The left side of the figure shows some settings for the serial port and the scanning frequency. In the curve measured on the right, the ordinate represents the intensity of the resonance peak in dB; the abscissa represents the scanning frequency in Hz. It can be seen from the curve that the resonant frequency of the chip under test is 41.447MHz. There are some small protrusions on both sides of the main peak in the curve, which should be the parasitic peaks of the crystal oscillator itself.
The experiment also tested the measurement stability of the resonance peak obtained by the test. The fluctuation range of the resonance frequency of the crystal oscillator measured 750 times in a row was within 100 Hz. Further experiments showed that in a longer time range (6,000 times, about 10 minutes), the fluctuation range was within ±200 Hz.
Conclusion
The crystal oscillator resonance frequency measurement system that combines a dedicated DDS chip, a detector chip, and a single-chip microcomputer containing an ADC can better complete the resonance frequency measurement of the quartz crystal oscillator, providing a low-cost solution for rapid sorting of quartz crystal oscillators in the industry. This solution has been applied to professional quartz crystal oscillator sorting equipment, and the overall effect is satisfactory.
Previous article:Software Anti-interference Technology and Its Application in Single Chip Microcomputer
Next article:Design of personnel registration and entry system based on MSP430F149
- Popular Resources
- Popular amplifiers
- Evaluating Roadside Perception for Autonomous Vehicles: Insights from Field Testing
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- New control system MATLAB simulation training
- TOWARD ORBITAL SEISMOLOGY THEORY FOR SPECKLE NOISE REDUCTION IN LASER DOPPLER VIBROMETER MEASUREMENT
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- MSP430 IO and internal structure diagram
- MSP430 Registers
- Using CircuitPython on PICO to control LED and play music at the same time
- DIY Small Communication System - FM Transmitter Radio Station
- msp430f149 baud rate setting
- Bought a very good ESP32-S2 development board
- What is the IC model of infrared remote control transmitter?
- Image frequency suppression measurement
- NUCLEO_G431RB Review - CRC Calculation
- Please help me explain this circuit schematic, how it works, and where each module is.