Decoding OBDII Comms


Closed Thread
Results 1 to 13 of 13
  1. #1

    Default Decoding OBDII Comms

    I'm working on some serial comms traffic and trying to work out how a value is being derived from some hex data.

    I'll give you an example, we have two data bytes $88 + $77 being transmitted in response to request for temperature data.

    From these two bytes it generates a temperature value of 29C, now only one of the bytes may be being used of course.

    A few more clues.

    "This is showing the value of Motor Power Inverter Module Temperature Sensor.
    Temperature of motor power inverter module is calculated at Motor Driver Module.
    [Operating Range]

    -40[°C] - 120[°C]
    -40[°F] - 248[°F]

    I though there might be an 0-5v 8bit dac involved in here somewhere and it's sending a voltage value from the sensor which is being converted in the software using some formula to the 29C

    Any ideas on how that 29C is derived from that data?


    Ditto on another temp sensor data serial chat we get $77 + $41 and it generates the value 36C on screen?

    Same clues as above and same sensor range.

    BCD? It doesnt appear to be ASCII? It doesn't appear to be a simple ofset etc?

    Hoping for a PB genius to give me some clues?

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Bump no ideas from the PBP collective?

    I'll dig out another data sample with a different temp so we can see the change and perhaps establish the relationship.
    I suppose it could be some sort of look up table?

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Hi,
    No, it's really quite hard (for me at least) to "translate" something like that with just one sample as a reference. If you could get 5 samples or something like that over a range of temperatures (and what they should correspond to) it might be easier - not saying I'm the man to pull it off though....

    However, it would seems to me that this sort of stuff should be documented somewhere, I mean isn't OBDII a "standard"? Doesn't it have a protocol specification?

    /Henrik.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Here is another example this is reporting amps.

    The data is two bytes. How is the amps being derived from those two bytes?

    $FF $A6 = -4.5A
    $00 $5F = +4.6A
    $01 $16 = +13.6A
    $01 $61 = +17.1A

    I suspect the sign is in the first byte.

    In the bottom example I was thinking 1 x 128 + $61 = 225 then do something to get 17.1?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Hi,
    It looks like you have a simple scale of ~20 counts per ampere.
    $005F is 90 in the decimal, 90/4.6A=19.5 counts per Amp
    $0116 is 278 in decimal, 278/13.6A=20.4 counts per Amp
    $0161 is 353 in decimal, 353/17.1A=20.6 counts per Amp

    $FFA6 = 65546 which in two complements is -89, 89/4.5=19.8 counts per Amp

    Average that out a bit and I'd call it 20 counts per ampere.

    /Henrik.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Thanks Henrik that fits in with some other tinkering i have been doing. More data to follow.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Here is a different current sensor

    This one gives the following data and values, seems to work on a different formula?

    $7F $9E = 2A
    $7C $9C = 8A
    $78 $9B = 16A
    $83 $9F = -6A

    Looks like anything over $7F in first byte is a negative value


    And one more this is reporting voltage.

    $98 $B1 = 158V
    $9B $99 = 162V
    $9C $80 = 163V

    Seems to be just the first byte involved + 6?

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Hi,
    Well I can only guess but here goes.

    Voltage:
    $98B1=39089=158V : 39089/158=247
    $9B99=39833=162V : 39899/162=246
    $9C80=40064=163V : 40064/163=246
    So, it looks like there's ~246 "counts" to a volt but again, that's just an educated guess.

    Or perhaps there's an offset to it making values above 32768 positive and values below negative. In that case it might look like this:
    (39089-32768)/158=40
    (39833-32768)/162=43
    (40064-32768)/163=45
    Nah, that's probably not it.

    The current is a little more tricky, here's my initial thought.
    $7F9E=32670=2A : (32768-32670) / 2 = 49
    $7C9C=31900=8A : (32768-31900) / 8 = 108
    $789B=30875=16A : (32768-30875) / 16 = 118
    $839F=33695=-6A : (32768-33695) / 6 = 154 (-154)

    Clearly the above doesn't add up at all so there's something else involved.

    So it's all about sitting down with pen, paper and a calculator and try to reverse engineer the numbers, try to find something that matches all the readings you have. Or try to find the specification of the protocol...

    /Henrik.

  9. #9
    Join Date
    Aug 2011
    Location
    Guadalajara, México
    Posts
    28


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    For the current, it seems that the amps are 128 reading units apart...
    33695 = -6
    33567 = -5
    33439 = -4
    33311 = -3
    33183 = -2
    33055 = -1
    32927 = 0
    32799 = 1
    32671 = 2
    32543 = 3
    32415 = 4
    32287 = 5
    32159 = 6
    32031 = 7
    31903 = 8
    31775 = 9
    31647 = 10
    31519 = 11
    31391 = 12
    31263 = 13
    31135 = 14
    31007 = 15
    30879 = 16

    Pretty close...
    My English doesn't sucks, it's just fugly...

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Thanks for the ideas so far.

    Here is some more data for a few functions.

    'MPI_MDL Temp C
    '$9C $97 = 21C
    '$88 $77 = 29C
    '$83 $80 = 31C
    '$6B $76 = 40C
    '$67 $73 = 42C

    'DC-DC Converter Temp C
    '$97 $22 = 22C
    '$7F $41 = 33C
    '$77 $41 = 36C
    '$76 $6F = 37C
    '$72 $6F = 39C

    'BAT_MDL Volts
    '$91 $10 = 152V
    '$95 $00 = 155V
    '$98 $0C = 158V
    '$9A $05 = 160V
    '$9C $00 = 162V
    '$9D $00 = 163V
    '$9E $00 = 164V

    'MPI_MDL Volts
    '$97 $7F = 157V
    '$98 $B2 = 158V
    '$9B $99 = 162V
    '$9C $80 = 163V

    'MPI_MDL Amps
    '$7F $9E = 2A
    '$7C $9C = 8A
    '$78 $9B = 16A
    '$83 $9F = -6A
    '$83 $9A = -6 to -8A

    TORQUE NM
    '$2D $5A = 0 NM
    '$3A $5A = 8.4NM
    '$41 $5A = 28 to 30 NM
    '$2A $5A = -8.4 NM
    '$29 $5A = -11.2 NM

    Any further help?

  11. #11
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    The guys above probably already know this stuff. But for those that follow this thread with interest and want to catch up, here's an interesting read:

    http://www.obd2crazy.com/techstd.html

    (unfortunately the links they posted do not seem to work)

    Robert

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Thanks for the ideas so far.

    Here is some more refined data for a few functions.

    'MPI_MDL Temp C
    '$9C = 21C
    '$88 = 29C
    '$83 = 31C
    '$6B = 40C
    '$67 = 42C

    'DC-DC Converter Temp C
    '$97 = 22C
    '$7F = 33C
    '$77 = 36C
    '$76 = 37C
    '$72 = 39C

    Any ideas on these two?

  13. #13


    Did you find this post helpful? Yes | No

    Default Re: Decoding OBDII Comms

    Some new data to fox you from an Air Fuel ratio sensor.

    The data from the car (left number) converts to the AF (Right number).

    255=7.31
    224=8.36
    192=9.71
    160=11.65
    128=14.56
    96=19.41
    64=29.12
    32=58.24
    16=116.48
    8=232.96
    4=465.92
    2=931.85
    1=1863.70

    It looks like a typical wideband 02 sensor response with a very steep rise at the end.

    I need to establish a formula (if possible) from this data so I can convert the data into the AF.

    Now I could capture every value from 0-255 and get exact numbers for each value but that will take a lot of time, and then I would have to do a lookup table for the normal operating range. I could just gather 128 data points from 64 to 192, that encompases the AF range 29.12 - 9.71 which i'm sure covers my cars operating area.

    How can I do it without using a look up table? Formula?

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts