View Single Post
#1: 01-26-2008, 09:44 AM
Trip meter hacking thread
CombatCQB's Avatar
Title: Contributor
Location: Rochester, NY
Car: 05 Legacy GT 5MT
Posts: 495
iTrader: (4)
Send a private message to CombatCQB Find all posts by CombatCQB Reply With Quote
This is a project I've finally found time to tackle and with surprisingly good results. This should apply to all available trip meters from 05-08 but I'm only working with an 05 right now. The ultimate goal here is to decode the trip meter data and integrate it as part of my CarPC.

So the 05 trip meter has one serial interface between the combination meter and the trip meter. Reading the service manual tell us that the trip meter does zero calculations, and relies on the combination meter to feed exact values to it. The serial line is also one way, so the trip meter only receives data. Here's the good part; from looking at the serial stream captures, the data is a standard UART protocol:

-12V signal (0-12V)
-2400bps, Even parity, 8 data bits, 1 stop bit
-Polarity is reverse, so 12V=logic 0
-One packet every 100ms or so
-Nine bytes in each packet
-Last byte is a single-precision checksum
-All trip meter data is contained in the remaining 8 bytes so there is only one packet to decode

As for the meaning of the 8 data bytes, that's still being worked out. But I'm 98% sure the first byte is the outside temp while the 3rd byte has something to do with the instant MPG.

================================================== ======================
So I've managed to decode all the bytes that the clock/trip-meter displays:

|Temp|Unknown|Instant MPG|Avg MPG A|Avg MPG B|Miles remain|00|A/B|Checksum

Temp: 0x2C = 0 degrees F. It is not an exact linear reading, 0x37,0x38 both displays 10 degrees F. See post #35 for details on the temp scale:

Unknown: This byte changes occasionally, but doesn't change the display. It might be a hidden reading we don't know about, only more testing will tell.

Instant MPG: 0x28=20.0MPG. Each increment is 0.5MPG

Avg MPG A: 0x10 = 4.8MPG, 0x20 = 9.6MPG, 0x30 = 14.4MPG, 0x40 = 19.2MPG, scale is linear
Avg MPG B: same as above but for trip B

Miles remaining: 0x01 = 10miles, basically convert hex to decimal and add a zero to the end. Max is 0x63 = 990miles

00: another unknown, haven't see it changed. Maybe a disabled feature.

A/B: Only bit 8 is known right now to cause the Avg MPG display to select between trip A or trip B. This is normally 0x0C or 0x8C, but I have seen 0x9C so those other bits should mean something. Just don't know what yet.

Checksum: Take all the bytes and add them up, truncate result to one byte.

Now I just need some time or someone to write software. The hardware is simply a USB to serial adapter, I'll put together a write up soon.

================================================== ======================
03/16/08 Added HW interface schematic. This is using what I have on hand, but once the interface is stable I'll put together a cheaper implementation using a FT232R.
Attached Thumbnails
Click image for larger version

Name:	packet timing.png
Views:	493
Size:	7.0 KB
ID:	47962  
Attached Files
File Type: pdf TripMeter_031608.pdf (21.3 KB, 223 views)

Last edited by CombatCQB; 03-16-2008 at 04:19 PM.. Reason: adding serial details...
The Following User Says Thank You to CombatCQB For This Useful Post:
1454 (05-14-2011)
Sponsored links