OBD-II interface circuit design

 

atmega644 + elm327 + mcp2551 chip sets

obdii_interface_circuit_-1

obdii_interface_circuit_-2

elm327 demonstration board diagram

obdii_interface_circuit_-4

elm327 demonstration board circuit schematic

 

obdii_interface_circuit_-3

elm327 + cp2102 as usb convert to uart

obdii_interface_circuit_-5

LP2951

obdii_interface_circuit_-6

Schematic circuit of OBDII interface adapter

obdii_interface_circuit_-7

The vehicle on-board diagnostics system (OBDII) provides a serial diagnostic link for communication with scan tools. There are 4 diagnostic interfaces: ISO 9141-2, KWP 2000, SAE J1850 and ISO 15765. A PC-based scan tool consists of an interface adapter and specialized diagnostic software. This paper presents the implementation of a smart OBDII interface adapter. The adapter is build of a protocol converter, interface transceivers and protective devices. The full schematic circuit of the adapter is presented and explained in detail. The protocol converter (MCU) processes and transfers diagnostic messages. It communicates with PC via serial port using ASCII messages. The software for the protocol converter has been developed in C language. A state diagram of software is presented. The functions performed by the software for different interfaces are explained in detail. The adapter is successfully verified in practice.

1. INTRODUCTION
The OBDII (On-Board Diagnostics II) system represents the capability of vehicle electronic systems to diagnose itself and its components. The output from the OBD system is presented to the driver as a warning light with an engine symbol. When a fault has been detected, a diagnostic trouble code is set and stored in the computer memory. OBD provides a serial diagnostic link for communication with external test equipment (scan tool). One of the following communication protocols is used [2, 5]:
1) ISO 9141-2 – baud rate 10.4 kbit/s;
2) ISO 14230 (KWP 2000 – Keyword protocol 2000) – the same baud rate;
3) SAE J1850 (Class B data communication interface) – rates 10.4/41.6 kbit/s;
4) ISO 15765 (CAN – Controller area network) – baud rates 250/500 kbit/s.
The ISO 9141-2 and KWP 2000 interfaces are the most common diagnostic interfaces in Europe (KWP 2000 is newer). They share the same physical interface, called K-Line interface. SAE J1850 is mostly used in the American vehicles. It has two alternative physical layers: VPW and PWM. CAN is mainly used in new cars with model year after 2003.
The scan tool should obtain and display diagnostic information stored [5]. A PC-based scan tool consists of an interface adapter and specialized diagnostic software. The interface adapter provides a connection between the vehicle and the PC. The connection to PC is most often via RS 232 interface. One ore more diagnostic interfaces can be supported. In case only K-Line interface is used, the adapter can be implemented as a simple electrical converter to RS 232. When CAN or J1850

OBDII interface for VPW, PWM,  and ISO 9141-2 Vehicles

interfaces are used, the adapter should contain a protocol converter, implemented by means of MCU.
The protocol converter processes and transfers diagnostic messages according to the data link layer of the respective protocol. If the protocol converter is utilized for processing of K-Line messages, this leads to improved message timing and decreased PC load as well [1, 4].
This paper presents a method for implementation of a smart OBD interface adapter for connection between all 4 diagnostic interfaces and the PC serial port. The adapter is called smart because of the presence of MCU. The adapter is build of a protocol converter (MCU), interface transceivers and protective devices (Fig. 1). This method of implementation uses an intermediate conversion of the electrical levels to TTL level that is necessary for connection of MCU. The protective devices suppress the overvoltages, coming from the vehicle lines. The interface transceivers are two-way converters of electrical levels between TTL and the respective interface signals.

2. SCHEMATIC CIRCUIT OF INTERFACE ADAPTER
The schematic circuit of the adapter shall conform to the requirements for the physical layer of diagnostic interfaces and RS 232.
The full schematic circuit of the interface adapter is presented at Fig. 2. The signals coming from the vehicle diagnostic connector are fed to connector J1 via a standard diagnostic cable. The protective devices of the circuit are D1 (TVS) and D3-D10 (voltage delimiters). The adapter is powered by the vehicle battery. A power supply +5 V (U1) necessary for MCU, RS 232- and CAN transceivers is provided.
The K-Line transceiver is implemented by an open collector comparator (U3A) and transistor inverter stages (Q1/Q2). The RxK signal is for receiving information from K-line. The TxLTxK/ signals are for transmitting information to K/L lines. The comparator has a reference voltage of +5V and is used for reading information from K line. The transistors are used for sending information on K/L lines.
At this stage of project the J1850 transceiver is not implemented. It is a subject of future work. Nevertheless five J1850 communication signals are provided: for VPW physical layer – TxVPW, RxVPW; for PWM physical layer – RxPWM, )(/)(−+TxPWMTxPWM.
The CAN transceiver U2 connects with 2 signals to the protocol converter U5: TxCAN and RxCAN. U2 has an AC termination circuit (R2-C4/R3-C5) according to ISO 15765-4 requirements. U2 is enabled by the signal EN_CAN [3].

obdii_interface_circuit_-8

ELECTRICAL and PHYSICAL CHARACTERISTICS:
This device is a CMOS microcontroller produced by Microchip Technologies. You can obtain detailed
specifications for the chip from Microchip data books, or on the Microchip website, so this section will only
provide a brief summary. It is available in several package designs and temperature ratings. The baseline
BR16F84-1.07 chip is a microchip 16F84A-20/P part, which is a commercial temperature range plastic 18 pin
DIP rated at 20 MHz. The device can be special ordered if other package designs, temp ratings, etc are
desirable.
TYPICAL APPLICATION CIRCUIT:
The typical application is a simple automotive scan tool using a PC or laptop as the host machine. The
interface to the PC is a serial link running at 19200 baud. Only 3 wires are needed, as no handshaking
signals are used. The serial output from the interface circuit is a 5 volt signal, which works well with most
PC's and laptops. The serial input is clipped and current limited, so it is capable of accepting almost any
signal voltage. The interface to the vehicle OBD bus is accomplished with a few external components and an
LM339 comparator chip. The connection to the vehicle uses 6 wires, assuming all three OBD protocols are to
be implemented. Operating voltage for the chip and associated circuits is small, and is derived from the
vehicle's 12V system on pin 16 of the OBD connector.
Refer to the schematic of a typical application. This design uses readily available components.
APPLICATION HINTS
(1) The cable to vehicle can be simple unshielded wires. This cable should be kept as short as possible, and
definitely no longer than 4 feet, especially for PWM operation. Somewhat longer cables could be used if the
circuit's termination resistors are replaced with lower values.
(2) The cable to Computer serial port can also be unshielded. The application circuit has been tested with
unshielded cables up to 30 Ft., but specific implementations may vary, so you may want to experiment if you
are attempting long runs. For every long runs, you might also wish to use an RS 232 transceiver chip in your
design.
(3) Circuit layout is not critical. The circuit has been tested on both hard wired perfboard prototypes and
plugboard breadboards. However, if your layout is very sloppy, you may want to add additional bypass
capacitors.
(4) Free software to utilize the application circuit is available for download. The program will run under DOS,
so it can be used on older computers as well as newer machines running windows. It is small enough that it
will fit on a DOS boot floppy, so you can still run it if your main operating system is not DOS compatible. The
computer need not even have a hard drive.

粤ICP备05041282号.

Copyright © 2009-2014 KITARM

You are here: