Automatic test system for temperature compensation of crystal oscillator
By designing an automated crystal oscillator temperature compensation testing system, using components such as high and low temperature testing equipment and microcontrollers, the problems of low efficiency and large error in traditional testing methods are solved, and high-precision and high-efficiency testing needs are achieved.
Patent Information
- Application Number
- CN202411968219.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-09
AI Technical Summary
The traditional crystal oscillator temperature compensation testing method relies on manual operation, is inefficient and has large errors, making it difficult to meet the needs of modern production for high-precision and high-efficiency testing.
Design a crystal oscillator temperature compensation automated testing system, including high and low temperature testing equipment, temperature-compensated crystal oscillator, phase measurement module, analog-to-digital converter, microcontroller and digital-to-analog converter, and calculate and adjust the temperature compensation parameters through an automated process.
It realizes automated testing, improves efficiency and accuracy, reduces errors caused by manual operation, can meet the testing needs of large-scale crystal oscillator production, and has good system stability and can operate continuously for a long time.
Smart Images

Figure CN119966349A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of crystal oscillator testing, and in particular to an automatic crystal oscillator temperature compensation testing system. Background Art
[0002] The measurement of temperature compensated crystal oscillators plays a vital role in the entire temperature compensation process. The accuracy of the measurement results directly determines a series of subsequent results. At the same time, since the frequency and other performance of the crystal oscillator will change under different temperature environments, temperature compensation testing is essential to ensure the stability of the crystal oscillator under various temperature conditions. However, traditional testing methods mostly rely on manual operation, which is inefficient and has large errors, and it is difficult to meet the needs of modern production for high-precision and high-efficiency testing of crystal oscillators. Summary of the invention
[0003] The invention provides a crystal oscillator temperature compensation automatic test system, which is used to solve the problems of low efficiency and large error in traditional test methods.
[0004] In one aspect, the present invention provides a crystal oscillator temperature compensation automatic test system, comprising a high and low temperature test device, a first number of temperature compensated crystal oscillators, a phase measurement module, an analog-to-digital converter, a microcontroller and a digital-to-analog converter, wherein:
[0005] The high and low temperature testing device is built with a second number of temperature acquisition units, the second number is greater than or equal to the first number, and the temperature acquisition unit is used to collect the actual temperature around the matched temperature compensated crystal oscillator;
[0006] The temperature-compensated crystal oscillator is placed at a position matching any temperature acquisition unit in the high and low temperature testing equipment;
[0007] The analog-to-digital converter is used to convert the actual temperature collected by the specific temperature collection unit into a digital signal, the specific temperature collection unit is matched with a specific temperature-compensated crystal oscillator, and the specific temperature-compensated crystal oscillator is selected by the microcontroller from the first number of temperature-compensated crystal oscillators;
[0008] The microcontroller is used to calculate a first compensation parameter according to the digital signal;
[0009] The phase measurement module is used to measure the phase difference between the output frequency of the specific temperature compensated crystal oscillator and the reference signal;
[0010] The microcontroller is used for processing the phase difference using a temperature compensation algorithm to obtain a second compensation parameter when the phase difference is valid, and adding the first compensation parameter and the second compensation parameter to obtain a third compensation parameter;
[0011] The digital-to-analog converter is used to convert the third compensation parameter into an analog signal to control the output frequency of the specific temperature compensated crystal oscillator.
[0012] Optionally, the temperature acquisition unit includes a temperature sensor, and the temperature sensor is used to acquire the actual temperature around the temperature compensated crystal oscillator matched with the temperature acquisition unit.
[0013] Optionally, the temperature sensor is a thermistor.
[0014] Optionally, the high and low temperature testing equipment is also equipped with a built-in controller, a refrigeration device and a heating device, and the controller is used to regulate the refrigeration device and the heating device.
[0015] Optionally, the phase measurement module includes a digital frequency meter, and the digital frequency meter is used to measure the output frequency of the specific temperature compensated crystal oscillator.
[0016] Optionally, the digital frequency meter uses a multi-cycle synchronous measurement method to measure the output frequency of the specific temperature compensated crystal oscillator.
[0017] Optionally, when the phase difference is valid, the step of using a temperature compensation algorithm to process the phase difference to obtain a second compensation parameter includes:
[0018] Determining whether the phase difference is valid;
[0019] If it is effective, using the temperature compensation algorithm to process the phase difference to obtain the second compensation parameter;
[0020] If invalid, continue to determine whether the received phase difference is valid.
[0021] Optionally, the temperature compensation algorithm includes a Kalman filter algorithm and a PID control algorithm.
[0022] Optionally, it also includes a display and a printer, wherein:
[0023] The display is used to display real-time information, including the actual temperature of the specific temperature acquisition unit, the output frequency of the specific temperature-compensated crystal oscillator, and the system working status;
[0024] The printer is used to print test results, which include the output frequency and the third compensation parameter of the specific temperature compensated crystal oscillator at different actual temperatures.
[0025] On the other hand, the present invention provides a crystal oscillator temperature compensation automatic test method, which is applied to any of the above systems and is characterized by comprising:
[0026] Selecting, by the microcontroller, a specific temperature compensated crystal oscillator from a first number of temperature compensated crystal oscillators for testing;
[0027] The microcontroller calculates a first compensation parameter according to a digital signal output by an analog-to-digital converter, and the fuzzy converter is used to convert an actual temperature collected by a specific temperature collection unit into a digital signal, and the specific temperature collection unit is matched with the specific temperature-compensated crystal oscillator;
[0028] The microcontroller uses a temperature compensation algorithm to process the phase difference when the phase difference output by the phase measurement module is valid to obtain a second compensation parameter, and adds the first compensation parameter and the second compensation parameter to obtain a third compensation parameter. The phase measurement module is used to measure the phase difference between the output frequency of the specific temperature-compensated crystal oscillator and the reference signal;
[0029] The third compensation parameter is input into a digital-to-analog converter and converted into an analog signal through the microcontroller to control the output frequency of the specific temperature compensated crystal oscillator.
[0030] The beneficial effects of the present invention include: a high degree of automation, which greatly improves efficiency and reduces errors compared to manual operation; high test accuracy and high speed, which can meet the test requirements of large-scale crystal oscillator production; and good system stability, which can run continuously for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of the structure of a crystal oscillator temperature compensation automatic test system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Figure 1 The structure of a crystal oscillator temperature compensation automatic test system provided by an embodiment of the present invention is shown, including high and low temperature test equipment, a first number of temperature compensated crystal oscillators, a phase measurement module, an analog-to-digital converter, a microcontroller and a digital-to-analog converter.
[0035] The high and low temperature test equipment provides a variable temperature environment for the entire test system, which is used to simulate the different temperature conditions that the temperature compensated crystal oscillator may encounter in actual work. The high and low temperature test equipment can heat up in 1 degree increments and keep warm for 2 hours.
[0036] The high and low temperature testing equipment is equipped with a second number of temperature acquisition units, the second number being greater than or equal to the first number, and the temperature acquisition units are used to acquire the actual temperature around the matched temperature compensated crystal oscillator.
[0037] In one example, the temperature acquisition unit includes a temperature sensor, and the temperature sensor is used to acquire the actual temperature around the temperature-compensated crystal oscillator matched with the temperature acquisition unit.
[0038] Furthermore, the temperature sensor is a thermistor.
[0039] Thermistors are used to sense temperature changes. When the temperature changes, the resistance of thermistors changes accordingly. Adjusting the frequency of the temperature-compensated crystal oscillator based on the temperature changes sensed by the temperature sensor alone cannot completely eliminate the effect of temperature on the frequency. There will still be frequency offsets at different temperatures.
[0040] In one example, the high and low temperature testing equipment also has a built-in controller, a refrigeration device, and a heating device, and the controller is used to regulate the refrigeration device and the heating device.
[0041] The refrigeration device can achieve cooling through the compressor refrigeration principle, and the heating device can increase the temperature by using heating elements such as heating wires to ensure that the temperature inside the high and low temperature test equipment is stable at the ambient temperature, creating the required temperature environment for the temperature compensated crystal oscillator.
[0042] The temperature compensated crystal oscillator is placed in a position matching any temperature acquisition unit in the high and low temperature test equipment.
[0043] The analog-to-digital converter (ADC) is used to convert the actual temperature collected by the specific temperature collection unit into a digital signal. The specific temperature collection unit is matched with a specific temperature-compensated crystal oscillator, and the specific temperature-compensated crystal oscillator is selected by the microcontroller from a first number of temperature-compensated crystal oscillators.
[0044] Common analog-to-digital conversion methods include successive approximation and dual-integral. The successive approximation ADC uses an internal comparator to compare the analog input with the step-by-step approximation analog voltage generated by the internal DAC to determine the digital output value. The dual-integral ADC determines the digital output value by integrating the analog input signal twice to measure the integration time.
[0045] The microcontroller is used for calculating a first compensation parameter according to the digital signal.
[0046] The phase measurement module is used to measure the phase difference between the output frequency of a specific temperature compensated crystal oscillator and a reference signal.
[0047] In one example, the phase measurement module includes a digital frequency meter, which is used to measure the output frequency of a specific temperature compensated crystal oscillator.
[0048] The working principle of the digital frequency meter is based on the counter. The output signal of the temperature-compensated crystal oscillator is first converted into a standard rectangular pulse signal by an amplifying and shaping circuit and then input into the counter. The counter counts the input standard rectangular pulse signal under the control of the standard time signal (second pulse signal) generated by the high-precision crystal oscillator. Within a specific counting time, the number of pulses counted is proportional to the frequency of the measured signal, thereby obtaining the frequency value.
[0049] Furthermore, the digital frequency meter uses a multi-cycle synchronous measurement method to measure the output frequency of a specific temperature compensated crystal oscillator.
[0050] The principle of the multi-cycle synchronous measurement method is: when the rising edge (or falling edge) of the measured signal arrives, the number of cycles of the measured signal and the time base signal are counted at the same time to ensure that the measurement is performed on the complete cycle of the measured signal. In traditional single-cycle measurement, the quantization error may be relatively large, especially when measuring high-frequency signals; while multi-cycle synchronous measurement can effectively reduce the quantization error by counting multiple cycles, so that the quantization error is amortized in multiple cycles, thereby greatly improving the measurement accuracy.
[0051] In one example, the reference signal includes a standard clock signal preset by the system and a clock signal provided by a high-precision clock source.
[0052] Furthermore, the reference signal is 1PPS, which is provided by a high-precision clock source.
[0053] The microcontroller is used for processing the phase difference by using a temperature compensation algorithm to obtain a second compensation parameter when the phase difference is valid, and adding the first compensation parameter and the second compensation parameter to obtain a third compensation parameter.
[0054] The microcontroller serves as the core control unit of the system and coordinates the work of various components. In one example, the microcontroller is STM32. STM32 integrates on-chip peripherals such as the Cortex-M series core, timer, interrupt controller, and general input and output interface (GPIO). It communicates with other components through GPIO, receives the phase difference of the phase measurement module, and processes the data according to the preset temperature compensation algorithm. The timer is used to control the time of the entire test process. The interrupt controller is responsible for handling external interrupt events such as over-temperature alarms of temperature sensors to ensure stable operation of the system. STM32 also sends compensation parameters to the digital-to-analog converter to achieve control of related analog circuits.
[0055] In one example, when the phase difference is valid, using a temperature compensation algorithm to process the phase difference to obtain a second compensation parameter includes:
[0056] Determine whether the phase difference is valid;
[0057] If it is effective, the phase difference is processed using a temperature compensation algorithm to obtain a second compensation parameter;
[0058] If invalid, continue to determine whether the received phase difference is valid.
[0059] It should be noted that loss of lock of the reference signal or the temperature compensated crystal oscillator will cause the phase difference to be invalid.
[0060] In one example, the temperature compensation algorithm includes a Kalman filter algorithm and a PID control algorithm.
[0061] A digital-to-analog converter (DAC) is used to convert the third compensation parameter into an analog signal to control the output frequency of the specific temperature compensated crystal oscillator.
[0062] The DAC converts the input digital signal into a corresponding analog voltage or current output through an internal resistor network or other means.
[0063] The beneficial effects of the above scheme include: high degree of automation, which greatly improves efficiency and reduces errors compared to manual operation; high test accuracy and fast speed, which can meet the test requirements of large-scale crystal oscillator production; good system stability and can run continuously for a long time.
[0064] In one example, an automatic test system for crystal oscillator temperature compensation provided by an embodiment of the present invention further includes a display and a printer, wherein:
[0065] The display is used to display real-time information, including the actual temperature of a specific temperature acquisition unit, the output frequency of a specific temperature-compensated crystal oscillator, and the system operating status;
[0066] The printer is used to print the test results, which include the output frequency and the third compensation parameter of the specific temperature compensated crystal oscillator at different actual temperatures.
[0067] The operator can monitor the working status of the system through the real-time information on the display. The display can be a liquid crystal display. The liquid crystal display (LCD) displays images and texts by controlling the transmission and blocking of light through the arrangement changes of liquid crystal molecules under the action of the electric field. It converts the received display data of STM32 into the required signal through the display drive circuit to realize information display.
[0068] The printer receives the printing instructions and data from STM32 and prints the data on paper using technologies such as thermal printing or inkjet printing.
[0069] Based on the same inventive concept, an embodiment of the present invention provides a crystal oscillator temperature compensation automatic test method, which is applied to any of the above systems and is characterized by comprising:
[0070] Selecting, by the microcontroller, a specific temperature compensated crystal oscillator from a first number of temperature compensated crystal oscillators for testing;
[0071] The microcontroller calculates the first compensation parameter according to the digital signal output by the analog-to-digital converter, the fuzzy converter is used to convert the actual temperature collected by the specific temperature collection unit into a digital signal, and the specific temperature collection unit is matched with the specific temperature compensation crystal oscillator;
[0072] When the phase difference output by the phase measurement module is valid, the microcontroller uses a temperature compensation algorithm to process the phase difference to obtain a second compensation parameter, and adds the first compensation parameter and the second compensation parameter to obtain a third compensation parameter. The phase measurement module is used to measure the phase difference between the output frequency of a specific temperature-compensated crystal oscillator and a reference signal;
[0073] The third compensation parameter is input into a digital-to-analog converter through a microcontroller and converted into an analog signal to control the output frequency of a specific temperature compensated crystal oscillator.
[0074] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0075] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A crystal oscillator temperature compensation automatic test system, characterized in that: It includes high and low temperature test equipment, a first number of temperature compensated crystal oscillators, a phase measurement module, an analog-to-digital converter, a microcontroller and a digital-to-analog converter, wherein: The high and low temperature testing device is built with a second number of temperature acquisition units, the second number is greater than or equal to the first number, and the temperature acquisition unit is used to collect the actual temperature around the matched temperature compensated crystal oscillator; The temperature-compensated crystal oscillator is placed at a position matching any temperature acquisition unit in the high and low temperature testing equipment; The analog-to-digital converter is used to convert the actual temperature collected by the specific temperature collection unit into a digital signal, the specific temperature collection unit is matched with a specific temperature-compensated crystal oscillator, and the specific temperature-compensated crystal oscillator is selected by the microcontroller from the first number of temperature-compensated crystal oscillators; The microcontroller is used to calculate a first compensation parameter according to the digital signal; The phase measurement module is used to measure the phase difference between the output frequency of the specific temperature compensated crystal oscillator and the reference signal; The microcontroller is used for processing the phase difference using a temperature compensation algorithm to obtain a second compensation parameter when the phase difference is valid, and adding the first compensation parameter and the second compensation parameter to obtain a third compensation parameter; The digital-to-analog converter is used to convert the third compensation parameter into an analog signal to control the output frequency of the specific temperature compensated crystal oscillator.
2. The system according to claim 1, characterized in that: The temperature acquisition unit includes a temperature sensor, and the temperature sensor is used to acquire the actual temperature around the temperature-compensated crystal oscillator matched with the temperature acquisition unit.
3. The system according to claim 2, characterized in that: The temperature sensor is a thermal element.
4. The system according to claim 1, characterized in that: The high and low temperature testing equipment is also equipped with a controller, a refrigeration device and a heating device, and the controller is used to control the refrigeration device and the heating device.
5. The system according to claim 1, characterized in that: The phase measurement module includes a digital frequency meter, which is used to measure the output frequency of the specific temperature compensated crystal oscillator.
6. The system according to claim 5, characterized in that: The digital frequency meter uses a multi-cycle synchronous measurement method to measure the output frequency of the specific temperature compensated crystal oscillator.
7. The system according to claim 1, characterized in that: The using a temperature compensation algorithm to process the phase difference to obtain a second compensation parameter when the phase difference is valid comprises: Determining whether the phase difference is valid; If it is valid, using the temperature compensation algorithm to process the phase difference to obtain the second compensation parameter; If invalid, continue to determine whether the received phase difference is valid.
8. The system according to claim 1, characterized in that: The temperature compensation algorithm includes a Kalman filter algorithm and a PID control algorithm.
9. The system according to claim 1, characterized in that: Also includes a display and a printer, where: The display is used to display real-time information, including the actual temperature of the specific temperature acquisition unit, the output frequency of the specific temperature-compensated crystal oscillator, and the system working status; The printer is used to print test results, which include the output frequency and the third compensation parameter of the specific temperature compensated crystal oscillator at different actual temperatures.
10. A crystal oscillator temperature compensation automatic test method, applied to any system described in claims 1-9, characterized in that: include: Selecting, by the microcontroller, a specific temperature compensated crystal oscillator from a first number of temperature compensated crystal oscillators for testing; The microcontroller calculates a first compensation parameter according to a digital signal output by an analog-to-digital converter, and the fuzzy converter is used to convert an actual temperature collected by a specific temperature collection unit into a digital signal, and the specific temperature collection unit is matched with the specific temperature-compensated crystal oscillator; The microcontroller uses a temperature compensation algorithm to process the phase difference when the phase difference output by the phase measurement module is valid to obtain a second compensation parameter, and adds the first compensation parameter and the second compensation parameter to obtain a third compensation parameter. The phase measurement module is used to measure the phase difference between the output frequency of the specific temperature-compensated crystal oscillator and the reference signal; The third compensation parameter is input into a digital-to-analog converter and converted into an analog signal through the microcontroller to control the output frequency of the specific temperature compensated crystal oscillator.
Citation Information
Patent Citations
Temperature compensation method, apparatus and access point
CN101202531A
System and method for modeling and correcting frequency of quartz crystal oscillator
CN110412438A
Crystal oscillator automatic temperature compensation system and compensation method
CN115065323A
Constant-temperature crystal oscillator time keeping system and method based on BP neural network
CN116400578A
Method of setting temperature compensation value for temperature compensation type crystal oscillator
JP2010147652A