Skip to content
Thomas Vago edited this page Jul 28, 2023 · 2 revisions

Table of Contents

Welcome to the MPGuino wiki!

Introduction

MPGuino is an impressive use of the Arduino platform to monitor a vehicle's fuel consumption or fuel efficiency. There is a lot of information about MPGuino at http://www.ecomodder.com, where you will find tons of useful and fun ways on improving gas mileage for any car.

MPGuino works by directly measuring the duration of the fuel injection pulse signals sent to a fuel injector on the vehicle's engine. It uses this measurement, along with the number of fuel injectors on the engine, and the rated fuel flow capacity of these injectors, to calculate fuel usage, fuel consumption rate, engine run-time, engine speed, and the estimated amount of fuel remaining in the vehicle's tank. When combined with a speed signal from the vehicle, MPGuino can also calculate fuel economy, vehicle speed, the time the vehicle spent while in motion, estimated remaining range, and estimated remaining run-time.

MPGuino can display such information using 3 primary trip variables. The Instant trip variable provides a snapshot of vehicle information at 1/2 second intervals. The Current trip displays summary vehicle information from the time the vehicle is started to the time the vehicle is turned off. The Tank trip displays summary vehicle information during a user-specified period of time, such as between tank fill-ups.

MPGuino displays this information in either US SAE units (miles, US gallons) or SI metric units (km, L). Additionally, MPGuino can display fuel economy as MPG, L/100km, km/L, or G/100mi. A compiler option allows MPGuino to use Imperial gallons instead of US gallons.

Optionally, MPGuino can also track when the vehicle is sitting with engine running (idle), and when the vehicle is in motion with the engine turned off (coast). Idle is self explanatory, but coast deserves a little explanation. When a vehicle is moving down the road, and the driver lets off the gas pedal, the vehicle will generally stop sending signals to the fuel injectors for that time, which effectively turns off the engine even though it is still turning over due to being mechancally coupled to the vehicle's drive wheels. This is totally transparent to the driver. MPGuino can report how long the vehicle has been idling, as well as how much fuel was consumed while idling. When combined with a speed signal from the vehicle, MPGuino will be able to report how long the vehicle was coasting, and how far the vehicle travelled while coasting.

Due to popular demand, MPGuino can optionally also do more. These compiler-selectable options are listed below:

  • Fuel Cost (Cost rate, Cost per distance, Cost of fuel consumed, estimated fuel worth remaining).
  • Graphs of fuel consumption over time, fuel economy over time, distance over time.
  • Graphs of fuel consumption vs vehicle speed, fuel economy vs vehicle speed, distance vs vehicle speed.
  • Partial tank refuelling.
  • Drag-racing measurement mode. MPGuino can estimate maximum engine power, as well as fuel consumption and economy stats for each drag run.
  • Alternator voltage output.
  • Two configurable analog output lines that can be connected to either LEDs to show whether Instant fuel economy is better or worse than Current or Tank fuel economy, or to a gauge to show fuel consumed or estimated fuel remaining.
MPGuino works for just about any car with fuel injection, but for cars built before 1996, there is no OBD-II option to measure either fuel flow or fuel economy.

Required hardware

MPGuino requires one of the following processors:

  • AVR ATmega168/328/328P - Arduino Uno R3, Arduino Nano, iDuino
  • AVR ATmega2560 - Arduino Mega
  • AVR Atmega32U4 - Arduino Leonardo, TinkerKit! LCD
MPGuino requires one of the following displays:
  • 16x2 direct output LCD display
  • 20x2 direct output LCD display
  • 20x4 direct output LCD display
  • 16x2 TwoWire (I2C) LCD display
  • 20x2 TwoWire (I2C) LCD display
  • 20x4 TwoWire (I2C) LCD display
  • 16x2 Parallax Serial LCD Module
  • 20x4 Parallax Serial LCD Module
MPGuino requires one of the following additional input configurations:
  • 3 buttons, direct input
  • Two-Wire (I2C) interface 3 or 5 buttons
  • 5 buttons and associated resistors for analog-style input
  • Parallax 5-position switch for analog-style input

Identifying connections on your vehicle

Fuel injector: Ideally, you should use a wiring schematic for your vehicle. However, if you can't locate a schematic, then you can use these generic instructions that should work with most vehicles.

  • Select an accessible fuel injector on the engine, and unplug the injector plug from the injector
  • Turn on the ignition, but do not start the engine.
  • Using a multimeter, look for 12 volts on one of the injector plug wires.
  • Use the injector plug wire that does NOT have 12 volts on it as the input signal for the MPGuino fuel injector input
Speed signal (VSS): While tracking fuel consumption is most useful, and cars generally have speed and distance instrumentation (speedometer/odometer), it is most convenient to identify a signal to use for tracking vehicle distance/speed. Unfortunately, there isn't a generic way to do this. You must locate a schematic for your vehicle, and do some guessing and testing. Alternately, you can find information from someone else who has installed an MPGuino on their vehicle, or you can try to adapt some other kit (such as an aftermarket navigation radio installation kit) that provides a usable vehicle speed signal. Some cars might not even have a dedicated speed sensor wire, or the speed sensor signal may need some conditioning to be usable as an input to the MPGuino speed sensor input.

Ground: Vehicle ground.

+12: This should be always on, when the car is off or in run or start, always on. Ideally, you should use a schematic for your vehicle. Alternately, you may find a usable wire from an aftermarket radio installation kit for your vehicle. Use a voltmeter on the lead under the ignition (ACC/OFF/RUN/START) if in doubt.

Main Options Debugging Technical

Clone this wiki locally