A Western Formula Racing Open Source Project
Comprehensive telemetry and data acquisition system for real-time monitoring of formula racing vehicle performance. This system captures CAN bus data from the vehicle, transmits it to a base station, and visualizes it through an interactive web dashboard.
The repository contains the end-to-end telemetry software for Western Formula Racing vehicles, enabling real-time monitoring of critical vehicle systems during testing and competition. The system consists of:
- PECAN Dashboard: Real-time web-based visualization of vehicle telemetry
- Universal Telemetry Software (
/universal-telemetry-software): Onboard and base station software for CAN acquisition, transport, and WebSocket/Redis bridging
flowchart LR
ECU["Vehicle CAN Bus (ECU)"]
HAT["Raspberry Pi CAN HAT"]
EDGE["Car Raspberry Pi
(UTS car mode)"]
BASE["Base Station Raspberry Pi
(UTS base mode)"]
REDIS["Redis"]
DASH["PECAN Dashboard
(Web UI)"]
INFLUX["InfluxDB 3"]
ECU -->|CAN| HAT
HAT -->|SPI / CAN| EDGE
EDGE -->|RF| BASE
BASE --> REDIS
REDIS -->|WebSocket| DASH
REDIS -->|Stream / Write| INFLUX
Data Flow:
- Vehicle CAN bus messages are read by the car-side Universal Telemetry Software on the Raspberry Pi
- The car-side UTS packs messages in UDP/TCP for radio or Ethernet transmission
- The base-side UTS receives telemetry and publishes it to Redis
- Redis-to-WebSocket/InfluxDB bridge broadcasts messages to connected clients and InfluxDB 3
- PECAN dashboard visualizes data in real-time through customizable views
For the detailed WebSocket message contract between PECAN and UTS, see WEBSOCKET_PROTOCOL.md.
InfluxDB 3 is implemented in a separate repository: https://github.com/Western-Formula-Racing/daq-server-components
Demo: https://western-formula-racing.github.io/daq-radio/dashboard
A modern React + TypeScript web application for real-time telemetry visualization.
Features:
- Real-time CAN message visualization with WebSocket connection
- Customizable category-based filtering and color-coding
- Multiple view modes (cards, list, flow diagrams)
- Interactive charts and graphs using Plotly.js
- Built with Vite, React 19, and Tailwind CSS
Tech Stack: React 19, TypeScript, Vite, Tailwind CSS, React Bootstrap, Plotly.js
Complete DAQ telemetry stack that runs on both the car and base station Raspberry Pis, automatically detecting its role based on CAN bus availability.
Features:
- Car/base auto-detection (single codebase deployable to both Pis)
- UDP and TCP telemetry transport with packet recovery
- Redis publisher, WebSocket bridge, and status HTTP server
- Optional InfluxDB 3 logging, audio/video streaming, and simulation mode
Tech Stack: Python, Redis, WebSockets, Docker, InfluxDB 3
Development and testing tools for simulating vehicle telemetry without physical hardware.
Features:
- CSV Data Playback: Replay recorded CAN data from CSV files
- Persistent WebSocket Server: Continuous data broadcasting for testing via
car-simulate/persistent-broadcast - WebSocket Sender / container scaffolding: Minimal Docker setup and example clients for local experiments
Includes:
- Sample CAN data files (CSV format)
- Example DBC (CAN database) file for message definitions
- Docker Compose setups for isolated testing environments, including a dev/demo server configuration in
car-simulate/persistent-broadcast
Convenience deployment for the PECAN WebSocket broadcast server. The dashboard is hosted at pecan.westernformularacing.org (GitHub Pages); this backend provides live CAN data over ws:// or wss://.
Features:
- Runs the broadcast server with production defaults
- Standard + extended CAN IDs, accumulator simulation
- Optional CSV replay
- Node.js (v18+) and npm
- Python 3.8+
- Redis server (bundled via Docker Compose in
universal-telemetry-softwarefor most deployments) - Docker and Docker Compose (for containerized deployment)
- Clone the repository:
Documentation lives in component READMEs such as
git clone https://github.com/Western-Formula-Racing/daq-radio.git cd daq-radiopecan/README.mdanduniversal-telemetry-software/README.md.
cd pecan
npm install
npm run devcd universal-telemetry-software
docker compose up -d
# See universal-telemetry-software/README.md for full hardware and production setup details.cd car-simulate
python websocket_sender.pyPECAN supports configurable message categorization through a simple text-based configuration file. This allows customization of message grouping and color-coding without code changes.
Configuration: pecan/src/assets/categories.txt
Example categories:
- VCU (Vehicle Control Unit)
- BMS (Battery Management System)
- INV (Inverter)
- TEST MSG
π Category Configuration Guide
cd car-simulate/persistent-broadcast
docker-compose up -dcd ws-backend
docker compose up -d --builddaq-radio/
βββ pecan/ # React dashboard application
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # WebSocket and data services
β β βββ config/ # Category configuration
β βββ public/ # Static assets
βββ universal-telemetry-software/ # Car/base telemetry stack (UTS)
βββ car-simulate/ # Testing and simulation tools
βββ ws-backend/ # WebSocket broadcast server deployment
βββ dev-utils/ # Developer utilities and scripts
βββ start_system.sh # Automated startup script
- Frontend: React 19, TypeScript, Tailwind CSS, React Bootstrap
- Visualization: Plotly.js for interactive charts and graphs
- Build Tools: Vite
- Backend: Python, asyncio, WebSockets
- Message Broker: Redis
- Data Format: CAN bus (DBC files)
- Deployment: Docker, Docker Compose, Nginx
Contributions are welcome! This project is maintained by the Western Formula Racing team.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly with the simulator
- Submit a pull request
This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.
- PECAN Project Page: Project PECAN
- Live Demo: Demo
For questions or issues, please open an issue on GitHub.
Built with β€οΈ by Western Formula Racing
London, Ontario, Canada π¨π¦
