Decoding CAN messages

Hello,

I'm working on a project thats measuring engine performance and fuel economy. Since most new cars (like the 2005 Ford we're using) have a CAN network, we thought we could get some engine messages off the CAN connector. We bought a CAN to USB adaptor and started recording messages.

(Time),Channel id,Flags,DLC,Data0,Data1,Data2,Data3,Data4,Data5,Data6,Data7,(Counter)

0.1,1,1024,2,7,32,0,232,131,64,28,194,0,1 0.1,1,1104,2,7,31,214,2,156,16,176,32,0,2 0.1,1,768,2,5,5,126,154,6,0,0,0,0,3 0.1,1,368,2,8,16,144,100,101,18,198,14,56,4 0.1,1,786,2,8,124,35,128,127,255,35,124,35,5 0.1,1,805,2,2,0,129,0,0,0,0,0,0,6 0.1,1,818,2,8,128,240,129,15,255,255,0,202,7 0.1,1,70,2,6,0,0,0,0,0,0,0,0,8 0.1,1,1200,2,8,40,101,40,105,40,103,40,99,9 0.11,1,1024,2,7,32,0,232,131,64,28,194,0,10 0.11,1,368,2,8,16,145,100,101,18,199,14,56,11

These messages appear common. The software from kvaser, canusb.com, WGSoft and any other program I've found simply display lines of data like these (either in decimal like this or hex)

The messages I found for ODB-II are mostly 4 bytes and don't match, and we've looked at SAE standards and these messages do not match the J1939 documents we found (although they are 8 bytes).

Does anybody know how to convert these numbers into words and real values with units?

Thanks, Kevin

Reply to
Kevin
Loading thread data ...

Typically, there are several CAN networks in a car. Those networks are firewalled one from another. Only the specific messages are going through. Perhaps what you call "CAN connector" is the diagnostic connector. You can't get much out of it.

[...]

[...]

There is no universal standard for CAN messaging. All car manufacturers are using their highly proprietary message layouts. They do not reveal that information. On the diagnostics, the KWP2000 protocol is used, and the messaging is usually based on J1939 standard. You can get some general information from it, but you should not expect to find much.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

The messages you are seeing are communications between various modules inside the car. These are not standardized in any way and can vary from one manufacturer to the next. In order to get the standardized data values that are defined in SAE J1979 you need to ask for them. This means you need something equivalent to a diagnostic tool that will send a CAN message with a request for a particular value (mode and PID) and then display the response when it comes back. This will only work on the CAN bus that is on pins 6 and

14 of the OBD connector and may or may not not work on any of the other "firewalled" CAN buses that you might find under the hood.

A good start would be to buy one of the many OBD adapters that are based on the ELM327 chip and then use one of the compatible freeware programs (or Hyperterminal) to poll the values that you want.

Also I believe that J1939 is only applicable to heavy equipment like trucks and buses while passenger vehicles with CAN will use ISO15765 which describes the use of KWP which is defined in ISO14230 which still relies on J1979 for the actual parmeter definitions. Older vehicles without CAN will use J1850 or ISO9141 or ISO14230 for the physical layer. Easy huh?

If your goal is to get accurate fuel consuption figures on vehicles other than your 2005 Ford then you will quickly discover that CAN messages are the least of your worries.

--Tom.

Reply to
Tom

29 bit identifiers are used in J1939, while your dump seems to indicate 11 bit identifier (addresses).

Paul

Reply to
Paul Keinanen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.