Skip to product information
Raw Source Code PyQt5 Engine Simulation Dashboard.
$10,000.00 USD
Sale price
$10,000.00 USD
Regular price
What you can do with this built simulation:
- Drive the Vehicle: Move the Throttle Slider and swap through the Transmission Gears to alter the engine speed (RPM), torque curves, and power output (HP) in real time.
- Track Engine Aging: Watch how accumulating mileage affects your Injector Clog Percentage and Oil Life on the continuous telemetry trend chart.
- Observe ECU Interventions: Force the engine into extreme stress scenarios to trigger active OBD-II Fault Codes (such as engine overheating or running too lean) directly inside the diagnostics status display window.
- Perform Service Actions: Use the pit-lane buttons to quickly top off the fuel tank or refresh the motor oil to clear active warning codes and restore standard operating metrics.
This python script builds an interactive, real-time Engine Simulation and On-Board Diagnostics (OBD-II) Dashboard. It uses PyQt5 to construct a sleek graphical user interface (GUI) and Matplotlib to handle live telemetry instrumentation and data graphing.
Essentially, it acts as a virtual engine dynamometer (dyno) software that lets you play the role of both a driver and a mechanic—testing how physical inputs, transmission gears, and different oil blends impact vehicle performance and component wear over time.
⚙️ Core Architecture: Component Breakdown
1. Engine Simulator (
EngineSimulator)
This is the physics engine running behind the scenes. Every 100 milliseconds, it steps forward in time and calculates mathematical relationships for real-time engine behaviors:
- RPM & Power Dynamics: Computes engine speed based on your throttle opening, selected gear ratios, and parasitic drivetrain friction. It then uses RPM and torque to solve for real-time Horsepower (HP).
- Thermal Management: Simulates heat build-up. Keeping the engine pinned at high RPMs generates heat, while driving faster forces ambient air into the radiator to cool it back down.
- Fluid & Component Degradation: Simulates long-term wear. As you drive, fuel is burned, oil degrades according to its specific viscosity profile, and the fuel injectors gradually clog up from mileage.
2. ECU Control Module (
ECUController)
This acts as the engine's onboard computer. It monitors incoming sensor data from the simulator and performs two critical roles:
- Electronic Safety Limiter: If the engine revs past its safe threshold (which changes dynamically based on the weight of the motor oil you choose), the ECU overrides the system and cuts the throttle to zero to prevent mechanical failure.
-
OBD-II Fault Logging: It actively flags industry-standard Diagnostic Trouble Codes (DTCs) if any system attributes fall out of safe operating limits:
- P0217: Engine Coolant Overheating.
- P0171: Fuel System running too lean (triggered by high injector clogging and falling fuel pressure).
- P0230 / P0300: Low fuel reserves and subsequent engine misfires when the tank dries out.
- P017C: Oil service reminder when life drops below 10%.
3. Animated Instrument Cluster (
GaugeCanvas)
A specialized graphics module that turns raw numbers (RPM, Torque, HP, and Coolant Temperature) into beautiful analog dial gauges. It dynamically sweeps indicator needles and divides its background arcs into standard color zones: a green safe range, a yellow warning buffer, and a redline zone.
4. Linear Telemetry History (
TelemetryCanvas)
A rolling time-series graph. It maps out your Fuel Level and Injector Clog Percentage over time. To keep the app running light and fast, it manages data within a rolling 50-point buffer, discarding old data points as new ones pour in.
5. Data Export Matrix (
EngineDashboard)
The user dashboard that links all the blocks together. It translates mechanical slider actions into engine states, displays a digital metrics readout panel, and contains an Export Data Button. Clicking it flushes your entire history out of the app's temporary memory and compiles it into an open-format CSV spreadsheet for data tracking.