This is a simple Arduino project using the ELMduino library to help diagnose information on my 350z on the track. This should work for any car that supports OBDII.
- ESP32 Board - I got this one, but there are other options out there. You just need bluetooth.
- ELM 327 Bluetooth Module - It was cheap and seems to work well. Connects very quickly.
- 128x64 LCD - You don't have to have an LCD for this to work but it's very helfpul for displaying the data. This article helped me get the LCD up and running on the ESP32. The LCD Pintout, I used is as follows:
// LCD hookup.
LCD | Board
SCK | D21 (SCL on board)
SDA | D22 (SDA on board)
GND | GND
VDD | 3.3v
- Clone the repo
- Select your ESP32 board and install necessary libraries
- Create a file called
arduino_secrets.h
in the root directory near theindex
file using the template below. - Update the values for your MacAddress and pass code if needed see "Finding the ELM327 Mac Address)".
- Lastly, flash the board and you're ready to try it out.
- With your ESP32 flashed and secrets.sh updated. Connect the ELM327 to your car.
- Turn on the ignition.
- Power on the device Arduino device.
- It will begin attempting to connect. If it fails to connect try a power the device on / off (sometimes it doesn't connect the first time).
- If you see CONNECTION SUCCESSFUL, wait a few seconds and you should see your data soon.
#define SECRET_SSID "OBD2"; // Default.
#define SECRET_PASS "1234"; // Default.
// Replace this with your own.
// Bluetooth device MAC address AA:BB:CC:11:22:33
#define SECRET_MAC_ADRESS {0xAA, 0xBB, 0xCC, 0x11, 0x22, 0x33};
- Plugin the ELM327 unit and connect to it your computers bluetooth. It should show up as "OBDII".
- Enter the password if it requires one. The default passcode for ELM327 bluetooth model is usually
1234
. If that doesn't work, try12345
or0000
. - For mac users, you can find the MAC address with the command
system_profiler SPBluetoothDataType
in Terminal. - You should be able to spot by looking for OBDII.
- Once you have the MAC address, go to your bluetooth settings and forget "OBDII".
- Next, update the MAC address in the
arduino_secrets
file. Each pair of values will have an0x
as seen below.
// AA BB CC 11 22 33
#define SECRET_MAC_ADRESS {0xAA, 0xBB, 0xCC, 0x11, 0x22, 0x33};
- Due to challenges connecting this to ELM327 wifi consistently I recommend bluetooth or a wired connection. For more details see [ELMduino Wifi Issue]](PowerBroker2/ELMduino#52).
- Make sure the car is started with OBDII ELM327 inserted into the port before starting the ESP32.
- If it doesn't connect the first time, try restarting the ESP32.
- Using the
ELM_PORT.connect(ssid)
as seen in the ELMduino ESP32 example often failed to connect and was very slow. I used the solution documented here to resolve this. - Querying certain data together such as RPM and temperatures was a little slow. I didn't really need RPM anymore, so I removed it from my example. However, even with multiple other data types the temperatures displayed fluctuate a lot between the values I show here on this repo.
- If you're able to connect but your values don't load for some reason, checkout the Elmduino library and try other PIDs.