OBD2 ELM327 compatible AllPro adapter with USB 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 ELM327 compatible USB adapter for On Board Diagnostic (OBD2) monitoring. 
Here is the issue - you need both CAN and USB in one chip. Microchip got a bunch of PIC18 processors with CAN functionality, for instance PIC18F2480 or PIC18F2580. But you are out of luck if trying to find the device supporting both CAN and USB. In this case Microchip has another solution - use the standalone CAN controller MCP2515 and interfacing with the main controller thru SPI bus. That is how AllPro adapter supporting CAN protocol. The schematic is shown in Figure 7. The ISO9141/14230 interface is implemented on MC33290, the J1850 VPW bus is controlled by MC33390 transceiver and the pair of P-channel and N-channel MOSFETs (Q1, Q2) is driving PWM bus and PIC18F2455 internal comparator together with resistors R4, R5 producing the differential PWM input. The sircuit is powered from USB bus. Transistor Q3 is for legacy L-line initialization in ISO9141 protocol. I do not think that any car sold in US was ever using it but the specs says it might :) The firmware is available for download as well. Note, that previous schematic of AllPro with two crystals is in Figure 5 in case you need it. 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 | | 2 | J1850 Bus + | 7 | | 5 | Signal Ground | 1 | | 6 | CAN High | 3 | | 7 | K Line | 4 | | 10 | J1850 Bus - | 6 | | 14 | CAN Low | 5 | | 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. 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 2007/2008 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 :) 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: Note that the free versions of ScanMaster and EeasyObdII are not supporting CAN protocol, apparently the authors are reluctant to keep them up-to-date. Here are the screenshots of ScanMaster-ELM: 


The adapter PCB is available for $6+S/H. The board was designed to fit SERPAC A20 enclosure, Mouser part reference 635-A-20-A or DigiKey
part SRA20A-ND. The Adapter kit that including the PCB, preprogrammed PIC chip and all the components required is available as well, see Products page. The kit doesn't include the OBD2 cable. 
I have compiled the parts list for the most of popular electronic components vendors. PIC18F2455, MCP2515 and MCP2551 are available from Microchip Direct. MC33290 and MC33390 available from Freescale as part of free sample program in RoHS MCZ33290 and MCZ33390 modifications. Part | Description | Mouser # | DigiKey # | J1 | USB type B connector | 737-USB-B-S-RA | 609-1039-ND | J2 | DB-9M connector | 737-DE09-PL-24 | A35113-ND | Q1,Q3 | 2N7000 transistor | 512-2N7000 | 2N7000FS-ND | | Q2 | BS250/VP2106 transistor | 781-BS250KL-TR1-E3 | BS250KL-TR1-E3CT-ND | | IC1 | PIC18F2455 | 579-PIC18F2455-I/SP | PIC18F2455-I/SP | | IC2 | MC33290 | 841-MCZ33290EF | MCZ33290EF-ND | | IC3 | MC33390/MC33990 | 841-MCZ33990EF | MCZ33990EF-ND | | IC4 | MCP2551/PCA82C250 | 579-MCP2551-I/P | MCP2551-I/P-ND | | IC5 | MCP2515 | 579-MCP2515-I/P | MCP2515-I/P-ND | | X1 | Crystal, 16.000Mhz | 815-ABL-16-B2 | X077-ND | | D1 | Blue 5mm LED | 604-WP7113MBD | 67-1751-ND | | D2 | Yellow 5mm LED | 604-WP7113YD | 516-1331-ND | | D3 | Red 5mm LED | 604-WP7113ID | 516-1328-ND | | D4,D5 | 1N4148 diode | 512-1N4148 | 1N4148DICT-ND | | R1,R4,R5,R8 | 10K Ohm | 291-10K-RC | 10KQBK-ND | | R2,R3 | 330 Ohm | 291-330-RC | 330QBK-ND | | R6,R7 | 22K Ohm | 291-22K-RC | 22KQBK-ND | | R9,R10 | 510 Ohm | 291-510-RC | 510QBK-ND | | R11,R12 | 100 Ohm | 291-100-RC | 100QBK-ND | | C1,C2 | 15pF | 140-50N2-150J-RC | 490-3691-ND | | C3,C6,C7 | 0.1uF | 871-B32529C104K189 | 478-3383-ND | | C4 | 0.47uF | 80-R82DC3470AA60J | 478-3415-ND | | C8,C9 | 560pF | 140-50P2-561K-RC | BC1022CT-ND | | C5 | 10uF 16V | 647-UVR1V100MDD1TA | 493-1036-ND | | IC socket | 28 pin socket for IC1 | 737-ICS-328-T | 3M5480-ND |
See assembling notes here This is another proof on concept. Some folks are having problem obtaining MC33290 and 33390 chips. In this case you can bring into play the schematic shown in Figure 6. It is using SN75452 and 75453 drivers instead. Note, that it is not the better solution but rather workaround and using Freescale’s dedicated bus drivers is preferable. |