Skip to content
FilipRaic edited this page Aug 31, 2026 · 1 revision

OBD-II Simulator - Wiki

Welcome to the wiki of the open-source OBD-II simulator board - a device that emulates a vehicle electronic control unit (ECU) towards any connected diagnostic tool.

The simulator answers diagnostic requests per the SAE J1979 and ISO 15031-5 standards over the CAN bus (ISO 15765-4), simulates 21 vehicle parameters (speed, engine rpm, coolant temperature and others) and maintains a bank of diagnostic trouble codes (DTC) with MIL ("check engine") status signalling.

Project status: the v0.7 board has been fabricated and assembled, and the core of the device has been verified on real equipment. An ELM327 diagnostic adapter connects, reads all 21 parameters, reads and clears fault codes and sees the MIL signalling, while the device powers it with 12 V through pin 16, exactly as a real vehicle does.

Why this project?

Developing and testing diagnostic tools and applications normally requires a real vehicle, which is expensive, impractical and makes deliberately induced faults nearly impossible. Commercial ECU simulators cost from several hundred to several thousand euros and are as a rule closed source. This project offers an alternative for EUR 40 to 60, depending on whether the parts are ordered from a distributor or bought over the counter, assembled exclusively from parts available to an individual on the open market, with fully open schematics, PCB files and source code.

Key features

Feature Description
Protocol CAN 2.0B, 500 kbit/s, 11-bit identifiers (ISO 15765-4)
Diagnostic modes 0x01, 0x02, 0x03, 0x04, 0x07, 0x09 (all others return the proper negative response 0x7F/0x11)
PID parameters 21 mode 0x01 parameters with ISO 15031-5 conversion formulas
Fault bank Up to 20 simultaneously active DTCs, states pending / confirmed / cleared, MIL signalling
Vehicle identification VIN (mode 0x09) over ISO-TP multi-frame transfer
User interface Waveshare 2.4" TFT (ILI9341, 240 × 320, used in landscape as 320 × 240) + incremental encoder (BI EN11-HSB1AQ20), 5-way switch (Alps SKRHABE010) and the CONFIRM / CLEAR / RETURN buttons
USB USB-C: the device appears to the computer as a USB disk holding the scenarios (MSC). USB-A: scenario import and export with an ordinary USB stick
Simulation profiles Manual, idle and driving profile. User scenarios in JSON format in the internal flash storage (16 MB)
Power USB-C charger with a 12 V PD profile, which also feeds the diagnostic tool through pin 16
Performance Response time below 8 ms, a measured upper bound (standard limit: 50 ms). Throughput 4.91 requests per second, limited by the Bluetooth link to the tool

Wiki structure

  • Building-the-device - everything needed to build the device at home: bill of materials (BOM), the breadboard development build, wiring and assembly.
  • Firmware - setting up the development environment (PlatformIO), compiling and uploading the firmware, code architecture, running the unit tests.
  • Usage - operating the device, selecting scenarios, the JSON scenario format, connecting a diagnostic tool.
  • Contributing - how to report a bug, propose a new feature or send a pull request, plus the code style rules.

Repository structure

/include, /src Portable protocol core (C++17, no external dependencies): the obd and sim modules
/firmware      PlatformIO project: the hal, can, app, ui and storage modules, plus the bring-up tools
/hardware      The v0.7 KiCad board project, the scripts that generate it, Gerber files, purchase lists and schematics
/docs          Project documentation: design specifications, the change log and the map of coupled files
/scenarios     Example simulation scenarios in JSON format
/tests         Unit tests of the protocol functions (they also run on a development computer)

Licence and standards

All source code, schematics and PCB files are published under the MIT licence (the LICENSE file in the repository), so you may freely use, modify and distribute them, including for commercial purposes, as long as the attribution notice is kept. The software is supplied without warranty. Code and identifiers are written in English, and the project documentation is available in Croatian and English.

Note on standards: the texts of the SAE J1979, ISO 15031-5, ISO 15765 and ISO 11898 standards are copyrighted and are not part of the repository. For implementation details the project relies on publicly available format descriptions and on its own measurements.

Quick start

  1. The final device is a dedicated board with an ESP32-S3 (a single specification), and for solder-free development the same module plugs into a breadboard through an adapter - details on Building-the-device.
  2. Install PlatformIO and upload the firmware - instructions on Firmware.
  3. Connect a diagnostic tool to the J1962 connector with an OBD-II cable and start the scenario you want - instructions on Usage.

OBD-II Simulator


ESP32-S3 · MCP2515 · SAE J1979 · ISO 15031-5

Clone this wiki locally