Introduction
Every digital system requires a clock signal to run, it’s like the beating heart of a system. To have a clock signal, a system needs to have an oscillator that generates that clock. There are multiple variants of oscillators: various LC-based, RC-based, and quartz crystal-based. Analysis of each of these types is out of the scope of this article.
The purpose of this blog series is to outline the most common types in today’s digital systems, suggest the procedure for the schematic design, PCB layout the validation process of the quartz crystal oscillator.
Digital System Oscillator Types
Today’s modern digital systems (i.e. microcontrollers) typically feature two types of oscillators – internal RC-based and quartz crystal-based oscillators.
Some applications can benefit from a simple internal RC oscillator. This option is convenient because it is cheap, small (no external components required), has a fast startup time and lower power consumption than crystal-based oscillators. It is a very simple plug and play solution. It even starts up together with an MCU, without need for any firmware initialization.
Why would we even want to use the external quartz crystal-based oscillator? Well, I’m glad you asked. Internal RC oscillator has a typical initial accuracy in the range of appr. ±1-2%. But besides the initial accuracy, these oscillators further vary due to voltage and temperature variations. This is all a result of the low Q-factor of the system (oscillator). In contrast, systems that require an accurate and precise clock signal require a high Q-factor component that precisely determines the oscillation frequency.
This is where quartz crystals come into play. Crystal-based oscillators, if designed correctly, have typical accuracy in the range of ±10-50 ppm (depending on the crystal choice, temperature variations and aging).
Why Do We Use Quartz Crystal Oscillators?
Do we need that kind of frequency precision? This depends on the application. This article won’t go into a deep analysis of each application (this may be the focus of the following articles), so we will just outline a few examples.
UART interface is a typical example of an application where communication might fail due to frequency difference between transmitter and receiver. This is an asynchronous communication protocol, which means that the correct interpretation of the message relies on the same baud rate and the same frequency (ideally) of the transmitter and receiver. Synchronization is done at the first signal transition at the beginning of the character sentence. After that, both transmitter and receiver rely on their frequency accuracy to sample the signal state at the right moment.
Another example is the USB high-speed interface, which requires frequency accuracy in the range of ppm (parts per million). This includes initial accuracy, temperature stability, and crystal aging. This kind of precision cannot be achieved with an internal RC oscillator. Also, to comply with IEEE 802.3 standard, each Ethernet node needs to have a frequency accuracy of ±100 ppm. Of course, in any RF application, you need to have the crystal, or you will drift out of the desired frequency band.
What Are Quartz Crystals Anyway?
Quartz crystal is simply a piece of a quartz rock, processed in a way to have a specific resonant frequency. What makes these rocks usable for this application is their piezoelectric feature. The piezoelectric effect is the ability of the material to generate a charge as a response to the applied mechanical stress. Also, the convenient fact is that every material that exhibits the piezoelectric effect also exhibits the converse piezoelectric effect (the applied electric field will generate mechanical stress). Specific crystals are cut in such a way that results in a specific mechanical resonant frequency.
In applications where the oscillator frequency is used as a reference, it is important to pay attention to the crystal choice. Several factors affect accuracy and need to be considered while designing the oscillator. These are listed below.
Initial Frequency Accuracy
Depending on the specific crystal part number, its typical initial frequency accuracy (if designed properly, we’ll discuss this later) will be in the range of ±10-50 ppm. This of course depends on the oscillator design, i.e. choice of loading capacitors (more on this topic later).
Frequency Stability with The Temperature Change
Quartz crystals oscillation frequency varies with the temperature. The rate of variation is dependent on the quartz cut angle. The frequency versus the temperature for various AT-cut angles (in minutes) is represented in the figure below.