Giter Club home page Giter Club logo

esp32-obd2-emulator's Introduction

ESP32 OBD-II Emulator

Open-source OBD-II emulator based on an ESP32 + CAN transceiver IC, controllable via WiFi through a simple web UI (or via API).

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Supported protocols

  • ISO 15765-4 CAN (11 bit, 500 Kbps)

Supported modes & PIDs

Mode PID Description
0x01 0x0C RPM
0x01 0x0D Vehicle speed
0x01 0x11 Throttle position
0x09 0x02 Vehicle Identification Number (VIN)

Usage

  1. Connect to the WiFi network ESP32-OBD2 (with password 88888888)
  2. Navigate to 192.168.4.1
  3. Enjoy :)

Hardware

  • ESP32-WROOM-32
  • SN65HVD230 (or any other CAN transceiver IC)
  • Serial->USB adapter
  • Power supply (3.3V)

ESP32-WROOM-32 SN65HVD230 Schematic

Connections

  • IO 4 -> CAN RX
  • IO 5 -> CAN TX

Flash / Install (via esptool)

  1. Download the latest release binaries
  2. Flash (app, bootloader, FAT filesystem): esptool.py write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x10000 obd2-emu.bin 0x8000 partitions.bin 0x110000 fatfs_image.img

Build

  1. Install the Espressif IoT Development Framework
  2. Clone this repo: git clone ...
  3. (Optional) Configure: make menuconfig
  4. Build: make all
  5. Flash: make flash
  6. Build & flash FAT image: make flashfatfs

Note: You might want to change some config values, for example: serial flasher, baud rate, pins, etc.

API

PATCH /api/vehicle

  • Content-Type: x-www-form-urlencoded
  • Data:
    • name
      • speed
      • rpm
      • throttle
      • vin
    • value
  • Example (CURL): curl -XPATCH -H 'Content-Type: application/x-www-form-urlencoded' -d 'name=speed&value=50' '/api/vehicle'

Acknowledgements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.