Colpitts, Crystal, Relaxation and 555 Oscillators
RC oscillators (Oscillators: Barkhausen, Wien Bridge and Phase Shift) are fine up to a few hundred kilohertz, but their frequency is only as stable as two resistors and two capacitors, perhaps . A radio needs megahertz with a few parts per million; a microcontroller's UART needs better than over temperature; a blinking LED or a PWM dimmer needs neither, only a square wave for a few cents. Three families cover these: LC oscillators for radio frequencies, crystal oscillators for precision, and relaxation oscillators (including the 555 timer) for cheap square waves. Each obeys the same loop idea, with a different frequency-setting element.
LC oscillators: Colpitts, Hartley, Clapp
An LC tank resonates at with a sharp phase change through (Resonance, Quality Factor and Bandwidth), so it makes a far more selective feedback network than an RC. The amplifier (one transistor is enough) only has to replace the energy lost in the tank's resistance each cycle.
- Colpitts: the tank capacitance is split into and in series; their junction is the tapping point that feeds the signal back to the amplifier input.
- Hartley: the same idea with a tapped inductor instead of a tapped capacitor.
- Clapp: a Colpitts with a small capacitor in series with . When it sets the frequency almost alone, so the transistor's own capacitances (which change with bias and temperature) matter less.
Gain condition. In the common-base Colpitts below, the divider returns the fraction of the collector swing to the emitter, so the transistor stage must have a voltage gain of at least . Its gain is roughly , where is the tank's parallel loss resistance for a coil with series resistance . As in every oscillator, design for a comfortable excess and let a nonlinearity (here the transistor itself saturating and cutting off) limit the amplitude.
Cross-check with SPICE: a Colpitts at 1.5 MHz
with of winding resistance, (), the course NPN model biased at about with its base bypassed to ground. SPICE first solves the bias point; a , current kick at then plays the part of noise.
cat > colpitts.cir <<'EOF'
* Common-base Colpitts oscillator, L = 10u, C1 = C2 = 2.2n
.model QN NPN(Is=1e-14 Bf=200 Vaf=100 Br=2 Rb=10 Cje=10p Cjc=4p Tf=0.4n)
VCC vcc 0 12
R1 vcc b 47k
R2 b 0 10k
CB b 0 100n
Q1 c b e QN
RE e 0 1k
L1 vcc t 10u
RL t c 2
C1 c e 2.2n
C2 e 0 2.2n
* a 100 ns, 1 mA kick at 1 us stands in for noise
IK c 0 PULSE(0 1m 1u 10n 10n 100n 1)
.control
op
print v(e) i(VCC)
tran 5n 60u
meas tran tgrow when v(c)=14 rise=1
meas tran t1 when v(c)=12 rise=40
meas tran t2 when v(c)=12 rise=60
let f = 20/(t2 - t1)
print f
meas tran vmax max v(c) from=55u to=60u
meas tran vmin min v(c) from=55u to=60u
.endc
.end
EOF
ngspice -b colpitts.cir 2>&1 | grep -E '^(f|vmax|vmin|tgrow|v\(e\)|i\(vcc\)) +='v(e) = 1.392125e+00
i(vcc) = -1.59745e-03
tgrow = 2.480430e-06
f = 1.519900e+06
vmax = 2.240251e+01 at= 5.984941e-05
vmin = 8.244698e-01 at= 5.754053e-05
The hand formula gives ; SPICE measures , 0.16 % higher, the effect of the transistor's capacitances and emitter resistance on the tank. With and the stage gain is in the hundreds against the 2 needed, so the swing builds past in and ends up limited by the transistor: the collector swings from to , above the supply, which an inductor fed from can do. A low-distortion design would reduce the excess gain (larger , a smaller tap ratio) or add amplitude control.
Crystal oscillators
A quartz crystal is a piezoelectric resonator: mechanically a tuning fork, electrically the Butterworth-Van Dyke model below. The motional arm represents the mechanical resonance; is the capacitance of the electrodes and holder.
The two capacitances give two resonances very close together:
At (series resonance) the crystal looks like , a few ohms; at (parallel, or anti-resonance) it looks like a very high resistance. Between them it is inductive, and that is where most oscillators run it. Because is femtofarads, is only a few tenths of a percent (about 2000 ppm in the example below) and is tens of thousands, a hundred times better than any coil. The frequency changes with temperature by a few tens of ppm over the industrial range for the common AT-cut (a typical datasheet figure in 2026), and ages by a few ppm per year.
Load capacitance and pulling. In the Pierce oscillator, the standard circuit inside nearly every microcontroller, the crystal sits between the input and output of an inverting amplifier (a CMOS inverter), with a capacitor , from each end to ground. The crystal sees a load and runs where its inductive reactance resonates with :
A crystal is specified "for " (say), and is cut to read exactly its nominal frequency with that load. Use different capacitors and the frequency is pulled away; that is how a VCXO is tuned, and how a wrong pair of capacitors puts a real-time clock a minute or more per month off.
Relaxation oscillators and the 555
A relaxation oscillator charges a capacitor until a threshold, then switches and discharges it to another threshold. The simplest is an op-amp Schmitt trigger (Comparators and Schmitt Triggers) whose output charges through back to its own inverting input. With the positive feedback fraction setting the thresholds at , each half-cycle is an RC exponential from towards :
The 555 timer (designed by Hans Camenzind for Signetics in 1971, on the market from 1972, and still sold by many makers) packages two comparators at and , a flip-flop and a discharge transistor. In the astable connection charges through from to and discharges through ; each step is a factor-of-2 exponential, hence :
In the monostable connection one trigger gives one pulse of . The thresholds are ratios of , so the timing does not depend on the supply to first order.
Worked example: a crystal's numbers
Given: a 10 MHz crystal with , , , specified for .
Find: , , , the offset at and the pulling per picofarad there.
Solve:
Check: a 2 pF error in board stray capacitance (very common) moves the frequency by about 38 ppm, about 3.3 s per day: more than the crystal's own tolerance. That is why load capacitors are computed, not guessed.
In Python: crystal impedance and timing formulas
import numpy as np
from scipy.optimize import brentq
# Crystal: motional arm Rm-Lm-Cm in parallel with the holder capacitance C0
Rm, Cm, C0 = 10.0, 20e-15, 5e-12
fs_target = 10e6
Lm = 1 / ((2 * np.pi * fs_target) ** 2 * Cm)
Q = 2 * np.pi * fs_target * Lm / Rm
def Z(f):
w = 2 * np.pi * f
zm = Rm + 1j * w * Lm + 1 / (1j * w * Cm)
z0 = 1 / (1j * w * C0)
return zm * z0 / (zm + z0)
fs = brentq(lambda f: Z(f).imag, 9.99e6, 10.005e6) # series resonance (X = 0, low |Z|)
fp = brentq(lambda f: Z(f).imag, 10.005e6, 10.03e6) # parallel resonance (X = 0, high |Z|)
print(f"Lm = {Lm * 1e3:.2f} mH, Q = {Q:.0f}")
print(f"fs = {fs / 1e6:.6f} MHz, |Z| = {abs(Z(fs)):.2f} Ohm")
print(f"fp = {fp / 1e6:.6f} MHz, |Z| = {abs(Z(fp)) / 1e3:.0f} kOhm, fp - fs = {(fp - fs) / 1e3:.2f} kHz")
for CL in [12e-12, 18e-12, 20e-12]:
fL = fs_target * (1 + Cm / (2 * (C0 + CL)))
print(f"C_L = {CL * 1e12:4.0f} pF: f = {fL / 1e6:.6f} MHz ({(fL / fs_target - 1) * 1e6:5.1f} ppm above fs)")
# 555 astable and op-amp relaxation oscillator
RA, RB, C = 1e3, 10e3, 10e-9
tH, tL = np.log(2) * (RA + RB) * C, np.log(2) * RB * C
print(f"555: tH = {tH * 1e6:.1f} us, tL = {tL * 1e6:.1f} us, f = {1 / (tH + tL) / 1e3:.2f} kHz, duty = {100 * tH / (tH + tL):.1f} %")
R, C, b = 10e3, 10e-9, 0.5
T = 2 * R * C * np.log((1 + b) / (1 - b))
print(f"Relaxation (beta = {b}): T = {T * 1e6:.1f} us, f = {1 / T / 1e3:.2f} kHz")Lm = 12.67 mH, Q = 79577
fs = 10.000000 MHz, |Z| = 10.00 Ohm
fp = 10.019980 MHz, |Z| = 1009 kOhm, fp - fs = 19.98 kHz
C_L = 12 pF: f = 10.005882 MHz (588.2 ppm above fs)
C_L = 18 pF: f = 10.004348 MHz (434.8 ppm above fs)
C_L = 20 pF: f = 10.004000 MHz (400.0 ppm above fs)
555: tH = 76.2 us, tL = 69.3 us, f = 6.87 kHz, duty = 52.4 %
Relaxation (beta = 0.5): T = 219.7 us, f = 4.55 kHz
The crystal's impedance swings from to about within 20 kHz, a fractional span of 0.2 %. The 555 cannot reach 50 % duty in this connection, because always includes (a diode across fixes that).
Interactive: what a high Q means
The lab is a series RLC, the same shape as the crystal's motional arm but scaled to audio frequencies so the numbers are readable: , , . Start at and slide down.
At the lab shows and a bandwidth of ; at , and the bandwidth shrinks to , while at resonance reads for a drive. A crystal goes 50 times further in . The voltage magnification is why crystals have a maximum drive level (typically tens to a few hundred microwatts): overdriven quartz ages fast or cracks.
Guided lab: a 555 astable
Hand calculation. , , : , , , duty 52.4 %.
Simulation. The Python cell; for intuition about each half-cycle, the RC charging curve in First-Order RC Circuits.
What you would measure. Build it on a breadboard from a battery or a bench supply at , current limit , with a decoupling capacitor across the 555's supply pins. Scope the capacitor (a sawtooth-like wave between and ) and the output. With a 5 % or 10 % capacitor, expect within about of 6.87 kHz; the bipolar 555 also adds a few percent from its internal delays at this speed. Change the supply from to : should change by only about 1 %. Replace by and an LED with a resistor on the output blinks at about 6.9 Hz.
Hazards and safe setup. Battery or current-limited supply only. The 555 output can source and sink a couple of hundred milliamps: never short it, and always put a resistor in series with an LED. Check electrolytic polarity.
Pitfalls
- Crystal load capacitors equal to . The crystal sees the series combination plus stray, so for and of stray, , not 18.
- Probing a crystal node with a 10x probe. Its few picofarads pull the frequency or stop the oscillator. Measure a buffered output.
- Electrolytic timing capacitors for precision. Their tolerance ( to on older types) and leakage dominate; use film or C0G ceramic.
- Forgetting the start-up margin. A Pierce oscillator needs a negative resistance several times (many vendors ask for a margin of at least 5, as of 2026); a weak inverter may start at room temperature and fail in the cold.
Practice
- A Colpitts uses , , . Find .
- Design a 555 astable for about 1 kHz with and .
- A crystal for is fitted with and of stray. Using the example's and , how many ppm does it run below nominal?
Answer
- ; .
- , so , giving .
- . Offsets: nominal, actual: about 62 ppm low.
Test yourself
A Colpitts tank has and . Its frequency is about…
Between its series and parallel resonances a quartz crystal behaves as…
- a small resistor
- a capacitor
- an inductor
- an open circuit
Increasing a crystal oscillator's load capacitance makes its frequency…
- rise
- fall
- stay the same
- double
A 555 astable has , , . The frequency is about…