Real-Time Fuel Consumption Monitoring
Robert Kwiatkowski wanted to see his fuel consumption in real-time. Unfortunately his truck did not give him this information, so he designed his own fuel consumption monitoring system using the free Windmill software. He connected his laptop to the On Board Diagnostics system of his Ford Expedition, used Windmill to collect data from the truck and Excel to calculate and display his current fuel consumption.
The On Board Diagnostics monitor vehicle conditions and components that are related to vehicle emissions. Sensors in the engine measure temperature, fuel pressure, speed and such like.
Most vehicles do not have a fuel flow sensor, Kwiatkowski therefore used 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.
Modern vehicles use the oxygen sensors to feedback data to the vehicle's electronic control module (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. The Mass Air Flow is the mass of air consumed in grams per second. Kwiatkowski used this information to convert the Mass Air Flow to gallons per hour and then calculate miles per gallon. He set Windmill to route the readings to Excel which performed the necessary calculations and showed the current fuel-consumption.
He used the known values to convert the MAF to Gallons of fuel per hour (GPH) and then calculated miles per gallon (MPG).
Here are the steps to make the conversion:
- Divide the MAF by 14.7 to get grams of fuel per second
- Divide result by 454 to get Lbs fuel per second
- Divide result by 6.701 Gals fuel per second
- Multiply result by 3600 to get gallons per hour
The expression for GPH is: MAF * 0.0805
To calculate MPG divide the MPH by GPH.
The final expression
for MPG will be:
VSS * 7.718
Although the system is designed to show real-time fuel consumption, all the data can be logged and reviewed later. Windmill can also record GPS co-ordinates alongside the vehicle data. Other data could be recorded, such as emissions. This means that the system could be adapted to show emission maps of journeys through specific areas.
Robert Kwiatkowski has produced a step-by-step guide to replicating his system which he has kindly made available here.
Further Reading
How to interface a vehicle's OBDII system to a PC
Learn More
To find out more - or to ask our advice on your project - enter your details below.