Help on MAF and OBD II.
#1
Help on MAF and OBD II.
I'm trying to calculate my miles per gallon based on OBD II readings. Based on this product I know it is possible to do this probably based only on the MAF readings from OBD II http://www.nology.com/pdadynoscreens.htm
The OBD II mode 1 PID 10 gives me this info from the MAF
Maf air flow gm/sec
This is a two byte value, and A is the most significant byte.
MAF air flow (gm/sec) = .01 * ( (256 * A ) + B )
My question is what does the gm/sec stand for and of what? Is it grams of fuel per second?
The OBD II mode 1 PID 10 gives me this info from the MAF
Maf air flow gm/sec
This is a two byte value, and A is the most significant byte.
MAF air flow (gm/sec) = .01 * ( (256 * A ) + B )
My question is what does the gm/sec stand for and of what? Is it grams of fuel per second?
#2
Re: Help on MAF and OBD II.
The grams per second is the weight of the air passing thru the MAF:
Assume 14.7 at cruise [it will be 14.2-14.4 with oxygenated gasoline.
So each 14.7 grams of air needs 1 gram of fuel flow.
Gasoline weights 6.1-6.7 pounds per gallon or 454 x say 6.3= about 2,860 grams per gallon [important to know each gallon's density and exact weight [or your calculations will be off by 5%].
The above is fine for idle and cruise but in acceleration you need to know the actual AF ratio which will drop to as much as 10-11 AF at extreme rpms.
Not sure whether you will accept average or instantaneous rates.
Since the rail has no return you just insert a flow meter in the fuel line and read.
http://www.measureanything.com/produ...ter_201B-6.asp
Assume 14.7 at cruise [it will be 14.2-14.4 with oxygenated gasoline.
So each 14.7 grams of air needs 1 gram of fuel flow.
Gasoline weights 6.1-6.7 pounds per gallon or 454 x say 6.3= about 2,860 grams per gallon [important to know each gallon's density and exact weight [or your calculations will be off by 5%].
The above is fine for idle and cruise but in acceleration you need to know the actual AF ratio which will drop to as much as 10-11 AF at extreme rpms.
Not sure whether you will accept average or instantaneous rates.
Since the rail has no return you just insert a flow meter in the fuel line and read.
http://www.measureanything.com/produ...ter_201B-6.asp
#3
Re: Help on MAF and OBD II.
The best and most accurate way of measuring mpg is to keep a log of gallons pumped divided by miles driven. Keep a notepad in your car and log the gallons on every fillup. I've been doing it for 14 years, it's not that much of a bother if you really care.
Q,
g/sec is not weight of air, it's mass flow of air.
2004 G35C 6MT Black. Killer.
Q,
g/sec is not weight of air, it's mass flow of air.
2004 G35C 6MT Black. Killer.
#4
Re: Help on MAF and OBD II.
Q45tech,
Thanks for the great reply, very informative! This is for a software product that will have OBD II support so I'm limited in using other hardware. Adding MPG is really just a convience thing that I can do since I already have everything setup to read from the OBD II port. I realize that this won't be the most accurate method, but all I care about is getting the most accuracy I can get out of OBD II.
Thanks for the great reply, very informative! This is for a software product that will have OBD II support so I'm limited in using other hardware. Adding MPG is really just a convience thing that I can do since I already have everything setup to read from the OBD II port. I realize that this won't be the most accurate method, but all I care about is getting the most accuracy I can get out of OBD II.
#5
Re: Help on MAF and OBD II.
The problem with injector open time accumulation is the non linear flow [opening and closing time and ramp up to full flow and bounce on closing]........at idle and cruise.
The same weakness that turbine type flow meters have lower accuracy at low flow.
You could use the adaptive feedback [O2 sensor] to finely trim the cruise numbers just as ecu does, but again the acceleration fuel ramp up is a big source of error.
I believe you could get to a real 5% accuracy.......1 gallon out of 20 used........20 mpg +-1 mpg using mass air flow.
In the engines case they don't worry about exactness in acceleration [other than not being too lean] as richness doesn't affect power by very much. Anything from 12.5-10 AF ratio is ok as the unburned gasoline just blows out the exhaust. And the volume of EXTRA displaced air only varies by 2% over that ratio.
The other problem will be the speed/distance sensor signal as the accuracy will change with tire inflation, brand, size, and wear.........there can easily be a new to worn out error of 2.5% and a 2% error between brands of the same size......any spinning of tire will add to it.
What you might need is a owner installed/adjusted correction factor using GPS or measured mile every 90 days.
Obviously a hand written log of gas purchases and miles driven would have the same tire/odometer error.
The same weakness that turbine type flow meters have lower accuracy at low flow.
You could use the adaptive feedback [O2 sensor] to finely trim the cruise numbers just as ecu does, but again the acceleration fuel ramp up is a big source of error.
I believe you could get to a real 5% accuracy.......1 gallon out of 20 used........20 mpg +-1 mpg using mass air flow.
In the engines case they don't worry about exactness in acceleration [other than not being too lean] as richness doesn't affect power by very much. Anything from 12.5-10 AF ratio is ok as the unburned gasoline just blows out the exhaust. And the volume of EXTRA displaced air only varies by 2% over that ratio.
The other problem will be the speed/distance sensor signal as the accuracy will change with tire inflation, brand, size, and wear.........there can easily be a new to worn out error of 2.5% and a 2% error between brands of the same size......any spinning of tire will add to it.
What you might need is a owner installed/adjusted correction factor using GPS or measured mile every 90 days.
Obviously a hand written log of gas purchases and miles driven would have the same tire/odometer error.
#6
Re: Help on MAF and OBD II.
I think 5% error is acceptable as this system is not intended for engine tuning only as a convience feature. I didn't quite follow what you were saying about where most of the error is coming from... Did you mean that using just the MAF sensor and assuming a constant air / fuel ratio or 14.7 woudl probably result in not much more then 5% error?
Heres the list of OBD II PIDs i'm working from. It has values for fuel trim that I can obtain from the oxygen sensors, but I'm not clear on why there are multiple sensors and how I could use them to obtain 1 value for the complete systems air / fuel ratio.
http://www.obddiagnostics.com/obdinfo/pids1-2.html
The system will have a GPS on it too so calculating distance shouldn't be an issue.
Heres the list of OBD II PIDs i'm working from. It has values for fuel trim that I can obtain from the oxygen sensors, but I'm not clear on why there are multiple sensors and how I could use them to obtain 1 value for the complete systems air / fuel ratio.
http://www.obddiagnostics.com/obdinfo/pids1-2.html
The system will have a GPS on it too so calculating distance shouldn't be an issue.
#7
Re: Help on MAF and OBD II.
At cruise steady speed the MAF [grams per second] will probably be accurate to 2-3%.
But if you monitor the range of drivers you will see many twitchy feet.......the miniaccelerations [monitored by TPS voltage] result in squirts of extra fuel in anticipation of more accelerations. The system goes in and out of closed loop. Wasting fuel.
WOT accelerations can consume 12-15 times more fuel per second than cruise. A single 15 second quarter mile acceleration will use more fuel than driving 4 miles at 60 mph
The real question is sampling rate and how you handle the overshoots........more fuel squirted than the MAF reflects.
The other problem is the 5-10 minute warm up for each cold crank and the extra fuel commanded. This extra up to a gallon per day [more in cold climates] must be accounted for in your calculations.
The algorithm would have 5 parts: crank/warmup, hot idle, mild acceleration, cruise, WOT acceleration........then I believe you could get to 3% overall accuracy.
http://www.v8sho.com/SHO/Great%20Compromise.htm
The problem is the confusion with MPG [because of speed increases] GALLONS PER HOUR would help people under stand trip costs better
But if you monitor the range of drivers you will see many twitchy feet.......the miniaccelerations [monitored by TPS voltage] result in squirts of extra fuel in anticipation of more accelerations. The system goes in and out of closed loop. Wasting fuel.
WOT accelerations can consume 12-15 times more fuel per second than cruise. A single 15 second quarter mile acceleration will use more fuel than driving 4 miles at 60 mph
The real question is sampling rate and how you handle the overshoots........more fuel squirted than the MAF reflects.
The other problem is the 5-10 minute warm up for each cold crank and the extra fuel commanded. This extra up to a gallon per day [more in cold climates] must be accounted for in your calculations.
The algorithm would have 5 parts: crank/warmup, hot idle, mild acceleration, cruise, WOT acceleration........then I believe you could get to 3% overall accuracy.
http://www.v8sho.com/SHO/Great%20Compromise.htm
The problem is the confusion with MPG [because of speed increases] GALLONS PER HOUR would help people under stand trip costs better
Trending Topics
#8
Re: Help on MAF and OBD II.
Ok, thanks for the info and I think I get what your saying, but can you explain to me how to adjust my calculations for the algorithm.
I get that I can estimate the fuel consumed as a measure of the mass aif flow rate * the ratio of fuel to air and since I can directly read the mass air flow rate from OBD 2, all I need to do is figure out an estimate for the fuel to air ratio based on the other parameters of the system.
Now for the algorithm you are suggesting, can I just figure out which of the states the engine is running at using the other OBD 2 data like coolant temp and TPS percent and then just hard code in a different value for air to fuel ratio based on those parameters and if so what are good values to use for each of the states? i.e. at cruise it would be 14.7, for WOT acceleration it would be 10??
To calculate the states I'm assuming that I can tell the system is in warmup mode if the coolant temp < 180 degrees and for the different acceleration states can I just look at the TPS % which will tell me how hard the driver is accelerating. What do you think are some good ranges for the TPS % to be in for these 4 other states?
I get that I can estimate the fuel consumed as a measure of the mass aif flow rate * the ratio of fuel to air and since I can directly read the mass air flow rate from OBD 2, all I need to do is figure out an estimate for the fuel to air ratio based on the other parameters of the system.
Now for the algorithm you are suggesting, can I just figure out which of the states the engine is running at using the other OBD 2 data like coolant temp and TPS percent and then just hard code in a different value for air to fuel ratio based on those parameters and if so what are good values to use for each of the states? i.e. at cruise it would be 14.7, for WOT acceleration it would be 10??
To calculate the states I'm assuming that I can tell the system is in warmup mode if the coolant temp < 180 degrees and for the different acceleration states can I just look at the TPS % which will tell me how hard the driver is accelerating. What do you think are some good ranges for the TPS % to be in for these 4 other states?
#9
Re: Help on MAF and OBD II.
I did some research on oxygen sensors and came upon the information that oxygen sensor voltage readings from 0 to 1 v correlate to air to fuel ratios of 10:1 to 19.1:1. Anyone know if this is correct and if I monitor only the bank 1 / sensor 1 oxygen sensor will this give me a close estimate of the car's total current air / fuel ratio to be used as a measure of fuel consumption?
The formula I plan on using is as follows:
((MAF air flow / (air to fuel ratio)) / (2,860 grams per gallon)) = gallons / second
I will then integrate this over the time period since the last reading to estimate continous gas usage for the time period the car was in motion and get a MPG reading with help from the GPS.
Also do I have to worry about warm up or WOT with this or will the oxy sensor voltage vary accordingly with these different states?
The formula I plan on using is as follows:
((MAF air flow / (air to fuel ratio)) / (2,860 grams per gallon)) = gallons / second
I will then integrate this over the time period since the last reading to estimate continous gas usage for the time period the car was in motion and get a MPG reading with help from the GPS.
Also do I have to worry about warm up or WOT with this or will the oxy sensor voltage vary accordingly with these different states?
#10
Thread
Thread Starter
Forum
Replies
Last Post
Freeman186
Engine, Drivetrain & Forced-Induction
1
09-06-2023 10:07 AM
n2fooz
Engine, Drivetrain & Forced-Induction
0
09-04-2015 07:46 PM