Why can’t the crystal oscillator be placed on the edge of the PCB board?

Crystal oscillator is the key in digital circuit design, usually in circuit design, crystal oscillator are used as the heart of the digital circuit, all the work of the digital circuit is inseparable from the clock signal, and just the crystal oscillator is the key button that directly controls the normal start of the entire system, it can be said that if there is a digital circuit design can see the crystal oscillator.

I. What is a crystal oscillator? 

Crystal oscillator generally refers to two kinds of quartz crystal oscillator and quartz crystal resonator, and can also be directly called crystal oscillator. Both are made using the piezoelectric effect of quartz crystals. 

The crystal oscillator works like this: when an electric field is applied to the two electrodes of the crystal, the crystal will undergo mechanical deformation, and on the contrary, if mechanical pressure is applied to the two ends of the crystal, the crystal will produce an electric field. This phenomenon is reversible, so using this characteristic of the crystal, adding alternating voltages to both ends of the crystal, the chip will produce mechanical vibration, and at the same time produce alternating electric fields. However, this vibration and electric field generated by the crystal is generally small, but as long as it is at a certain frequency, the amplitude will be significantly increased, similar to the LC loop resonance that we circuit designers often see. 

II. Classification of crystal oscillations (active and passive) 

① Passive crystal oscillator

Passive crystal is a crystal, generally a 2-pin non-polar device (some passive crystal has a fixed pin with no polarity).

Passive crystal oscillator generally needs to rely on the clock circuit formed by the load capacitor to generate the oscillating signal (sine wave signal). 

② Active crystal oscillator

An active crystal oscillator is an oscillator, usually with 4 pins. Active crystal oscillator does not require the CPU’s internal oscillator to produce a square-wave signal. An active crystal power supply generates a clock signal. 

The signal of active crystal oscillator is stable, the quality is better, and the connection mode is relatively simple, the precision error is smaller than that of passive crystal oscillator, and the price is more expensive than passive crystal oscillator. 

III. Basic parameters of crystal oscillator 

The basic parameters of the general crystal oscillator are: operating temperature, precision value, matching capacitance, package form, core frequency and so on. 

The core frequency of the crystal oscillator: The choice of the general crystal frequency depends on the requirements of the frequency components, like the MCU is generally a range, most of which are from 4M to dozens of M.

Crystal vibration accuracy: the accuracy of the crystal vibration is generally ±5PPM, ±10PPM, ±20PPM, ±50PPM, etc., high-precision clock chips are generally within ±5PPM, and the general use will choose about ±20PPM.

The matching capacitance of the crystal oscillator: usually by adjusting the value of the matching capacitance, the core frequency of the crystal oscillator can be changed, and at present, this method is used to adjust the high-precision crystal oscillator. 

In the circuit system, the high speed clock signal line has the highest priority. The clock line is a sensitive signal, and the higher the frequency, the shorter the line is required to ensure that the distortion of the signal is minimal. 

Now in many circuits, the crystal clock frequency of the system is very high, so the energy of interfering with harmonics is also strong, harmonics will be derived from the input and output two lines, but also from the space radiation, which also leads to if the PCB layout of the crystal oscillator is not reasonable, it will easily cause a strong stray radiation problem, and once produced, it is difficult to solve by other methods. Therefore, it is very important for the crystal oscillator and CLK signal line layout when the PCB board is laid out.