Open hardware · SAE J1979 · ISO 15031-5

ECU simulator
on your desk

An open-source OBD-II simulator board that behaves like a real vehicle towards any diagnostic tool: 21 simulated parameters, a diagnostic trouble code bank with MIL signalling and CAN communication per ISO 15765-4 - all from parts anyone can buy, for EUR 40 to 60, depending on where the parts are bought.

< 8 msresponse time (standard limit: 50 ms)
21mode 0x01 PID parameters
40 - 60 €total parts cost
USB-Cpowered by a standard charger
Interactive preview

Send a diagnostic request

This is how the simulator answers on a real CAN bus. Pick a parameter - the frames below are built by the same rules the firmware uses: a request on identifier 0x7DF, a response from 0x7E8, encoding by the inverse formulas of ISO 15031-5 and 55 padding per ISO 15765-4.

CAN 2.0B · 500 kbit/s · 11-bit ID
Request - diagnostic tool → simulator
Response - simulator (ECU 0x7E8) → tool
-

Values come from the same simulation model that runs on the device (idle profile, 10 Hz refresh).

The mock-up draws the same screens the device shows on its TFT, and you can walk them with the keyboard. It has its own EN/HR switcher, but the screen text stays English in both, exactly as on the device.

What the device does

Features

MODE 0x01 / 0x02

Real-time readings

21 parameters with correct conversion formulas - speed, engine rpm, temperatures, pressures, lambda sensor, fuel level - plus support bit masks (PID 0x00/0x20/0x40) and freeze frame values from the moment the fault appeared.

MODE 0x03 / 0x04 / 0x07

Fault bank and MIL

Up to 20 simultaneously active DTCs in pending and confirmed states, turning the "check engine" lamp on and off, and clearing faults from the tool - ideal for exercising fault handling without breaking a real car.

MODE 0x09 · ISO-TP

Vehicle identification

The vehicle VIN (17 characters) is transferred in multiple frames of the ISO 15765-2 transport protocol (FF → FC → CF), including correct handling of flow-control frames and cyclic sequence numbers.

INTERFACE

Screen and physical controls

A 2.4" TFT next to a column of physical controls: an incremental encoder for setting values, a 5-way switch for navigation and the CONFIRM, CLEAR and RETURN buttons. Scenarios in JSON format live in the internal flash - over USB-C the device appears to the computer as a USB disk, and a plain USB stick imports and exports scenarios.

SIMULATION

Three operating profiles

Manual value entry, idle with the engine warming up towards operating temperature, and a driving profile in which speed, rpm, load and air flow are physically coupled.

OPEN SOURCE

Everything is public

Schematics, PCB files, the complete C++ (C++17) source code and 98 unit tests - all under the MIT licence. The same firmware, unmodified, compiles for the development and for the final build.

Under the hood

Hardware

The heart of the device is the ESP32-S3-WROOM-1 module (dual core 240 MHz, 8 MB flash, Wi-Fi/BLE). The CAN chain consists of an MCP2515 controller and an SN65HVD230 transceiver with ESD protection up to the standard J1962 connector. Power: USB-C → CH224K (PD sink, requests 12 V) → TPS562201 to 3.3 V, with 12 V on pin 16 that powers the diagnostic tool.

The dedicated two-layer board measuring 130 × 115 mm is documented together with the routing rules for the CAN differential pair and the series termination of the SPI bus. Not ready to solder SMD right away? The same ESP32-S3-WROOM-1 module on a breakout adapter plugs into a breadboard and runs the same firmware. The board has been fabricated and assembled, and an ELM327 diagnostic adapter reads all 21 parameters and the fault codes from it while drawing its own power from pin 16.

Key components
Component Role ≈ EUR
ESP32-S3-WROOM-1 Microcontroller, 240 MHz, 8 MB flash 4.90
MCP2515 + SN65HVD230 CAN controller and transceiver 2.22
Waveshare 18366 (ILI9341 2.4") TFT screen (no touch) 9.18
5-way switch + incremental encoder physical interface controls (Alps, BI Technologies) 2.20
J1962F OBD-II connector 3.98
S25FL128L / W25Q128 16 MB flash - internal scenario storage (FAT) 2.32
USB-A + TS3USB221 + SY6280 USB stick / PC link (mux + protection) 1.18
PCB 130 × 115 mm Two-layer, JLCPCB / PCBWay / Aisler 8.00

Every track, via, pad and footprint, drawn straight from the KiCad file: 892 track segments, 73 vias and 103 footprints. Hover any part for its description, toggle the two copper layers, and switch the page between English and Croatian.

DIY

Build it yourself

Every component is available to an individual on the open market (Mouser, TME, LCSC, AliExpress…). Detailed instructions, BOM tables and the pinout are on the wiki.

Pick a variant

Fastest start: ESP32-DevKitC + off-the-shelf modules (≈ 30-40 €, minimal soldering). For a compact final device, order the dedicated board from the supplied Gerber files (five pieces ≈ 27 €).

Get the components

The full list with suppliers and prices is in the repository (/hardware/bom) and on the wiki page Building the device.

Assemble and wire it

The pinout is documented down to the last resistor - including traps such as the ESP32-S3 strapping pins, the layout of analogue inputs on ADC1 (GPIO1-GPIO10) and the separate interrupt line for CAN.

Flash the firmware

Clone the repository and run pio run -t upload in PlatformIO - the transfer goes over the USB-C port (USB-Serial-JTAG), and the BOOT and RESET service buttons are there for entering download mode by hand. The unit tests (pio test -e native) also run without any hardware, on your computer.

Connect a tool

Connect any OBD-II scanner or ELM327 adapter to the J1962 connector with an extension cable - the simulator presents itself as ECU 0x7E8 and is ready for requests.

Community

Join the development

ROADMAP

Wish list

The UDS protocol (ISO 14229), simulation of multiple ECUs (0x7E8-0x7EF), remote scenario control over Wi-Fi, modes 0x06 and 0x0A, CAN FD, and recording and replaying real vehicle traffic.

HOW TO START

Issue → branch → PR

Report a bug or propose a feature through Issues, and for code, fork the repository, pass the unit tests and send a pull request. Code is written in English (C++17), documentation in Croatian.

TESTING

Test it with your own tool

Compatibility reports for diagnostic tools we have not tried are extremely valuable - the tool model and a short traffic capture are enough. Instructions are on the wiki page Contributing to the project.