USB OBD2 adapter on PIC18F2455
On PC desktops the RS-232 serial ports are about
to disappear from most computers (especially from laptops), replaced by
the USB connection. This project was begun as a response to build simple ISO9141-2/14230-4 ELM323 compatible USB adapter for On Board Diagnostic (OBD2) monitoring.

This project is build around one of new Microchip
PIC18F2455/2550 8-bit microprocessor with USB support. The PIC18F2455 USB
core is V1.1 and V2.0 compliant and operates at 1.5 Mb/sec and 12Mb/sec
speeds respectively. The microprocessor has 2048 bytes of RAM and 24K of Flash
program memory, which is plenty for implementing the OBD2 controller
functionality using high-level C programming language. The PIC18F2550 is
basically the same with 32K Flash memory. The chip is
available in DIP28 package and with a few external components allows
implementing the ISO9141-2 and ISO14230-4 (KWP2000) protocols
controller. The SAE OBD2 protocol translates into ASCII character based
messages and exposing to PC via USB virtual COM interface. The circuits steals
the 5V power from USB bus which make the circuit design simple. Freescale's MC33290 chip is providing an interface to
ISO9141/14230 bus. The
schematic is shown in Figure 1. There are 3
LEDs showing the USB connection status and OBD connection
transmit/receive activity. The adapter has a dedicated connector for
In-Circuit Serial Programming, see programming
PIC18F2455. You can download the firmware for 18F2455 and 18F2550 using
this link.
The adapter uses 9 pin D type female
connector to link up to vehicle’s OBD2 J1962 connector. The
pinout was chosen to match many of the commercially available
cables. The pin connections required of the cable are as
follows:
|
J1962 Pin |
Description |
DB9F Pin |
|
5 |
Signal Ground |
1 |
|
7 |
K Line |
4 |
|
15 |
L Line |
8 |
|
16 |
Vehicle Battery Positive |
9 |
You can build the cable yourself as Mouser Electronics started
selling J1962 OBD2 connectors made by Delphi.

Note, that it is just connector block, no shell provided and you have
to ordered the connector pins separately, see the parts reference table below.
There is no driver required for Microsoft
Windows XP/2000/Vista as the adapter using the standard
Communication Device Class (CDC) driver usbser.sys
included in the distribution. However, Windows doesn’t have a
standard INF file for the CDC driver. You can download the info
file here. Plug the
adapter to a spare USB port on your PC. Windows Found New
Hardware Wizard will launch. Skip the Windows Update screen and
go to install screen. Select "Install from a list or specific
location (Advanced)" as shown below and then click "Next".
Select the OBD Adapter INF file and configure the driver.

Open the Device Manager and select "Ports (COM and LPT)", the device
appears as a
"Communication Port". Go to "Port Settings" tab and "Advanced"
button. Select the port number you want to use.

Microsoft has a tool for examining the USB connections.
USBView.exe is a freeware utility available for download, shows the USB connections
tree and displays the details of USB devices
connected to it, see the result below:

Here is the list the software I have tested so far with
adapter:
The
result of running ScanMaster is shown below:

Here is the screen of ScanMaster Freeware Edition:

The layout in Gerber format available for download
here. I can sell the Adapter blank PCB
for $6 plush S/H or a kit that included the board, preprogrammed PIC chip
and all the components required as well, just let me
know...

This adapter was originally designed around PIC18F2455 chip.
At that time PIC18F2455/2550 was the only one available from
Microchip with USB 2.0 support. PIC18F2450 contains a
subset of
features available in 2455 controller. The adapter
schematic remains the same, the
only firmware has to be
updated. Note that the chip is relatively inexpensive and
Microchip Direct sells them for $3.84 in small quantities.
Any vehicles built for sale in US on or after 1996 have been required to have an OBD2 port. If your vehicle
was built before 1995 it might have OBD2 connector but it is not necessarily OBD2 compliant. OBD2 standard comprises four different electrical interfaces:
- ISO 9141/14230
- J1850 PWM
- J1850 VPW
- ISO 15765 (CAN)
VPW (Variable Pulse Width) was originally introduced by General
Motors when PWM (Pulse With Modulation) belongs to Ford. ISO 9141 and
the later incarnation ISO 14230 (AKA Keyword 2000) is the one most
of European and Asian vehicles using. All new model starting 2006/2007
have only CAN protocol. Here is the picture of typical a
16-pin OBD2 connector:

Find the connector in your vehicle and determine which pins are
present using table below as the protocol reference:
|
Protocol |
Pin 2 |
Pin 6 |
Pin 7 |
Pin 10 |
Pin 14 |
|
ISO 9141/14230 |
|
|
ü |
|
|
|
J1850 PWM |
ü |
|
|
ü |
|
|
J1850 VPW |
ü |
|
|
|
|
|
ISO 15765 CAN |
|
ü |
|
|
ü |
Note, that the only pins specific to particular protocols
are listed.
The exact location of the OBD2 connector varies from vehicle
to vehicle, but it will be within three feet of the driver. Personally, I am using flashlight
to get the clear view :) This adapter is ISO9141/14230 and pin 7
should be present in OBD connector. If it J1850, either PWM or VPW you need
AllPro adapter.
I have compiled the parts list for the most of popular
electronic components vendors. Please note, that the list is for
reference only, the most parts are standard type and available
in different varieties. Some vendors, like Mouser having
tendency dropping some parts and replacing it with other
similar. PIC18F2450 is available from
Microchip Direct. MC33290 as MCZ33290 modification is available
as part of free sample program from
Freescale.
See assembling notes here
|