Skip to the content
PCBKitNew board
2 layers100 × 100 mmEngine Simulator-2.0, the printed circuit board in 3D

Engine simulator for ECU testing based on ESP32-32U DevKitC. The system connects to the ECU through the standard Speeduino 40-pin IDC connector and generates signals to simulate real engine operation.

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
62
Nets
91
Pads
246
Tracks, vias
682, 18
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
5 Sep 2026
Updated
19 Oct 2026

Overview

Engine Simulator-2.0 is an open-source printed circuit board by koolcat6666, from the koolcat6666/Engine-Simulator-2.0 repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 100 mm with 62 parts on 91 nets, routed with 682 tracks and 18 vias.

It is built around the CD4050BE, 74AHCT125D and ESP32-DEVKITC-VE, with the R-78E5.0-1.0, TLV2372IP and BZX55C3V6-TR among its other parts. Its parts include 17 resistors, 12 connectors, 7 capacitors, 6 ICs and 1 diode. It belongs with the ESP32 boards of this library.

Main components

6

README

README.md

Engine Simulator 2.0

Engine simulator for ECU testing based on the Speeduino V0.4 and the ESP32-32U DevKitC.

The system connects to the ECU through the standard Speeduino 40-pin IDC connector and generates signals to simulate real engine operation.

PCB 3D render

Architecture

Signals generated by the ESP32

SignalESP32 PinTo SpeeduinoMethod
Crank TriggerGPIO 12IDC Pin 25Square wave via hardware timer and 3.3V-to-5V level shifter
Cam 1 TriggerGPIO 13IDC Pin 24Square wave via hardware timer and 3.3V-to-5V level shifter
Cam 2 TriggerGPIO 14IDC Pin 24 (optional)Square wave via hardware timer and 3.3V-to-5V level shifter
CLT (Coolant Temperature)GPIO 26 (DAC2)IDC Pin 19Analog voltage 0–3.3V, amplified to 0–5V
MAP (Pressure)GPIO 25 (DAC1)IDC Pin 11Analog voltage 0–3.3V, amplified to 0–5V

Manually controlled signals (potentiometers)

SignalSpeeduino PinNotes
TPS (Throttle Position Sensor)IDC Pin 225V potentiometer, wiper/common connected to ESP32 ADC (GPIO 34) through a voltage divider
IAT (Intake Air Temperature)IDC Pin 20Potentiometer connected directly to Speeduino
O2 (Oxygen Sensor)IDC Pin 21Potentiometer connected directly to Speeduino

ECU input signals

SignalESP32 PinFrom SpeeduinoNotes
Fan FeedbackGPIO 27IDC Pin 15Fan status (0V = ON), 5V-to-3.3V voltage divider

ECU outputs monitoring

Speeduino outputs such as injectors, ignition/coils, fan, idle, VVT, boost, and fuel pump are read by the ESP32 through CD4050BE buffers for timing calculation (Phase 2).


Firmware features

  • 64 trigger wheel / crank patterns (ArduStim compatible): 60-2, 36-1, 24-1, LS1, 58X, Chrysler NGC, BMW N20, GM 40-tooth OSS, and many others
  • RPM inertia model: cranking from 0 to 350 RPM, then idle at 850 RPM + (TPS × 6150), with low-pass filtering
  • Start/Stop button: starts and stops the engine with a cranking ramp, idle stabilization, and gradual shutdown
  • Dynamic MAP simulation: 100 kPa with engine off, 85 kPa during cranking, and 30–100 kPa depending on RPM and TPS
  • Dynamic CLT simulation: gradual warm-up, fan cooling, and Newton cooling when engine is off
  • USB serial interface: ArduStim protocol for configuring trigger wheel and crank pattern, as well as RPM mode from TunerStudio
  • Speeduino timing monitoring (Phase 2): input capture via ISR on 9 CD4050BE inputs (4 injectors + 4 coils + fan), measuring injector on-time, pulse frequency, duty cycle, ignition dwell and advance
  • WiFi AP + web dashboard (Phase 3): SSID EngineSimulator2.0, password 1234567890, IP 192.168.254.1, responsive dashboard at /, allows selecting one of 64 trigger patterns and persists the setting to NVS memory
  • Startup synchronization mode (Sync Mode): Passive (autonomous start) or Active (real ECU-driven start), selectable from the /setup page and persisted to NVS

Startup synchronization (Sync Mode)

When the engine is started (physical Start/Stop button or /api/start), the simulator behaves according to the selected Sync Mode, configured on the /setup web page and stored in NVS (key syncMode):

ModeBehavior
Passive (default)Fully autonomous. Cranking ramps the RPM from 0 up to 350, then the engine transitions to RUNNING on its own.
ActiveReal ECU-driven start. The engine stays in CRANKING (RPM capped at 350) until the Speeduino actually fires: it transitions to RUNNING only when both injector and ignition activity are detected (within a 400 ms window) and RPM ≥ 250. If no valid firing is seen within 10 seconds, cranking stops and the engine returns to OFF.

The firing detection reuses the Phase 2 input-capture ISRs: the injector/ignition ISRs update the event markers lastInjEventUs / lastIgnEventUs, exposed through the hasRecentInjection/Ignition/Firing(windowMs) helpers in timing.cpp. The active mode value is also reported in the /api/data JSON payload as "syncMode":0|1.

Verification status

ModuleStatus
Phase 1 — Crank/Cam generation and engine modelVerified on hardware (Speeduino / Mega2560 reads engine speed correctly; fixed GPIO register usage GPIO.out_w1ts/w1tc in the ISR for core v3.3.x)
Phase 2 — Injector/ignition timing (input capture)Implemented and compiled successfully; drives the Sync Mode Active startup logic
Phase 3 — WiFi AP + web dashboardVerified on hardware (dashboard, /setup and Sync Mode Passive/Active tested)

Details and references: doc/WORKING_VERSION_EN.md.


Directory structure

text
Engine Simulator 2.0/
├── Engine_Simulator_2_0/         # ESP32 firmware (single source tree; folder name = sketch name)
│   ├── Engine_Simulator_2_0.ino  # Main sketch (timer, simulation, state machine)
│   ├── comms.cpp / comms.h       # Serial command parser (ArduStim protocol)
│   ├── globals.h                 # Shared data structures (incl. SyncMode enum)
│   ├── timing.cpp / timing.h     # Injector/ignition input capture (Phase 2)
│   ├── web.cpp / web.h           # WiFi AP + dashboard + /setup + /api/data (Phase 3)
│   └── wheel_defs.h              # 64 trigger wheel definitions
├── Hardware/                     # PCB design (KiCad 10.0)
│   └── Engine Simulator 2.0/
│       ├── *.kicad_sch           # Schematic
│       ├── *.kicad_pcb           # PCB layout
│       ├── *.kicad_pro           # KiCad project
│       ├── BOM.md                # Bill of materials (updated from netlist)
│       └── Gerbers/              # Manufacturing files (Gerber + drill)
├── doc/                          # Documentation (English + Italian)
│   ├── ESP32U_PIN_ASSIGNMENT_EN.md / _IT.md
│   ├── SPEEDUINO_V04_IDC40_PINOUT_EN.md / _IT.md
│   ├── dupont_pinout_EN.md / _IT.md
│   └── WORKING_VERSION_EN.md / _IT.md
├── images/                       # README assets
├── README.md                     # This file (English)
├── README_IT.md                  # Italian README
└── LICENSE                       # MIT

Hardware requirements

Main components

ComponentQuantityDescription
ESP32-WROOM-32U1Main microcontroller
74AHCT1251Quadruple level shifter 3.3V -> 5V (Crank, Cam1, Cam2)
TLV23721Dual rail-to-rail op-amp (MAP/CLT buffers)
R-78E5.0-1.0 (RECOM)1Switching regulator drop-in 12V -> 5V, 1A, 91% efficiency
40-pin IDC connector1Connection to Speeduino V0.4
CD4050BE2Hex buffer for ECU inputs (injectors, ignition, fan)
Trimmer potentiometers5(2 kΩ x2, 10 kΩ x3) — TPS, IAT, O2, and others
Push button1Start/Stop
DC barrel jack112V power input

Voltage levels

SectionVoltageMethod
Board power supply12VExternal DC barrel jack
Logic supply5VR-78E5.0-1.0 switching regulator from 12V
ESP32 and sensors3.3VOnboard regulator
ESP32 digital outputs -> ECU3.3V -> 5V74AHCT125
ESP32 analog outputs -> ECU0–3.3V -> 0–5VTLV2372 (gain 1.5x)
Fan input from ECU5V -> 3.3VResistive divider

Build and upload

Prerequisites

  • Arduino IDE or Arduino CLI
  • ESP32 board package installed: esp32:esp32 via Board Manager
  • Selected board: ESP32 Dev Module or ESP32-WROOM-32U
  • Libraries for the dashboard (Phase 3): use ESP32Async (compatible with ESP32 core v3.3.x and mbedTLS 3; the classic me-no-dev version does not compile)
    • ESP Async WebServer (arduino-cli lib install "ESP Async WebServer")
    • Async TCP (arduino-cli lib install "Async TCP")

Compile and upload

bash
# Via Arduino CLI (first time: install the dashboard libraries as well)
arduino-cli lib install "ESP Async WebServer" "Async TCP"
arduino-cli compile --fqbn esp32:esp32:esp32 "Engine_Simulator_2_0"
arduino-cli upload --fqbn esp32:esp32:esp32 --port COMx "Engine_Simulator_2_0"

Configuration

The trigger wheel/crank pattern can be selected in the following ways:

  1. Dashboard web interface (recommended): connect to WiFi EngineSimulator2.0 (password 1234567890) and open http://192.168.254.1 -> page /setup to select the pattern and the Sync Mode (both persisted to NVS memory)
  2. USB serial (115200 baud): use command X to select the next pattern, or S<n> to select by index
  3. ArduStim GUI: desktop software connecting via serial to configure patterns and modes

Project notes

  • The integrated MAP sensor on the Speeduino V0.4 (IDC Pin 11) cannot be used as an alternative to the DAC-generated signal from the ESP32 for simulation. In this case, the MAP pin of the IDC must be disconnected and re-routed to the proper simulation output.
  • The fan is managed with feedback: Speeduino controls it, and the ESP32 reads it to model CLT temperature.
  • The IAT and O2 potentiometers are purely manual and do not affect the ESP32 simulation. They are used to test ECU corrections.
  • The KiCad PCB (Hardware/Engine Simulator 2.0/) is complete: 2-layer routing with a solid GND plane on the bottom copper layer and thermal reliefs. DRC: no clearance errors and no unconnected pads; only cosmetic warnings remain.
  • The design is intended to be a compact, low-cost and fully functional engine simulation interface for ECU testing and development.

Manufacturing outputs (Gerber + drill)

Manufacturing files are generated with kicad-cli and are ready for any fabrication house (JLCPCB, PCBWay, PCBcart):

  • Hardware/Engine Simulator 2.0/Gerbers/ — Gerber RS-274X, 9 layers (F_Cu, B_Cu, F_Paste, B_Paste, F_Mask, B_Mask, F_SilkS, B_SilkS, Edge_Cuts) + .gbrjob file
  • Hardware/Engine Simulator 2.0/Gerbers/ — Separate Excellon drill files: -PTH.drl (plated holes, 0.3–2.2 mm) and -NPTH.drl (non-plated holes)
  • Hardware/Engine Simulator 2.0/Engine_Simulator_2.0_FAB_gerbers.zip — ZIP archive containing all Gerber and drill files, ready for direct upload to the manufacturer

Board: 2 layers, 100 × 100 mm, thickness 1.6 mm, HASL finish, minimum trace width 0.2 mm, minimum clearance 0.21 mm, minimum drill 0.3 mm (via) / 2.2 mm (M2 mounting holes, PTH connected to GND).

Parts

62
QtyValueFootprintReferences
92.2kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR23, R24, R25, R26, R27, R28, R29, R30, R31
9BZX55-C3V6PCM_Diode_THT_AKL:D_DO-35_SOD27_P7.62mm_Horizontal_ZenerDZ1, DZ2, DZ3, DZ4, DZ5, DZ6, DZ7, DZ8, DZ9
8~TerminalBlock_Altech:Altech_AK100_1x02_P5.00mmJ3, J4, J5, J6, J7, J8, J9, J11
510kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR13, R14, R16, R18, R21
4MountingHole:MountingHole_2.2mm_M2_DIN965_PadMH1, MH2, MH3, MH4
30.1uFCapacitor_THT:C_Disc_D10.5mm_W5.0mm_P5.00mmC2, C3, C6
310kPotentiometer_THT:Potentiometer_ACP_CA9-V10_VerticalRV3, RV4, RV5
22kPotentiometer_THT:Potentiometer_ACP_CA6-H2,5_HorizontalRV1, RV2
25.1kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR15, R17
2CD4050BEPackage_DIP:DIP-16_W7.62mm_LongPadsU5, U6
10.33 uFCapacitor_THT:C_Disc_D10.5mm_W5.0mm_P5.00mmC1
11N5817Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD13
120kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR22
1470 uf 16vPCM_Capacitor_THT_AKL:CP_Radial_D5.0mm_P2.00mmC7
1470ufPCM_Capacitor_THT_AKL:CP_Radial_D5.0mm_P2.00mmC4
147ufPCM_Capacitor_THT_AKL:CP_Radial_D5.0mm_P2.00mmC5
174AHCT125Package_DIP:DIP-14_W7.62mm_LongPadsU2
1CRANKTerminalBlock_Altech:Altech_AK100_1x02_P5.00mmJ10
1DC INTerminalBlock_Altech:Altech_AK100_1x02_P5.00mmJ2
1ESP32-DevKitCPCM_Espressif:ESP32-DevKitCU1
1R-78E5.0-1.0Converter_DCDC:Converter_DCDC_RECOM_R-78E-0.5_THTU3
1Screw_Terminal_01x02TerminalBlock_Altech:Altech_AK100_1x02_P5.00mmJ12
1Start/StopButton_Switch_THT:SW_PUSH_1P1T_6x3.5mm_H5.0_APEM_MJTP1250SW2
1TLV2372Package_DIP:DIP-8_W7.62mm_Socket_LongPadsU4
1~Connector_IDC:IDC-Header_2x20_P2.54mm_VerticalJ1

Questions

How big is the Engine Simulator-2.0 PCB?

It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Engine Simulator-2.0 use?

62 parts, built around the CD4050BE, 74AHCT125D, ESP32-DEVKITC-VE and R-78E5.0-1.0. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Engine Simulator-2.0 KiCad files?

From the koolcat6666/Engine-Simulator-2.0 repository on GitHub, at the commit this page was made from: the board is Hardware/Engine Simulator 2.0/Engine Simulator 2.0.kicad_pcb and its schematic Hardware/Engine Simulator 2.0/Engine Simulator 2.0.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Engine Simulator-2.0 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers65 × 56 mmKgiu, the printed circuit board in 3D

    Kgiu

    goruck/all

    Alexa Lambda Linux (ALL) Reference Design - IoT and ML at the edge.

    24 parts62
  • 2 layers25.8 × 35.5 mmOctopixel, the printed circuit board in 3D

    Octopixel

    jrlomas/OctoPix

    An extension board for additional Neopixels for the Octopus boards

    8 parts9MIT
  • 2 layers68.6 × 53.3 mmSensorArduinoHat, the printed circuit board in 3D

    SensorArduinoHat

    shareresearchteam/SAMI-Robot

    Software and Hardware resources and development of the SAMI humanoid robot

    36 parts5MIT
  • 2 layers171.5 × 138.7 mmSTM32 board, the printed circuit board in 3D

    STM32 board

    vladBaciu/Sensorless-BLDC-HW

    Bachelor thesis project

    31 parts3
  • 2 layers50 × 50 mmTrk srv-01, the printed circuit board in 3D

    Trk srv-01

    alxhub/arc

    Addy's Railroad Company

    89 parts
  • 2 layers77.1 × 84.7 mmEConBadge, the printed circuit board in 3D

    EConBadge

    Oxmose/EConBadge

    E-Ink Convention Badge | Connected badge to display your favorite images and texts at convention.

    19 parts3GPL-3.0
  • 2 layers75.5 × 71 mmEsp mobo, the printed circuit board in 3D

    Esp mobo

    Okanagan-Marine-Robotics/Electrical

    Repo For Electrical pcbs and documentation

    83 parts2
  • 2 layers58 × 71 mmOpenchess controller, the printed circuit board in 3D

    Openchess controller

    PaoloJN/openchess

    A chessboard that knows where the pieces are: 64 Hall sensors, 81 RGB LEDs, one ESP32, a printed case, and a BLE phone app. KiCad hardware, PlatformIO firmware, Expo app.

    28 parts1