PREVIEW
relay-logic

Relay Oscillator: Feedback, the Buzzer, and the Birth of the Clock Signal

DigiSim Relay Team DigiSim Relay Team
11 min read

In the previous post, we finished building something that computes: given any three input bits, the full adder works out the correct sum and carry in a single stroke. You set the inputs, the relays respond, and the answer appears. Done.

Every circuit we have built so far shares that same quality. Give it inputs; it gives you outputs. Change the inputs; the outputs change to match. The circuit reacts, settles, and waits for the next question. It is, in a precise technical sense, combinational: its output at any moment depends only on its inputs at that moment — nothing else. History does not matter. Time does not matter. Only the current combination of 0s and 1s at the input terminals.

That is about to change.

In this post we wire one relay’s output back into its own coil — and discover a circuit that cannot settle, cannot rest, and cannot be described by a truth table at all. That circuit is an oscillator, and it is the gateway to the second half of digital logic: the world where time, sequence, and memory matter.

The dangerous question: what if the output feeds the input?

Everything we have done so far has been careful to keep the flow of information moving in one direction: inputs enter on the left, outputs emerge on the right. A well-behaved combinational circuit never lets its output circle back and influence its own input. Keep those paths separate and the logic is clean, predictable, and easy to reason about.

Now ask: what happens if you break that rule?

Start with the simplest possible case. Take a single relay wired normally closed — so when the coil is energized, the output contact opens, cutting off current. Now take a wire from that output contact and run it directly back to power the coil.

Trace what happens from the moment you connect power to the system:

  1. Power arrives. The coil is energized.
  2. The coil energizes — the normally closed contact opens.
  3. The contact opens — current to the coil is cut off.
  4. The coil de-energizes — the spring snaps the contact closed again.
  5. The contact closes — current rushes back to the coil.
  6. Go to step 2.

The circuit has trapped itself in a logical argument it cannot resolve. The coil wants to be energized if and only if the contact is closed — but whenever the contact is closed, the coil energizes and opens it. There is no stable resting place. The circuit cannot be ON because being ON switches it OFF. It cannot be OFF because being OFF switches it ON.

So it does the only thing it can: it keeps going.

What “endlessly cycling” actually sounds like

Unlike every previous circuit in this series, the oscillator does not need you to do anything. There is no switch to flip, no input to change. The moment power is applied, the relay starts talking to itself — and it does not stop.

Each cycle, the armature travels from open to closed and back again. That mechanical movement takes real time — the same travel delay we first noticed in Post 1, when you were asked to watch for the tiny gap between flipping the switch and the lamp responding. In the oscillator, that delay is not a minor detail. It is the circuit. The time the armature takes to move is the time each half-cycle lasts. A faster armature oscillates at a higher frequency; a heavier one, lower. The physical mechanics set the rhythm.

The output of this circuit is not a fixed 0 or a fixed 1. It is a square wave — a signal that alternates: ON, OFF, ON, OFF, ON, OFF — ticking like a clock, because it is, in exactly the right sense, acting like a clock.

Why a truth table no longer applies

Every previous post in this series has included a truth table. This post does not — and that absence is deliberate, and important. Let’s be precise about why.

A truth table answers the question: given these input values, what is the output? It lists every possible combination of inputs and maps each one to a definite output. The full adder’s table has eight rows — eight input combinations, eight answer pairs. Static. Complete. Timeless.

The oscillator makes a mockery of that question. It has no external inputs (or its “input” is just the power supply, which never changes). Ask “what is the output?” and the honest answer is: it depends on when you ask. Ask during the ON half-cycle and the answer is 1. Ask during the OFF half-cycle and the answer is 0. Ask a millisecond later and it might have flipped. The output depends not on the inputs but on time — specifically on the history of the circuit’s own behavior.

This is the defining property of sequential logic. A sequential circuit’s output depends on its inputs and on the sequence of events that has already occurred — on its own internal history. Combinational logic is a function: same inputs always produce the same output, with no memory and no time dependence. Sequential logic is a state machine: it has an internal state that evolves over time, and the output reflects that state.

The oscillator is the simplest possible sequential circuit. It has two states — coil-on-contact-open and coil-off-contact-closed — and it cycles through them automatically. Here is its behavior expressed as a timing sequence rather than a truth table:

StepCoil stateContact stateOutput
1EnergizedOpen0
2De-energizedClosed1
3EnergizedOpen0
4De-energizedClosed1

Each row follows from the previous one — the state at step 3 depends on what happened at step 2, which depended on step 1. No static input combination determines any single row; the sequence does. That distinction, between a truth table and a timing diagram, marks the exact boundary between combinational and sequential logic.

You have had one of these in your house all along

Here is the moment in this series when the abstract clicks into something you have almost certainly heard.

The common electric doorbell — the kind that makes a buzzing or ringing sound rather than playing a recorded chime — is a relay oscillator. Not “similar to” one; it literally is one. The electromagnetic coil pulls a striker against a bell; in doing so, it pulls the striker away from the electrical contact that powers the coil; the coil loses power; the spring returns the striker; the contact re-closes; the coil fires again. Every buzz is one cycle. The rapid chattering you hear is the armature traveling back and forth dozens of times per second.

The old-fashioned telephone ringer works the same way — two bells, the clapper swinging between them driven by an oscillating electromagnet. The electric school bell that marks the end of every period in every school corridor. The alarm buzzer on a kitchen timer. All relay oscillators. All versions of the circuit in this post.

This is one of those facts that, once you know it, you cannot unhear. The next time a doorbell rings in a film, or an alarm sounds on a ship in an old movie, you will know: that is a relay talking to itself — a logical paradox converted into mechanical rhythm by the sheer physics of an armature with mass and a spring with resistance.

The step from buzzer to clock

The doorbell’s oscillation is charming but unruly. The frequency drifts with temperature, with mechanical wear, with battery voltage. That is fine for a doorbell. It is catastrophic for a computer.

A computer needs to coordinate the actions of many circuits. Some circuits are faster than others; some take longer to settle on an output after their inputs change. If you want circuits to share results — if you want the output of the adder to feed the input of a register, for instance — you need a way to say: everyone update at the same moment. Operate in lockstep. Take one step, then take the next.

The way computers say that is with a clock signal: a regular, repetitive pulse that the entire system uses as a shared heartbeat. Every time the clock ticks from 0 to 1, every flip-flop, every register, every latch that cares about synchronization takes one step forward. In between ticks, the logic is allowed to ripple and settle. At the tick, everyone freezes the new values in place. The clock is what transforms a heap of combinational logic into a machine that marches through a program one instruction at a time.

And where does a clock signal come from? An oscillator. A circuit that cycles between 0 and 1 on its own — reliably, continuously, at a controlled rate.

The relay computers of the 1940s — the Harvard Mark I, the Bell Labs relay calculators, Konrad Zuse’s Z-series machines in Germany — were each clocked by something very close to this circuit. The relay oscillator provided the master pulse; the rest of the machine followed its lead. As technology advanced from relays to vacuum tubes, then to transistors, then to quartz crystals and phase-locked loops, the underlying idea remained exactly the same: an oscillating circuit sets the tempo and the logic marches in time.

In a modern processor running at 4 GHz, the clock signal oscillates four billion times per second. That is the oscillator, taken to its logical end. The relay chattering in your doorbell and the heartbeat of a laptop CPU are the same architectural idea, separated by a factor of roughly a hundred million in frequency.

Try it yourself — and turn the sound on

This is the most audible circuit in the entire series. Turn your sound on before you interact. What you are about to hear is not a synthesized effect; it is the acoustic output of the relay armature being driven back and forth by the self-interrupting circuit — the relay’s own click, repeating.

A relay oscillator: the output feeds back against its own coil, and the circuit cycles without pause. Turn sound on to hear the armature chattering — this is exactly how an electric buzzer works. Open it in the DigiSim Relay Lab.

Three things to notice as you watch and listen:

  1. You do not have to do anything. Connect the power and the circuit runs. Every previous circuit in this series waited for you to flip a switch. This one starts on its own and doesn’t need you. That self-sufficiency is new — and fundamental to what a clock signal is. The computer doesn’t wait for the programmer to manually tick the clock; it ticks itself.

  2. Count the clicks and try to estimate the frequency. How many cycles per second? Then think about what would make it faster or slower. A lighter armature would travel faster, shortening each half-cycle. A stiffer spring would snap back faster, the same effect. The physical properties of the relay directly determine the clock frequency — the mechanics are the timing. No external component is needed.

  3. Compare what you hear now to what you heard in Post 1. In Post 1, you heard one click when the relay pulled in and one click when it released — two distinct sounds marking a state change you initiated. Here, those same two sounds repeat automatically, driven by the circuit itself. The relay has become a musician playing a two-note rhythm on a loop, and you are no longer the conductor.

The border between two worlds

It is worth pausing on what this circuit represents in the arc of this series.

Posts 1 through 14 lived entirely in combinational logic. Each circuit — the AND gate, the OR gate, the NOT, the half adder, the full adder — was a function in the mathematical sense. Inputs in, outputs out, no memory, no time. You could verify any of them with a truth table. The outputs were determined completely and immediately by the current state of the input switches. These are the circuits that compute.

From Post 15 onward, we are in sequential logic. Circuits have state. Their outputs depend on their history. Time matters. The truth table is replaced by a state diagram, a timing diagram, a sequence. These are the circuits that remember — and that march through steps in time. They are the circuits that make a computer a computer rather than a very complicated calculator.

The oscillator is the hinge between those two worlds. It introduces feedback — the property that makes sequential logic possible — in the starkest possible form: a circuit whose output has looped back to become its own input, with nothing else going on. From here, the next step is to ask: can feedback be made to settle, rather than oscillate? Can we find a feedback configuration that holds still, rather than one that keeps cycling?

The answer is yes. And a circuit that holds still under feedback is a circuit that remembers.

What you just learned — and what’s next

Post 15 marks a turning point in this series. Here is what you now understand:

  • An oscillator is built by wiring a relay’s output back to oppose its own coil — creating a logical paradox that the circuit resolves by cycling between its two states without rest.
  • There is no truth table for an oscillator. Its output depends on time and history, not on any fixed input combination. This is the defining property of sequential logic, as opposed to the combinational logic of every previous post.
  • Instead of a truth table, a timing sequence captures the oscillator’s behavior: state → state → state, each step following causally from the last.
  • The electric buzzer and doorbell are relay oscillators — the circuit in this post, given a striker or a bell. You have lived with relay oscillators without knowing it.
  • The oscillator is the origin of the clock signal: the repeating pulse that lets every circuit in a computer update in lockstep. Relay computers in the 1940s used this mechanism directly; modern processors use the same principle at billions of cycles per second.

In Post 16 of Building a Computer from Relays, we ask the natural question: can feedback be controlled, rather than left to run wild? Wire two relays so each can hold the other in place, and you get a circuit with two stable states — one that holds still and remembers which state it was last put into. That circuit is the R-S latch, the first memory element. Where the oscillator refuses to settle, the latch refuses to change until you tell it to. Feedback, tamed.

DigiSim Relay Lab