How to design PCB crystal oscillator?


We often compare the crystal oscillator to the heart of the digital circuit, because all the work of the digital circuit is inseparable from the clock signal, and the crystal oscillator directly controls the whole system. If the crystal oscillator does not operate, the whole system will be paralyzed, so the crystal oscillator is the prerequisite for the digital circuit to start working.

The crystal oscillator, as we often say, is a quartz crystal oscillator and a quartz crystal resonator. They are both made of the piezoelectric effect of quartz crystals. Applying an electric field to the two electrodes of a quartz crystal causes mechanical deformation of the crystal, whereas applying mechanical pressure to both sides causes an electric field to occur in the crystal. And both of these phenomena are reversible. Using this property, alternating voltages are applied to both sides of the crystal and the wafer vibrates mechanically, as well as generating alternating electric fields. This kind of vibration and electric field are generally small, but at a certain frequency, the amplitude will be significantly increased, which is piezoelectric resonance, similar to the LC loop resonance we commonly see.

PCB crystal

 

As the heart of the digital circuit, how does the crystal oscillator play a role in smart products? Smart home such as air conditioning, curtains, security, monitoring and other products, all need wireless transmission module, they through Bluetooth, WIFI or ZIGBEE protocol, the module from one end to the other end, or directly through the mobile phone control, and the wireless module is the core component, affecting the stability of the whole system, so choose the system to use the crystal oscillator. Determines the success or failure of digital circuits.

Due to the importance of crystal oscillator in digital circuit, we need to be careful when using and designing:

1. There are quartz crystals in the crystal oscillator, which is easy to cause quartz crystal breakage and damage when it is impacted or dropped by the outside, and then the crystal oscillator cannot be vibrated. Therefore, the reliable installation of the crystal oscillator should be considered in the design of the circuit, and its position should not be close to the plate edge and the equipment shell as far as possible.

2. Pay attention to the welding temperature when welding by hand or machine. Crystal vibration is sensitive to temperature, welding temperature should not be too high, and the heating time should be as short as possible.

Reasonable crystal oscillator layout can suppress the system radiation interference.

1. Problem description

The product is a field camera, which consists of five parts inside: core control board, sensor board, camera, SD memory card and battery. The shell is plastic shell, and the small board has only two interfaces: DC5V external power interface and USB interface for data transmission. After the radiation test, it is found that there is about 33MHz harmonic noise radiation problem.

The original test data are as follows:

PCB crystal1

2. Analyze the problem

This product shell structure plastic shell, non-shielding material, the whole test only power cord and USB cable out of the shell, is it the interference frequency point is radiated by the power cord and USB cable? Therefore, the following steps are taken to test:

(1) Add magnetic ring only on the power cord, test results: the improvement is not obvious;

(2) Only add magnetic ring on USB cable, test results: the improvement is still not obvious;

(3) Add magnetic ring to both USB cable and power cord, test results: the improvement is obvious, the overall frequency of interference decreased.

It can be seen from the above that the interference frequency points are brought out from the two interfaces, which is not the problem of the power interface or USB interface, but the internal interference frequency points coupled to the two interfaces. Shielding only one interface cannot solve the problem.

Through near-field measurement, it is found that a 32.768KHz crystal oscillator from the core control board generates strong spatial radiation, which makes the surrounding cables and GND coupled 32.768KHz harmonic noise, which is then coupled and radiated through the interface USB cable and power cord. The crystal oscillator’s problems are caused by the following two problems:

(1) The crystal vibration is too close to the edge of the plate, which is easy to lead to the crystal vibration radiation noise.

(2) There is a signal line under the crystal oscillator, which is easy to lead to the harmonic noise of the signal line coupling crystal oscillator.

(3) The filter element is placed under the crystal oscillator, and the filter capacitor and matching resistance are not arranged according to the signal direction, which makes the filtering effect of the filter element worse.

3, the solution

According to the analysis, the following countermeasures are obtained:

(1) The filter capacitance and matching resistance of the crystal close to the CPU chip are preferentially placed away from the edge of the board;

(2) Remember not to lay ground in the crystal placement area and the projection area below;

(3) The filter capacitance and matching resistance of the crystal are arranged according to the signal direction, and placed neatly and compact near the crystal;

(4) The crystal is placed near the chip, and the line between the two is as short and straight as possible.

4. Conclusion

Nowadays many systems crystal oscillator clock frequency is high, interference harmonic energy is strong; Interference harmonics are not only transmitted from the input and output lines, but also radiated from space. If the layout is not reasonable, it is easy to cause a strong noise radiation problem, and it is difficult to solve by other methods. Therefore, it is very important for the layout of crystal oscillator and CLK signal line in PCB board layout. 

Note on PCB design of crystal oscillator

(1) The coupling capacitor should be as close to the power supply pin of the crystal oscillator as possible. The position should be placed in order: according to the power supply inflow direction, the capacitor with the smallest capacity should be placed in order from the largest to the smallest.

(2) The shell of the crystal oscillator must be grounded, which can radiate the crystal oscillator outwards, and can also shield the interference of external signals on the crystal oscillator.

(3) Do not wire under the crystal oscillator to ensure that the floor is completely covered. At the same time, do not wire within 300mil of the crystal oscillator, so as to prevent the crystal oscillator from interfering with the performance of other wiring, devices and layers.

(4) The line of the clock signal should be as short as possible, the line should be wider, and the balance should be found in the length of the wiring and away from the heat source.

(5) The crystal oscillator should not be placed on the edge of the PCB board, especially in the design of the board card.

PCB crystal2