Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Fuel Consumption Sensing

Fuel Consumption Sensing

Fuel Consumption Sensing

I rented a luxury Buick on a business trip the other day, and in addition to XM radio and lots of other goodies, I noticed it had a real time readout of fuel consumption in MPG.  Does anyone here know what sensor is used to calculate this?  ie fuel flow, fuel weight, etc etc.
Also, are there any retrofit kits available for older cars that the average shadetree guy such as myself can install?

RE: Fuel Consumption Sensing

One method is to measure the on time of the injectors.  With my vehicle the factory MPG readout is always higher than what I measure with the gas pump and odometer.  You can buy flow meters and mount them into the gas line.  Not sure that they would give you a good instantaneous reading though.

RE: Fuel Consumption Sensing

In other words it's a calculation by the ECM, not a matter of sensing. Most OEM's are fairly accurate, and read within 1 to 3 seconds.

These days most add-ons are for marine or aircraft. Flo-Scan is one company supplying to them. J.C. Whitney used to sell them too.

RE: Fuel Consumption Sensing

In the days of carburetors, this was done by putting a fuel flow sensor on the gas line to the carburetor and a sensor on the speedometor (or drive shaft). Or, a very crude MPG indication was made just be measuring the vacuum on the intake manifold. Aftermarket add-on kits were made, but they were crude (i.e. cheeply made), had to be adapted for each type of car, and like most add-ons, unreilable due to the cheap connectors, dangling wires, etc.

Now days, this is done by adding up the time the injectors are open and measuring the distance the car travels. This is simple for the car manufacturer as all the information is already controlled or available on the various control modules within the car. On a modern car with modern fuel injection, to measure the fuel flow, you would have to measure the fuel flow at the incomming fuel line, and the return line to the tank, and subtract the two readings.

Now, some aftermarket computers that people use to modify their cars with turbos, nitros, wild cams, high-compression, etc. have the ability to display computed milage (as well as completely re-map their fuel curves, timing, etc). But, unless you're into working on your car a lot, have time and money to loose, and willing to break your car and fix it time and again, I would not suggest it.

Easier to buy a new car.

RE: Fuel Consumption Sensing

It is fairly simple if the car uses an electronic speedometer sender. That will generate a pulse each time a known small increment of distance is covered.

Fuel flow can be conveniently measured by totalising the fuel injector on time.  

As both these signals will be available at the ECU, it not difficult to calculate and display instantaneous fuel mileage or economy, in either metric or imperial units.

RE: Fuel Consumption Sensing

Thanks for all the input.  My vehicle is a 2000 Mazda B3000 truck, and it has an injector system, but the speedometer is an old fashioned mechanical cable.  I looked at the Flo Scan site, and they calculate gallons per hour for marine applications.  I suppose if I were really ambitious I could do a gph calculation, but I think the best suggestion is to buy a vehicle with this feature next time around.  Sure miss my '56 Chevy Bel Aire. sadeyes

RE: Fuel Consumption Sensing

It should also be noted that the fuel consumption assumes a constant fuel pressure to your injectors.  Any variation in your fuel pressure will cause error in the fuel consumption calcuation.

RE: Fuel Consumption Sensing

A valid point, but that is what the fuel pressure regulator does.

Likewise a change in tire size away from the original will alter the reading too.  

RE: Fuel Consumption Sensing

The consensus seems to be that measuring the on-time of the fuel injectors is the way to go. But how to do that? As far as I know, the injector timing isn't available over OBD2 (EOBD).

An alternative approach I have seen is based on the fact that:

   Fuel Flow = Air Flow / Stoichiometric Ratio.

For a gasoline (petrol) engine, the stoichiometric ratio is 14.7.
The air flow is obtained by a MAF (Mass Air Flow) sensor, and it is available over OBD2.

If there is no MAF sensor, then the MAP (Manifold Absolute Pressure) sensor can be used:

   Air Flow = C x RPM x MAP / Absolute Temperature.

Engine RPM, MAP (intake manifold pressure) and intake air temperature are also available over OBD2.
In this case there is a constant of proportionality that must be found by calibration.

* http://www.omninerd.com/2006/07/16/articles/57
* http://en.wikipedia.org/wiki/OBD-II_PIDs
* http://en.wikipedia.org/wiki/Manifold_absolute_pressure

So much for all that. Now can anyone tell me if this method will work on a diesel engine? What is the stoichiometric ratio in that case?

RE: Fuel Consumption Sensing

First, many of the GM OBDs measure injector pulse width.  This is not one of the generic OBD parameters, and you will not find it on Chrysler or Ford's OBD output.  However, the ECU is controlling the injector timing, so an O-scope can be used to  determine what the pulse width is for a given engine speed and load.

I would also recommend not assuming that your engine is operating at the stoichiometric ratio at all times.  This can be especially true of stratified charge engine, cold starting, etc.

As far as the diesel stoich. ratio, check out the link below.  It has been discussed here before.



RE: Fuel Consumption Sensing

Thanks for the feedback.

I'm looking for a fuel consumption metric that will work for petrol (spark-ignition) and diesel (compression-ignition) engines using only generic OBD2.

What about PID $04 - Calculated Load Value?
This is returned as a percentage.

Any better suggestions?

RE: Fuel Consumption Sensing

for 1996 and newer OBD-II vehicles, check out ScanGauge-II


easy to install (in fact portable) trip computer. Very entertaining.

RE: Fuel Consumption Sensing


Its a little tricky using the calculated load.  Calculated load is expressed as a percent of how hard the engine is working compared to how hard it can work at a given RPM.

It should also be noted that for a MAP system, this load value is based on vacuum only.  A MAF system bases this on airflow and RPM.  Thus the calculated load on a MAF system is more useful.

Isn't OBD great?

RE: Fuel Consumption Sensing

So how do after-market trip computers like the ScanGauge calculate fuel consumption?
The ScanGauge web-site says that 99% of cars and light trucks report information on fuel consumption.
So I presume they are using generic OBD data.
But what PIDs and what algorithm?
And given the variations between petrol/diesel and MAF/MAP vehicles, what accuracy is possible?

Quote from http://www.scangauge.com/support/faq.shtml:
"Can I use the ScanGauge II to save fuel?
If your car reports information on fuel consumption (99% of cars and light trucks do), and you use it to adjust your driving habits, you can save a lot of fuel."

RE: Fuel Consumption Sensing

By the way, I think the Calculated Load Value could be a more accurate measure of fuel consumption on diesels.

According to ISO 15031-5 (equivalent to SAE J1979), for petrol (gas) engines the CLV is effectively (current airflow / peak airflow), and as reidh pointed out, the air-fuel ratio is not always stoichiometric.

But it goes on to say:
"Compression-ignition engines (diesels) shall support this PID using fuel-flow in place of airflow for the above calculations."

Of course, as with everything else in OBD, whether the engine manufacturers abide by the standard is another matter...

RE: Fuel Consumption Sensing

Hi to all !

I think benkinsella perhaps can help me ....

I ´ve an instant fuel gauge lts/100kmts on bmw 520i 1988.

I want to convert the voltage at the instrument
(this is the ready product of compute the fuel consume
and the distance)
by a factor in order the scale gauge 0 5 10 11 12 13 14 15 ....
correspond directly to kilometers by liter

So when i read at 180 kph 5 this will be 5 kmts for liter and not 5 lts for 100 kmts.(of course presently it indicates 20 lts for 100 kmts).

I know the formula to convert it by how can i do to convert electronically the voltage for the factor?

I hope this operation will be possible with discret ic's and not with a programable microprocessor like pic ....

This is the idea then i will be more specific.

Thanks and congratulations for your level.

RE: Fuel Consumption Sensing


I don't think your question is particularly relevant for this forum, but I will attempt an answer.

If your gauge readout is analogue, with a moving needle, then you don't need to "convert the voltage" at all. Just print a new scale for the gauge and stick it on top of the existing one.

If your gauge readout is digital, with an LCD display, then first of all I would double-check if there is a "voltage at the instrument". It may have a digital interface, in which case you need something like a microcontroller.

If your gauge readout is digital, with a voltage input, then yes, you could use an op-amp circuit to perform a conversion, but would it really be any use?
Chances are the gauge isn't doing a straight-forward analog-to-digital conversion. There's probably a microcontroller in there too, with a look-up table or scaling factor involved. You would have to take the instrument out of the car, connect it to a programmable voltage source, and play around with it to be sure.

e.g. See the Difference Amplifier here:
If your input range is 0 to 5V, then choose V2 = 5V, and R1 = R2 = R3 = R4 = 10k.
Then when V1 = 0V, Vout = 5V, and when V1 = 5V, Vout = 0V.
That gives you the "reciprocal" function you're looking for, but that's only part of the solution.  

RE: Fuel Consumption Sensing

Thanks benkinsella for your careful answer.

"I don't think your question is particularly relevant for this forum, but I will attempt an answer ..."

Sorry i thought like this have relation with real time readout of fuel consumption ..and perhaps anyone
should have the same problem for best check the results of his experiments with cylinder deactivation, acetone,

 EFIE diy and sensors trickings in order to get particular car save gas like mine....

"If your gauge readout is analogue, with a moving needle"

Yes it is!

", then you don't need to "convert the voltage" at all.
 Just print a new scale for the gauge and stick it on top of the existing one."

Not i don´t want this way!

I want to change internal electronically speaking ...
I see exits a direct inverse relation, (inversor circuit), but  the problem is that the scale don´t have  proporcional steps....

and i thinking now with your info that, with a basic microcontroller with a look-up table should be the correct solution.

I´m only a hamradio, electronic and automotive enthusiast i appreciate your help and like valious info about op amps
should you have the kindness to tell me where go to get help or this exactly electronic basic microcontroller design to convert
volt input table to volt ouput table?

No bother more, and go away..

Thankfully for your valious information.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


White Paper - Considerations for choosing a 3D printing technology
The adoption of 3D printing into major companies’ product development life cycles is a testament to the technology’s incredible benefits to consumers, designers, engineers and manufacturers. While traditional production methods have limitations in manufacturability, 3D printing provides unparalleled design freedom due to the additive method of building parts layer by layer. Download Now
White Paper - Are all 3D printed metals the same?
With so many different 3D printing metal systems and processes today, how can you know exactly what you’re getting? Today, there are several different methods for manufacturing 3D printed metal components with their own strengths and limits. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close