How does a Crystal work?

If you think of a crystal as being a tiny bell, it's easy to see how, if you hit it with a tiny little hammer, it would ring with a pure tone just like a big bell would if you hit the big bell with a small hammer.

That's exactly what a crystal does, but the trick is that it's made of piezoelectric material which makes electricity when you hit it and changes shape when you shock it with electricity.

To make it produce that pure bell-like tone continuously, it's connected across an amplifier which works just like someone pushing you on a swing so that when you got to just a little past the peak of one swing they'd give you a push to make sure you came back for the next one.

The piezoelectric nature of the crystal causes it to change shape when the amplifier output "pushes" it with an electric signal, and then when the amplifier lets go, the crystal springs back and generates its own signal which says "push me", and sends it to the input of the amplifier at just the right time for the amplifier to generate another push and regenerate the cycle, forever.

So what makes the crystal start oscillating?

Noise.

There's noise everywhere, and it's like zillions of tiny hammers hitting everything all the time.

Some of that noise hits the crystal, and when it's hooked up to the amplifier and starts to ring a little from the noise hits, the amplifier gets the electrical signal from the crystal's physical ringing tone (frequency), builds it up, and sends it back to the crystal. That makes the crystal change shape even more, sending a bigger signal back to the amplifier when the crystal's shape springs back, until the system is oscillating continuously and is stable.


The devices with two pins are not oscillators, they are resonators (crystals), which can be used in an oscillator circuit (such as a Pierce oscillator), and if used with the correct circuit will oscillate at (or near) the marked frequency. The Pierce oscillator circuit, shown below, uses two capacitors (load capacitors, C1/C2), the crystal (X1), and an amplifier (U1).

enter image description here

The devices with four pins are complete circuits including a resonator and an active circuit that oscillates. They require power and output a square wave or sine wave output at (or near) the marked frequency.

There are also (ceramic) resonators with three pins that act like crystals with capacitors.

The way crystals (and ceramic resonators) work is that they are made of a piezoelectric material that produces a voltage when they are distorted in shape. A voltage applied will cause a distortion in shape. The crystal is made into a shape that will physically resonate (like a tuning fork or a cymbal) at the desired frequency. That means that the crystal will act like a filter- when you apply the desired frequency it will appear like a high impedance once it gets vibrating, and to frequencies a bit different, it will be more lossy. When put in the feedback circuit of an amplifier, the oscillation will be self-sustaining. Much more, and some math, here.


A crystal does not oscillate on its own. You don't simply apply power and get oscillations out. Think of a crystal as a very accurate and sharp frequency filter. You put it in the feedback path of a amplifier in the right way, and it causes the circuit to oscillate at the crystal's resonant frequency. It's the circuit that causes the oscillations. They crystal kills all the frequencies except the one it's tuned for, which only allows enough overall loop gain for the circuit to oscillate at the crystal's frequency.