TExcelTAD
Home › Analog Electronics: Diodes, Transistors & Op-Amps › Colpitts, Crystal, Relaxation and 555 Oscillators

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 ±1 %\pm 1\ \%. A radio needs megahertz with a few parts per million; a microcontroller's UART needs better than ±2 %\pm 2\ \% 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 f0=1/(2πLC)f_0 = 1/(2\pi\sqrt{LC}) with a sharp phase change through f0f_0 (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 C1C_1 and C2C_2 in series; their junction is the tapping point that feeds the signal back to the amplifier input.
f0=12πL Ceq,Ceq=C1C2C1+C2f_0 = \frac{1}{2\pi\sqrt{L\,C_\text{eq}}}, \qquad C_\text{eq} = \frac{C_1 C_2}{C_1 + C_2}
  • Hartley: the same idea with a tapped inductor instead of a tapped capacitor.
  • Clapp: a Colpitts with a small capacitor C3C_3 in series with LL. When C3≪C1,C2C_3 \ll C_1, C_2 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 C1/(C1+C2)C_1/(C_1 + C_2) of the collector swing to the emitter, so the transistor stage must have a voltage gain of at least (C1+C2)/C1(C_1 + C_2)/C_1. Its gain is roughly gmRpg_m R_p, where Rp=(ω0L)2/RsR_p = (\omega_0 L)^2 / R_s is the tank's parallel loss resistance for a coil with series resistance RsR_s. 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

L=10 μHL = 10\ \mu\text{H} with 2 Ω2\ \Omega of winding resistance, C1=C2=2.2 nFC_1 = C_2 = 2.2\ \text{nF} (Ceq=1.1 nFC_\text{eq} = 1.1\ \text{nF}), the course NPN model biased at about 1.4 mA1.4\ \text{mA} with its base bypassed to ground. SPICE first solves the bias point; a 1 mA1\ \text{mA}, 100 ns100\ \text{ns} current kick at t=1 μst = 1\ \mu\text{s} then plays the part of noise.

bash · try it yourself
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 f0=1/(2π10 μH⋅1.1 nF)=1.5175 MHzf_0 = 1/(2\pi\sqrt{10\ \mu\text{H} \cdot 1.1\ \text{nF}}) = 1.5175\ \text{MHz}; SPICE measures 1.5199 MHz1.5199\ \text{MHz}, 0.16 % higher, the effect of the transistor's capacitances and emitter resistance on the tank. With gm=1.39 mA/25.85 mV=54 mSg_m = 1.39\ \text{mA}/25.85\ \text{mV} = 54\ \text{mS} and Rp=(95.3 Ω)2/2 Ω=4.5 kΩR_p = (95.3\ \Omega)^2/2\ \Omega = 4.5\ \text{k}\Omega the stage gain is in the hundreds against the 2 needed, so the swing builds past 2 V2\ \text{V} in 2.5 μs2.5\ \mu\text{s} and ends up limited by the transistor: the collector swings from 0.82 V0.82\ \text{V} to 22.4 V22.4\ \text{V}, above the supply, which an inductor fed from VCCV_{CC} can do. A low-distortion design would reduce the excess gain (larger RER_E, 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 RmLmCmR_m L_m C_m represents the mechanical resonance; C0C_0 is the capacitance of the electrodes and holder.

1 2 Rm 10 Ohm Lm 12.67 mH Cm 20 fF C0 5 pF (holder) motional arm (the vibrating quartz)

The two capacitances give two resonances very close together:

fs=12πLmCm,fp=fs1+CmC0≈fs(1+Cm2C0),Q=2πfsLmRmf_s = \frac{1}{2\pi\sqrt{L_m C_m}}, \qquad f_p = f_s\sqrt{1 + \frac{C_m}{C_0}} \approx f_s\left(1 + \frac{C_m}{2 C_0}\right), \qquad Q = \frac{2\pi f_s L_m}{R_m}

At fsf_s (series resonance) the crystal looks like RmR_m, a few ohms; at fpf_p (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 CmC_m is femtofarads, fp−fsf_p - f_s is only a few tenths of a percent (about 2000 ppm in the example below) and QQ 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 C1C_1, C2C_2 from each end to ground. The crystal sees a load CL=C1C2/(C1+C2)+CstrayC_L = C_1 C_2/(C_1 + C_2) + C_\text{stray} and runs where its inductive reactance resonates with CLC_L:

fL≈fs(1+Cm2(C0+CL))f_L \approx f_s\left(1 + \frac{C_m}{2(C_0 + C_L)}\right)

A crystal is specified "for CL=18 pFC_L = 18\ \text{pF}" (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 CC through RR back to its own inverting input. With the positive feedback fraction β=R2/(R1+R2)\beta = R_2/(R_1 + R_2) setting the thresholds at ±βVsat\pm\beta V_\text{sat}, each half-cycle is an RC exponential from ∓βVsat\mp\beta V_\text{sat} towards ±Vsat\pm V_\text{sat}:

T=2RCln⁡1+β1−β(β=0.5: T=2RCln⁡3=2.197 RC)T = 2RC\ln\frac{1 + \beta}{1 - \beta} \qquad (\beta = 0.5:\ T = 2RC\ln 3 = 2.197\,RC)

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 13VCC\frac{1}{3}V_{CC} and 23VCC\frac{2}{3}V_{CC}, a flip-flop and a discharge transistor. In the astable connection CC charges through RA+RBR_A + R_B from 13\frac{1}{3} to 23VCC\frac{2}{3}V_{CC} and discharges through RBR_B; each step is a factor-of-2 exponential, hence ln⁡2=0.693\ln 2 = 0.693:

tH=0.693 (RA+RB) C,tL=0.693 RBC,f=1tH+tL=1.44(RA+2RB) Ct_H = 0.693\,(R_A + R_B)\,C, \qquad t_L = 0.693\,R_B C, \qquad f = \frac{1}{t_H + t_L} = \frac{1.44}{(R_A + 2R_B)\,C}

In the monostable connection one trigger gives one pulse of T=RCln⁡3=1.1 RCT = RC\ln 3 = 1.1\,RC. The thresholds are ratios of VCCV_{CC}, so the timing does not depend on the supply to first order.

Worked example: a crystal's numbers

Given: a 10 MHz crystal with Cm=20 fFC_m = 20\ \text{fF}, Rm=10 ΩR_m = 10\ \Omega, C0=5 pFC_0 = 5\ \text{pF}, specified for CL=18 pFC_L = 18\ \text{pF}.

Find: LmL_m, QQ, fp−fsf_p - f_s, the offset at CL=18 pFC_L = 18\ \text{pF} and the pulling per picofarad there.

Solve:

Lm=1(2π⋅10 MHz)2⋅20 fF=12.67 mH,Q=2π⋅10 MHz⋅12.67 mH10 Ω=79 600fp−fs≈10 MHz⋅20 fF2⋅5 pF=20.0 kHzfL−fsfs=20 fF2(5+18) pF=435 ppm,ddCLΔffs=−Cm2(C0+CL)2=−18.9 ppm/pF\begin{aligned} L_m &= \frac{1}{(2\pi \cdot 10\ \text{MHz})^2 \cdot 20\ \text{fF}} = 12.67\ \text{mH}, \qquad Q = \frac{2\pi \cdot 10\ \text{MHz} \cdot 12.67\ \text{mH}}{10\ \Omega} = 79\,600 \\ f_p - f_s &\approx 10\ \text{MHz} \cdot \frac{20\ \text{fF}}{2 \cdot 5\ \text{pF}} = 20.0\ \text{kHz} \\ \frac{f_L - f_s}{f_s} &= \frac{20\ \text{fF}}{2(5 + 18)\ \text{pF}} = 435\ \text{ppm}, \qquad \frac{d}{dC_L}\frac{\Delta f}{f_s} = -\frac{C_m}{2(C_0 + C_L)^2} = -18.9\ \text{ppm/pF} \end{aligned}

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

python · try it yourself
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 10 Ω10\ \Omega to about 1 MΩ1\ \text{M}\Omega within 20 kHz, a fractional span of 0.2 %. The 555 cannot reach 50 % duty in this connection, because tHt_H always includes RAR_A (a diode across RBR_B 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: L=100 mHL = 100\ \text{mH}, C=10 nFC = 10\ \text{nF}, f0=5.033 kHzf_0 = 5.033\ \text{kHz}. Start at R=200 ΩR = 200\ \Omega and slide RR down.

0 A1.3 mA2.5 mA3.8 mA5.0 mAf0/3f0/2f02f03f0|I|f0 = 5.03 kHzImax/sqrt2f1f2-90090f0/3f0/2f02f03f0phase of I (deg)Q = 15.81B = f2 - f1 = 318 Hzat f0: resistive

At 200 Ω200\ \Omega the lab shows Q=15.81Q = 15.81 and a bandwidth of 318.3 Hz318.3\ \text{Hz}; at R=2 ΩR = 2\ \Omega, Q=1581Q = 1581 and the bandwidth shrinks to 3.183 Hz3.183\ \text{Hz}, while ∣VC∣\lvert V_C \rvert at resonance reads 1.581 kV1.581\ \text{kV} for a 1 V1\ \text{V} drive. A crystal goes 50 times further in QQ. 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. RA=1 kΩR_A = 1\ \text{k}\Omega, RB=10 kΩR_B = 10\ \text{k}\Omega, C=10 nFC = 10\ \text{nF}: tH=76.2 μst_H = 76.2\ \mu\text{s}, tL=69.3 μst_L = 69.3\ \mu\text{s}, f=6.87 kHzf = 6.87\ \text{kHz}, 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 9 V9\ \text{V} battery or a bench supply at 9 V9\ \text{V}, current limit 50 mA50\ \text{mA}, with a 100 nF100\ \text{nF} decoupling capacitor across the 555's supply pins. Scope the capacitor (a sawtooth-like wave between 3 V3\ \text{V} and 6 V6\ \text{V}) and the output. With a 5 % or 10 % capacitor, expect ff within about ±10 %\pm 10\ \% of 6.87 kHz; the bipolar 555 also adds a few percent from its internal delays at this speed. Change the supply from 9 V9\ \text{V} to 6 V6\ \text{V}: ff should change by only about 1 %. Replace CC by 10 μF10\ \mu\text{F} and an LED with a 1 kΩ1\ \text{k}\Omega 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 CLC_L. The crystal sees the series combination plus stray, so for CL=18 pFC_L = 18\ \text{pF} and 5 pF5\ \text{pF} of stray, C1=C2≈26 pFC_1 = C_2 \approx 26\ \text{pF}, 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 (−20-20 to +80 %+80\ \% 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 RmR_m (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

  1. A Colpitts uses L=4.7 μHL = 4.7\ \mu\text{H}, C1=1 nFC_1 = 1\ \text{nF}, C2=4.7 nFC_2 = 4.7\ \text{nF}. Find f0f_0.
  2. Design a 555 astable for about 1 kHz with C=100 nFC = 100\ \text{nF} and RA=1 kΩR_A = 1\ \text{k}\Omega.
  3. A crystal for CL=12 pFC_L = 12\ \text{pF} is fitted with C1=C2=22 pFC_1 = C_2 = 22\ \text{pF} and 3 pF3\ \text{pF} of stray. Using the example's CmC_m and C0C_0, how many ppm does it run below nominal?
Answer
  1. Ceq=1⋅4.7/5.7=0.825 nFC_\text{eq} = 1 \cdot 4.7/5.7 = 0.825\ \text{nF}; f0=1/(2π4.7 μH⋅0.825 nF)=2.56 MHzf_0 = 1/(2\pi\sqrt{4.7\ \mu\text{H} \cdot 0.825\ \text{nF}}) = 2.56\ \text{MHz}.
  2. RA+2RB=1.44/(1 kHz⋅100 nF)=14.4 kΩR_A + 2R_B = 1.44/(1\ \text{kHz} \cdot 100\ \text{nF}) = 14.4\ \text{k}\Omega, so RB=6.7 kΩ→6.8 kΩR_B = 6.7\ \text{k}\Omega \to 6.8\ \text{k}\Omega, giving f=986 Hzf = 986\ \text{Hz}.
  3. CL=11+3=14 pFC_L = 11 + 3 = 14\ \text{pF}. Offsets: 20/(2⋅17)=588.2 ppm20/(2 \cdot 17) = 588.2\ \text{ppm} nominal, 20/(2⋅19)=526.3 ppm20/(2 \cdot 19) = 526.3\ \text{ppm} actual: about 62 ppm low.

Test yourself

A Colpitts tank has L=10 μHL = 10\ \mu\text{H} and C1=C2=2.2 nFC_1 = C_2 = 2.2\ \text{nF}. Its frequency is about…

  1. 1.07 MHz1.07\ \text{MHz}
  2. 1.52 MHz1.52\ \text{MHz}
  3. 2.15 MHz2.15\ \text{MHz}
  4. 15.2 MHz15.2\ \text{MHz}

Between its series and parallel resonances a quartz crystal behaves as…

  1. a small resistor
  2. a capacitor
  3. an inductor
  4. an open circuit

Increasing a crystal oscillator's load capacitance CLC_L makes its frequency…

  1. rise
  2. fall
  3. stay the same
  4. double

A 555 astable has RA=1 kΩR_A = 1\ \text{k}\Omega, RB=10 kΩR_B = 10\ \text{k}\Omega, C=10 nFC = 10\ \text{nF}. The frequency is about…

  1. 4.6 kHz4.6\ \text{kHz}
  2. 6.9 kHz6.9\ \text{kHz}
  3. 13 kHz13\ \text{kHz}
  4. 144 kHz144\ \text{kHz}