A modular, embedded vehicle telemetry platform modernising an analog sports car with real-time data acquisition, high-frequency logging, and dynamic HUD rendering.
View Repository on GitHubHardware architecture and polling figures pulled directly from the physical build.
| Vehicle Mule | 2004 Lotus Elise 111R (2ZZ-GE ECU) |
|---|---|
| Processing Core | Raspberry Pi 5 — Broadcom BCM2712, VideoCore VII GPU |
| Bus Communication | ISO 9141-2 (K-Line) over USB — Vgate vLinker FS, FTDI FT230X bridge |
| Display Hardware | 5-inch capacitive touchscreen — 800×480 native resolution (DSI) |
| Sampling & Refresh | Fast PIDs (RPM, Speed, Throttle) @ 20 Hz · Slow PIDs (Coolant, Battery, IAT, Fuel) @ 1 Hz round-robin · 60 FPS vector rendering |
| UI Framework | Python 3 / PyQt5 — QPainter vector graphics engine |
Upon power-up, the software launches directly into a clean kiosk menu. Rather than locking the driver into a single interface, the touchscreen allows instant selection between Road Mode and Track Mode before initializing the OBD-II polling thread.
This onboarding layer ensures the system configures its active query set (needed_fields) before opening serial communications, optimizing bandwidth from the moment the engine fires.
One telemetry core, two dedicated UI profiles tailored for street ergonomics or high-RPM motorsport focus.
Focused on clear road parameters: large digital speed readout, battery voltage, intake air temperature, fuel level, and balanced coolant zone alerts.
Dominant central tachometer with progressive shift lights sweeping up to 8,500 RPM, dedicated throttle position bar, and lap timing HUD.
A pixel-perfect Web Component port of the Python PyQt5 rendering engine. Experience the dashboard directly in your browser with real-time physics and pedal inputs.
Comparing desktop simulation testing against real-world in-car testing inside the Lotus Elise cockpit.
Verifying UI smoothing, color thresholds, and gauge sweep animation on desktop via MockEngine before deploying to hardware.
Real-time road layout data ingestion over ISO 9141-2 K-Line inside the Lotus Elise, proving immediate throttle response.
Testing tachometer sweep, progressive shift lights, and throttle bar response using simulated high-RPM data.
Full track layout running live in the cockpit with real ECU data, zero frame drops across tachometer and shift light rendering.
Bridging software and physical vehicle hardware presented real-world constraints that required targeted architectural fixes.
Challenge: The Lotus 2ZZ ECU communicates over ISO 9141-2 (K-Line)—a legacy half-duplex serial protocol where queries block sequentially. Polling all 9 supported PIDs every frame caused a ~1-second lag between throttle input and gauge movement.
Fix: Implemented selective field querying (needed_fields) and a Dual-Rate Polling Engine. Fast fields (RPM, Speed, Throttle) are queried every iteration at 20Hz, while slow fields (Coolant, Battery, Intake Temp, Fuel) are polled round-robin once per cycle (1Hz). Query count dropped from 9 to 3 on Road layout, eliminating lag completely.
Challenge: macOS enumerates FTDI chips as /dev/cu.usbserial-*, while Linux uses /dev/ttyUSB0. When unreachable, python-obd fell back to an auto-scan that got stuck probing Apple's debug console for 30s. Additionally, forced baud rates (38400/115200) broke adapter initialization.
Fix: Configured launch environment variable overrides (PITELEMETRY_PORT) to target valid ports directly and bypass auto-scan sweeps. Reordered connection attempts in model.py to prioritize auto-baud negotiation before forcing explicit rates.
Challenge: Night cockpit testing revealed a noticeable reddish tint across the dashboard background, caused by subtle red-channel biases in palette hex codes (e.g., #1A1012).
Fix: Refactored config.py, motec_tachometer.py, and side_panel.py to enforce true neutral greys ($R=G=B$). Verified color accuracy across the entire rendering pipeline via RGB pixel sampling.
Challenge: Ensuring clean startup and shutdown sequences when powered directly from the car's ignition circuit without corrupting the MicroSD file system.
Fix: Routed switched 12V audio power through a regulated 12V-to-5V buck converter feeding the Pi 5, paired with auto-launch systemd kiosk services and read-only overlay filesystems.
The telemetry platform is split into independent modules, each tackling a specific aspect of vehicle data.
Custom 3D-printed single-DIN bezel holding the 5" DSI screen flush in the Lotus Elise dashboard.
Asynchronous multi-threaded data ingestion, publish-and-poll architecture, and K-Line protocol handling.
Real-time cockpit dashboard rendering, Road vs. Track profiles, and zero-lag ECU gauge sweeps.
10Hz GPS automated start/finish line geofencing, acceleration benchmarking, and VBOX session logging.
50Hz 6-DOF IMU integration measuring live longitudinal/lateral Gs, pitch, roll, and friction circle limits.
Synchronized video capture paired with real-time telemetry gauges burned directly into MP4 track footage.
The final production version after many sessions of hardware debugging, UI refinement, and real-world testing.
Final production road layout running in the Lotus Elise with all debugging fixes applied.
▶ Press play and unmute for soundFinal production track layout with calibrated tachometer, shift lights, and zero-lag throttle response.
▶ Press play and unmute for sound