← Back to blogBuilding a Computer from Relays · Part 15 of 15

Relay Oscillator: Feedback, Buzzers, and Clock Signals

See how a normally closed relay contact can interrupt its own coil, why real feedback oscillates only because of delay, and how oscillators relate to digital clocks.

Matthias KellerMatthias Keller
8 min read
Chalkboard feature illustration for “Relay Oscillator: Feedback, Buzzers, and Clock Signals”

TL;DR: Place a relay’s normally closed contact in series with its own coil and the relay can repeatedly energize and release. The Boolean loop has no stable 0-or-1 solution; physical coil and armature delays create the time evolution. The result is a rough relaxation oscillator, not a precision clock. It demonstrates feedback and timing, while a practical digital clock also needs a stable reference, waveform conditioning, distribution, and timing analysis.

In the previous post, we built a full adder. Set its three input bits, wait for the relays to settle, and the sum and carry become determined by the current inputs.

That is the combinational model:

output=f(current inputs)\text{output}=f(\text{current inputs})

Now connect a relay contact back into the relay’s own coil circuit. The output influences the future input, so the circuit can no longer be understood as a one-way chain of Boolean gates. Delay, stored energy, and history become essential.

This self-interrupting circuit is a useful bridge from combinational logic to feedback, oscillators, and sequential systems. It is also a good warning: a feedback loop that looks contradictory in Boolean algebra does not tell you by itself what physical hardware will do.

The Self-Interrupting Relay

Use a relay with a normally closed (NC, or Form B) contact. Wire that contact in series with the relay coil and its supply.

The intended cycle is:

  1. With the armature released, the NC contact is closed.
  2. Coil current rises and produces magnetic force.
  3. After the relay’s operate delay, the armature moves and opens the NC contact.
  4. Opening the contact interrupts coil current.
  5. The coil’s magnetic field decays.
  6. After the relay’s release delay, the spring returns the armature and closes the contact.
  7. Coil current begins rising again.

If the relay, supply, contact ratings, and mechanical dynamics support repeated operation, the cycle continues.

The contact is therefore doing two jobs: it reports the armature state and controls the energy that creates that state. This is negative feedback with delay. Energizing the coil eventually removes its own drive; removing the drive eventually restores it.

Why an Ideal Boolean Loop Is Not Enough

If Q represents the closed-contact state, the zero-delay abstraction resembles:

Q=Q‾ Q=\overline{Q}

Neither binary value satisfies this equation:

  • if Q=0Q=0, the rule demands Q=1Q=1;
  • if Q=1Q=1, the rule demands Q=0Q=0.

That does not prove a real circuit will produce a clean clock. It shows only that the ideal two-valued, zero-delay model has no stable operating point.

A physical relay contains additional state:

  • coil current and magnetic flux;
  • armature position and velocity;
  • spring force;
  • contact separation;
  • residual magnetism;
  • electrical and mechanical delay.

Those continuous variables determine what happens between the logical states. A simulator must model some delay or physical dynamics to reproduce oscillation; a purely combinational solver may instead report an unstable loop, an unknown value, or a convergence error.

A Timing Sequence, Not a Truth Table

A truth table describes stable input/output combinations. The relay oscillator is better described by phases:

PhaseNC contactCoil currentArmature action
StartClosedRisingBegins pulling in
OperateOpeningNear operate thresholdMoves toward energized position
InterruptOpenDecayingMagnetic force falls
ReleaseClosingNear release thresholdSpring returns armature
RepeatClosedRising againNew cycle begins

The current does not usually jump instantly from zero to its final value. A relay coil is inductive, so its electrical time constant contributes to the cycle. Likewise, the armature takes finite time to travel.

The output is consequently not a mathematically perfect square wave. Depending on where it is measured, a real trace can include:

  • unequal high and low times;
  • contact bounce;
  • switching spikes;
  • cycle-to-cycle period variation;
  • voltage-dependent frequency;
  • missed or irregular cycles.

A Schmitt-trigger input or another conditioning stage can translate the contact waveform into cleaner digital edges, but it cannot recover precision that the source never had.

What Sets the Frequency?

A first-order period estimate uses the operate and release intervals:

Tcycle≈toperate+trelease T_{\text{cycle}}\approx t_{\text{operate}}+t_{\text{release}}

and:

f≈1Tcycle f\approx\frac{1}{T_{\text{cycle}}}

This is an explanatory approximation, not a design formula. Manufacturer definitions of operate and release time already cover the relay’s internal electrical and mechanical response, while contact bounce is normally specified separately; adding all of those quantities as independent delays can therefore double-count part of the motion. External coil resistance and inductance, suppression components, supply voltage, temperature, contact trajectory, and bounce can still alter the observed waveform. Data sheets generally give limits or distributions, not a precision oscillator specification.

Frequency and duty cycle can change with:

  • supply voltage;
  • coil temperature and resistance;
  • armature mass and spring force;
  • contact wear and contamination;
  • magnetic hysteresis;
  • suppression components across the coil;
  • the electrical load being switched.

A flyback diode, for example, protects a DC coil driver from a large inductive voltage transient, but it also lets coil current decay more slowly and can extend release time. Protection and timing must be designed together.

Omron’s relay terminology guide explicitly treats operate time, release time, and contact bounce as separate characteristics. That distinction is exactly what a simplistic ON/OFF animation leaves out.

From Self-Interrupter to Buzzer

Electromechanical buzzers and vibrating bells commonly use this principle. The moving armature interrupts the coil circuit, a spring restores the contact, and repeated impacts create sound.

Do not generalize that construction to every ringing device:

  • some bells use a single solenoid stroke;
  • some telephone ringers use an alternating-current electromagnet and polarized armature;
  • motor-driven bells use a rotating striker;
  • electronic buzzers use transistor or piezoelectric oscillators;
  • modern doorbells may play sampled audio.

The self-interrupting relay is one important oscillator topology, not the universal mechanism behind every buzzer or bell.

Is an Oscillator a Sequential Circuit?

The oscillator has internal physical state and its future depends on its past, so a static truth table is insufficient. In that broad dynamical sense, it is stateful.

In digital design, however, sequential logic usually refers to circuits whose stored state is updated according to defined inputs and clocking rules: latches, flip-flops, registers, counters, and state machines. A free-running oscillator is normally treated as a time reference or clock source, not as a storage element in the data path.

The distinction is useful:

  • an oscillator repeatedly changes state on its own;
  • a latch retains one of two stable states;
  • a flip-flop samples data at a defined clock event;
  • combinational logic transforms the stored values between events.

All involve physical delay, but they serve different architectural roles.

How an Oscillator Becomes a Clock

A clock is not merely any alternating waveform. A usable synchronous clock must meet the receiving logic’s electrical and timing requirements.

A practical clock path may contain:

  1. Reference source — crystal, MEMS, RC, ring, or another oscillator.
  2. Frequency generation — dividers or a phase-locked loop (PLL).
  3. Waveform conditioning — controlled thresholds and edge rates.
  4. Distribution network — buffers and routed clock trees.
  5. Local control — clock enables or integrated clock-gating cells.

Modern devices can also contain multiple clock domains, derived clocks, and asynchronous interfaces. They do not necessarily march to one universal edge.

On an active clock edge, only storage elements whose clock and enable conditions are satisfied capture new data. Combinational paths then respond and settle before the next required capture event. Designers must account for:

  • clock period;
  • setup and hold time;
  • clock-to-output delay;
  • combinational path delay;
  • clock skew;
  • jitter;
  • reset recovery and removal;
  • crossings between unrelated clock domains.

This is why a chattering relay is an excellent demonstration but a poor precision clock. Its period and edge placement are too dependent on mechanical and electrical variation for demanding timing.

Modern clock systems still use oscillation and feedback, but the implementation is far more controlled. For example, a PLL compares phase, adjusts a controlled oscillator, and distributes derived frequencies; TI’s clocking material describes oscillators, PLLs, dividers, buffers, and jitter cleaners as distinct parts of the timing chain.

Early Electromechanical Computing: Avoid a Single-Origin Story

Relay-based calculators and early computers needed sequencing, but they did not all use one self-interrupting relay as a master clock. Designs used different combinations of motor-driven mechanisms, stepping circuits, pulse generators, relay chains, and asynchronous control.

The continuity with a modern processor is architectural, not a claim of identical circuitry:

  • both need events to occur in a controlled order;
  • both rely on physical timing;
  • both must allow signals to become valid before they are consumed.

A quartz-referenced PLL and a self-interrupting relay solve very different engineering problems. What they share is the production or use of repeated timing events.

Try the Simulated Relay Oscillator

The embedded circuit lets you observe the feedback loop without subjecting real contacts to continuous chatter:

A simulated relay oscillator. Apply power, watch the normally closed contact interrupt the coil, and compare the logical states with the time-dependent motion.
Open in the Relay Lab

As you experiment, ask:

  1. Where is the output measured: across the contact, the coil, or a separate contact?
  2. Does the model include operate and release delays?
  3. Is contact bounce modeled or idealized away?
  4. Are high and low times equal?
  5. What happens if the delay parameters change?

Those questions turn an animation into an engineering model review.

Building It in Hardware

Continuous relay chatter can shorten contact life, create electromagnetic interference, and produce inductive voltage transients. If you construct a physical version:

  • use a low-voltage isolated supply;
  • verify coil voltage, current, and contact ratings;
  • do not switch mains voltage for this experiment;
  • add manufacturer-recommended coil suppression;
  • understand that suppression can alter release time;
  • stop if contacts arc excessively, stick, or overheat.

The simulation is the right place to learn the topology. A real implementation requires the relay datasheet and an appropriate driver/protection design.

What You Learned

  • A normally closed relay contact can interrupt its own coil and create a relaxation oscillator.
  • The zero-delay Boolean relation Q=Q‾Q=\overline{Q} has no stable binary solution; physical delay determines the actual trajectory.
  • Operate time, release time, coil dynamics, and bounce shape the period and waveform.
  • Some buzzers and vibrating bells use this mechanism, but many ringing devices use other designs.
  • A free-running oscillator is not the same thing as a latch or flip-flop.
  • A dependable digital clock requires reference stability, conditioning, distribution, and timing verification.
  • Modern synchronous systems update selected storage elements, often across multiple clock domains—not every circuit on every edge.

Next in Building a Computer from Relays, feedback is arranged to create two stable states instead of endless switching. Continue to the R-S latch, where feedback becomes memory.

Open the DigiSim Relay Lab

Apply the concept in a simulator model.