Jump to content
LegacyGT.com

Trip meter hacking thread


CombatCQB

Recommended Posts

  • Replies 98
  • Created
  • Last Reply
Now obvious idea for a product - you should start making and selling inline adapter with some dip-switches (for ease of use) that would allow people with bigger injectors get back proper mpg readings....
Link to comment
Share on other sites

on my 08 it's not integrated in the gage cluster but is displayed on a screen below the center cubby (non gt, no navi)

 

so the stream is continuous? or there is a 50ms break between packets? if there is a 50ms break, how i have the software written will only open the comm port when it detects data and will only allow x amout of bytes in as 1 stream. with my string generator i have the timer set to send a stream every 50ms and my stream parser breaks it up in to it's respective places flawlessly. it can be started and stopped whenever with no ill effect on data.

 

anymore info on temperature?

 

as for adjusting for larger injectors, this can be done in the software by manipulating the data

Link to comment
Share on other sites

Let me rephrase: The packets are sent every 100ms (10Hz) or so, each packet takes about 45ms of that 100ms cycle. The rest of the 100ms cycle is quiet. The packets are repeated in this fashion "continuously" from the point the car is started to when the engine is turned off.

 

I've been working on the HW for a little bit so don't have more info on the temp yet. I'll take a look today to see what I can find out.

 

The easiest way to comp for large injectors is to have a formula or a look up table. We'll need to have some fixed data points (i.e. 3rd gear, 40MPH) to compare stock and upgraded injectors. This will hopefully tell us if the offset is linear or something more involved.

Link to comment
Share on other sites

excellent. In VB I set MSComm1.RThreshold to the length of the stream (my stream is 24, it will have to be changed to the length of the real stream). I made a few functions, one for each byte we want to look at. In the MSComm_OnComm event i put all my coding to call the functions and post the data in a few text boxes. no need for a timer to poll for data, my guess is the length of the stream never changes so unless the threshold is met exactly it does nothing with the data.
Link to comment
Share on other sites

i'm not using anything to detect the start of the stream. the oncomm event fires only if it senses data comming in. setting the threshold to the length of the stream it works without a hitch. because the stream is sent only every 100ms and not continuously, the "break" we do get is the start of the stream. If for some reason the length of the stream gets screwed up, i have not accounted for and i'm looking in to that. but like i said at this point, i can start and stop my parsing app at any time while the stream is comming in and it works perfectly

 

EDIT:

well i got it to error by starting and stopping it really fast. time to re-think

 

EDIT 2:

Using this

If Not Len(buffer) = 24 Then

GoTo err

 

effectivly if the data length doesn't equal the correct length it skips it and waits for a new stream. The 24 is the length of my mock stream for now.

Link to comment
Share on other sites

Here is my analysis of the temperature data:

 

http://spreadsheets.google.com/pub?key=pbu2njZZpkg-DLIJVouqZJQ

 

It seems that every 9th and 10th data point produces the same temperature value. It is based on the data that I did replicate on my trip meter (green highlight) and I manually filled in the rest after seeing the pattern. I can't explain why this is the case, but I'm 99% sure the pattern is correct.

 

It would be nice to have a simple formula to replicate this in our code, but have to think on it a little to come up with one.

 

Edit1=============

This pattern lines up with every 5th and 6th decimal value of the input data (i.e. 25,26,35,36). If we create an xy plot we see the steps generated and we can divide this up into linear segments; so 20-25 is linear, 26-35 is linear, 36-45 is linear.

 

We could write a switch statement that will recreate these segments:

switch(input)
{
  case: 20<input<26
      temp = -22 + (input - 20)
  case: 25<input<36
      temp = -17 + (input - 26)
   .
   .
   .
   default
      error in temp input data
}

 

Edit2==============================

The hex data is in centigrade. See post #47 for details:

http://www.legacygt.com/forums/showpost.php?p=1700402&postcount=47

Link to comment
Share on other sites

That code will work fine. It'll write something up in VB. I also gotta make a real hex to decimal converter that takes in to account for letters.

 

EDIT:

Writing this code is monotonous, it's a shame the data isn't linear, subaru dropped the ball on this one....

Link to comment
Share on other sites

:lol:

 

Anyway, back to the units thingey. I wonder if anyone has a metric trip meter clock that could be plugged into to see what it outputs based on the hex input stream.

 

Here's a quick spreadsheet that I threw together that converts F to C. I show two C columns - one rounded up without any decimal precision, the other column with two decimal places.

 

http://spreadsheets.google.com/pub?key=pqcYtsjv_NcaGNER1i-RFTA

 

LaterZ!

Darren!!

Link to comment
Share on other sites

Pm member zuczek. He tried to hook up a metric gauge cluster to a U.S. trip computer I think and he got temperature displayed correctly, so that would confirm that the temperature is sent in encoded C.
Link to comment
Share on other sites

Even though I'm Canadian, I grapped a US car because it was oh-so-much cheaper than if I were to buy a local car for myself.

 

If anything, I'm getting use to the imperial units on my car - especially with the interior and exterior temperature gauges. :lol:

 

The US trip meter is different than the metric trip meter. The units are pretty well much hard-coded into it. When I pulled out my trip meter to do my boost gauge install, I noticed that the LCD display is unit specific. Just like the Speedo cluster is unit specific. At least I didn't have to change out my cluster as it has km/h units on the "inner" ring.

 

LaterZ!

Darren!!

Link to comment
Share on other sites

I used the formula C = (F - 32) * 5/9

 

Anyway, I asked in the Canada forum if their temp display shows a decimal point or not. Nope, whole numbers only.

 

LaterZ!

Darren!!

 

Interestingly the ACC controls on metric cars display a decimal point (half degrees).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.




×
×
  • Create New...

Important Information

Terms of Use