This chapter explains which device owns which job. That matters because the Raspberry Pi organizes races while ESP32 boards capture fast sensor pulses locally. It also keeps the design understandable when a starting gate is added later.
Registration station ───── local Wi-Fi, no Internet ── Raspberry Pi
(participants + vehicles) Racing Manager + API + UI
Race-director notebook ─── LAN or local Wi-Fi ─────────┤
Race-director notebook ─── HDMI/USB-C/DisplayPort ── projector or external TV
│ WebSocket (primary)
┌────────────────────────────┴────────────────────────────┐
│ │
ESP32 START ESP32 FINISH
L1 start, L2 start L1 finish, L2 finish
╰──────────────── optional RS485 ─────────────────────────╯
The Raspberry Pi is not a time-critical sensor controller. It manages races, participants, UI, storage, and connectivity. Each ESP32 debounces local sensors using hardware interrupts and retains events through temporary network loss.
The registration station is one notebook or tablet at the check-in desk. It enters names and vehicle data into Racing Manager before the race. Local Wi-Fi is therefore an internal working network, not visitor Wi-Fi. The race director opens the spectator view on their notebook. The projector or external TV connects directly to that notebook only (for example through HDMI, USB-C/DisplayPort adapter, or docking station); the Raspberry Pi does not supply a dedicated spectator-display signal.
The diagram and table below show the reference design: 2 modules,
ESP32 STARTandESP32 FINISH, each covering both lanes. The shippedESP32_WEBSOCKET_DIRECTrace-device mode instead defaults to 4 single-sensor modules —lane-1-start,lane-1-finish,lane-2-start,lane-2-finish, one GPIO input each, matching the working ESP32 sensor firmware guide sketches. Both module counts speak the same WebSocket protocol; the backend’sexpectedDeviceIdssetting controls whichdevice_ids it accepts, so either topology can be wired up without a protocol change.
| Measurement point | Owner | Sensor ID | Event |
|---|---|---|---|
| Lane 1 start | ESP32 START | start.lane_1 |
beam_broken |
| Lane 2 start | ESP32 START | start.lane_2 |
beam_broken |
| Lane 1 finish | ESP32 FINISH | finish.lane_1 |
beam_broken |
| Lane 2 finish | ESP32 FINISH | finish.lane_2 |
beam_broken |
IDLE → HEALTHY → ARMED → RUNNING → FINISHED → IDLE
│ │
sensor fault └─ start/finish events
race.arm with a race_id.race.armed; blocked or faulty sensors prevent a start.race.start starts the race. With a future gate, START opens gates together and sends the start reference to FINISH.race.reset clears only transient module race state.race.arm, the Pi runs multiple time-sync rounds (time.sync_request/time.sync_response) and stores module offset and estimated uncertainty.estimated quality flag and stated synchronization uncertainty; do not claim guaranteed sub-millisecond scoring.race.start_reference gives a particularly consistent race reference.The Pi publishes a WPA2-protected SSID such as RacingManager, with no Internet requirement. Connect only start-01, finish-01, and the registration station. Give the Pi a stable address, for example 192.168.50.1; reserve ESP addresses or identify devices by ID. For events, a dedicated travel router makes a more stable AP while the Pi remains connected by Ethernet.
Navigation: ← Materials · Next: Wiring → · Deutsch
All topics: Project overview · Materials · Architecture · Wiring · Firmware · Protocol · Setup · Testing · ESP agent brief · Racing Manager integration