Dive into an OBD2 world with ELM327

Today we are going to have a bit of introduction to what the OBD2 and ELM327 is, protocols and trouble codes. This is necessary to understand what we are going to do later on.

First a dictionary:

OBD / OBD2 – OBD2 is the second version of connector that is available in all modern cars and connects to CAN bus or ECU of the car. We will use only protocols compliant with OBD2 connector, OBD is an old version to which OBD2 is not backwards compatible.
CAN – Controller Area Network, serial bus that allows car components to communicate with ECU.
DTC – Diagnostic Trouble Codes.
PIDS – Parameter IDs for CAN requests.

I am going to use ELM327 controller (or Chinese counterfeit). It is quite cheap and easy to buy and does support a lot of protocols:

0 – Automatic
1 – SAE J1850 PWM (41.6 kbaud)
2 – SAE J1850 VPW (10.4 kbaud)
3 – ISO 9141-2 (5 baud init, 10.4 kbaud)
4 – ISO 14230-4 KWP (5 baud init, 10.4 kbaud)
5 – ISO 14230-4 KWP (fast init, 10.4 kbaud)
6 – ISO 15765-4 CAN (11 bit ID, 500 kbaud)
7 – ISO 15765-4 CAN (29 bit ID, 500 kbaud)
8 – ISO 15765-4 CAN (11 bit ID, 250 kbaud)
9 – ISO 15765-4 CAN (29 bit ID, 250 kbaud)
A – SAE J1939 CAN (29 bit ID, 250* kbaud)
B – USER1 CAN (11* bit ID, 125* kbaud)
C – USER2 CAN (11* bit ID, 50* kbaud)

Modern cars usually have CAN connection, older ones may have a different protocol. Luckily there is automatic connection available in ELM which tries all the protocols and selects the working one (I assume this is the first that responded for the request).

User can communicate with ELM327 using AT commands, popular in modems communication. The specific subset depends on the controller version. There is a good breakdown of commands supported in each version in the table: https://www.elmelectronics.com/wp-content/uploads/2016/07/AT_Command_Table.pdf

The description and usage for each command is available in the datasheet for ELM372. There is also an indication for which protocol it is available which may come in handy:

https://www.sparkfun.com/datasheets/Widgets/ELM327_AT_Commands.pdf

Next thing are “Diagnostic Error Codes”, usually connected with “Check Engine” light:

Check engine lights.
Source: http://carcare.sg

 

 

 

 

 

 

This generally indicates current (or possible in  the future) problem with one or more parts of the engine. I have merged some data available on the internet for quick reference of trouble codes:

More or less complete list of DTC codes is available here:

http://www.launchtech.co.uk/dtc-codes-list/

There is much more data available on wiki about the OBD2 in general which might be useful later: https://en.wikipedia.org/wiki/OBD-II_PIDs

That’s all for now as it gets quite long. Stay tuned 😉

Leave a Reply

Your email address will not be published. Required fields are marked *