PowerBroker2 / ELMduino

Arduino OBD-II Bluetooth Scanner Interface Library for Car Hacking Projects
MIT License
587 stars 117 forks source link

ELMulator - a useful tool for your ELMDuino development #209

Open jimwhitelaw opened 6 months ago

jimwhitelaw commented 6 months ago

When working on my ELMduino projects, I've found it useful to use ELM327 emulation rather than connecting to a physical ELM327 device attached to an actual vehicle. Doing app development sitting on a folding chair in the garage gets old pretty quickly, so...

I have published this ELMulator library that can make testing a lot easier. It's been very helpful for me and I hope that it can be useful for others as well.

This library allows you to program a microcontroller device to emulate an ELM327 OBDII adapter connected to an ECU. The emulator can work with any of the huge number of ODBII apps that are compatible with the ELM327-standard adapters, like Torque or CarScanner.

There are two main use cases for this library:

  1. It is ideal for use in developing OBDII applications using the ELMduino library. You can build the example program, upload it to a $10 ESP32 device with builtin Bluetooth and use it for your testing and development, avoiding the need to be communicating with an actual ELM327 device plugged into a vehicle.

  2. This library can be used to as the building block for creating your own ELM327 compatible device that can read values from various custom sensors and allow you to monitor those sensors with your own software or one of the many OBDII client applications that are compatible with the ELM327 specification. No connection to an actual OBDII port is needed.

The project includes two example programs for setting up ELMulator. In the simplest case, creating a working emulator that responds with dummy data values, you can be up and running on an ESP32 in just a couple minutes. See the project readme for more info.

Note: This is a fork of the GTTurboEcu library by TheBigBadWolfClub which is no longer being maintained.