- C++ 100%
Remove the 1x02 through-hole pin header (J3) and add MountingHole_2.5mm footprints. Update many footprint details: reposition reference/value/text coordinates for several resistors and U2, adjust Teensy4.0 footprint position/orientation and pad rotations, and reorder/fix multiple silkscreen/drawing primitives and pad angles. Project meta files (.kicad_prl, .kicad_pro) were also updated. |
||
|---|---|---|
| 3D Model/Launcher | ||
| docs | ||
| firmware | ||
| hardware | ||
| .gitignore | ||
| LICENSE | ||
| plan.md | ||
| README.md | ||
CO2 Dragster Racing Timer System
A 2-lane CO2 dragster race timing system. Each lane has a dedicated Teensy 4.0 MCU measuring elapsed race time with microsecond resolution, reporting results to a central ESP32 master that serves a live web page over WiFi.
System Overview
[Start Button] ──> [1× Relay] ──> CO₂ Solenoids L1 + L2 in parallel (fires both lanes)
└──> Teensy L1 + Teensy L2 (hardware interrupt, simultaneous start)
[850nm IR Laser]──beam──>[SFH203 + LM393]──> Teensy (interrupt on beam break = finish)
Teensy L1 ──UART──> ESP32 Master ──WiFi──> Web Browser (live results)
Teensy L2 ──UART──> ESP32 Master
Hardware
| Component | Qty | Purpose |
|---|---|---|
| Teensy 4.0 | ×2 | Lane timer MCU — 600 MHz, hardware interrupts, µs timing |
| ESP32 dev board | ×1 | Master MCU — WiFi web server, receives times from both lanes |
| 850 nm IR Laser Module | ×2 | Finish line emitter |
| SFH203 Photodiode | ×2 | Finish line receiver (~5 ns rise time) |
| LM393 Comparator Module | ×2 | Converts photodiode signal to clean digital edge |
| 5V Relay Module | ×1 | One relay fires both CO₂ solenoids wired in parallel |
| Jaycar SS0903 Solenoid | ×2 | 12V — fires CO₂ launcher over-centre mechanism |
| Momentary pushbutton | ×1 | Start trigger — simultaneously starts both timers and fires CO₂ |
See hardware/BOM.md for the full component list including launcher hardware.
Timing Accuracy
- Resolution: 1 µs (
micros()on Teensy 4.0 at 600 MHz) - Interrupt latency: ~100–200 ns
- Practical accuracy: Limited by beam geometry and car body width (~0.1–0.5 ms), not electronics
- Target spec: 1 ms — exceeded by ~1000×
3D Printed Launcher
Based on Printables model 451928 — over-centre spring mechanism fired by a 12V solenoid. Print two complete sets (one per lane).
Default solenoid: Jaycar SS0903 — use Launcher - centre plate 12mm.stl
Alt solenoid: 13X30TL (13mm OD × 30mm) — use Launcher - centre plate 12mm - MOD for 13X30TL Solenoid.stl
| STL File | Notes |
|---|---|
Launcher - centre plate 12mm.stl |
Default — fits Jaycar SS0903 |
Launcher - centre plate 12mm - MOD for 13X30TL Solenoid.stl |
Modified — fits 13X30TL |
Launcher - stand.stl |
|
Launcher - hammer.stl |
Drives the CO₂ piercing bolt |
Launcher - lever.stl |
Over-centre arm |
Launcher - knob.stl |
|
Launcher - nozzle.stl |
CO₂ car guide |
Launcher - inner plate 3mm.stl |
|
Launcher - outer plate 12mm.stl |
|
Launcher - outer cover 3mm.stl |
Repository Structure
firmware/
lane_timer/lane_timer.ino — Teensy 4.0 (identical firmware for both lanes)
master/master.ino — ESP32 master with WiFi web UI
hardware/
BOM.md — Full component list (electronics + launcher hardware)
3D Model/
Launcher/ — STL files for the CO₂ launcher (print ×2)
docs/
wiring_guide.md — Step-by-step wiring instructions and circuits
plan.md — System design document
Firmware Setup
Lane Timer (Teensy 4.0)
- Install Teensyduino
- Open firmware/lane_timer/lane_timer.ino in Arduino IDE
- Board: Teensy 4.0, CPU Speed: 600 MHz
- Upload the same sketch to both Teensys — lane ID is set by a hardware jumper on Pin 4:
- Lane 1: jumper Pin 4 → 3.3V
- Lane 2: leave Pin 4 unconnected
Master (ESP32)
- Install ESP32 Arduino core
- Install library:
ArduinoJson(Benoit Blanchon) - Open firmware/master/master.ino
- Board: ESP32 Dev Module
- Upload, then connect to WiFi AP
CO2_Dragsterand browse tohttp://192.168.4.1
UART Protocol
Communication between each Teensy and the ESP32 uses 115200 baud ASCII lines:
| Direction | Message | Meaning |
|---|---|---|
| Teensy → ESP32 | LANE:x READY |
Ready for a race |
| Teensy → ESP32 | LANE:x START |
Start interrupt fired |
| Teensy → ESP32 | LANE:x TIME:xxxxxx |
Race finished; elapsed time in µs |
| Teensy → ESP32 | LANE:x FAULT:BEAM |
Beam not detected at startup |
| ESP32 → Teensy | RESET |
Reset to READY state |
| ESP32 → Teensy | STATUS |
Request current state |
Wiring
See docs/wiring_guide.md for full wiring instructions, circuit diagrams, and the pre-race checklist.
License
MIT — see LICENSE