Get in touch

The Crystal Oscillator Design Basics (1/3)


9 mins read



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.

Figure 1. The frequency versus the temperature for various AT-cut angles [5]



Frequency Stability with Crystal Aging


Quartz crystals also age and this brings frequency shifting as well. Typical aging frequency drift is appr. 1-5 ppm for the first year and gradually drops in the next years.


Crystal Electrical Model


Crystal electrical symbol and model is shown in the figure below.

Figure 2. Crystal electrical symbol and model




R1 is called motional resistance (not equal to ESR, as discussed later) and this represents the circuit losses. C1 is motional capacitance, and this represents the elasticity of the crystal. L1 is motional inductance, and this represents the vibrating mass of the crystal. The typical values of these elements are not available (nor important to the designer).


What is important is the equivalent series resistance (ESR) and its typical values are in the range of 10 – 150 Ohms for MHz-range crystals and 10-150 kilo-Ohms for 32.768 kHz crystals. The relation between ESR and crystal model elements are shown in the equation below.

Figure 3. The relation between ESR and crystal model elements



C0 is called shunt capacitance. This represents the parasitic capacitance in parallel with the crystal, resulting in the capacitor formed by crystal electrodes. Shunt capacitance typical values are in the range of 1-10 pF and vary depending on the crystal size, shape and package. Of course, crystals in larger packages will have smaller shunt capacitance since the electrodes have larger distance in between them. This parameter is typically listed in the crystal datasheet.


CL is the load capacitance that needs to be connected in parallel to the crystal terminals in order to create an oscillator that oscillates with the desired frequency. We’ll discuss this in more detail later.


How do we choose the suitable crystal and design a good oscillator?


Modern digital systems (MCU, RF transceiver ICs and similar) most often use Pierce oscillator topology. Pierce oscillator design is briefly described in STM’s app note 2867 [6], so we will just outline the details important in practice.



Figure 4. Pierce oscillator circuitry [6]



The external part of the oscillator constitutes of the chosen crystal (Q), load capacitors (CL1 and CL2) and drive level limiting resistor (Rext).

Factors that need to be considered during the crystal choice and oscillator design are listed in the following sections.


Crystal nominal frequency


This depends on the actual application and frequencies that need to be achieved. For example, RF applications typically have one specific frequency that needs to be generated from the oscillator. Digital systems (i.e. MCUs) typically have more freedom for the designer in terms of the frequency of choice.


Make sure you consult with the IC datasheet on the suitable choice of frequency.


Crystal load capacitance


This parameter marks the exact amount of capacitance that needs to be placed upon crystal electrodes. In the actual design, this capacitance is made of the load capacitors (CL1 and CL2). In parallel with both CL1 and CL2, there is the parasitic pin capacitance (typically 3-4 pF per pin), so crystal sees the sum of those on each side. Finally, since both of these parallels are connected to the ground, crystal sees the series combination of those on its electrodes. Also, note that this series combination is placed in parallel with the crystal’s shunt capacitance (C0).


This combination of the capacitance needs to be equal to the nominal crystal load capacitance. In practice, the crystals with the lower load capacitance are much easier to start oscillations (require less power from the amplifier) but have much higher pullability.


On the other hand, crystals with the larger rated load capacitance are harder to start the oscillations but have much lower pullability. In summary, crystal pullability is the impact of small variations of the load capacitance seen by the crystal on the oscillation frequency shifting. This is the reason why most ICs have listed desired crystal load capacitance in their datasheet.


Crystal ESR


Depending on the crystal nominal frequency and crystal size, ESR can also vary up to 4 times! Oscillators that utilize crystals with lower ESR have a larger safety factor. Larger safety factor means that oscillator is more likely to remain reliable and able to start oscillations in various ambient conditions (temperature variations, additional dust and similar).


Drive level control


Drive level refers to the amount of the power dissipated in the crystal. For a reliable oscillator design, it is important to have enough of the power from the amplifier to start the oscillations. However, we need to be sure that we can limit the drive level to a safe amount, so we don’t overdrive the crystal. In other words, we need to anticipate an oscillator drive level limiting resistor (marked in the above figure as Rext). Drive level will be discussed in more detail in the next blog.


Crystal package


In the space-constrained applications, the crystal package will often be dictated by the mechanical requirements. We will discuss this topic in more detail in the next blog.




By taking all the above factors for crystal, as well as the oscillator-specific characteristics from the IC datasheet, we can choose the suitable crystal and load capacitors for our oscillator. Besides that, anticipate the drive level limiting resistor and you are good to proceed towards the PCB layout phase.


In our next blog, we will discuss the PCB design of the good oscillator, stay tuned!