Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MPG Meter

kinarfi

Well-Known Member
I would like to build a meter that shows my MPG constantly, maybe total gas used, maybe what's left in the tank. I will need a flow transducer because it for an 84 motor home. I'm looking for suggestions of where to start and what to use.
Thank You.
Jeff AKA kinarfi
 
If it's fuel injected, I think you have a pressurized rail that returns fuel to the tank.
So. you might be better off measuring the injector time and turn that into fuel injected and assume that the fuel rail is at constant pressure. The ECM probably has a better chance of getting it right.

Basic times: https://www.enginebasics.com/Engine Basics Root Folder/Fuel Injectors.html

and a Fuel injector table: **broken link removed**

So, you have a cc/min rating and the on time, so you can get fuel used. Then there is calibration.

So, you have to measure between 1.5 and 6 mS or probably gate a counter when each fuel inkector fires and read it every 0.6 seconds or so.

Then you need to interface to the speedometer sensor, which is really a distance sensor. I think a pulse every 1-2 feet is about the right range.

If it's a carb, then you can measure the fuel flow. Way back when, there was an article in Pop Electronics or radio-Electronics to build an MPG meter. You built the sensor too.
 
Last edited:
There exist fuel meters for injected engines, where they have one meter for flow in and one for flow back, so they only account the net fuel use.
For MPG you will also need to connect to the speed pickup so you know how many miles you did.
 
Yes there is I looked into it.
I built a dash guage system for my car I looked into mpg but didnt fancy the maths.
Most cars have obd connectors, you can get data from this, they call them pid's, you request a pid and the ecu returns it, one of the pids is engine load, this directly tells you the amount of air is entering the engine, at the same time you can get the pid for the lamda, this tells you the air/fuel ratio, knowing these 2 pieces of info you can calculate the amount of fuel entering the engine, eg a 2 litre engine at wide open throttle will use 1 litre of air per rev, at perfect fuel/air ratio of 14.7:1 the amount of fuel would be 1/14.7 about 0.06l (at less than wide open throttle you multiply the maximum amount of air by the load %), from the obd you can also get the rpm and road speed pids for the car, then you can work out the mpg.
You could just ignore the fuel/air ratio and assume its 14.7:1, most engines are pretty good now, or you could go the other way and take air temp (density) and fuel temp into consideration.
This is how manufacturers do it to get dashboard mpg.
I might have got a couple of details wrong there its a while since I looked into it but the gist is correct.
Or you could always fork out 40 quid and buy yourself a digi dash which does this and a whole load of other things from the obd connector.
 
Last edited:
When I worked at the VW dealerships in the early 80's.. The Passat came out with a really simple MPG monitor..

It was a needle guage ( similar to the current gauge ) that was centered... When the manifold air pressure was equal, this was the best MPG.. If there were depression, the amount of depression gave a poor MPG and similarly a high pressure was also poor efficiency.... Most engines have a port for tapping air pressure....
 
Ford had a similar system, a vacuum guage tells you when an engine is running efficiently, not so much the exact mpg.
The 'load' pid from OBD is actually calculated from vacuum, it also uses air temp and stored constants for the engines volumetric efficiency.
If an engine has a mass air flow sensor (maf) instead of a manifold absolute pressure sensor (map) then its voltage can be used as an amount of fuel used indicator (some are freq not voltage).
 
This is for a 1984 motor home with a 454 Chevy engine which is carburated and predates OBD. Thanks for the responses.
What I am wanting to do is put fuel flow meter in and couple that to the speed pick up from the after market cruise control and do the math from that point. This will allow me to know how much gas is left in the tank also. At present, I think I'm only getting about 6.6 MPG:eek: @ 65 mph
 
You can buy aftermarket fuel consumption displays, I had one way back.
If the carby has a fuel inlet and return then you will need 2 flow sensors, the fuel consumed is whats comming into the engine - whats going back.
the display I had used a reed switch which you stuck to the back of the speedo, being an older vehicle this will probably work too, you'll have to measure how many pulses per mile there are.
I had a motorbike I used this idea on, sticking a reed switch on the back of the speedo and a little circuit that cancelled the indicators after you had travelled so much distance if you forgot to turn them off, they fit them from new now.
 
This is for a 1984 motor home with a 454 Chevy engine which is carburated and predates OBD. Thanks for the responses.
What I am wanting to do is put fuel flow meter in and couple that to the speed pick up from the after market cruise control and do the math from that point. This will allow me to know how much gas is left in the tank also. At present, I think I'm only getting about 6.6 MPG:eek: @ 65 mph

**broken link removed**

(Sparkfun used to sell a kit - but don't any longer. Don't know why).

Note there are a variety of flow sensors in the same ad.

If the BB carb has a return fuel line you would, of course, need 2 of these. But only one uC (whichever one you use).
 
This will allow me to know how much gas is left in the tank also.

Didn't they put a normal fuel gauge on them back then? :confused:
 
Didn't they put a normal fuel gauge on them back then? :confused:
Probably one of those non-linear ones where it read 1/4 of tank when empty.
Yes, OF COURSE, it has a fuel gauge, and actually, it seems to work quite well.
This camper has a ~94 gallon tank and I can fill it($$$$$$$), record the mileage, go camping for several days, come back home, fill it back up($$$$$$$)(47.728 G), record the mileage(314.6), do the math, and I come up with 6.591518605430774 MPG, truncated to 6.5 mpg for easy math.
At 65 MPH, I get ~6.5 MPG = 10 G/H = 0.16666 G/Min = 37.85 L/H = 0.630833 L/M.
If I'm going up a hill, I'm sure the fuel flow goes up considerably, maybe 200% (WAG)
This method works, but is extremely slow and I'd like something a little quicker.
 
Last edited:
I had a motorbike I used this idea on, sticking a reed switch on the back of the speedo and a little circuit that cancelled the indicators after you had travelled so much distance if you forgot to turn them off

Just like to say I'm impressed with that idea! :D

they fit them from new now.

And I never knew that!.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top