 1 - 3 of 3 Posts

·
##### Registered
Joined
·
6 Posts
Discussion Starter
Hello / Bonjour,
Initially, I started this project to get the turbine/compressor RPM on my Android table for my Optima 2.0L. From there, I added more stuff to get a better understanding of my engine. All you have to do is to create some custom PIDs to monitor the values you want to look at on your Torque application.

In addition to my car, I provided an alternate version of some formulas to accommodate the 2.4L platform. With some efforts, other engines can be supported if the community is interested. Most of the work can be done with a dyno chart with some adjustments on a real car.

I'm a software engineer, so you will see some weird tricks that I used to make this work with Torque Pro. I recommend to start with the easy equations and validate them one by one. It is quite easy to screw up a formula and get a bad result. Let me know if you find something wrong or just want to add a new gauge to your dashboard.

*: Replace the * by the multiplication sign (x) when entering the equation.
/: Replace the / by the division sign (÷) when entering the equation.

In order to create your custom PIDs, you need to go the "Settings > Manage extra PID/Sensors >... Add custom PID" menu.

OBD-II Sensors (For reference only)
[0b]: Intake Manifold Absolute Pressure (kPa)
[0c]: Engine RPM
[0d]: Vehicule Speed (km/h)
[0f]: Intake Air Temperature (C)
: Barometric Pressure (kPa)
: Bank 1 - Sensor 1 Lambda
: Ambient Temperature (C)

For more information: OBD-II PIDs - Wikipedia, the free encyclopedia

Torque Pro Operations (For reference only)
abs(): Absolute value.
{X:B}: Verify if the bit B is set within the X byte.
[pid]: Refers to the pid number of a sensor.
val{Long Name}: Refers to another equation using its long name.

Air Density
This equation gives the air density inside the intake. Used to calculate the mass air flow rate or as a standalone gauge. The relative humidity is assumed to be constant at 50%.
Unit: lb/cf
Equation: .0717*(303.15/([0f]+273.15))*(/101.325)

Sea Level Comp
This equation computes a compensation factor to normalize your horsepower/torque values to sea level, 30 celcius, 50% humidity. Useful to compare your HP/Torque values with other members.
Equation: .0717 / (val{Air Density} + .0000001)

IsBoost
This equation indicates whether the car is in boost or not. It is used to filter unwanted results from other equations. It checks if the MAP sensor is between 96 kpa and 255 kpa which means a boost between -0.78 PSI and 22.275 PSI.
PID: 010b
Min: 0.0
Max: 1.0
Equation: ({A:7}+({A:6}*{A:5}))-({A:7}*{A:6}*{A:5})

IsRpmGT3072
This equation indicates whether the engine runs at least 3072 revolutions per minute.
PID: 010c
Min: 0.0
Max: 1.0
Equation: {A:6}+({A:5}*{A:4})

IsRpmGT3584
This equation indicates whether the engine runs at least 3584 revolutions per minute.
PID: 010c
Min: 0.0
Max: 1.0
Equation: {A:6}+({A:5}*{A:4}*{A:3})

IsRpmGT4096
This equation indicates whether the engine runs at least 4096 revolutions per minute.
PID: 010c
Min: 0.0
Max: 1.0
Equation: {A:6}

IsSpeedGT128
This equation indicates whether the car is going over 128 km/h in order to filter unwanted results from other equations.
PID: 010d
Unit: km/h
Min: 0
Max: 255
Equation: {A:7}

BSFC
This equation gives the Brake Specific Fuel Consumption at WOT.
Equation (2.0L): (((-0.000025*[0c])+.59)*abs(val{IsRpmGT3584}-1))+(((.000029*[0c])+.40)*val{IsRpmGT3584})
Equation (2.4L): (((-0.000056*[0c])+.68)*abs(val{IsRpmGT4096}-1))+(((.000037*[0c])+.30)*val{IsRpmGT4096})

P.S I'm still working to improve this formula based on the engine load when you are not at WOT...

T-Outlet PR
This equation gives the pressure ratio as seen by the turbo outlet. I used an average value of 0.5 PSI drop to compensate for the pipe/filter restriction and 1 PSI drop for the intercooler. Depending of your setup and what you want to monitor, you can change these values to accommodate your needs.
Min: 0.0
Max: 3.0
Equation: (([0b]*.145)+1.0)/((*.145)-0.5)

T-Intake PR
This equation gives the pressure ratio as seen by the intake manifold.
Min: 0.0
Max: 3.0
Equation: [0b]/(

T-RPM
This equation gives an estimate of the turbine/compressor RPM based on the turbo pressure ratio of the td04-19t compressor map. The number is only valid while you are in boost.
Unit: x1000
Min: 50.0
Max: 175
Equation: ((((val{T-Outlet PR}*80)-30)*(([0c]*.000015)+.91))*val{IsBoost})+(abs(val{IsBoost}-1)*50)

T-Inlet Air Temp
This equation gives an estimate of the air temperature at the turbo inlet. This estimate assumes that 65% of the air entering the air box is provided by the intake air temperature and 35% by the ambient air temperature at 0 km/h (Idle). As you go, this ratio is changed to reach 100% of the ambient air temperature at 128 km/h. This model is based on data that I collected on my car last summer. You will need to create an extra PID reading this value if you want to convert it to Fahrenheit instead of Celcius.
PID: 010d
Unit: Celcius
Min: -40.0
Max: 215.0
Equation: (((*((.005*A)+.35))+([0f]*((-.005*A)+.65)))*abs(val{IsSpeedGT128}-1))+(*val{IsSpeedGT128})

T-Outlet Air Temp
This equation gives an estimate of the air temperature at the turbo outlet. You will need to create an extra PID reading this value if you want to convert it to Fahrenheit instead of Celcius.
Unit: Celcius
Min: -40.0
Max: 215.0
Equation: ((((((((val{T-Inlet Air Temp}+273.15)*((val{T-Outlet PR}*.2)+.8)))-273.15)-val{T-Inlet Air Temp})/.7)+val{T-Inlet Air Temp})*val{IsBoost})+(abs(val{IsBoost}-1)*val{T-Inlet Air Temp})

IC Efficiency
This equation gives an estimate of the intercooler efficiency. You will see a negative result when you are not in boost since the air entering the IC is cooler than the intake air temperature (the equation acts a heater in this case). If you do not want to see this, you can multiply the equation by val{IsBoost} to filter out the result.
Unit: %
Equation: (((val{T-Outlet Air Temp}-[0f])+1)/((val{T-Outlet Air Temp}-)+1))*100

VE
This equation gives an estimate of the volumetric efficiency based on the RPM.
Unit: %
Min: 0.0
Max: 100.0
Equation (2.0L): (((.005*[0c])+81)*abs(val{IsRpmGT3584}-1))+(((-.005*[0c])+117)*val{IsRpmGT3584})
Equation (2.4L): (((.009*[0c])+53)*abs(val{IsRpmGT4096}-1))+(((-.006*[0c])+115)*val{IsRpmGT4096})

Volume Air Flow
This equation gives the volume air flow rate of your turbo car.
Unit: cf/min
Min: 0.0
Max: 500.0
Equation (2.0L): (1.998*val{VE}*[0c]*val{T-Intake PR})/5660
Equation (2.4L): (2.359*val{VE}*[0c]*val{T-Intake PR})/5660

Mass Air Flow
This equation gives the mass air flow rate of your car.
Unit: lb/min
Min: 0.0
Max: 100.0
Equation: val{Volume Air Flow}*val{Air Density}

Mass Fuel Flow
This equation gives the mass fuel flow rate of your car. Bank 1 - Sensor 1 Lambda has been used to measure the A/F ratio.
Unit: lb/min
Min: 0.0
Max: 100.0
Equation: val{Mass Air Flow}/(14.71*)

Horsepower (At the crank)
This equation gives the horsepower at the crank.
Min: 0.0
Max: 300.0
Equation: (val{Mass Fuel Flow}*60)/val{BSFC}

P.S Multiply this equation by val{Sea Level Comp) if your want to normalize the result to sea level, 30 celcius, 50% relative humidity.

Torque (At the crank)
This equation gives the torque at the crank.
Unit: lb.ft
Min: 0.0
Max: 300.0
Equation: (val{Horsepower (At the crank)}*5252)/[0c]

Torque (At the wheels)
This equation gives the torque at the wheels based on the circumference of my 215/55/R17 tires.
PID: 010d
Unit: lb.ft
Min: 0.0
Max: 3000.0
Equation: ([0c]/(((A/60)/.0021)+.001))*(val{Torque (At the crank)}*.84)*(A/(A+.001))

P.S Replace .0021 km (or 2.1 m) by the circumference of your tires for more accuracy.

Fuel Instant
This equation gives the instant fuel consumption of your car. I used 1.68 pounds/liter of gasoline at 25 celcius in the formula. The gasoline weight is compensated using the ambient temp.
PID: 010d
Unit: L/100 km
Min: 0.0
Max: 100.0
Equation: ((val{Mass Fuel Flow}*60)/(1.68/(((-25)*.00095)+1)))*(100/(A+.001))*(A/(A+.001))

Fuel MPG Instant
This equation gives the instant fuel consumption of your car in miles per gallon.
PID: 010d
Unit: MPG
Min: 0.0
Max: 100.0
Equation: (((100/(val{Fuel Instant}+.001))*3.785)/1.609)*(A/(A+.001))

• kville kia

#### kville kia

·
Joined
·
311 Posts
Will these work on any obd II ?

·
##### Registered
Joined
·
6 Posts
Discussion Starter
Will these work on any obd II ?
Since it is related to the ECM/ECU of your car, the short answer is no. For instance, I have been contacted a few weeks ago to adapt the formulas for the Dodge Dart 2.0L. They don't have a wideband O2 sensor, so PID  to read the A/F ratio just before the catalytic converter does not work for them. Instead, we used an alternative sensor to simulate the same behaviour.

The easiest way to find out is to enter the following PIDs and verify if you can read something with the Torque App. Like I said, we may need to look at alternative PIDs to make it work for your particular application.

[0b]: Intake Manifold Absolute Pressure (kPa)
[0c]: Engine RPM
[0d]: Vehicule Speed (km/h)
[0f]: Intake Air Temperature (C)
: Barometric Pressure (kPa)
: Bank 1 - Sensor 1 Lambda
: Ambient Temperature (C)

Let me know if you need more information on this.

1 - 3 of 3 Posts