• Welcome to Ecoboost Performance Forum. Please log in or sign up.
collapse

Torque PIDs...Take 2

Started by ecoboostsho, June 07, 2014, 07:59:06 PM

Previous topic - Next topic

ecoboostsho

I finally spent some time this weekend trying out an idea I had and I believe it is working so far.  I am reverse engineering a few of the PIDs with a serial protocol analyzer and a scan tool that requests the information.  I basically request a parameter one PID at a time and capture the response from the car which includes the original PID and the value.  As such I am fairly confident in the PID however the "math" part of the equation is more challenging.  Here is what I have confirmed so far...

*Disclaimer - While these were originally done on my 2011 SHO I have since purchased a 2013 SHO model and have tested almost all of them and they are the same with notable exceptions (AWD, Tire Pressure). That said you should verify they will work with your car first. The 2013+ cars have a BCM (in lieu of a smart junction box) which may require different PIDs for some parameters. Additionally, I see no reason why they shouldn't be the same for the Flex, MKS, and possibly even other EcoBoost platforms.  As always do not tweak these while moving. ;)

Instructions for adding the PIDs to Torque are at the bottom of this post. 

For Anyone interested in trying this yourself here is how I am approaching this:

First you will need an OBDII adapter...I highly recommend the MX adapter because of its speed and ability to access the HSCAN AND MSCAN buses.  Although torque can't explicitly access the MSCAN bus other software such as http://forscan.org can.  I purchased my MX from http://scantool.net  I got the Bluetooth model and use it with my Android Phone.

Torque can be downloaded from the App store.  There are two versions - one is free and the other is "paid" but it's only like $5 and well worth it as I don't think you can add custom PIDs with the Free version.

If you are willing to you can download a free serial port sniffer - I used this one.  http://freeserialanalyzer.com/

It has some limitations (30 minute max session time) but works really well and even sees Bluetooth COM port data.  You basically install that on the same laptop as you have your Scanning Software (Forscan works great).  You start Forscan and connect it to the car.  Then select the PID you are after (and just that PID).  Now before you hit the "start" button in Forscan you want to fire up the serial analyzer and then "connect" to the COM port that Forscan is using (this will vary).  Select "Packet View" and then "start" capturing data.  Switch back to Forscan and then start capturing the PID.  You literally need a couple of seconds of data as it will create a lot of lines in the serial analyzer very quickly.

Now comes the fun part.  Using the serial analyzer you can look at the data captured line by line.  You should see alternating Reads and Writes.  When the scantool is requesting a PID it will always start with "22xxxx" where the xxxx is the actual PID for whatever you were scanning.  The response will always be "62xxxx" which will include the same PID.  The next several bytes include the response from the car and they are always in Hexidecimal. 

In some cases you may need to determine the "Module" (i.e. ECU, BCM, 4x$) address.  If you go back to the very beginning of the lines in the serial analyzer you will see a set of ASCII codes it sends to the car to set up the PIDs it is requesting.  You are looking for a line right a the beginning that includes the following:
STCAFCP761, 726.  In this example the 761 is the module address of the AWD unit in a 2011 Taurus.  726 is the address of the scantool I believe.  If you find this command look for the 3 digits right after the STCAFCP...  That should be the module address you are after.  You take this and plug that 3 digit number in to the "Header" portion of Torque.  Add your PID and equation and you should be good to go.

I know that is a lot of info to digest but it isn't as complicated as it sounds once you get in to it.  The hard part is actually figuring out the equation.

2010+ Taurus pids

Knock 

Notes on how this PID works: This PID will vary from -4 to +7.5 although we have some people that say they've seen a -5.  If the number is negative then it is adding timing in real time (this is good)...if it is positive it is knocking (this is bad).   A couple of degrees isn't a big deal and the general consensus seems to be under 5 should be okay if you aren't highly modified.  The ECU is supposedly able to subtract a maximum of 7.5 degrees of timing and won't read any higher (not verified by me personally and may be tune dependent).

Most of the knock I see is at part throttle (less than 2 degrees) and isn't a big deal unless you are maxing out the gauge then something worth looking in to may be going on.  Knock at WOT is more important to monitor.

One note:  Do NOT use spaces in the equation and pay careful attention to the () or you will get weird results.

PID 2203EC
Torque Equation -  ((signed(A)*256)+B)/512 

Note: Many people find the logic Ford used "backwards" and think that a positive number should be adding timing and a negative number should mean knock.  This is a totally valid approach and you can easily change the formula to accommodate that by using the following formula:

Torque Equation -  ((signed(A)*256)+B)/-512

You can think of this as Cylinder Ignition correction - If it is positive then it is adding timing (good) if it is negative is subtracting timing (Bad)

Whatever way you decide to use it is just fine but make sure you remember :)  For the record I have switched to the second way as i find it more intuitive.

12-12-19 update - It was brought to my attention that some tuners are setting knock to "per cylinder" instead of "global".  If that is the case then this gauge will always read 0 and you won't be getting an accurate reading of knock.  You should be able to see it adding timing at light throttle on a fairly regular basis so if you aren't I would recommend consulting with your tuner before relying on this gauge entirely.

Transmission Temperature
"OBD2 Mode and PID"  =  221E1C
"Long Name" = Trans Temp
"Short Name" = Trans T
"Minimum Value" = -40
"Maximum Value" = 260
"Scale Factor" = 1
"Unit Type" = deg
"Equation" = (((signed(A)*256)+B)*(9/8)+320)/10

Gear Selection Indicator (GEAR_OSC officially) Tells  you what Forward gear you are in i.e. 1-6
PID 221e12
Torque Equation    A

Gear Ratio
PID 221E19 
Torque equation: ((A*256)+B) / 4096
1st 4.484
2nd 2.872
3rd 1.842
4th 1.414
5th 1.000
6th 0.742
Reverse -2.882 (not sure Reverse really works yet but it shows "0")

Trans Gear
PID 221e23
70 indicates "Park"
60 Indicates "R"
50   Indicates "N"
46 Indicates "D"
10 Indicates "M"

Fuel Pump pressure "desired" Fuel pump PID discussion starts on page 10 (This probably isn't terribly interesting until you compare it against measured fuel pressure (which is already available in Torque).  Most of us won't have an issue with this unless you are running Ethanol blends and are worried about running out of pump capacity.  I'm venturing a large discrepancy between Desired and Measured would be "bad".

Name:  High Pressure Fuel Pump Desired
PID:  2203dc
torque Equation: ((256*A)+b)*10*.145  readout in PSI.
Unit: PSI

High Pressure Fuel Pump Rail Actual  (Already in Torque but I am calling it out specifically)
Name: Fuel Pump Rail Pressure2
PID: 22F423
Equation:  ((256*A)+b)*10*.145  readout in PSI.
Unit: PSI

Differential Fuel Pump Pressure (Uses two previous PIDs to calculate a Torque "Virtual PID" and display the results!)
PID:
Name: Fuel Pressure Differential
Equation:  (VAL{High Pressure Fuel Pressure Desired})-(VAL{High Pressure Fuel Pressure Actual})
Unit: PSI

IAT1 (temp sensor directly after airbox/filter)  Temperature sensor discussions occur on pages 2,4 and 6.
PID: 22F40F
Equation: (A-40)*1.8+32
Deg.: Farenheit

Intercooler (CAC) - I believe this equation is fairly accurate at this point but it was "Interpreted" so it may be off a tiny bit.  This sensor is right before the throttle body and after the intercooler.  It is also a stock 3 BAR pressure sensor.

Charge Air Cooler PID 220461
Torque Equation (((signed(A)*256)+B)/64)*1.8+32


IAT2 This sensor is on top of the intake manifold and is also a pressure sensor.  This is the sensor that many people are swapping out for a "3 Bar".

PID 2203CA
Equation (A-40)*1.8+32  in Deg. F

Waste Gate % Discussion occurs on page 2, and 18.
PID 220462
Equation: A/128*100

AWD module PWM Modulation of rear clutch %   Discussion occurs on pages 4, 9, and 14.
Returns a number that indicates how much the rear clutch is being directed to lock up and thus send power rearward.  Note this PID is not available on some 2013+ cars as apparently the PIDs weren't loaded from the factory.  There is a TSB to add them 12-7-3 that can be performed at the dealer. Discussion is on pages 22 and 23.

Note that the header and PID values will need to be changed from 2010-12 models to the 2013+ models.

2011 Info
PID 22D128
Formula A/256*100
Header  761

2013 Info
PID 22D1e63
Formula A/256*100
Header:  (leave it blank for 2013+)

2011 only:
AWD Status (1=on/0=off)
PID: 22191C
Equation: ((265*A)+B)/32768
Header: 761

Learned Octane ratio  (See this thread for Explanation)
http://www.ecoboostperformanceforum.com/index.php?topic=4675.msg73674#msg73674

Another note on LOR - It appears to only look at knock seen under 4k RPM and 1.5 load (Credit to AJPTurbo) in other words at part throttle conditions.  It won't look at WOT knock and adjust the LOR directly however if your LOR does change it is believed to affect your WOT timing.

PID 2203E8
Formula - (Signed(A)*256+B)/16384

Fuel level {Already in Torque, but this did work for me}
22f42f
(A/255*100)

ACC PEDAL POSITION % 

PID  22032B
Formula = "A/256*100" <-- try this formula it works. (FF = 256.. so if 256/2 = 128 points)
note that this value = 0 when you are using cruise control as it measure actual pedal position of the accelerator. This position % is the raw read of the pedal position.  Note that this will not ever exceed 80% as that is considered fully open.  I thought this was silly since it's accelerator pedal position (and not throttle body) so I use a formula of A/2 which gets you a decimal range from 0 to 100 when fully open.  It isn't technically correct but makes more sense to my brain. :)

Variable Camshaft Actual advance (there are actually two of these - one for each cam.  This is #1)
PID: 220318
Equation: Signed(A)/16 

RPM (Already in Torque but this is the Ford PID which may respond faster and eliminate lag?)
PID: 22F40C
Equation: A/4
Units: RPM

DTC Count (Note this includes DTC's that don't light the MIL lamp)
PID:22D137
Equation: A

Knock Sensor 1 Raw Data
PID: 220403
Equation: A

Knock Sensor 2
PID: 220404
Equation: A


Desired Boost Discussion on pages 13 and 14
I've been messing with the "Desired Boost" PID and it has been driving me crazy, but I think I've finally figured it out for anyone that cares!  It was never matching the boost gauge in Torque and didn't seem linearly related at all so I couldn't figure out the equation.  Then I stumbled on a PID called "Throttle Inlet Pressure Sensor".  If you remember our cars have (at least) two pressure sensors (there is an additional one for barometric pressure as well someplace) - one sitting on top of the manifold (also combined with IAT2) and one right before the throttle plate.  I figured out the throttle plate PID (22033E) and watched that and sure enough that is what tracks to "Desired Boost".  It makes sense actually since there would be a pressure drop across the throttle plate depending on how far it was open (and max is only 80% anyway).  So bottom line is the MAP sensor on top of the manifold will probably never match "Desired Boost" - although it should get close at WOT. I'm also guessing manifold pressure will be lower since air is being sucked out of the intake manifold and in to the valves - that and the combined larger volume of the manifold.

Application: You could create a differential gauge as discussed previously to see if your turbos were keeping up with the requested boost - could be useful to discover boost leaks etc...

Desired Boost
(This won't read vacuum but does vary slightly with barometric pressure - note I am manually subtracting 14.7 psi from this equation so zero boost is actually 0 and not atmospheric pressure of 14.7 psi.  You can keep these in kpa by deleting the *.145-14.7 you just need to be consistent with all of your formulas)

PID: 220466
Equation: ((256*A)+B)/128*.145-14.7
Deg: PSI

Throttle Inlet Pressure Sensor
PID: 22033E
Equation: ((256*A)+B)/128*.145-14.7
Deg: PSI

Intake Manifold pressure - i.e. Boost Gauge Discussed on page 14 (already in Torque with a different PID.  I would actually recommend using Torque's built in boost gauge over this one as I believe the one in Torque is correctly compensating for actual barometric pressure.  If you knew the correction factor for your elevation you could adjust the 14.7 number in the equation below and it should close enough.  In MN at my elevation it was off by about a 1/2 PSI)
PID: 22F40B
Equation: A*.145-14.7

Catalyst Temp (Already in Torque)
PID:  22F43C
Equation: ((((256*A)+B)/10)-40)*1.8+32
Units: Deg. F

Torque Control Requested (Used during shifting to reduce torque...aka torque management.)
2203AF  returns 0 with car off...Determined this just tells you where the torque reduction request came from...i.e. Transmission, Lean Decel, Tip in...not terribly interesting so I'm leaving it alone for now.

Misfire Monitor
PID 220700
Response of "0" is interpreted from a scan tool response of 00820000 - need to figure this one out but my car never misfires...so may be challenging.

Misfire Trips  This is an incremental counter that will keep counting up (larger value) as long as you don't have any significant misfire events during the current drive cycle.  If it sees too many misfires then it will reset to 0.  I use this to make sure the car is running properly and this way you only have to check it every so often rather than catch misfires as they happen (although severe misfires will set other codes and you will probably notice them)
PID 2216DC
Equation: (256*A)+B

Current Misfires
PID 220345
Equation (256*A)+B  ?? (still investigating as this may return 4 bytes of data which would require the use of the C and D variables in the equation)  Car isn't misfiring so it is difficult to test...

Injector Fault (Note this is "bit encoded" so it will need interpretation...) May have to create a separate gauge for each injector...
PID: 220394
Equation: {Still working on it}  It returns 00000000 which I believe represents up to 8 cylinders (we obviously only have six) so a 00000001 means cylinder 1.  00000010 means 2 etc...?

Tire pressures: Discussed in detail on page 5.

6/12/14 update on Tire Pressures:  We can't get Torque to respond to these PIDs for the 2011 as I believe they are in a different module that it refuses to access...the 2011's are on MSCAN which may be preventing it and the 2013's have a BCM on the HSCAN which means the address is probably different.  No luck for now...

2013+ tire pressures (psi):

LFTP
PID: 222813
Equation: (((256*A)+B)/3+22/3)*0.145

LRTP
PID: 222816
Equation: (((256*A)+B)/3+22/3)*0.145

RFTP
PID: 222814
Equation: (((256*A)+B)/3+22/3)*0.145

RRTP
PID: 222815
Equation: (((256*A)+B)/3+22/3)*0.145

Why can't I see ....?
Many people have asked for certain gauges such as oil pressure, oil temperature, and exhaust gas temperature.  They aren't available via any scan tool for one simple reason.  The physical sensors don't exist on the SHO.  If the ECU doesn't have a sensor to read there definitely won't be a PID to grab for it.

PID Installation Instructions:

{Updated file 9/9/2015}
Bulk Import: (Note I'm not sure this will really be easier for someone that isn't a little familiar with windows and basic computer functions.  You may be better off manually entering them one at a time – see procedure below.)

The following will let you add all of the PIDs defined in this post to Torque via the "Import" feature on Torque.

Your first step is to hook up your phone to your computer via a USB cable (the one you more than likely charge your phone with).  You can do this in other ways as well but you need to put the attached "Ford EcoBoost Ext PIDs.csv" file in the proper Torque directory on the phone. Open up a file explorer and then navigate to the drive letter that is your phone.  You should see some directories (varies by phone and number of storage cards).  Torque should be on your internal SD card (Unless you told it to go someplace else or your phone directed it there) and the directory you are looking for is labeled ".torque".  If you don't see .torque you are going to have to "show hidden files" in windows explorer – this varies by version so I suggest you Google it.  You then select the "Extended PIDs" directory.  Copy the attached file in to that directory and then disconnect your phone.

Once that file is there you can select the "settings" menu off the main screen...scroll down to "Custom PIDs" and then "Import".  You should see "Taurus PIDs" listed in the menu.  Select them and then go add them to your screen!

WARNING: You may choose to "clear the list" of the existing custom PIDs to keep things cleaned up, but keep in mind this will strand any gauges you already have on the screen unless they are named exactly the same as in the import file.  This means you will have to add them back to the screen one at a time and you may be "irritated". :)


Adding a single PID:
Add a custom PID in Torque by going to the "Settings" section off the main screen.
Enter the following for the fields it prompts you for:
"OBD2 Mode and PID"  =  221E1C
"Long Name" = Trans Temp
"Short Name" = Trans T
"Minimum Value" = -40
"Maximum Value" = 260
"Scale Factor" = 1
"Unit Type" = deg
"Equation" = (((signed(A)*256)+B)*(9/8)+320)/10
Leave the OBD Header blank

Adding gauges to your Torque Screen:

Go to the Realtime Information display from the main menu and then find a place on the screen you'd like to put your new gauge.  Long press and then "Add Display".  Pick a gauge type and then scroll to find your new PIDs.  Position it on the screen and then repeat the whole process until your gauges are all populated on the screen.

*Final note.  If you open the .CSV file in Excel be careful as it will immediately interpret two of the PIDS as "exponential notation" and hose them up...You can open the file without issue just don't save it unless you know what you are doing!  Your safest bet is to open it with Notepad :)

12/31/2015 Update: Fixed the Knock formula one last time to be consistent with other threads.  Also updated attached file to include both 2010-12 and 2013+ specific PIDs.  You will obviously only be able to use the PIDs that correspond to your year.

2013 White SHO w/PP, Gearhead Tuned, 3 Bar, 160T, Plugs...Mess with the Bull and you'll get the Horn. :)
Previous 2011 Tuxedo Black SHO w/PP - 12.89 1/4 Mile

glock-coma

ecoboostsho,
once again your the man.  Thank you for working on this.


Edit: subscribed!!
2010 red candy metallic non PP 402B
AJPTURBO 2 BAR Tune Stock 14.1@100.3 / Tuned 12.83@107.7
K&N panel, RX OCC, Sp-534 @.30 Tint 50%F-35%R BOV bypass
1997 SHO silver frost (sold)
1990 SHO triple black 5-speed (saved my life)

ShoBoat

Really great work! Awesome!


Sent from my iPhone using Tapatalk
2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

ShoBoat

Any chance someone would know the equations for C instead of F?
2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

ecoboostsho

Just drop off the "*1.8+32" part. They are inherently in C.

Sent from my XT1060 using Tapatalk

2013 White SHO w/PP, Gearhead Tuned, 3 Bar, 160T, Plugs...Mess with the Bull and you'll get the Horn. :)
Previous 2011 Tuxedo Black SHO w/PP - 12.89 1/4 Mile

ShoBoat

2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

Larrylu

Great work!  Can't wait to try some of these. Tomorrow for sure. Thank you,thank you!
2010 Loaded, Non PP, Steel Blue Metallic, Livernois Stage 4+, Blacked out grill, Nexus 7 Tablet running Torque Pro

Larrylu

Wish I could be of more help in this project cause I'm sure enjoying the results. In that spirit it seems the best I can do is try plugging the PID's in ASAP and giving you back my observed results for what ever aid that can be. My extended testing results on the knock PID is just non responsive. Tough because a non response is the desired reading, but a hick up once in a great while would be reassuring that it indeed was functioning.
I will try the edit on the knock PID, and I'll try the Cyl head temp, the charge air temp, maybe the IAT2 (especially neat if we find out where that sensor is residing)
2010 Loaded, Non PP, Steel Blue Metallic, Livernois Stage 4+, Blacked out grill, Nexus 7 Tablet running Torque Pro

ecoboostsho

Larry - The Knock pid should give you values if you just drive around on the interstate at light throttle.  You should see negative numbers which means it is adding timing...positive numbers are what you want to avoid during WOT.  That said I never see those much either.
2013 White SHO w/PP, Gearhead Tuned, 3 Bar, 160T, Plugs...Mess with the Bull and you'll get the Horn. :)
Previous 2011 Tuxedo Black SHO w/PP - 12.89 1/4 Mile

Larrylu


Quote from: ecoboostsho on June 08, 2014, 10:17:33 AM
Larry - The Knock pid should give you values if you just drive around on the interstate at light throttle.  You should see negative numbers which means it is adding timing...positive numbers are what you want to avoid during WOT.  That said I never see those much either.

Must be something wrong with my set up because I never see any activity ....at all!
Will recheck everything.
2010 Loaded, Non PP, Steel Blue Metallic, Livernois Stage 4+, Blacked out grill, Nexus 7 Tablet running Torque Pro

ShoBoat

IAT2 is reading after the CAC at least that's the way it is in Forscan. I have done data logging with both IAT and IAT2 the second is always higher than the first. I also forgot to reconnect the sensor just before the throttle body and I got a 0 reading and error code to go with it.
2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

ecoboostsho

Cool. That would be the more critical temp I would think...not that it isn't interesting to see the  intercooler in action.

Sent from my XT1060 using Tapatalk

2013 White SHO w/PP, Gearhead Tuned, 3 Bar, 160T, Plugs...Mess with the Bull and you'll get the Horn. :)
Previous 2011 Tuxedo Black SHO w/PP - 12.89 1/4 Mile

ShoBoat


Quote from: ecoboostsho on June 08, 2014, 10:26:50 AM
Cool. That would be the more critical temp I would think...not that it isn't interesting to see the  intercooler in action.

Sent from my XT1060 using Tapatalk

Exactly, I will try to work out the delta between the 2. I would guess this would have an impact at the track. What would be really cool if we had a way to trig the fans to high speed when in the line for a run at the track. I had noticed how the IAT2 temp climbed like crazy before a run when I was data logging with my lap top last year. This is also true as my best time was doing back to back runs with minimal time before the next run. 


Sent from my iPhone using Tapatalk
2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

ShoBoat

Come to think of it, I recall speaking to a fellow at the track with a 300SRT8 (2013?) and his hand held tuner was able to turn on the fans at will.


Sent from my iPhone using Tapatalk
2012 Pearl White CTS-V Stock
2016 Fusion Titanium 2.0 EB Stock
2013 SHO Black on Black (Gone) PP, Unleashed Custom Tune, 170 TStat, SP534 Plugs, 3 Bar, Airaid Intake, PPE catted downpipes, Corsa Cat-back, H&R Springs. Focal 165KR Front Stage,2 JL W6 10 with Focal 800.1. 12.62 @ 110 mph.

ecoboostsho

We could do this via the PCM if we knew the PID and the bits to set...assuming we had a program that could transmit that on the CAN bus. I know Torque can do that for predefined tests and such but I don't know about individual PIDs...

Sent from my XT1060 using Tapatalk

2013 White SHO w/PP, Gearhead Tuned, 3 Bar, 160T, Plugs...Mess with the Bull and you'll get the Horn. :)
Previous 2011 Tuxedo Black SHO w/PP - 12.89 1/4 Mile