Relaxation Oscillator: What is it? (And How Does it Work)

💡
Key learnings:
  • Relaxation Oscillator Definition: A relaxation oscillator is defined as a non-linear electronic circuit that generates non-sinusoidal repetitive signals, such as square and triangular waves.
  • Components and Function: It utilizes non-linear elements and energy-storing components like capacitors and inductors, which charge and discharge to create oscillations.
  • Working Principle: The operation is based on the continuous charging and discharging of an energy-storing component, determining the waveform and frequency of the output.
  • Circuit Varieties: Examples include Op-Amp and UJT relaxation oscillators, each using different components to shape the output waveform.
  • Practical Applications: Relaxation oscillators are crucial in digital circuits, functioning as internal clock signals, among other uses.

What is a Relaxation Oscillator?

A relaxation oscillator is a nonlinear electronic oscillator that produces a repeating non-sine wave, such as a square, triangle or pulse. Henri Abraham and Eugène Bloch built a vacuum-tube multivibrator around 1918. The name relaxation oscillation came later from van der Pol. A later electronic oscillator of this class still uses a threshold switch plus an RC or RL timing path.

Harmonic (linear) oscillators make sines with a resonator. Relaxation oscillators make non-sines by charging an energy store to a threshold, then resetting it.

Typical outputs are triangle, square or rectangular pulses, set by the thresholds and the timing network.

The switch can be a transistor, Op-Amp, MOSFET or a device such as a UJT or neon. The timing store is usually a capacitor (sometimes an inductor). Both stores are not required in one circuit.

Each cycle charges the store to a trip point, then discharges or reverses it. Period, and so frequency , follows the time constant and the trip levels.

How Does a Relaxation Oscillator Work?

The timing capacitor (or inductor) is charged from the supply and then dumped or reversed through the switch. Discharge is not always through a separate load; in many circuits it is through the switch itself.

Wave shape depends on the switch, the time constant and where you take the output (capacitor vs switch output).

A simple RC lamp circuit is sketched below as a teaching model.

rc relaxation oscillator
RC Relaxation Oscillator

A capacitor sits in a path with a lamp and a battery. A true lamp flasher needs a sharp threshold (neon, PUT or similar). A plain incandescent bulb does not snap at a set voltage.

The battery charges the capacitor through the series resistor. While capacitor voltage is below the lamp threshold, the lamp stays dark.

When capacitor voltage reaches the breakdown or trip level, the lamp (or switch) conducts and the capacitor dumps through that path, so the lamp flashes.

After the voltage falls below the hold level, the path opens, the lamp goes dark and charging starts again.

Charge and dump then repeat, so the flash is periodic.

Charge time tracks the RC time constant, set by the resistor and the capacitor.

Flash rate therefore follows R, C and the lamp trip voltages.

Lamp-voltage waveforms for that sketch are below.

rc relaxation oscillator waveform
RC Relaxation Oscillator Waveform

The nonlinear switch is what sets the trip points and the edges of the wave.

Relaxation Oscillator Circuit Diagram

The switch type shapes the wave. This page works two common circuits: an op-amp astable and a UJT sawtooth.

Op-Amp Relaxation Oscillator

An op-amp relaxation oscillator is an astable multivibrator. The op-amp output is a square (or rectangular) wave. The circuit is shown below.

op amp relaxation oscillator
Op-Amp Relaxation Oscillator

The parts are a capacitor, resistors and an op-amp.

The timing RC feeds the inverting input, so capacitor voltage VC is the voltage at V-. The non-inverting input V+ is set by the resistor divider from the output.

Positive feedback on the op-amp makes a Schmitt trigger. The RC path around it turns that bistable into an astable.

Treat the op-amp as a comparator. If V+ > V-, the output saturates near +12 V on this sketch. If V- > V+, the output saturates near −12 V. Real saturation is a little inside the rails.

At t = 0 take the capacitor as empty, so V- = 0. The divider sets V+ = βVout.

    \[ \beta = \frac{R_2}{R_2+R_3} \]

If R2 and R3 are equal, β = 1/2, not 2. With ±12 V saturation, the trip levels are ±6 V, so the capacitor ramps between about +6 V and −6 V.

    \[ t=0; \quad V- = 0V; \quad V+=+6V; \quad V_{OUT}=+12V \]

With V+ > V-, Vout is +12 V and the capacitor charges toward +12 V through the timing resistor.

When capacitor voltage (V-) rises above +6 V, V- exceeds V+ and the output snaps to −12 V.

    \[ V- > 6V, \quad V+=6V, \quad V_{OUT}=-12V \]

V+ is a fraction of the new output, so V+ becomes −6 V. The capacitor voltage does not jump; it then ramps down.

The capacitor then discharges toward −12 V. When V- falls below −6 V, V+ is again greater than V-.

    \[ V+ = -6V; \quad V-<-6V, \quad V+>V- \]

The output snaps from −12 V back to +12 V and charging toward +12 V starts again.

That charge and discharge cycle produces a repeating square wave at the op-amp output, as below. The capacitor voltage is a triangle-like exponential ramp.

op amp relaxation oscillator waveform
Op-Amp Relaxation Oscillator Waveform

Period follows how long the capacitor takes to travel between the ±6 V trips. That time tracks the timing RC product.

UJT Relaxation Oscillator

A unijunction transistor (UJT) can be the switch. The UJT relaxation oscillator is shown below.

ujt relaxation oscillator
UJT Relaxation Oscillator

The UJT emitter joins the timing resistor and capacitor.

Start with the capacitor empty, so its voltage is zero.

    \[ V_C = 0 \]

The UJT stays off. The capacitor charges through R toward the supply, following the exponential below.

    \[ V = V_0 (1-e^\frac{-t}{RC}) \]

If the UJT never fired, voltage would head for VBB. In oscillation it never gets there.

The UJT turns on when emitter voltage reaches the peak point V_P (η V_BB + V_D), which is below the supply. The capacitor then dumps through the emitter into base-1, through R1.

Discharge continues until voltage falls to the valley voltage (VV). The UJT then turns off and charging starts again.

Capacitor voltage is a sawtooth. A pulse appears across R2 (base-2) mainly while the UJT conducts and stays near zero while the UJT is off and the capacitor is charging.

Those two waveforms, capacitor and R2, are shown below.

ujt relaxation oscillator waveform
UJT Relaxation Oscillator Waveform

Relaxation Oscillator Frequency

Frequency follows charge time (and, to a lesser extent, dump time). Charge time tracks the timing RC product and the trip voltages.

Frequency of Op-Amp Relaxation Oscillator

In the op-amp circuit, R1 and C1 set the timing. Larger R1 and C1 stretch the ramps and lower the frequency.

Smaller R1 and C1 raise the frequency.

R2 and R3 set β and therefore the ± trip voltages. A smaller |trip| means a shorter ramp and a higher frequency.

A lower trip voltage is reached sooner. A higher trip takes longer to reach.

Frequency therefore depends on R1, R2, R3 and C1. For equal saturation magnitudes the formula is:

    \[ f = \frac{1}{2 \times R_1 \times C_1 \times ln (\frac{1+k}{1-k})} \]

Where:

    \[ k = \frac{R_2}{R_2+R_3} \]

Designs often take R2 and R3 equal, so β = 1/2.

    \[ R_2 = R_3 = R \]

    \[ k = \frac{R}{2R} = \frac{1}{2} \]

    \[ f = \frac{1}{2 \times R_1 \times C_1 \times ln (\frac{1+\frac{1}{2} }{1-\frac{1}{2} })} \]

    \[ f = \frac{1}{2 \times R_1 \times C_1 \times ln (3)} \]

    \[ f = \frac{1}{2.2 \times R_1 \times C_1} \]

Put R1 and C1 into that last line (2.2 ≈ 2 ln 3) to get the frequency.

Frequency of UJT Relaxation Oscillator

UJT frequency follows timing R and C. External R1 and R2 only limit base current and are not the n-divider in the stored formula.

An approximate frequency, ignoring dump time and V_D, is:

    \[ f = \frac{1}{RC ln(\frac{1}{1-n})} \]

Where:

n (often written η) is the intrinsic stand-off ratio, typically about 0.5 to 0.8 (the stored range is 0.51 to 0.82). The UJT’s internal interbase divider sets n, not the external base resistors.

    \[ n =  \frac{R_1}{R_1 + R_2} \]

The emitter voltage that fires the UJT is:

    \[ V = n V_{BB} + V_D \]

Where:

VBB = interbase supply voltage

VD = emitter pn-junction drop (often ~0.5 to 0.7 V), in the emitter-to-base-1 path when the device fires

Timing resistor R must sit between:

    \[ max = \frac{V_{BB}-V_P}{I_P} \quad min=\frac{V_{BB}-V_V}{I_V} \]

Where:

VP, IP = peak-point voltage and current

VV, IV = valley voltage and current. R must be less than (V_BB − V_P)/I_P so the charge current can still reach I_P, and greater than (V_BB − V_V)/I_V so the device can drop out at the valley.

Relaxation Oscillator Differential Equation

Back to the op-amp circuit with equal R2 and R3. The divider gives:

    \[ V_+ = \frac{V_{out}}{2} \]

V on the capacitor follows ohm’s law plus i = C dv/dt:

    \[ \frac{V_{out}-V_-}{R} = C \frac{dV_-}{dt} \]

The first-order equation has a particular solution plus a homogeneous solution.

For a constant particular solution, set V = A so the derivative is zero:

    \[ \frac{dV_-}{dt} = \frac{dA}{dt} = 0 \]

    \[ \frac{A}{RC} = \frac{V_{out}}{RC} \]

    \[V_{out} = A \]

For the homogeneous part, a Laplace transform (or direct substitution) of

    \[ \frac{dV_-}{dt} +\frac{V_-}{RC} = 0 \]

    \[ V_- = Be^{\frac{-1}{RC}t} \]

V is the sum of those two pieces:

    \[ V_- = A + Be^{\frac{-1}{RC}t} \]

Find B from the initial condition on the first half-cycle:

    \[ t=0; \quad V_{out} = V_{dd}; \quad V_-=0 \]

    \[ 0 = V_{dd} + Be^0 \]

    \[ B = -V_{dd} \]

The stored closed form for that first ramp (with V_out held at V_dd) is:

    \[ V_- = V_{out} - V_{dd} e^{\frac{-1}{RC}t} \]

Comparator vs Op-Amps

A comparator can replace the op-amp in this astable. Comparators are built to switch. Rail-to-rail inputs or outputs are a datasheet feature, not a given, for either part.

A comparator usually has faster edges than a general-purpose op-amp, so it is often the better choice for a square-wave astable.

Most op-amps have push-pull outputs, so no pull-up is required. Many comparators are open-collector or open-drain and do need a pull-up. Push-pull comparators exist and do not.

Applications of Relaxation Oscillators

RC relaxation clocks are used where a coarse on-chip or board oscillator is enough. Accurate digital systems more often use a crystal. Other uses include:

  • Voltage-controlled oscillator
  • Memory circuits
  • Signal generator (to generate clock signals)
  • Stroboscopes
  • Firing thyristor-based circuit
  • Multi-vibrators
  • Television receivers
  • Counters
Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.