Crystal oscillator is the key in digital circuit design. Usually, in circuit design, crystal oscillator is regarded as the heart of digital circuit. All the work of digital circuit is inseparable from clock signal, and crystal oscillator is the key button that directly controls the normal start of the whole system. It can be said that crystal oscillator can be seen where there is digital circuit design.
Crystal oscillator is the key in digital circuit design. Usually, in circuit design, crystal oscillator is regarded as the heart of digital circuit. All the work of digital circuit is inseparable from clock signal, and crystal oscillator is the key button that directly controls the normal start of the whole system. It can be said that crystal oscillator can be seen where there is digital circuit design.
1. What is a crystal oscillator?Crystal oscillator generally refers to quartz crystal oscillator and quartz crystal resonator, and can also be directly called crystal oscillator. Are made by using the piezoelectric effect of Shi Ying crystal.

The working principle of crystal oscillator is as follows: when an electric field is applied to two electrodes of the crystal, the crystal will be mechanically deformed; conversely, if a mechanical pressure is applied to both ends of the crystal, the crystal will generate an electric field. This phenomenon is reversible, so taking advantage of this characteristic of crystal and applying alternating voltage across the crystal, the wafer will produce mechanical vibration and alternating electric field at the same time. However, the vibration and electric field generated by crystals are generally very small, but as long as they are at a certain frequency, the amplitude will increase obviously, just like the LC circuit resonance that we circuit designers often see.
2. Classification of crystal oscillator (active crystal oscillator and passive crystal oscillator)① Passive crystal oscillator
Passive crystal oscillator is a crystal, generally a 2-pin nonpolar device (some passive crystal oscillators have nonpolar fixed pins).
Generally, a passive crystal oscillator can generate an oscillation signal (sine wave signal) by means of a clock circuit formed by a load capacitor.
② Active crystal oscillator
The active crystal oscillator is an oscillator, usually with four pins. Active crystal oscillator does not need the internal oscillator of CPU to generate square wave signal. An active crystal oscillator can generate a clock signal by supplying power.
Active crystal oscillator has stable signal, good quality, simple connection mode, smaller precision error and more expensive price than passive crystal oscillator.
3. Equivalent circuit of crystal oscillatorIn fact, the crystal oscillator acts like a series RLC circuit.
The equivalent circuit of the crystal oscillator shows a series RLC circuit, which represents the mechanical vibration of the crystal oscillator, and the parallel connection with a capacitor represents the electrical connection with the crystal oscillator, and the crystal oscillator works towards series resonance.

Where R is ESR equivalent series resistance, L and C are equivalent inductance and capacitance respectively, and Cp is parasitic capacitance.
4. Basic parameters of crystal oscillatorThe basic parameters of general crystal oscillator are: working temperature, precision value, matching capacitance, packaging form, core frequency and so on.
Core frequency of crystal oscillator: Generally, the choice of crystal oscillator frequency depends on the requirements of frequency components, such as MCU, which is generally in a range, mostly ranging from 4M to tens of m.
Precision of crystal oscillator: The precision of crystal oscillator is generally within 5 ppm, ±10PPM, 20 ppm, 50 ppm, etc., and the high-precision clock chip is generally within 5 ppm, so it will be selected around 20 ppm in general use.
Matching capacitance of crystal oscillator: usually, the core frequency of crystal oscillator can be changed by adjusting the value of matching capacitance. At present, this method is used to adjust the crystal oscillator with high precision.
5. Design and layout of crystal oscillator on PCB boardAs the heart of digital circuit, crystal oscillator affects the stability of the whole system, and the choice of crystal oscillator determines the success or failure of digital circuit.
Because there is a Shi Ying crystal in the crystal oscillator, it is easy to cause the crystal oscillator not to start vibrating due to external impact, so the reliable installation of the crystal oscillator should be considered in the circuit design, and its position should not be close to the board edge, equipment shell and other places as far as possible. Usually pay attention to the following points when PCB is placed on the crystal oscillator:
① The crystal oscillator should not be too close to the edge of the board, and the shell of the crystal oscillator must be grounded, otherwise it will easily lead to radiation noise of the crystal oscillator.
Pay special attention to this point when designing the board. Grounding the shell can prevent the crystal oscillator from radiating outward, and at the same time, it can shield the interference of external signals on the crystal oscillator. If it must be arranged on the edge of PCB, another GND line can be laid on the edge of the printed line of the crystal oscillator, and at the same time, holes are punched on the ground wire at a certain distance to surround the crystal oscillator.

② No signal wire can be laid under the crystal oscillator, otherwise it will easily lead to the harmonic noise of the crystal oscillator coupled with the signal wire.
Ensure that the floor is completely paved, and do not wire within 300mil of the crystal oscillator, so as to prevent the crystal oscillator from interfering with the performance of other wires, components and layers.
③ If the filter device is placed under the crystal oscillator, and the filter capacitor and matching resistor are not arranged according to the signal flow direction, the filtering effect of the filter will be worse.
The coupling capacitors should be as close as possible to the power supply pin of the crystal oscillator, and placed in the order from large to small according to the direction of power inflow.
④ The wiring of the clock signal should be as short as possible and wider, and a balance should be found between the wiring length and the distance from the heat source.
Take the following layout as an example, the layout of crystal oscillator will be relatively better:
① The filter capacitor and matching circuit of the crystal oscillator are close to the MCU chip and far from the board edge.
② The filter capacitor and matching resistor of the crystal oscillator are arranged according to the signal flow direction, and placed neatly and compactly near the crystal oscillator.
③ The crystal oscillator should be placed near the chip, and the wiring to the chip should be as short and straight as possible.
In the circuit system, the high-speed clock signal line has the highest priority. The clock line is a sensitive signal. The higher the frequency, the shorter the trace is required to ensure the minimum distortion of the signal.

Because in many circuits, the clock frequency of system crystal oscillator is very high, so the energy of interference harmonics is also strong, and harmonics will not only be derived from input and output lines, but also radiate from space, which also leads to a strong stray radiation problem if the layout of crystal oscillator in PCB is not reasonable enough, and once it is generated, it is difficult to solve it by other methods. Therefore, it is very important to layout crystal oscillator and CLK signal line in PCB layout.
About Maxipcb
Maxipcb empowers innovators to turn cutting-edge technologies into reality.
We offer one-stop solutions for design, simulation, testing, PCB manufacturing, component procurement and SMT assembly, enabling efficient development, rapid deployment and risk control across the full product lifecycle.Serving the world in communications, industrial automation, aerospace, automotive, semiconductor and beyond, we build a safer, more connected future together.