No description
  • C++ 76.9%
  • OpenSCAD 23.1%
Find a file
Stewart Bennell 7355806904
Add adjustable finish line laser mount models and BOM
Laser holder, adjust cap and lower cover for a flush, spring loaded
laser mount on the finish line tower. Document printed parts, hardware,
consumables and tools in the BOM and README.
2026-10-11 10:23:23 +11:00
3D Model Add adjustable finish line laser mount models and BOM 2026-10-11 10:23:23 +11:00
docs Update LaneBoard wiring guide for J5 pin 2 as GND 2026-10-06 15:03:24 +11:00
firmware Power DisplayBoard from master 12V with TSR3-2450N converter 2026-10-05 11:26:54 +11:00
hardware Add adjustable finish line laser mount models and BOM 2026-10-11 10:23:23 +11:00
.gitignore Add DisplayBoard KiCad project for HUB75 LED panel display 2026-09-30 12:54:11 +10:00
LICENSE Update LICENSE 2026-04-02 19:02:48 +11:00
plan.md Switch MasterBoard and DisplayBoard to 38 pin ESP32 2026-10-06 18:47:55 +11:00
README.md Add adjustable finish line laser mount models and BOM 2026-10-11 10:23:23 +11:00
TODO.md Switch MasterBoard and DisplayBoard to 38 pin ESP32 2026-10-06 18:47:55 +11:00

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 Board: ARM + Start Button] ──> 555 pulse ──> MOSFET ──> CO₂ Solenoids L1 + L2
                                                └──> cable ──> [Master Board] ──> Teensy L1 + L2
                                                                (isolated, simultaneous start)

[850nm IR Laser]──beam──>[SFH203 + LM393 on Lane Board]──> Teensy (interrupt on beam break = finish)

Teensy L1 ──UART──> ESP32 (Master Board) ──WiFi──> Web Browser (live results)
Teensy L2 ──UART──> ESP32 (Master Board) ──UART──> Display ESP32

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 ×2 On each Lane Board. Converts photodiode signal to clean digital edge
Start Board ×1 Start line. ARM switch, single 200 ms pulse, MOSFET fires both CO₂ solenoids
Master Board ×1 Finish line. Carries the ESP32, powers the lane boards, isolated start input
Lane Board ×2 Finish line. Teensy 4.0 with start and stop comparators
Jaycar SS0903 Solenoid ×2 12V — fires CO₂ launcher over-centre mechanism
Momentary pushbutton ×1 Start trigger — simultaneously starts both timers and fires CO₂
ARM switch + LED ×1 Start button is live only when armed

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

3D Printed Finish Line Laser Mount

Flush, adjustable 850 nm laser mount for the finish line tower. The laser sits in a holder glued into a cap that pivots on one screw, with spring loaded yaw and pitch screws for alignment. Files are in 3D Model/Finish Line/, generated from finish_line_laser_align.scad. Per lane: one each of 2026_Finshline_1_laser_mount.stl (at least 2 perimeters), laser_adjust_cap.stl, laser_holder.stl and laser_tower_lower_cover.stl. Print one white photodiode_alignment_target.stl as a setup tool.

See hardware/BOM.md for the screws, inserts, springs and tools.

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
  display/display.ino         ESP32 HUB75 LED panel display (Display Board)
hardware/
  BOM.md                      — Full component list (electronics + launcher hardware)
  LaneBoard/                  KiCad project for the lane timer PCB (x2)
  MasterBoard/                KiCad project for the ESP32 master PCB (finish line)
  StartBoard/                 KiCad project for the start button and solenoid PCB (start line)
  DisplayBoard/               KiCad project for the ESP32 HUB75 LED panel display PCB
3D Model/
  Launcher/                   — STL files for the CO₂ launcher (print ×2)
  Finish Line/                Laser mount STLs and OpenSCAD source (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)

  1. Install Teensyduino
  2. Open firmware/lane_timer/lane_timer.ino in Arduino IDE
  3. Board: Teensy 4.0, CPU Speed: 600 MHz
  4. 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)

  1. Install ESP32 Arduino core
  2. Install libraries: ArduinoJson (Benoit Blanchon) and EspSoftwareSerial (display link on GPIO25)
  3. Open firmware/master/master.ino
  4. Board: ESP32 Dev Module
  5. Upload, then connect to WiFi AP CO2_Dragster and browse to http://192.168.4.1

Display (ESP32)

  1. Install libraries: ESP32 HUB75 LED MATRIX PANEL DMA Display and Adafruit GFX Library
  2. Open firmware/display/display.ino
  3. Board: ESP32 Dev Module
  4. Upload. The display shows NO LINK until the master is running, then each lane's state and time
  5. If the lanes appear on the wrong panels, swap LANE1_X and LANE2_X. BRIGHTNESS sets panel brightness and current draw

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
Master → Display DISP <state1> <time1_us> <state2> <time2_us> <winner> Full race state, sent on every change and once a second. State is IDLE, READY, RUNNING, FINISHED or FAULT; winner is 0, 1 or 2

Wiring

See docs/wiring_guide.md for full wiring instructions, circuit diagrams, and the pre-race checklist.

License

MIT — see LICENSE