How capacitors and resistors work with crystal oscillators

  • Relationship between crystal oscillator and capacitor

As we all know, the basic function of capacitor is to store charge and realize the charging and discharging process. In the crystal oscillator circuit, there is a close interaction between the load capacitor and the crystal oscillator.

The matching capacitor of the crystal oscillator can be simply called "load capacitor". Imagine that this load capacitor is like a little assistant of the crystal oscillator, helping the crystal oscillator to start working.

The crystal oscillator is like a person who needs a partner to dance, and this partner is the load capacitor. The crystal oscillator has two wires, which will be connected to the IC block (an integrated circuit block), where there are some effective capacitors. In order for the crystal oscillator to work properly, we need to connect another capacitor outside the crystal oscillator, which is the load capacitor.

The role of the load capacitor is very important. It is like a bridge that connects the distributed capacitance between the crystal oscillator and the circuit. Only when this bridge makes the capacitance at both ends of the crystal oscillator equal to the load capacitance, the crystal oscillator can start working. This "starting to work" process can be imagined as the crystal oscillator is charging, and then it starts to dance-that is, oscillation.

Tips: If engineers are purchasing crystal oscillators, it is best to explain important parameters such as the required load capacitance to the purchaser, so that the purchaser will reduce many selection detours during the crystal oscillator selection process. If the load of the crystal oscillator cannot be confirmed, the capacitance is difficult to match, the starting capacitance cannot be charged and discharged, and the crystal oscillator cannot start; when the distributed capacitance is equal to the crystal oscillator capacitance value, the crystal oscillator can emit a resonant frequency. The size of the capacitance can affect the stability and phase of the crystal oscillator frequency. The smaller the capacitance, the higher the price. Therefore, this load also determines the price of the crystal oscillator itself.


  • Relationship between crystal oscillators and resistors

1. Cooperate with the internal circuit of the IC to form negative feedback and phase shift, so that the amplifier works in the linear region. The role of the resistor connected to the input and output of the crystal oscillator is to generate negative feedback to ensure that the amplifier works in the high-gain linear region. At the same time, it plays a role in current limiting to prevent the inverter output from overdriving the crystal oscillator and damaging the crystal oscillator.

Imagine that you have an amplifier, and its function is to increase the sound or signal. However, if the sound or signal becomes too loud, it will be distorted, just like when you shout loudly, the sound will become harsh. To solve this problem, we add a "little helper" to the amplifier - a resistor.

This resistor can help us adjust the degree of amplification to ensure that the signal is amplified without distortion. At the same time, this resistor can prevent the amplifier from overworking, thereby protecting it from damage. However, it is not enough to amplify the signal, we also need to let the signal swing back and forth like a pendulum so that oscillation can be generated. And this resistor can help the amplifier work in the "linear region", which is like the "comfort zone" where the amplifier is most suitable for working. Here, the amplifier can stably amplify the signal and generate the oscillation we need.

For different types of amplifiers (such as CMOS and TTL), the resistance value of this "little helper" may be different. CMOS amplifiers usually require a larger resistor (such as more than 1M), while TTL amplifiers may need to be adjusted according to their type. However, some special amplifiers (such as amplifiers in some microprocessors) already have this "little helper" inside, so we don't need to add it extra.

2. The resistor in series with the crystal oscillator is often used to prevent the crystal oscillator from being overdriven;

Specifically, the electroplating on the crystal oscillator will gradually wear out due to excessive force, which will cause the frequency of the crystal oscillator to become higher, just like the machine is running too fast. If the crystal oscillator is overdriven, this excessive force will also cause the crystal oscillator to break down prematurely, just like the machine is scrapped prematurely due to overuse.

To avoid this situation, we need to adjust something called "drive level", that is, the drive level. This drive level is like the amount of force given to the crystal oscillator. We have to find a suitable force that can make the crystal oscillator work normally without causing it to be damaged.

At the same time, we also need to consider the "oscillation margin", which is like leaving a little "spare power" for the crystal oscillator. In this way, even in some special cases, the crystal oscillator can maintain a stable working state.

3. Parallel connection reduces the resonant impedance and makes the resonator easy to start;

Imagine that there is a small device called "Schmitt inverter" hidden in Xin (input end) and Xout (output end). This little device has a feature that it cannot start the crystal oscillation by itself, just like a child cannot push a large tire to roll by himself.

To solve this problem, we added a resistor at both ends of the inverter. This resistor is like an "assistant". It can help the inverter to reverse the output signal (that is, flip 180 degrees) and then send it back to the input. In this way, a feedback loop is formed.

Then, we connect the crystal in parallel with this resistor. The crystal and the resistor are like two little friends. They work together to reduce the impedance of the resonance, just like adding some lubricant to the tire to make it easier to roll. In this way, the resonator is easier to start.

Moreover, this resistor has another advantage, which is that it can make the AC equivalent of the feedback loop resonate according to the frequency of the crystal. Because the quality factor (Q value) of the crystal is very high, even if the value of the resistor changes in a large range, it will not affect the output frequency, just like adding a stable "power source" to the tire, allowing it to maintain a stable rolling speed.