Close

Meaningless numbers

A project log for CAN-obd2

This project was started as a way to display and save information from my 2008 Honda Civic's OBD2 port.

kevinjkriegerkevinjkrieger 07/25/2014 at 05:380 Comments

After fixing the little fiasco with the cable that shorted power and ground, fixing the CAN transceiver wiring to account for the mixed up footprint, and having a coffee - I was ready to go again. Lets check it out shall we?

After much fighting with CAN baud rates (It turns out my Civic runs at 500kHz) I was finally able to see data on my 2008 Honda Civic's CAN bus! It... it works! 

*happy dance* 

Okay - focus. The first test I wanted to do was to read out the RPM of my vehicle using the OBD2 standard PID query. Explained here: http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01

This involves my device setting up a CAN message object to read anything coming from ID 0x7E8 through 0x7EF. Then my device sets up a CAN message object to transmit to ID 0x7DF (the OBD2 broadcast ID) and for the 8 data bytes, uses 0x02, 0x01, 0x0C, 0x55, 0x55, 0x55, 0x55, 0x55. This means please tell me the engine RPM pretty please. At which point the car should ACK my packet and respond with a few things: from ID 0x7E8 through 0x7EF (not sure which one) I should get 8 bytes: 0x04, 0x41, 0x0C, 0xA, 0xB, 0xXX, 0xXX, 0xXX. Which means 4 meaningful data bytes in the stream, freeze frame data, PID 0x0c (rpm) and the two RPM bytes A and B. See http://en.wikipedia.org/wiki/OBD-II_PIDs#Query.

However, the value I'm getting (displayed on LCD screen) seems meaningless... 

More later. Need sleep.

Discussions