Smart test
How to use an oscilloscope to measure the output frequency of a passive crystal oscillator
The crystal oscillator is an important electronic component in the circuit, which controls the tempo of the system. There are many types of crystal oscillators, among which passive crystal oscillators are cheap and widely used. When using an oscilloscope to measure the output frequency of a passive crystal oscillator, it is often found that the crystal oscillator has no output signal, and the crystal oscillator does not vibrate. So how to measure the output frequency of the passive crystal oscillator with an oscilloscope?
1 Introduction to Passive Crystal Oscillator
Passive crystal oscillators should be called Crystal (crystal) to be precise, and active crystal oscillators are called Oscillator (oscillator). Passive crystal oscillator is formed by plating electrodes on both ends of a quartz wafer, and its two pins are non-polar. Passive crystal oscillators cannot oscillate by themselves, and need to be matched with peripheral circuits when working. Under certain conditions, a quartz wafer will produce a piezoelectric effect: the electric field and mechanical deformation at both ends of the wafer will mutually transform. When the frequency of the applied alternating voltage is equal to the natural frequency of the wafer, the vibration and electric field intensity generated by the crystal are called piezoelectric resonance, which is similar to the resonance of an LC circuit.
Figure 1 Quartz crystal circuit symbol, equivalent circuit, reactance characteristics and peripheral circuit diagram
Since the crystal is a passive device, it is more sensitive to the parameters of the peripheral circuit, especially the load capacitance. According to the crystal's manual, we know that there is a recommended capacitor in the test circuit, which is very relevant to whether the crystal starts to oscillate:
Cg and Cg are called matching capacitors, which are ground capacitances connected to the two pins of the crystal oscillator. Their function is to adjust the load capacitance to make it consistent with the requirements of the crystal oscillator. Note that the total capacitance value after Cg and Cg are connected in series ((C_d*C_g)/(C_d+C_g )) is the effective load capacitance part.
Cic: Chip pin distribution capacitance and chip internal capacitance.
△C: PCB trace distribution capacitance, the empirical value is 3 to 5pF.
For a 32.768kHz passive crystal oscillator used in a project, the recommended value of the load capacitance in the manual is 12.5pF. It can be seen that this value is relatively small, and a small change is enough to affect the circuit characteristics.
2 The influence of the probe
Probes, like oscilloscopes, are part of the measurement system, and their correct use greatly affects the test results. When the probe of the probe clicks on the measurement point, the access of the probe will affect the circuit under test, which is called the load effect of the probe. This load effect is generally simplified as a parallel connection of a resistor and a capacitor. For oscilloscopes with bandwidth below 500MHz, the standard configuration is a passive probe with 1x attenuation or 10x attenuation. The attenuation ratio of some probes can be manually selected. Probes with different attenuation ratios have differences in bandwidth, input resistance, and input capacitance:
Figure 2 The parameter difference of ZP1025SA at 1 times and 10 times attenuation
It can be seen that the input capacitance of the probe is larger than the load capacitance in the crystal manual. The intervention of the probe must greatly affect the circuit that has been optimized with parameters, and thus seriously affect the oscillation of the crystal circuit. The power of the two evils is the lesser one, and the 10 times attenuation probe should be preferred when measuring passive crystal oscillators. If the parasitic parameters of the 10-fold attenuation probe are still too large, you can consider using an active high-voltage differential probe, and its load parameters are optimized to be very small. For example, Lecroy's ZP1000 probe has an input impedance of 0.9pF and 1M ohm.
3Choose the appropriate measuring point
Since the two ends of the crystal are very sensitive and it is not convenient to connect the probe for measurement, you can change the way of thinking and measure the signal in other places.
Some clock chips have clock out function, which is the signal of the buffer crystal, and the output of its pin has a very strong driving ability, so it can be directly measured by the probe.
The clock sent by the crystal is input to the processor, and the timer can be used to divide the frequency of this signal, and then the divided signal is output to the pin. In this way, we only need to measure the frequency-divided signal to calculate the frequency of the original clock.
This indirect test method can only test the frequency of the crystal, not the amplitude of the crystal output signal. If the accuracy of the frequency can be tested in the working condition of the equipment, the operation of the crystal circuit is OK.
Figure 3 Use the buffer function and counter function of the chip to measure
If the signal driving ability is very strong, you can consider a non-contact test program: near-field probe. The near-field probe cooperates with the spectrum analyzer or the FFT analysis function of the oscilloscope to measure the frequency at the peak voltage. Because it is a non-contact solution, there is no load effect of the probe, but you need to pay attention to the frequency resolution of the spectrum analyzer and FFT analysis at this time, which will affect the step and accuracy of the measurement results.
4 Tip: How to measure frequency
After capturing the output signal of the crystal, how to measure its frequency? In the ZDS series oscilloscope of ZLG Zhiyuan Electronics, you can choose hardware frequency counter, frequency parameter measurement, rising edge parameter measurement and other methods.
When the hardware frequency meter is implemented, there are algorithms for measuring the period and the number of pulses. These two different test methods are selected according to the frequency of the input signal, in order to expect the measured value to be more accurate. When the signal frequency is small, the method of measuring the period will be selected. The period of the signal is measured. The reciprocal of the period is the frequency. The error source of this method is the frequency of the timing clock for measuring the period; when the signal frequency is large, the number of pulses will be measured In the method, the number of rising edges of the signal is measured in the standard time. The error of this method is a matter of selection in the standard time.
In the time parameter of parameter measurement, there is a test item of "frequency". This test item is to find the time difference between two rising edges, and then find the reciprocal to get the frequency. The error of this test item lies in the judgment of the rising edge and the cycle timing frequency, which is limited by the sampling rate of the current sampling point.
Among the statistical parameters of parameter measurement, there is a "rising edge counting" method, the principle of which is to measure the number of rising edges. In the test, you can select the cursor area for the measurement range, and the cursor range is set to 200ms, so the measured rising edge is multiplied by 5, which is the signal frequency.
Figure 4 Frequency, rising edge count measurement interface diagram
The signal generator is selected to output signals of different frequencies, and the frequencies measured by the above three methods are shown in Table 1.
Table 1 Comparison table of frequencies measured by different measurement methods
It can be seen that the measurement results of the three have little difference, the resolution of the hardware frequency meter is higher, and the effective digits in the parameter measurement are only 5 digits. The accuracy of the output frequency of this signal generator is ±1ppm, and the frequency accuracy of the internal crystal oscillator of the oscilloscope is ±2ppm. In the 24MHz hardware frequency meter mentioned above, the measurement accuracy is 80Hz/24MHz=3.33ppm, which is basically measured by the instrument Within accuracy. The measured value of the parameter appears to be closer to the true value in some cases. This is because the effective digits are not enough and rounded off. The hardware frequency meter is the more accurate one.