What is a crystal oscillator?

The crystal oscillator is the key man in digital circuit design. Usually in circuit design, the crystal oscillator is regarded as the heart of the digital circuit. All the work of the digital circuit is inseparable from the clock signal, and the crystal oscillator is the key button that directly controls the normal startup of the entire system. It can be said that the crystal oscillator can be seen wherever there is a digital circuit design.


· Definition of crystal oscillator
Crystal oscillator generally refers to quartz crystal oscillator and quartz crystal resonator, which can also be directly called crystal oscillator. They are all made using the piezoelectric effect of quartz crystal.


Its working principle is as follows: after adding an electric field to the two electrodes of the crystal, the crystal will undergo mechanical deformation. On the contrary, if mechanical pressure is added to both ends of the crystal, the crystal will generate an electric field. This phenomenon is reversible, so by using this characteristic of the crystal, adding an alternating voltage to both ends of the crystal, the chip will generate mechanical vibration and an alternating electric field at the same time. However, the vibration and electric field generated by the crystal are generally very small, but as long as it is at a certain frequency, the amplitude will increase significantly, which is similar to the LC loop resonance that we circuit designers often see.


· Classification of crystal oscillators
①Passive crystal oscillators
Passive crystal oscillators are crystals, usually 2-pin non-polar devices (some passive crystal oscillators have fixed pins with or without polarity).
Passive crystal oscillators generally need to rely on the clock circuit formed by load capacitance to generate an oscillation signal (sine wave signal).
②Active crystal oscillators
Active crystal oscillators are oscillators, usually 4 pins. Active crystal oscillators do not require the internal oscillator of the CPU to generate a square wave signal. Active crystal oscillators can generate a clock signal when powered.
Active crystal oscillators have stable signals, good quality, and simpler connections. The accuracy error is smaller than that of passive crystal oscillators, and the price is slightly more expensive than that of passive crystal oscillators.


· Basic parameters of crystal oscillators
Generally, the basic parameters of crystal oscillators are: frequency, operating temperature, frequency difference, operating voltage, matching capacitance, package size, output mode, etc.
Core frequency of crystal oscillators: Generally, the choice of crystal oscillator frequency depends on the requirements of frequency components. For example, MCU is generally a range, most of which range from 4M to tens of M.
Crystal oscillator accuracy: The accuracy of crystal oscillators is generally ±5PPM, ±10PPM, ±20PPM, ±50PPM, etc. High-precision clock chips are generally within ±5PPM, and generally used will be around ±20PPM.
Crystal oscillator matching capacitor: Usually, the core frequency of the crystal oscillator can be changed by adjusting the value of the matching capacitor. At present, this method is used to adjust high-precision crystal oscillators.