Car Development

The OBD II connector is called a J1962 connector.

Pin Signal Description
2 J1850 Bus+  
4 CGND GND
5 SGND GND
6 CAN High J-2284
7 ISO 9141-2 K-LINE Tx/Rx
10 J1850 Bus-  
14 CAN Low J-2284
15 ISO 9141-2 L-LINE Tx/Rx
16 +12v Battery power

Protocol descriptions on the OBD II.

http://pinoutsguide.com/CarElectronics/car_obd2_pinout.shtml

CAN bus (pin 6 and 14) can run on two speeds: 250kbits or 500kbits (tested on Volvo C70). (Also called ISO15765).

SAE J1850 PWM (41.6 kbaud, standard of the Ford Motor Company) / SAE J1850 VPW (Variable Pulse Width) (10.4/41.6 kbaud, standard of General Motors)

ISO 9141-2. 10.4 kbaud, primarily used in Chrysler, European and Asian vehicles.

ISO 14230 KWP2000 (Keyword Protocol 2000) used by most European and Asian manufacturers.

 

Here some initial notes to myself:

For PID Query: ID (7DF), CAN frame length (8), bytes (2), Mode (09), PID (02)
http://en.wikipedia.org/wiki/OBD-II_PIDs


Send 7DF (8) 02 09 02 00 00 00 00 00
Next: 7E0 30 00 00 00 00 00 00 00

Response (from 7E8 to 7EF):



Negative Response: 7E8 03 7F 02 12
59 56 31


10 .......................????
14 .....................value of additional data bytes (why are there 3missing here?)
49 ......................mode + h40h (9 + 40 = 49)
02 .......................PID (=02)
01 ....................... (frame 1/5?)
59 Y
56 V
31 1
 

 

Sending request 7E8 (8) 02 01 00 00 00 00 00 00 (2 bytes, mode 1, pid 0) / requesting supported PIDs
Reply: 06 41 00 98 3b a0 13 00 (6 additional bytes, mode 1, pid 0, 98 3b a0 13 ==> Bit encoded [A7..D0] == [PID 0x01..PID 0x20] [= 10011000 00111011 10100000 00010011])
Supported PIDs by my car: 1, 4, 5, 11, 12, 13, 15, 16, 17, 19, 27, 31, 32
Or in Hex: 1, 4, 5, b, c, d, f, 10, 11, 13, 1b, 1f, 20

Sending request 7E8 (8) 02 01 04 00 00 00 00 00 (2 bytes, mode 1, pid 4) / requesting calculated engine load
Reply: 03 41 04 00 00 00 00 00 (3 additional bytes, mode 1, pid 4, 00 ==> A*100/255 % )
Calculated engine load = 00 * 100/255%

Sending request 7E8 (8) 02 01 0b 00 00 00 00 00 (2 bytes, mode 1, pid 0b) / Intake manifold absolute pressure
Reply: 03 41 0b 65 00 00 00 00 (3 additional bytes, mode 1, pid 11, 65 ==> kPa (absolute) )
Pressure = 65 kPa (absolute)

Sending request 7E8 (8) 02 01 0c 00 00 00 00 00 (2 bytes, mode 1, pid 0c) / requesting Engine RPM
Reply: 04 41 0c 0a a0 00 00 00 (4 additional bytes, mode 1, pid 0c, 0a a0 ==> ((A*256)+B)/4 rpms )
Engine rpm = ( ( 10 * 256 ) + 160 )/ 4 = 680 rpm
Other measured rpms: 680; 697; 716,5; 725; 726; 729,5; 860,5; 944,5; 969,5; 971; 1021; 1305,5; 1720,5; 1787,5