9141/14230 Adapter
 
Home
AllPro Adapter
9141/14230 Adapter
Multiadapter
Windows Driver
18F2450 with CDC
Programming 18F2455
References
About Me

USB OBD2 adapter on PIC18F2455

 

Project Overview

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.

Hardware

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 on Pic 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 OBD2 Cable

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.

Description

Mouser #

J1962 connector 829-12110252
J1962 connector male pins

829-12047581

DB9 female connector

156-1309-E

DB9 connector shell

156-2009-E

 

Connecting and Testing

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:

 

The Software

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:

 

Adapter PCB

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...

 

Using PIC18F2450

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.

 

Is it the right adapter for my car?

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 multiadapter or AllPro adapter.

 

Parts List

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.

 

Part

Description

Jameco #

Mouser #

Digikey #

J1

USB type B connector

230958

806-KUSBX-BS1N-W

609-1039-ND

J2

ICSP 6 pin header

153700

538-22-28-4063

A30920-ND

J3

DB-9M connector

104943

152-3309

A35113-ND

Q1

2N7000 transistor

783594

512-2N7000

2N7000FS-ND

IC1 PIC18F2450   579-PIC18F2450-I/SP PIC18F2450-I/SP
IC2 MCZ33290     MCZ33290EFR2CT
X1 Crystal, 20.000Mhz 325067 815-AB-20-B2 X036-ND
D1 Blue 5mm LED   78-TLHB5400 67-1751-ND
D2 Yellow 5mm LED   78-TLHY5400 516-1331-ND
D3 Red 5mm LED   78-TLHR5400 516-1328-ND
D4 1N4148 diode 36038 512-1N4148 1N4148DICT-ND
R1 10K Ohm   291-10K-RC 10KQBK-ND
R2,R3 220 Ohm   291-220-RC 220QBK-ND
R4,R5 510 Ohm   291-510-RC 510QBK-ND
C1,C2 20pF 332321 140-50N5-200J-RC 490-3703-ND
C3 0.47uF   581-BQ074D0474K 478-3415-ND
C4 1uF x 25V 330431 140-XRL25V1.0-RC 493-1099-ND
C5 0.1uF tantalum 33486 80-T350A104K035 478-1831-ND
C6 0.1uF   581-BQ014D0104K 478-3383-ND
  28 pin socket for IC1 526248 571-3902619 3M5480-ND

 

Assembling Kit Notes

See assembling notes here

 

Home | AllPro Adapter | 9141/14230 Adapter | Multiadapter | Windows Driver | 18F2450 with CDC | Programming 18F2455 | References | About Me

 

This page was last updated on 03/23/08