Posts Tagged ‘OBD’

This is a nice project to try out.  It is quite simple, especially for those of you using an OBD 2 compliant petrol car.

If you have a car computer, and want to make a power meter here is how to do it:

Step 1 Figure out how much fuel you are burning. (MAF reporting gasoline vehicles)

  • Using an elm tool or whatever you have to read OBD data, request MAF – PID 0x10 (this is mass airflow) [g/s]
  • Now divide this MAF value by 14.7, this is the magic stoichiometric ratio that fuel needs to burn in air.  For the sake of an engine power calculation we don’t need to worry if the engine is running rich, it is only able to physically burn at this ratio, so any additional fuel is not turned into useful work at the crank.
  • The result of this equation gives fuel mass [g/s]

Step 1 Figure out how much fuel you are burning. (Non-MAF reporting gasoline vehicles)

  • If you don’t have a MAF sensor reported on your OBD you will have to do a speed density calculation, this is less error prone if your car is NA (non turbo).
  • Note engine size in [cc]
  • Gas constanst R = 0.082057 [L atm mol^-1 K^-1]
  • Molar mass of air = 28.75 [g/mol]
  • Estimate Volumetric Efficiency  (this is a definate source of error, browse the web for expected VE figures) for now assume  a vtec engine should be getting around VE = 0.9 at 6500 rpm and at idle assume VE = 0.4, do interpolation to find VE for all other engine speeds, or make a lookup table.
  • Prepare to request the following PIDs:
  • Engine speed (PID 0x0C) [RPM] (raw/4)
  • MAP – Manifold air pressure (PID 0x0B) [kpa] (raw = value)
  • MAT – Manifold air temp (PID 0x0F) [degC] (raw + 40)
  • Work out airflow with the following formula (adding 273 to MAT converts to degrees Kelvin)
  • Airflow [g/s] = (MAP/100) * (Eng_speed/120) * (EngSize/1000) * (1/(MAT+273)) * (1/R) * 28.75 * VE
  • Fuel flow [g/s]  = Airflow / 14.7

Step 2 Estimate engine power

The net calorific value of petrol in the UK is about ~ 43 MJ/kg depending on what fuel station you go to!  The rather poor efficiency of our beloved internal engine is ICE_eff ~ 0.33 (33% is thermal loss to the cooling system and a further 33% goes to bearing and pumping losses).

Power [kW] = 43 * fuel flow [g/s] * ICE_eff

Power [bhp] = power [kw] * 1.34 (look at my previous post to calculate torque)

There we have it.  Have a fiddle with the engine efficiency value, it should not really exceed 0.36, let me know how you get on.

Advertisements