Time-O-Matic
Time-O-Matic records the finish of a cross-country race. One button starts the clock, another records each finisher, and a thermal printer adds a line of tape for each one while the race runs. It runs on a Raspberry Pi Pico 2 W and needs no phone or network.
I coach high-school cross-country, and it has timed real meets since 30 September 2026. It has already saved several races that other teams were supposed to be timing.
Try it
This simulator is a port of the standalone firmware’s logic to your browser. It draws the same screens with the display’s own fonts and prints the same tape. Press START at the gun and FINISHER for each runner, then hold START for two seconds to end the race. Wait ten seconds after a finisher to see the tape feed, or switch off the printer to see the start interlock. Once the simulator has focus, the S and F keys work as well.
The hardware
- Controller
- Raspberry Pi Pico 2 W (RP2350), firmware in C on the Pico SDK
- Controls
- Two Kailh BOX Navy keyboard switches with printed keycaps
- Record
- QR204 58 mm thermal printer, RS-232 through a MAX3232, 9600 baud
- Display
- 128×64 SSD1306 OLED (a 20×4 LCD on the first version)
- Clocks
- RP2350 monotonic counter for race time; DS3231 RTC and ATGM336H GPS with PPS for the wall-clock times on the tape
- Power
- 2S drone battery, direct to the printer and through a buck converter to the Pico
- Case
- OpenSCAD, printed in PLA+, 165 × 135 × 68 mm, with strap slots
How it started
On 23 September I filmed the finish of a meet on my phone, so the officials would have a second record of bib numbers. They ended up needing it. Two days later I had a receipt printer on the bench for fun, and the two ideas met: could a small board and a printer replace the clunky handheld timer, then do things only big, expensive races get, such as live results and mile splits?
The first plan was a phone-assisted system, and much of it got built (see below). But once the printer, display, buttons and GPS all worked, the shortest path to something useful was to drop the phone entirely and replicate the handheld: start button, lap button, one printed line per finisher. That firmware was written on 28 September and timed its first race two days later.
What the design protects
The operator gets one chance at each finisher, so most of the firmware’s decisions exist to keep that press from being lost or corrupted.
- Timestamps come first. One core timestamps button edges and nothing else that could delay them. The other handles the display, GPS and the slow printer, so a press is captured even while an earlier line is still printing.
- Race time never touches the wall clock. Elapsed time comes only from the monotonic counter. The RTC and GPS only label the tape, the mapping between them freezes at the start, and GPS corrects the RTC only between races. Gaining or losing a fix mid-race changes nothing.
- No paper, no race. The tape is the primary record, so the firmware asks the printer for its status at every start and refuses to start if it gets no answer. GPS lock isn’t required.
- The start button can’t end the race by accident. It has to be released after the start before it can act as the end control, and ending takes a two-second hold. The recorded end time is when the hold began, not when it was accepted.
- Power-up can’t invent finishers. On the first hardware boot, power sequencing looked like button presses: the timer started a race on its own and recorded two zero-time finishers. Now both inputs must stay released for 100 ms before they’re enabled, and anything pending from before that is discarded.
- A dead display doesn’t stop the race. Display writes have a 4 ms timeout and only send what changed. After three failures in a row the firmware stops talking to the display, and timing and printing carry on.
The tape’s layout came from a problem with the printer: the newest line sits below the tear bar, out of sight. Feeding after every finisher would waste paper and scatter a pack across the tape. So lines print with no space between them, and after ten seconds without a finisher the printer feeds two blank lines. The newest time becomes readable, and the gaps on the tape show how the race broke into packs.
From cat-treat carton to case
The first enclosure was an Inaba Churu carton. It timed the first meet as the cat gogurt timer, to the mild perplexity of the other coaches and wondrous delight of the athletes. It passed its test, but I only had the one.
There are no tables at a high-school cross-country race, so the case is designed to be carried and used in the hand. Each control has its own shape: START/END is a small flat key in a three-sided guard, FINISHER is a large grooved paddle you can find by feel, and the power rocker has a guard of its own. The label says FINISHER rather than FINISH to keep it distinct from END. Swapping the LCD for the small OLED cut the face area by about 32%, since the display only needs to give the time and reassure the operator.
Before committing to long prints, I tested the fit with small coupons, which caught rigid tabs on both sides of the printer that stopped it seating. The first keycaps also failed in a way that mattered: their posts were 0.3 mm too wide and held the switch down at full travel, which could have swallowed the next finisher. They now have a 5.2 mm post, and they return freely.
How well it works
The carton’s first meet was a varsity race on 30 September, and I compared its tape with the published results and my phone video of the finish.
| Finish presses / published finishers | 30 / 30, none extra or missing |
|---|---|
| First-to-last span, published | 306.0 s |
| First-to-last span, tape | 306.2 s |
| Gap between successive finishers, mean difference | +0.007 s signed, 0.290 s absolute |
| Tape minus published, each finisher | +0.1 to +1.2 s, mean +0.48 s |
This isn’t a measurement of absolute accuracy. The published results for this race show whole seconds, so each comparison hides up to a second of rounding, and the two timers’ start presses may differ. (The first part is a polite way of saying that the tape from the cat-treat carton was finer-grained than the official results: tenths of a second against whole seconds.) What it does show is that the clock didn’t meaningfully drift and no event was lost. It is also hand timing, not fully automatic timing, and reaction time at the button matters far more than the counter’s resolution.
The phone and timer weren’t connected, but the switches click loudly enough to hear on the video. Sliding the tape’s pattern of 30 gaps across the filtered audio found the first finish at 18.944 s into the video. Fitting only the odd-numbered or only the even-numbered finishers landed within 12 ms of that. Fitting only the last 15 landed 152 ms later, which fits locking onto the switch’s release click instead. The video frames at the predicted times show the right runners, even in tight packs. It’s a forensic trick rather than a sync method, but it let me line up the tape with the video after the fact.
Later races have been bigger: the 17 October tape above reached at least 68 finishers.
It has also come full circle. The handheld it replicates appears to be an Ultrak 498 or its successor, the 598, a one-piece printing stopwatch that sells for about $390. At heart it’s a lap timer: the 498 manual lists lap/split and lap/speed displays, average and best lap times, and dual timers for training programs, and the button pressed for each finisher is labelled LAP/RESET. So some meets use a lap timer to time races, and now I take a race timer to track workouts and press FINISHER at the end of each repetition.
The bigger system, not yet at meets
The tape records times and places, not who finished. At each race I also write my own athletes’ names on it in pen as they come in, since I know them by sight. A line that has just printed is still hidden below the tear bar, so I draw an arrow to where it will come out and write the finisher number next to the name.
That covers my own team. Matching everyone else to a place is still manual work after the race, and the phone-assisted firmware and native Android app aim at that. They exist as prototypes, tested on the bench and against recorded video, and they haven’t been used to time a meet:
- the Pico sends each finish to the phone over BLE and stays the timing authority, so a phone crash can’t change a timestamp;
- an append-only EEPROM journal survives power loss, and 45 presses in 7 seconds caused no overflows or write failures on the bench;
- the phone films the finish and suggests a bib for each press, which a person accepts or corrects in a fast review queue. Timing events stay immutable, and each correction is added as a new record.
The early numbers are promising, with caveats. On the 30 September video, OCR around each press read 27 of 30 bibs exactly, and a person recovered the other three. Replaying clips from the 23 September meet, ranking bibs by the order runners approached the line put the right one first for 73 of 74 finishers. Those 74 are provisional mappings from the same footage, and neither test covers rain, darkness, a moving camera or folded bibs. The aim was never to let software decide results silently: it’s to give a person better evidence, faster.
Known limits
- The standalone firmware has no power-loss recovery: the paper tape is the record, and cutting power mid-race means no ending footer and no resuming.
- A human operator still has to tell apart runners who finish shoulder to shoulder.
- The case is PLA+ and, in the words of its own design notes, “splash-resistant only in the optimistic sense enjoyed by the original Churu carton.” A weatherproof revision would need a gasketed lid, covered connectors and a display window.
How it was made
GPT-6.1 Sol, through Codex, wrote most of the firmware, Android app, video analysis and CAD, with Claude Opus covering a stretch when Sol’s backend was down. I chose the direction and did the wiring, soldering, printing, fit testing and race-day operation. To stop the agent waiting on my fingers, I wired a second Pico to the timer’s button inputs as a virtual button-presser, so it could run its own races on the bench. It took five days to get from the first test print to the first race.
One offshoot, written with Claude Opus 5.5, is a pace light for track workouts: a station with a buzzer countdown and a white LED that glows up to a pace group’s target time, blinks exactly on it and pulses when they’re late. The core of it works on the bench, so it belongs in a later entry.