On-Board Diagnostics Interfacing

Author:  Jonathan Davies

Since 1996, all road vehicles sold in the USA have been required to be equipped with on-board diagnostics, or OBD, systems. The standard for this system is known as  OBD-II. Europe adopted a compatible standard, known as  EOBD, in 2000. Although the system was originally intended for the purpose of monitoring emissions, it provides a simple way of communicating with the engine's EMU (engine management unit). The OBD-II protocol supports a means for mechanics to test for warning codes and diagnose the cause of a Check Engine warning light. More usefully, it also provides a means to access a wide range of live sensor data from various parts of the engine, such as the current speed, the coolant temperature, throttle position, amongst others. Unfortunately, the specification does not mandate the set of sensors which should be supported, so different vehicle manufacturers have chosen to make different sets of sensor readings available.

Through the use of a scan-tool comprising an  ELM323 chip and supporting circuitry, a computer can be connected to the vehicle's OBD-II port via its RS232 serial port, allowing the computer to query the vehicle's EMU for particular sensor readings and diagnostic codes.

The ELM323 accepts various modem-style commands from the computer. Full details are provided on the datasheet. We use ATZ to reset the chip, ATE0 to turn off local echo and ATL1 to turn on line-feeds. ATFI then attempts a fast initialisation of the OBD bus. Note that all commands sent to the ELM323 should be terminated by a carriage-return character (\r, Hex 0x0D) only. Although the datasheet claims that a carriage-return and linefeed (\r\n) is acceptable, this was found not to work.