OBDuino
Contact : info@obduino.ca


Logging capabilities

Everytime a PID is queried to the ECU, reply is sent on the TX pin of the OBDuino (TTL level), it's actually configured as 38400,7,N,1 (115200 for v030+) and output as csv text like "9121,0D,29" which is the time in ms since startup, the PID (0D = speed), the uncooked value in hexadecimal (29h = 41km/h).
Logging can be made with a special cable and a laptop. The cable is a standard TTL converter anyway, a search for "rs232 ttl" on eBay reports adapter for about $4 shipped ; "usb ttl" reports some adapter for $5 shipped, I tested one based on a SiLabs CP2102 and it works perfectly.

Pinout of the 4 pins header on the OBDuino is:
1 - GND
2 - +5V
3 - RX
4 - TX
When the OBDuino is plugged in the car, the pin 2, +5V is an output pin, so if you have an USB dongle connected to your laptop, you do not need to connect the 5V pin to it, just connect pin 1,3 and 4.

I also made a small daughterboard with an SD card slot so I can log all my trip without having a bulky laptop in the car.
For the time being the logger is build by hand on a small PCB, I tested it with a SD Lexar 2GB in FAT16/32 and a SDHC Sandisk 4GB in FAT32. It does not work with a SDHC Kingston 4GB, anyway, doesn't Kingston buy grade B memories from manufacturers? Maybe this is why.
SD logger SD logger
Here is the schematic of the SD logger with an ATMEGA16 (but I did it with an ATMEGA168 I had around, pinout is not exactly the same but it works at 8MHz at 3.3V too).

To facilitate the build of a logger, a simple Arduino with an SD card can be used. SD socket should be wired like this on the Arduino : SD logger arduino (it's a schematic I found in the Arduino forums), here is the sketch : SD logger sketch, feel free to use it. You need to download the SdFat library too.

Example of what is logged, this is an abstract of a real file capture, you can see that 100 PIDs (yes, one hundred) were captured in 1 second, between second 17th and second 18th :
17009,0D,00
17018,11,10
17029,0C,0000
17039,03,0100
17049,0D,00
17059,11,10
17070,0C,0000
17079,03,0100
17089,0D,00
17099,11,10
17108,0C,0000
17119,03,0100
17129,0D,00
17139,11,10
17149,0C,0000
17159,03,0100
17169,0D,00
17179,11,10
17189,0C,0000
17199,03,0100
17209,0D,00
17219,11,10
17228,0C,0000
17239,03,0100
17250,0D,00
17259,11,10
17269,0C,0000
17278,03,0100
17289,0D,00
17299,11,10
17309,0C,0000
17319,03,0100
17329,0D,00
17339,11,10
17348,0C,0000
17358,03,0100
17370,0D,00
17379,11,10
17389,0C,0000
17398,03,0100
17409,0D,00
17419,11,10
17429,0C,0000
17439,03,0100
17449,0D,00
17460,11,10
17469,0C,0000
17479,03,0100
17489,0D,00
17499,11,10
17509,0C,0000
17519,03,0100
17528,0D,00
17539,11,10
17549,0C,0000
17559,03,0100
17569,0D,00
17580,11,10
17589,0C,0000
17599,03,0100
17609,0D,00
17618,11,10
17629,0C,0000
17639,03,0100
17648,0D,00
17659,11,10
17670,0C,0000
17679,03,0100
17689,0D,00
17699,11,10
17710,0C,0000
17720,03,0100
17729,0D,00
17739,11,10
17748,0C,0000
17759,03,0100
17769,0D,00
17779,11,10
17789,0C,0000
17799,03,0100
17809,0D,00
17819,11,10
17829,0C,0000
17840,03,0100
17849,0D,00
17860,11,10
17869,0C,0000
17879,03,0100
17889,0D,00
17899,11,10
17909,0C,0000
17920,03,0100
17930,0D,00
17939,11,10
17950,0C,0000
17959,03,0100
17970,0D,00
17980,11,10
17989,0C,0000
17999,03,0100
Using a small script to keep RPM and speed for instance, and output in a .csv file, you can then use Excel to open the file and do some graphics as this one when I drove around a parking lot.
OBDuino

Transparent mode

The device can be put in a transparent mode, meaning that after the CAN bus initialization is done, it waits for your command. Connect a terminal in 38400,7,N,1 (115200 for v030+). To enter transparent mode, press and release the middle button when the banner screen is showned at boot ; or (v030+ only) after receiving the OBDUINO banner on your com port, send a '\n'. To quit transparent mode, press middle button or (v030+ only) send FF FF for the command and argument.
Some examples: after the '>' prompt, enter a command followed by an optionnal pid, for instance to ask for the PID01-20 support, enter as below:

>01 00‹enter›
41 00 BE 1F A8 12


The RPM pid is 0C, so to ask RPM just enter 01 0C:

>01 0C‹enter›
41 0C 1F D8

About the reply: 41 is 40+command, 0C is the PID, then the result 1F D8 means (0x1f*256+0xd8)/4=2038 RPM

To get a VIN, just enter 09 02:

>09 02‹enter›
49 02 01 53 43 43 46 45 33 33 43 39 56 48 46 36 35 33 35 38

49 02 is the answer for 09 02, 01 means there is one item following, decoded ASCII VIN is SCCFE33C9VHF65358

A list of PIDs and how to interpret their results is on wikipedia here: OBD-II PIDs

Real life example of transparent mode

This is a capture made with HyperTerminal and my netbook. I typed commands after the '>' prompt character. Everything in bracketed italic are comments I added here for your comprehension:

OBDUINO030

>01 00 [PID 01 to 20 supported by ECU]
 41 00 BE 1F A8 13
>01 01 [monitor status, MIL is off]
 41 01 01 07 65 00
>07 [pending DTC: none]
 47 00
>03 [a DTC in memory, P0441, I suspect either my gas cap or the PCV, it comes and goes]
 43 01 04 41
>02 00 00 [PID supported for freeze frame]
 42 00 00 7E 1F 80 03
>02 02 00 [info in freezed frame #00 is for code P0441]
 42 02 00 04 41
>09 02 [VIN, it's a Hyundai Elantra 2007 2.0L]
 49 02 01 4B 4D 48 44 55 34 35 44 36 37 55 xx xx xx xx xx xx (KMHDU45D67Uxxxxxx)
>09 04 [Calibration ID]
 49 04 01 48 37 4E 43 4D 43 30 41 2D 2D 2D 2D 00 00 00 00 (H7NCMC0A----)
>09 06 [Calibration Verification Number]
 49 06 01 00 00 83 D3
>09 08 [In-use Performance Tracking]
 49 08 10 08 E4 1F BD 0D 48 08 B8 00 00 00 00 0D 47 08 B8 00 00 00 00 07 02 08 E4 00 00 00 00 03 02 01 BA
>05 [not supported by CAN so 7F means it's a negative answer to mode 05, 11 = service not supported]
 7F 05 11
>01 46 [yup, ambient temperature is (53h-28h=43d) 43C with Humidex factor! it seems the ECU use it :)]
 41 46 53
>ff ff
‹EOT› [we received an EndOfTransmission and the OBDuino shutdowns]