A Python-based system that simulates core functionalities of an Electronic Control Unit (ECU) used in modern vehicles.
This project provides a real-time visual and interactive environment to observe how engine data behaves during acceleration and braking events.
- Tkinter GUI replicates a simple dashboard interface
- Matplotlib graphs display live RPM and speed updates
- Multithreaded engine keeps the UI responsive while physics ticks at 60 Hz.
- Periodic CSV logging of coolant temperature, fuel level, and battery voltage
Ideal for educational use, experimentation, and testing embedded logic before working with real hardware.
| Technology | Purpose |
|---|---|
| Python 3 | Core programming language |
| Tkinter | Desktop GUI interface |
| Matplotlib | Real-time graph plotting |
| Threading | Concurrent data updates |
| CSV | Periodic sensor data logging |
- Threaded 60 Hz simulator with simple longitudinal physics (throttle, brake, drag, gears).
- Tkinter UI with press-and-hold Gas/Brake, engine toggle, gear control.
- Live Matplotlib plot of Speed and RPM/100 with autoscaling.
- CSV logging every 2 seconds to
logs/telemetry_log.csv. - Resilient design: optional sensors/logger modules auto-fallback so the app still runs.
Vehicle_Telemetry_and_Diagnostic_System/
βββ main.py # Main GUI simulator
βββ telemetry/ # Vehicle data logic
β βββ __init__.py
β βββ simulator.py # (planned)
β βββ controller.py # (planned)
β βββ sensors.py # Randomized temp, fuel, battery voltage
βββ telemetry_logger.py # Logs sensor data to CSV
βββ gui/ # (optional UI modules)
βββ tests/ # (unit tests - planned)
βββ logs/ # Log output directory (auto-created)
βββ README.md # Project documentation
- Clone the repository:
git clone https://github.com/lyushher/Vehicle_Telemetry_and_Diagnostic_System.git
cd Vehicle_Telemetry_and_Diagnostic_System- (Optional) Create a virtual environment:
python -m venv venv
source venv/bin/activate # or .\venv\Scripts\activate on Windows- Install dependencies:
pip install matplotlibpython main.pySensor data is logged every 2 seconds to logs/telemetry_log.csv. Each entry includes:
- Timestamp
- RPM
- Speed (km/h)
- Engine Temperature (Β°C)
- Fuel Level (%)
- Battery Voltage (V)
- Unit tests using
pytest - Coverage reports via
pytest-cov
- GitHub Actions for automated testing
- Linting and code quality checks
- Docker containerization
- EC2 / Streamlit / FastAPI-based deployment
This project will include a REST API using FastAPI to expose real-time telemetry data. Example endpoints:
GET /telemetry # Latest sensor readings
GET /logs # Access logged dataThis project is licensed under the MIT License.
Note: This project is under active development and will progressively include API endpoints, tests, and cloud deployment support.