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
- Unified Telemetry Software: Onboard and base station software for data transmission
flowchart LR
ECU["Vehicle CAN Bus (ECU)"]
HAT["Raspberry Pi CAN HAT"]
EDGE["Raspberry Pi
Edge Collector"]
BASE["Base Station Raspberry Pi"]
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 Raspberry Pi
- Onboard Raspberry Pi packs messages in UDP/TCP for radio transmission
- Base station receives RF data and publishes 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
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
Python-based receiver system that bridges radio telemetry to WebSocket clients.
Components:
- Redis Message Queue: Central message broker for telemetry data
- WebSocket Bridge (
redis_ws_bridge.py): Broadcasts Redis messages to connected web clients - Docker Deployment: Containerized setup with Redis included
Tech Stack: Python, Redis, WebSockets, Docker
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
- WebSocket Sender: Configurable data transmission scripts
Includes:
- Sample CAN data files (CSV format)
- Example DBC (CAN database) file for message definitions
- Docker Compose setup for isolated testing environment
Production deployment configuration for hosting the PECAN dashboard.
Features:
- Dockerized Nginx setup for static file serving
- SSL/HTTPS configuration support
- Node.js (v18+) and npm
- Python 3.8+
- Redis server
- Docker and Docker Compose (for containerized deployment)
- Clone the repository:
Documentation WIP.
git clone https://github.com/Western-Formula-Racing/daq-radio.git cd daq-radio
cd pecan
npm install
npm run devcd base-station
pip install -r requirements.txt
python redis_ws_bridge.pycd 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 host-demo
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
βββ base-station/ # Radio receiver and WebSocket bridge
βββ car-simulate/ # Testing and simulation tools
βββ host-demo/ # Production hosting configuration
βββ 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 π¨π¦
