Crystals and Oscillators

Every clock needs something that repeats at a steady rate, and something that counts the repeats. In electronics the steady repeater is an oscillator, and in most watches, computers and microcontrollers its rate is set by a sliver of vibrating quartz called a crystal. This article explains how a crystal turns vibration into an electrical signal, why it is far steadier than the coil-and-capacitor circuits of RCL Circuits, how an amplifier keeps it ringing, and how it compares with cheaper timing parts. It then covers the numbers on a crystal, the common types, testing, everyday uses and handling.

About the analogies. Everyday comparisons appear only in shaded "Analogy" boxes, and each says where it stops working.

1. A short recap

2. How electronics keeps time

Anything that repeats regularly can keep time. The time for one repeat, or cycle, is the period, T; the number of cycles per second is the frequency, f, measured in hertz (Hz). They are each other's inverse: f = 1/T.[1] A kilohertz (kHz) is a thousand cycles a second, and a megahertz (MHz) a million.

A mechanical clock counts the swings of a pendulum or balance wheel; some chronometers beat twice a second (2 Hz).[2] An electronic clock counts the cycles of an oscillator: a circuit that produces a repeating signal by itself, from a steady DC supply. The U.S. Navy's training manual describes it as an amplifier that provides its own input through feedback.[3] In a digital circuit the oscillator's output is usually a clock signal, a square wave whose every rising edge steps the circuit forward. A microcontroller's speed, timers and communication rates all come from it.

How good a clock is depends on how steady its oscillator's frequency is. Timing people express the error in parts per million (ppm): 1 ppm of 16 MHz is 16 Hz. A day has 86,400 seconds, so an oscillator off by 1 ppm gains or loses about 0.09 s a day, or about 2.6 s a month (calculated). NIST distinguishes accuracy, closeness to the ideal frequency, from stability, how well the error stays the same over time.[4] Even inexpensive quartz watches usually keep within half a second a day, about 5 ppm.[2]

3. What a crystal is

A quartz crystal, or crystal unit, is a thin slice of quartz with a metal electrode on each face, mounted in a hermetically sealed case with two leads or pads.[5]​[3] Quartz is a hard, common mineral: the second most common on Earth.[2] Synthetic quartz, grown under heat and pressure, had become more common than natural quartz in electronics by 1971, and nearly all quartz oscillators now contain it.[2]​[6]

Each slice is cut at a precise angle to the natural crystal. Its cut, such as X, Y or AT, sets how it vibrates and how much temperature affects it. It is then ground to the thickness that gives the frequency wanted: for a given cut, the thinner the slice, the higher the frequency.[3] The common AT-cut runs from about 600 kHz to 30 MHz; above 30 to 40 MHz the slices become too thin and fragile.[7] On a schematic a crystal is drawn as a thin rectangle between two plates and labeled with the letter Y (Figure 1).

Inside a quartz crystal Three panels. (a) A cutaway of a common through-hole crystal case: a sealed metal can holds a thin round quartz disc with a metal electrode on each face. Springy clips hold the disc by its edge and connect the electrodes to two leads. (b) A watch crystal: a small sealed tube holds a quartz tuning fork a few millimeters long; arrows show its two prongs flexing apart and together. (c) The schematic symbol: a thin rectangle between two plates, labeled Y1, 16.000 megahertz. (a) MHz crystal (HC-49/US case) sealed metal can thin quartz disc metal electrode,one on each face springy clips holdthe disc by its edge two leads (b) watch crystal (tuning fork) the two prongs flexapart and together quartz fork, a fewmillimeters long sealed tube (c) symbol Y1 16.000 MHz
Figure 1. (a) A common through-hole crystal case cut open: a thin quartz disc with an electrode on each face, held by springy clips inside a sealed metal can. (b) A watch crystal: a tiny quartz tuning fork in a sealed tube. (c) The schematic symbol. Simplified; not to scale. Construction after IQD and Microchip AN2648.

4. The physics: piezoelectricity and resonance

The piezoelectric effect

In 1880 the brothers Pierre and Jacques Curie found that certain crystals produce electric charges on their faces when squeezed. The charge is proportional to the pressure and disappears when the pressure is released. This is the piezoelectric effect, from the Greek for "press". In 1881 the Curies demonstrated the inverse effect: apply a voltage and the crystal changes shape (Figure 2).[2] Reverse the voltage and the strain reverses.[6] Quartz shows the effect less strongly than Rochelle salt, but it is used for timing because it is mechanically much stronger.[3]

The piezoelectric effect Three panels. 1: A block of quartz is squeezed by arrows from above and below; plus charges appear on its top face and minus charges on its bottom face, and a voltmeter connected across it reads a voltage. 2: A battery is connected across a block; a dashed outline shows its shape with no voltage, and the block is drawn narrower and taller, changed in shape. 3: An alternating-voltage source drives a block; two outlines, one wide and short and one narrow and tall, show it swinging back and forth between the shapes: at its natural frequency the vibration is strong and steady. 1. Squeeze it: a voltage appears (direct piezoelectric effect) + − + − + − + − + − V force 2. Voltage in: it changes shape (inverse piezoelectric effect) + dashed: shape with no voltage 3. AC at its natural frequency: strong, steady vibration (resonance) it swings between the two outlines
Figure 2. The piezoelectric effect. 1: squeezing a piezoelectric crystal produces a voltage across it. 2: applying a voltage changes its shape. 3: an alternating voltage at the crystal's natural frequency makes it vibrate strongly. Shape changes greatly exaggerated; real ones are far too small to see.

Mechanical resonance

Every solid object has a natural frequency: the rate at which it vibrates by itself when struck. It depends on the object's shape, size, elasticity and the speed of sound in its material.[8]​[9] Pushing an object at its natural frequency builds up a large vibration; pushing faster or slower has much less effect. That is resonance.[9]

A crystal combines the two ideas. An alternating voltage on its electrodes squeezes and stretches the quartz through the inverse effect. If the voltage's frequency matches the slice's natural frequency, the quartz vibrates strongly, and the direct effect turns that vibration back into a voltage on the same electrodes. Seen from its pins, it behaves like an electrical resonant circuit.[7]​[3]

Analogy: a bell. Strike a bell and it rings at its own note, whatever hit it. A quartz slice "rings" at its own frequency in the same way, and its very low losses let it ring for a long time.

Where it breaks down: A bell is struck once and fades; an oscillator pushes the crystal electrically on every cycle and senses its "note" electrically. The vibration is far too small and too fast to see or hear.

The crystal as an RCL circuit

Engineers describe a crystal near its resonance with an equivalent circuit: electrical parts that behave the same way, though the crystal contains no coil and no capacitor (Figure 3).[7] A series chain, called the motional arm, models the vibrating quartz:[8]​[7]

In parallel with the motional arm sits C0, the shunt capacitance: an ordinary capacitance of a few picofarads between the two electrodes and the case.[7]​[8] Microchip's example 8 MHz crystal has L1 = 22 mH, C1 = 0.018 pF, R1 = 30 Ω and C0 = 4.5 pF; this article uses it throughout.[7]

Equivalent circuit of a quartz crystal Between two pins, two branches in parallel. The upper branch, labeled motional arm, the vibrating quartz as an electrical model, is a series chain: L1, 22 millihenries, the moving mass; C1, 0.018 picofarads, the springiness; and R1, 30 ohms, the losses or friction. The lower branch is C0, 4.5 picofarads: the electrodes and case, an ordinary capacitor. motional arm: the vibrating quartz, as an electrical model pin 1 pin 2 L1 = 22 mH moving mass C1 = 0.018 pF springiness R1 = 30 Ω losses (friction) C0 = 4.5 pF the electrodes and case: an ordinary capacitor
Figure 3. The equivalent circuit of a quartz crystal near its resonance. The motional arm (L1, C1, R1 in series) represents the vibrating quartz; C0 is the capacitance of the electrodes and case. Values are Microchip AN826's example 8 MHz crystal.

5. Series and parallel resonance, and Q

The motional arm is a series RCL circuit, so it has a series resonance exactly like the one in RCL Circuits. At the series resonant frequency, fs, the reactances of L1 and C1 cancel, the crystal's impedance is at its lowest, and the crystal looks like a plain resistance close to R1:[7]

fs = 1 / (2π√(L1C1))

Slightly higher, the motional arm acts as an inductor and resonates with C0 like a tank circuit. This parallel or anti-resonant frequency, fa, is where the impedance is highest.[7]​[3] For the example crystal, fs = 7,997,837 Hz and fa = 8,013,817 Hz: only 0.2% apart.[7] Below fs and above fa the crystal acts as a capacitor; in the narrow band between them it acts as an inductor (Figure 4).[7]​[3]

Reactance of a quartz crystal near resonance Graph of reactance in kilohms, from minus 15 to plus 15, against frequency from 7.99 to 8.026 megahertz, for the example crystal. Far from resonance the reactance sits near minus 4.4 kilohms: capacitive. Rising with frequency, it crosses zero at the series resonance, fs, 7.9978 megahertz, then climbs steeply and runs off the top of the graph just below the parallel resonance, fa, 8.0138 megahertz. It returns from the bottom of the graph just above fa and settles back toward minus 4.4 kilohms. The narrow band between fs and fa, where the reactance is positive, is shaded and labeled inductive. −15 −10 −5 +5 +10 +15 0 7.99 8.00 8.01 8.02 frequency (MHz) reactance X (kΩ) fs = 7.9978 MHz fa = 8.0138 MHz inductive(X above 0) capacitive(X below 0) capacitiveagain
Figure 4. Reactance of the example crystal near 8 MHz, calculated from its equivalent circuit. The reactance passes through zero at the series resonance fs and shoots off the scale at the parallel resonance fa. Between them (shaded) the crystal is inductive; everywhere else it is capacitive. After Microchip AN826, Figure 10.

A very high Q

As in EL-11, Q is the reactance at resonance divided by the resistance, Q = XL1/R1.[7] For the example crystal, XL1 at 8 MHz is 2π × 8 MHz × 22 mH, about 1.1 MΩ, so Q ≈ 1.1 MΩ / 30 Ω ≈ 37,000 (calculated). The worked example in EL-11 had a Q of 10. Quartz crystals typically reach Q values of tens of thousands to hundreds of thousands, against perhaps 100 to 200 for a good coil-and-capacitor circuit.[7]​[8]​[6]

The bandwidth, the frequency divided by Q, shows what this means. The example crystal's resonance is only about 8 MHz / 37,000 ≈ 217 Hz wide, about 27 ppm (calculated); a Q-of-200 circuit at the same frequency would be about 40 kHz wide (calculated; Figure 5).[7]

How sharp a crystal resonance is Two graphs of response as a percentage of its peak against how far the frequency is from resonance. Left, within plus or minus 1 percent: the coil-and-capacitor circuit with a Q of 200 makes a smooth hump about 0.5 percent wide at the 70.7 percent line, while the quartz crystal with a Q of about 37,000 is a single vertical line at the center, too narrow to see. Right, zoomed in to plus or minus 60 parts per million: the coil-and-capacitor curve is almost flat at the top of the graph, while the crystal now shows a clear peak whose width at 70.7 percent is about 27 parts per million, 217 hertz at 8 megahertz. −1% −0.5% 0 +0.5% +1% Within ±1% of resonance 0% 50% 100% response (% of peak) −60 −30 0 +30 +60 ppm Zoomed in: within ±60 ppm bandwidthabout 27 ppm(217 Hz) 70.7% quartz crystal, Q about 37,000 (the example crystal, calculated) good coil-and-capacitor tuned circuit, Q = 200
Figure 5. How sharp a crystal's resonance is. Left: within ±1% of resonance, a good coil-and-capacitor circuit (Q = 200) makes a broad hump, while the crystal (Q ≈ 37,000) is a single thin line. Right: zoomed in to ±60 ppm, the crystal's peak becomes visible, about 27 ppm wide at the 70.7% line. Curves calculated from the standard resonance formula.

This sharpness is why crystals keep time so well. Near resonance the crystal's reactance changes so steeply with frequency that the rest of the oscillator circuit can barely move the frequency, even as temperature or supply voltage changes.[7]​[3] The flip side is that a crystal can be tuned, or pulled, only a tiny amount.[7]

A slice can also vibrate at odd multiples of its basic frequency, called overtones. Crystals for frequencies above about 30 MHz often use them; ninth-overtone crystals reach about 200 MHz. The basic mode is the fundamental.[7]

6. Load capacitance

Most microcontroller oscillators run a crystal in the inductive band between fs and fa, with capacitors across it. Where it settles in that band depends on the total capacitance the circuit places across the crystal's pins, the load capacitance, CL.[7]​[8] So a crystal's marked frequency is only true with the right load. A crystal sold as parallel-resonant is specified with a CL, typically 12 to 32 pF, and is trimmed to give its marked frequency, roughly 100 ppm above fs, with that load. A series-resonant crystal is meant for circuits that run it at fs. The two are built exactly alike; only the trimming differs.[7]

Change the load and the frequency moves: more capacitance lowers it, less raises it (Figure 8, below).[8] Microchip gives the sensitivity as C1 × 106 / (2(C0 + CL)2) ppm per picofarad.[7] For the example crystal with a 13 pF load, that is about 29 ppm for every picofarad (calculated). Stray capacitance on a circuit board can therefore pull a crystal measurably off frequency.[7]

Choosing the two capacitors

In the usual circuit (section 7) the crystal has a capacitor from each pin to ground. Call them CA and CB; datasheets often call them C1 and C2, not to be confused with the motional C1. Seen from the crystal they are in series (recap), plus the board's stray capacitance CS, usually 2 to 5 pF:[7]

CL = CACB / (CA + CB) + CS

Worked example (calculated). A crystal specified for CL = 16 pF, on a board with about 5 pF of stray capacitance, needs the two capacitors in series to make 11 pF. Two equal capacitors in series give half their value, so CA = CB = 22 pF. That sits within the 12 to 22 pF range the ATmega328P datasheet suggests for crystals, with the two always equal.[10] Use stable C0G (NP0) ceramic capacitors (recap).[7] Larger values make the frequency steadier but reduce the loop gain and can stop the oscillator starting.[7]

7. Oscillators: making a clock

An oscillator needs three things: amplification, to make up for losses; regenerative (positive) feedback, a path that returns part of the output to the input in step with it; and a frequency-determining device, a filter that allows only the wanted frequency through.[3] Two conditions, the Barkhausen criteria, must hold at that frequency. The total phase shift around the loop must be 360°, so the returning signal lines up with itself. And the loop gain, how much a signal grows on one trip around, must be above 1 to start and settle at exactly 1 while running.[7]​[8]

How an oscillator starts Left: a block diagram of a loop. An amplifier, drawn as a triangle, sends its output around through a box labeled crystal, passes only f0, and the box feeds back to the amplifier input. Notes: at start-up the loop gain is above 1; running, the loop gain is exactly 1 and the total phase shift is 360 degrees. Right: the output against time. It begins as tiny noise, then a sine wave at the crystal frequency grows larger each cycle, and finally levels off at a steady amplitude. For a megahertz crystal this takes milliseconds. The loop amplifier crystal passes only f0 feedback output Start-up: loop gain above 1 Running: loop gain exactly 1, total phase shift 360° Start-up noise(tiny) grows each cycle steady amplitude time: milliseconds for a MHz crystal
Figure 6. Left: an oscillator is an amplifier whose output returns to its input through a filter, here the crystal. Right: at power-on the amplifier boosts electrical noise; the crystal passes back only its own frequency, which grows each trip around the loop until the amplifier's limits hold the loop gain at exactly 1. Illustrative waveform.

Nobody has to "start" an oscillator. At power-on the amplifier amplifies random electrical noise; the crystal feeds back only its own frequency, which grows on every trip until the amplifier's limits hold the loop gain at exactly 1 (Figure 6).[8]​[7] This takes time. High-Q crystals start more slowly than low-Q resonators; high resistance and high load capacitance slow them further.[8] The RP2040 microcontroller allows about 1 ms for its 12 MHz crystal.[11] The ATmega328P recommends waiting 32K clock cycles (32,768) for a 32.768 kHz crystal: one second (calculated).[10]

Analogy: pushing a swing. A swing has its own rhythm. Small pushes at that rhythm, timed with the motion, replace what friction takes and keep it going. Pushes at any other rhythm do little (OpenStax uses the same example).[9]

Where it breaks down: You watch the swing and choose when to push. The amplifier chooses nothing: it simply amplifies whatever comes back to it, and only the crystal's own frequency survives the trip with the right phase. The "push" is also continuous, not a shove once a cycle.

The Pierce oscillator

The circuit inside nearly every microcontroller is the Pierce oscillator (Figure 7), after George W. Pierce. In the 1920s Walter Cady built the first quartz oscillator, and Pierce made its use practical with a simpler, reliable circuit that remains the most common one today.[2] It has five parts:[12]​[8]

Pierce crystal oscillator Schematic. A dashed box marks the inside of the microcontroller. In it, an inverting amplifier, a triangle with a small circle at its output, has a feedback resistor RF of 1 to 10 megohms connected from its output back to its input to bias it. Its input goes to pin XTAL1 and its output to pin XTAL2; a second triangle buffers the output into the clock signal, a square wave. Outside the chip, crystal Y1, 16 megahertz with a load capacitance of 16 picofarads, connects between XTAL1 and XTAL2, with a series resistor RS of about 1 kilohm on the XTAL2 side. Capacitor CA, 22 picofarads, runs from the XTAL1 side of the crystal to ground and CB, 22 picofarads, from the XTAL2 side to ground. A note: phase shift around the loop is 180 degrees in the inverter plus 180 degrees in Y1 with CA and CB, 360 degrees in total. inside the microcontroller RF, 1 to 10 MΩ (bias) clock signal (square wave) inverting amplifier XTAL1 XTAL2 RS, about 1 kΩ Y1: 16 MHz, CL = 16 pF CA = 22 pF CB = 22 pF Phase shift around the loop: inverter: 180° Y1 with CA and CB: 180° total: 360°
Figure 7. A Pierce crystal oscillator. Inside the microcontroller: an inverting amplifier biased by RF, between pins XTAL1 and XTAL2, followed by a buffer that delivers the clock. Outside: the crystal, its two load capacitors, and an optional RS. Values from the worked example in section 6; circuit after TI SZZA043 and Microchip AN2648.

In an ATmega328P, pins XTAL1 and XTAL2 are the input and output of exactly such an inverting amplifier, built in; you add the crystal and two capacitors.[10] The waveform at the crystal is a sine wave. The chip squares it up into its clock,[8] and may then multiply it. The RP2040, for example, uses circuits called PLLs (phase-locked loops) to turn its 12 MHz crystal into 48 MHz for USB and up to 133 MHz for its processors, all as accurate as the crystal.[11]

How it behaves in a circuit

Frequency against load capacitance Graph of the frequency change in parts per million, compared with a load capacitance of 13 picofarads, against load capacitance from 5 to 35 picofarads, for the example crystal. The curve falls steeply at first and then more gently: plus about 430 parts per million at 5 picofarads, zero at the specified 13 picofarads, marked with a dot, and about minus 290 at 35 picofarads. Near 13 picofarads each extra picofarad lowers the frequency by about 29 parts per million. Less capacitance gives a higher frequency; more gives a lower one. −300 −200 −100 0 +100 +200 +300 +400 5 10 15 20 25 30 35 load capacitance CL (pF) frequency change (ppm), compared with CL = 13 pF specified CL = 13 pF:about −29 ppm for each extra pF less capacitance: higher frequency more capacitance: lower frequency
Figure 8. Frequency against load capacitance for the example crystal, relative to its specified 13 pF load. Near 13 pF each extra picofarad lowers the frequency by about 29 ppm. Calculated from Microchip AN826's pulling formula and example values.

8. For comparison: RC oscillators and ceramic resonators

RC oscillators

An RC oscillator sets its frequency with resistors and capacitors instead of a resonator. Some produce sine waves; others, called relaxation oscillators, repeatedly charge and discharge a capacitor through a resistor.[3] The 555 timer is one. They are cheap, but only as accurate as their resistors and capacitors. The NE555's timing also drifts typically 150 ppm for every degree Celsius in astable mode,[14] so 20 °C of warming moves it about 0.3% (calculated).

Most microcontrollers contain an RC oscillator so they can run with no external parts:

Ceramic resonators

A ceramic resonator works like a crystal but vibrates a piezoelectric ceramic instead of quartz. Its Q is lower, and it is more sensitive to the load capacitance.[8] In return it is cheap, rugged and small, and it starts faster than a quartz crystal. Many types build the two load capacitors in and have three pins: the two ends and ground.[15] A typical series is accurate to ±0.5% at 25 °C, varies ±0.3% over −20 to +80 °C, and ages up to ±0.3% in ten years.[15] The ATmega328P's oscillator accepts either a crystal or a ceramic resonator; for a resonator, use the capacitor values its maker gives.[10]

That is roughly a hundred times worse than a crystal: fine for blinking lights or reading buttons, but not for keeping the time of day (Figure 9).

Frequency accuracy of common timing sources Horizontal bar chart on a logarithmic scale from 1 to 100,000 parts per million. From longest bar to shortest: internal RC oscillator, factory calibrated, plus or minus 10 percent, 100,000 parts per million, about 2.4 hours a day; internal RC oscillator, user calibrated, plus or minus 1 percent, about 14 minutes a day; ceramic resonator at 25 degrees, plus or minus 0.5 percent, 5,000 parts per million, about 7 minutes a day; crystal oscillator module with everything included, plus or minus 50 parts per million, about 4.3 seconds a day; watch crystal at 25 degrees, plus or minus 20 parts per million, about 1.7 seconds a day; TCXO from minus 40 to plus 85 degrees, plus or minus 2.5 parts per million, about 0.2 seconds a day. Worst-case frequency error (logarithmic scale: each step is ten times more) Internal RC oscillator, factory calibrated ±10% = ±100,000 ppm, about 2.4 hours a day Internal RC oscillator, user calibrated ±1% = ±10,000 ppm, about 14 minutes a day Ceramic resonator, at 25°C ±0.5% = ±5,000 ppm, about 7 minutes a day Crystal oscillator module, everything included ±50 ppm, about 4.3 seconds a day Watch crystal, at 25°C ±20 ppm, about 1.7 seconds a day TCXO, −40 to +85°C ±2.5 ppm, about 0.2 seconds a day 1 10 100 1,000 10,000 100,000 ppm (parts per million)
Figure 9. Worst-case frequency error of some common timing sources, on a logarithmic scale, with the equivalent clock error per day (calculated: 1 ppm is about 0.09 s a day). Orange bars: RC oscillators and ceramic resonators; teal bars: quartz. Values from the ATmega328P data sheet (RC), Token ZTT (ceramic), ECS-2520MV (crystal oscillator module), ECS ECX-12 (watch crystal) and ECS-TXO-2520 (TCXO).

9. Units and markings

The frequency is stamped on the package.[7] Other numbers come from the datasheet, and the part number often encodes them. In ECS's numbering, for example, ECS-200-20-4X is a 20.000 MHz crystal for a 20 pF load in a low-profile HC-49/US case, and ECS-.327-12.5-12-TR is a 32.768 kHz crystal for 12.5 pF in the ECX-12 package.[16]​[13]

The numbers on a crystal datasheet
QuantityWhat it meansMHz crystal (ECS HC-49USX)Watch crystal (ECS ECX-12)
FrequencyThe marked frequency, with the specified load3.57 to 70 MHz32.768 kHz
Frequency toleranceHow far it may be from the marked frequency at 25 °C±30 ppm±20 ppm
Frequency stabilityExtra change over the temperature range±50 ppm, −10 to +70 °C−0.03 ppm/°C2 around 25 °C (section 10)
Load capacitance, CLThe load it was trimmed for (section 6)10 to 20 pF, or series12.5 pF (others available)
ESRResistance at resonance; lower starts more easily40 Ω max at 13 to 20 MHz90 kΩ max
Shunt capacitance, C0Capacitance of electrodes and case7 pF max1.3 pF
Drive levelPower the crystal may dissipate500 µW max0.5 µW max
AgingSlow drift with time, first year±5 ppm±3 ppm

Values from the ECS data sheets.[16]​[13]

Tolerance and temperature stability add up, and aging adds more. For a microcontroller, 50 to 100 ppm is usually fine;[7] for a clock, 50 ppm is about 4 s a day (calculated).

10. Common types

The 32.768 kHz watch crystal

Almost every quartz watch, and most real-time clock circuits, use a 32.768 kHz crystal shaped like a tiny tuning fork.[4]​[8]​[13] The odd number is a power of two: 32,768 = 215. A binary divider, a chain of stages that each halve the frequency, needs only 15 stages to turn it into exactly one pulse per second, which steps the motor that moves the second hand (Figure 10; see stepper motors).[2] By 1972 Girard-Perregaux's GP350 watch movement ran at 32,768 Hz with a 15-stage low-power CMOS divider, and that frequency became the industry standard.[2] Small size and low power made it the choice.[4]

The 32.768 kHz watch crystal Top: a block labeled crystal oscillator, 32,768 hertz, feeds a chain of fifteen boxes each labeled divide by 2. Labels under the chain show 16,384 hertz after the first, 1,024 after the fifth, 32 after the tenth and 1 hertz after the fifteenth; an arrow notes that one pulse a second steps the motor that moves the second hand. Bottom: a graph of frequency change in parts per million against temperature from minus 40 to plus 85 degrees Celsius. The curve is an upside-down parabola with its peak, 0 parts per million, at 25 degrees: about minus 21 at 0 degrees, about minus 144 at minus 40 degrees and about minus 122 at 85 degrees. Fifteen halvings turn 32,768 Hz into one pulse per second (2¹⁵ = 32,768) crystal oscillator 32,768 Hz ÷2 16,384 ÷2 ÷2 ÷2 ÷2 1,024 ÷2 ÷2 ÷2 ÷2 ÷2 32 ÷2 ÷2 ÷2 ÷2 ÷2 1 Hz one pulse a second steps the motor that moves the second hand A tuning-fork crystal runs fastest near 25°C and slows on either side 0 −50 −100 −150 −40 −20 0 25 40 60 85 temperature (°C) ppm turnover, 25°C: 0 ppm 0°C: about −21 ppm −40°C: about −144 ppm
Figure 10. Top: fifteen divide-by-two stages turn 32,768 Hz into one pulse per second. Bottom: frequency change of a tuning-fork crystal with temperature, using a typical coefficient of −0.034 ppm/°C2 and a turnover at 25 °C (calculated; actual coefficients are −0.02 to −0.04).

A tuning-fork crystal runs fastest at its turnover temperature, usually about 25 °C, and slows on either side along a parabola:[8]

f = f0(1 + B(T − T0)2)

where B is a small negative number: −0.02 to −0.04 ppm/°C2 for the ECX-12.[13] At 0 °C, 25 degrees from turnover, a typical crystal runs about 0.034 × 252 ≈ 21 ppm slow, losing nearly 2 s a day (calculated). A watch sits on a warm wrist, so watch crystals usually turn over at 25 to 28 °C.[4]

MHz crystals

Microcontrollers, USB chips and radios use AT-cut crystals from a few MHz to a few tens of MHz,[7] in through-hole HC-49/US cases or small surface-mount packages. Their ESR is tens of ohms, against tens of kilohms for a watch crystal, and they tolerate hundreds of times more drive; frequencies above about 27 MHz in the HC-49USX range use the third overtone.[16]​[13]

Crystal oscillator modules

A crystal oscillator module (often called an XO) puts the crystal and the whole oscillator circuit in one sealed package. It needs only power and ground, and delivers a ready-made square-wave clock. ECS's ECS-2520MV, for example, measures 2.5 × 2.0 mm, runs from 1.6 to 3.6 V, and holds ±50 ppm including temperature, supply, load and aging. Its four pads are power, ground, output, and an enable pin that can switch the output off.[17] There is no load capacitance to get right, but it draws a few milliamps.[17]

Better modules correct for temperature. A TCXO (temperature-compensated crystal oscillator) measures its temperature and adjusts its frequency by an equal and opposite amount.[18] The ECS-TXO-2520 holds ±2.5 ppm from −40 to +85 °C.[19] An OCXO (oven-controlled crystal oscillator) keeps the crystal in a small heated chamber at a constant temperature, and is the most stable kind of quartz oscillator.[2]

11. Testing

12. Everyday uses

13. Safety and handling

Crystals work at a few volts and microwatts, so the risks are to the crystal, not to you:

The whole story in brief

Looking back over the whole Learn path

This article completes the Learn path. Articles 1 and 2 began with electrons and the materials that carry or block them. Articles 3 to 8 introduced the basic parts: resistors, capacitors, coils, diodes, transistors and transformers. Articles 9, 10 and 11 combined them into DC, AC and resonant circuits. Articles 12 to 20 covered practical components: switches and relays, batteries, LEDs and optoelectronics, voltage regulators, integrated circuits, circuit protection, sensors, sound transducers and motors. This one closed the loop by returning to resonance, the idea from article 11, in the part that gives almost every digital circuit its heartbeat. To put these parts to work together, continue to the Microcontrollers pages.

Sources

All links were checked in October 2026. External links open in a new tab.

  1. OpenStax, College Physics 2e, section 16.2, "Period and Frequency in Oscillations": https://openstax.org/books/college-physics-2e/pages/16-2-period-and-frequency-in-oscillations
  2. Michael A. Lombardi (NIST), "The Evolution of Time Measurement, Part 2: Quartz Clocks", IEEE Instrumentation & Measurement Magazine, October 2011 (PDF): https://tf.nist.gov/general/pdf/2534.pdf
  3. U.S. Navy, NEETS Module 9: Introduction to Wave-Generation and Wave-Shaping, chapter 2, "Oscillators" (PDF): https://legacy.maritime.org/doc/neets/mod09.pdf
  4. Michael Lombardi (NIST), "The Accuracy and Stability of Quartz Watches", Horological Journal, February 2008 (PDF): https://tf.nist.gov/general/pdf/2276.pdf
  5. IQD Frequency Products, "Crystal Handling Precautions" application note (PDF): https://www.iqdfrequencyproducts.com/files/pdf1/iqd-app-note---crystal-handling-precautions-v2.pdf
  6. NIST Time and Frequency Division, "Time and Frequency from A to Z, Q to Ra", entry "Quartz Oscillator": https://www.nist.gov/pml/time-and-frequency-division/popular-links/time-frequency-z/time-and-frequency-z-q-ra
  7. Steven Bible, Microchip Technology, AN826 "Crystal Oscillator Basics and Crystal Selection for rfPIC and PICmicro Devices" (DS00826A, 2002, PDF): https://ww1.microchip.com/downloads/en/AppNotes/00826a.pdf
  8. Torbjørn Kjørlaug and Amund Aune, Microchip Technology, AN2648 "Selecting and Testing 32.768 kHz Crystal Oscillators for AVR Microcontrollers" (DS00002648D, 2022, PDF): https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ApplicationNotes/ApplicationNotes/AN2648-Selecting_Testing-32KHz-Crystal-Osc-for-AVR-MCUs-00002648.pdf
  9. OpenStax, College Physics 2e, section 16.8, "Forced Oscillations and Resonance": https://openstax.org/books/college-physics-2e/pages/16-8-forced-oscillations-and-resonance
  10. Microchip Technology, ATmega48A/PA/88A/PA/168A/PA/328/P data sheet (DS40002061B, 2020), chapter 9, "System Clock and Clock Options", and section 29.4, "Clock Characteristics" (PDF): https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061B.pdf
  11. Raspberry Pi Ltd, RP2040 Datasheet, sections 2.16, "Crystal Oscillator (XOSC)", and 2.17, "Ring Oscillator (ROSC)" (PDF): https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf
  12. Moshiul Haque and Ernest Cox, Texas Instruments, "Use of the CMOS Unbuffered Inverter in Oscillator Circuits" (SZZA043, January 2004, PDF): https://www.ti.com/lit/an/szza043/szza043.pdf
  13. ECS Inc. International, ECX-12 32.768 kHz SMD Tuning Fork Crystal data sheet (PDF): https://ecsxtal.com/store/pdf/ECX-12.pdf
  14. Texas Instruments, NA555, NE555, SA555, SE555 xx555 Precision Timers data sheet (SLFS022K, revised March 2026, PDF): https://www.ti.com/lit/ds/symlink/ne555.pdf
  15. Token Electronics, "(ZTT) Ceramic Resonators" data sheet (December 2022, PDF): https://token.com.tw/pdf/resonator/ceramic-resonator-ztt.pdf
  16. ECS Inc. International, HC-49USX Quartz Crystal data sheet (PDF): https://ecsxtal.com/store/pdf/hc-49usx.pdf
  17. ECS Inc. International, ECS-2520MV SMD MultiVolt Crystal Oscillator data sheet (PDF): https://ecsxtal.com/store/pdf/ECS-2520MV.pdf
  18. NIST Time and Frequency Division, "Time and Frequency from A to Z, T to Te", entry "TCXO": https://www.nist.gov/pml/time-and-frequency-division/popular-links/time-frequency-z/time-and-frequency-z-t-te
  19. ECS Inc. International, ECS-TXO-2520 SMD HCMOS TCXO data sheet (PDF): https://ecsxtal.com/store/pdf/ECS-TXO-2520.pdf
  20. Jauch Quartz GmbH, "Handling Notes for Quartz Crystals" (February 2019, PDF): https://www.jauch.com/downloadfile/5804d1605949f_9d6bcce5aa3b443c1079/quartz_crystals_handling_notes_02-2019.pdf