The Escapement Ticks in Discrete States
Under my loupe, the pallet fork sits frozen mid-swing. This is the heart of the watch I’m dismantling — the Swiss lever escapement — and I’ve been staring at it for twenty minutes trying to understand the sequence. Lock. Impulse. Drop. Lock again. The escape wheel can only advance when the balance swings far enough to release the pallet jewel. Otherwise, everything waits.
It’s a state machine in brass.
Moore and Mealy formalized finite automata in the 1950s, but watchmakers had been building them for centuries without the vocabulary. The escapement has exactly four states, and the transitions are governed by angular position. No ambiguity, no race conditions. The physics enforces the formalism.
In Scheme, we can model this with a recursive state function:
(define (escapement state ticks)
(if (= ticks 0) 'done
(let ((next (case state
((locked) 'impulse)
((impulse) 'drop)
((drop) 'locked)
(else 'locked))))
(display state) (newline)
(escapement next (- ticks 1)))))
(escapement 'locked 6)
Output:
locked
impulse
drop
locked
impulse
drop
Java’s enums with abstract methods give us the same pattern, but the transitions live inside each state:
enum Escapement {
LOCKED { Escapement next() { return IMPULSE; } },
IMPULSE { Escapement next() { return DROP; } },
DROP { Escapement next() { return LOCKED; } };
abstract Escapement next();
public static void main(String[] args) {
var state = LOCKED;
for (int i = 0; i < 6; i++) {
System.out.println(state);
state = state.next();
}
}
}
The Scheme version keeps state external — you pass it forward through recursion. The Java version encapsulates transitions inside the states themselves. Neither is wrong. The escapement doesn’t care how you model it, as long as the sequence holds.
What strikes me, tweezers in hand, is how little tolerance the mechanism has for deviation. If the pallet stone is worn unevenly, the impulse phase shortens. The watch loses time. In code, a state machine this simple can’t fail unless you break the transition logic. In brass, everything degrades. The kinked hairspring on my workbench is proof enough of that — the balance wheel can’t swing far enough to release the pallet, so the whole system sits in permanent LOCKED state. Dead.
Maybe that’s the real difference between software and horology: in code, states are eternal. In a watch, they’re borrowed time.