Board logo

Tin top fuel computer
roadrunner - 11/5/10 at 07:57 PM

Can anyone tell me how and where a modern car works out the constent MPG on the computer, i think mine is reading wrong.
Brad.


Madinventions - 11/5/10 at 08:15 PM

Here's a snippet that I've used in my code for the onboard computer for my Mojo. It basically takes the MAF airflow reading and speed data from the ECU and works out the MPG from that.


quote:

Computing the Fuel Consumption of your Vehicle
This is a fairly straightforward approach. Most vehicles do not have a fuel flow
sensor, therefore; you need to use the Mass Air Flow (MAF) sensor and the
Vehicle Speed Sensor (VSS) to calculate miles per gallon (MPG).

1. Mass Air Flow - The mass of Air in grams per second consumed.
2. Vehicle Speed Sensor - The actual speed of the vehicle.

For today’s vehicles and by EPA regulations vehicles use the oxygen sensors to
feedback data to the ECM and control the air to fuel
ratio. This ratio is set at the chemically ideal value
of 14.7 grams of air to every gram of gasoline.
Since we now have a quantitative value we can use
other known values to convert the MAF to Gallons
of gas per hour (GPH) and then calculate miles per gallon (MPG).
Here are the steps to make the conversion:
1. Divide the MAF by 14.7 to get grams of gas per second
2. Divide result by 454 to get Lbs gas per second
3. Divide result by 6.701 Gals gas per second
4. Multiply result by 3600 to get gallons per hour
The math expression for GPH is: MAF * 0.0805
The value for vehicle speed is delivered in Km/Hr, to convert to miles multiply by
0.621317. To calculate MPG divide the MPH by GPH. The final math expression
for MPG will be:
(VSS * 7.718)/MAF



Hope this helps?!

Ed.


RichardK - 11/5/10 at 08:21 PM

Think its time I went to bed, my head hurts.

Rich


dhutch - 11/5/10 at 08:32 PM

In short, its a case of the engine knowing how much fuel it is putting in against the speed.
- Clearly the amount of fuel it puts in is a factor of MAF and Lambda. As the injectors themselfs are open loop.


Daniel


MikeRJ - 11/5/10 at 08:33 PM

On an OEM system the ECU will probably just integrate injector open times with some correction factors for dead time. They are often calibrated to be very optimistic IME (I suspect deliberately), but I'm not aware of any calibration factors that can easily be changed.

Using the MAF (as per a Circuit Cellar magazine article a couple of years back) doesn't work so well with performance engines since 1) The MAF on many cars runs out of dynamic range at the upper end of the airflow, and the ECU uses alternative fueling strategies 2) It doesn't take into account that the mixture will not be stoichiometric under fast throttle openings and high engine loads.


roadrunner - 11/5/10 at 08:41 PM

OH, so there's bugger all I can do about adjusting it then.
My computer says i am doing 35mpg but the gauge says different.


nick205 - 11/5/10 at 10:10 PM

What car is it?

A diagnostics check might reveal the problem - could be a sensor reading wrong and confusing the computer. May also indicate a problem that needs addressing.


blakep82 - 11/5/10 at 10:45 PM

bmw by any chance?


britishtrident - 12/5/10 at 07:02 AM

All OEM ones work by injector duration they are nearly all very very optimistic some by at least 25%

To make matters worse the petrol gauge on a lot modern cars dosen't work directly off the tank senders, the ecu estimates the ammount of fuel used since the petrol cap was last removed to put fuel in.


iank - 12/5/10 at 07:06 AM

How far out is the speedo? If it reads 5% over (they all read over) then the MPG will presumably also be optimistic by at least 5%.

Tyre size if non-standard will also come into the error.


britishtrident - 12/5/10 at 11:44 AM

Speedometers read about 4 to 5% fast but the speed the ECU computes is usually spot on (not allowing for tyre wear).


roadrunner - 12/5/10 at 06:39 PM

Its a VW Bora tdi 150, i have trouble with shuddering at low revs in high gears, more so when accelerating up hill. But this only happens between 1500-2500 revs.
I have changed the camshaft as it was worn, then the previous owner said it was loosing compression on number 4 cylinder. So had it in my local garage to be checked out. Compression is fine but the injectors are all over the place. I had also renewed the MAF sensor, but this was a cheap one from ebay and made the idling very erratic, so the old one has been put back in.
I am going to change the fuel filter as the garage thought that a t some point some contaminated fuel has been used, then i will check for leaks in the pipe work. After that i will be getting back to forum of knowledge on where to go next.
Thanks
Brad.