USBVPW -- An VPW to USB converter that will allow connecting any USB equipped PC to a GM OBD2 PCM

This project is released under the GNU GPL license. You can read it if you want but basically it means that the design is freely available and freely modifiable. It's also saleable by anyone who wants to put the effort into building and selling it. The only restriction is that if you make an improvement and sell it, you have to contribute the improvement back to the free software community. That means making your improved schematic, firmware, or whatever also freely available. Pretty fair, since the original design was free to begin with.

This project includes a PCB and firmware sufficient to allow connecting a PC with USB to an GM OBD2 PCM (1996 and later). The PCB is designed with Eagle from Cad Soft (http://www.cadsoft.de). The design files are attached. This is a rev0 board and has some bugs, which are noted, but not fixed, in the schematic. They'll be fixed in rev1, which will probably be done in WinQCad? . The components are mostly surface mount, including a SOIC and PLCC, which can be hand soldered.

A microchip 18F2455 (plus firmware) provides the USB interface, and the Freescale 68HC58 DLC provides the VPW interface. The 68HC58 includes receive and send FIFOs in addition to the VPW line driver. Only a handful of passive components are needed to complete the VPW side of the circuit. In hindsight I would not choose the PIC again but it's what's there now.

The project will include a C library that can be linked to your own VPW application. The C library will implement the SAE J 2534 API (yes, this is an SAE standard that specifies an MS Windows API). This API is targeted to reflashing/reprogramming but is generic enough to support scan tool operations also.

Project Status


PCB Version 1.1
July 2007

My patched up and fly wired 1.0 PCB has toasted a DLC and a PIC now. Since I think I've collected all of the errors in the original design, I decided to create a new schematic and lay out a new board. This one will fit inside an enclosure from PacTec? , the CNM 0407 from http://www.pactecenclosures.com/. Eagle couldn't route it so I'm trying the autorouter from http://www.freerouting.net/. When it completes I will upload the schematics and board files.

This board is much smaller than the last one to fit the enclosure, so I've placed components on both sides, and used more surface mount packages where possible. I also switched to a mini Type B USB connector to save space.

I've written a very basic PC client to talk to the UsbVpw board. It uses libusb, a Linux USB library that has been ported to Windows. I've also added the current firmware, client software, and libusb to the project files below. The firmware is compiled using the Microchip MPLAB IDE, and the free assembler and C compiler. The PC software is compiled using Visual C. Project files are included for both IDEs.


PCB version 1.0
Nov 7 06
Please note the schematic has known bugs that have been fixed on my PCB. I don't yet have a schematic that shows these changes.
  • VUSB and VBUS are no longer connected together. If you are curious, this will make a PIC very hot and toast the USB section! These 2 nets have been separated, with VUSB bypassed to ground with a .47uF cap, and VBUS pulled to ground with a 100K resistor. I have replaced the dead PIC with a new one.
  • There is now a stabilizing cap on the LM voltage regulator

I have fixed the bugs noted on the schematic on my PCB. With these changes the board gets partially through enumeration. For some reason it is identified as a low speed peripheral instead of a full speed peripheral, despite having a pullup attached to D+. I am somewhat stuck at this point and could use some help from someone with USB and microchip experience.

Nov 19 2006
Observed that the 20 MHz crystal output would go dead just after connecting the USB cable, and come back after disconnecting the USB cable. ??? Not sure what's wrong there, but I took out the crystal and put in an OSC and now the demo works fine. On to VPW firmware development.

Dec 27 2006
Crystal problem is due to wrong load capacitors. Sticking with the canned oscillator for now but will switch back at some point since the crystal is cheaper. I am trying out the HID example code from Lakeview Research: http://www.lvr.com/hidpage.htm Jan provides example HID code (both host side and firmware) which I hope to tweak into the USBVPW firmware and API library.

-- SteveRavet - 07 Nov 2006

Project files -- PCB version 1.0

Schematic files Board files in Gerber format: Software Other files
Topic attachments
I Attachment Action Size Date Who Comment
pdfpdf sae_j_2534-1.pdf manage 403.5 K 27 Dec 2006 - 07:02 TWikiGuest standard windows API for scan tool and reflashing functions
elsebrd usb_vpw.brd manage 35.5 K 07 Nov 2006 - 03:10 SteveRavet board file in Eagle format
elsecmp usb_vpw.cmp manage 18.5 K 07 Nov 2006 - 03:11 SteveRavet component side copper layer
gifgif usb_vpw.gif manage 54.8 K 07 Nov 2006 - 02:58 SteveRavet schematic in GIF format
elsesch usb_vpw.sch manage 176.3 K 07 Nov 2006 - 03:00 SteveRavet schematic in Eagle format
elsesol usb_vpw.sol manage 14.0 K 07 Nov 2006 - 03:11 SteveRavet solder side copper layer
elsestc usb_vpw.stc manage 4.5 K 07 Nov 2006 - 03:11 SteveRavet component side silkscreen
elsests usb_vpw.sts manage 1.9 K 07 Nov 2006 - 03:12 SteveRavet solder side silkscreen
zipzip usb_vpw_source.zip manage 461.8 K 26 Sep 2007 - 03:34 SteveRavet firmware and PC client software
Topic revision: r7 - 26 Sep 2007 - 03:37:56 - SteveRavet
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback