GlossaryCrystal oscillator
Crystal oscillator
A crystal oscillator is a circuit that uses a vibrating quartz crystal to generate a stable clock frequency. It provides the timing reference for microcontrollers, processors, radios and communication interfaces on almost every board.
How it works
Quartz is piezoelectric: a voltage across it makes it flex, and flexing it produces a voltage. A small quartz blank cut to a precise size and angle has a sharp mechanical resonance. Placed in the feedback path of an amplifier, the crystal passes energy only near that resonance, so the circuit oscillates at the crystal's frequency.
On many boards, the MCU contains the amplifier and the designer adds a crystal and two load capacitors, forming a Pierce oscillator. The load capacitance on the crystal's datasheet must match the total capacitance the circuit presents, including pins and traces, or the frequency shifts. Complete oscillator modules package crystal and circuit together and output a ready clock. Temperature-compensated (TCXO) and oven-controlled (OCXO) versions hold frequency much tighter across temperature for GNSS and radio use.
Frequency stability is specified in parts per million, covering initial tolerance, drift over temperature and aging over the years of service.
Crystal oscillator vs internal RC oscillator
Most MCUs include an internal RC oscillator that needs no external parts and starts almost instantly, but its frequency drifts with temperature and voltage. A crystal is far more accurate and stable, which UART baud rates, USB, CAN bit timing, radios and timekeeping depend on. Many designs boot on the RC oscillator and switch to the crystal once it has started and settled.
Why it matters
A clock that fails to start, or starts slowly when cold, stops the whole board. Clock faults are a classic bring-up problem: wrong load capacitors, too little gain margin, long traces or flux residue near the crystal can leave a board that works on the bench and fails in the field.
How to get it right
- Calculate load capacitors from the crystal's specified load capacitance and an estimate of stray capacitance.
- Check that the oscillator has enough gain margin for the crystal's series resistance.
- Place the crystal next to the MCU pins, with short traces over a solid ground.
- Keep fast digital and switching signals away from crystal traces.
- Test startup across temperature and supply voltage.
- Choose crystals with shock and vibration ratings suited to moving platforms.
Crystal oscillators in robotics and drone hardware
Drones and robots vibrate, take shocks and work across wide temperatures, all of which stress crystals. A clock fault can reset a flight controller or corrupt CAN traffic in flight. GNSS receivers and radios need tight frequency stability, often from a TCXO. Layout around crystals is a common review point, and cleaning after reflow matters, since residue near crystal pins can slow or stop startup.