An MPGuino Fuel-Economy Computer with a Retro Look

Russia’s Invasion of Ukraine and the soaring fuel prices that followed it last year have got me thinking about ways to reduce my gasoline consumption. I considered buying an automobile that would provide higher gas mileage. However, it was logical first to check out how much efficiency I could get from my old econobox that I am currently driving, a 1993 Toyota Corolla.

Possible strategies for improving its fuel economy include:

  • Putting on some low-rolling-resistance tires.
  • Adding a shroud below the engine compartment (to reduce aerodynamic drag).
  • Even removing the alternator (as some racers do) or having it operate only when braking.

In addition, driving it differently can also help a great lot.

I was aware. However, I knew it would be a challenge to try various driving strategies without more immediate feedback on their impact on fuel efficiency. Some newer vehicles show immediate fuel consumption on the dashboard. Mine doesn’t. It’s something that takes work to incorporate.

The owners of most vehicles can purchase, for instance, a ScanGauge and connect it to the OBD-II ( On Board Diagnostics II) port for data on their car, which would permit them to see an estimate of MPG at a glance while driving. My car was made many years before OBD-II was made a standard.

So I considered revisiting the project I felt in 2009 in which I had installed an Arduino-based fuel-economy system named ” MPGuino” in the car I drove then. The MPGuino can tap into two signals available to the vehicle’s Electronic Control Unit (ECU) one is from the vehicle’s speed sensor, and the second is for the fuel injection system. With these two signals, an MPGuino can determine how speed the car is traveling and how much fuel it uses and can display the driver the instantaneous efficiency of power in terms of miles per gallon (MPG). The MPGuino also keeps track of what amount of gas is consumed along with the mileage traveled for longer durations which means it will display the average MPG for one trip or the last gas tank.

I remember that this gadget was handy. After I removed the car from which I had it installed, I’d need to locate a new MPGuino to replace my Corolla.

Although the software aspect of MPGuino is currently being created, the hardware is becoming more difficult to find. The companies that are listed as listed on the MPGuino Wiki page as selling MPGuino kits or boards in the past are no longer in business. It was easy to make one with the help of schematics, an Arduino (I utilized the Arduino Nano), an LCD board that measures 16 by two, and a few separate parts.

I was reminded. However, I recalled how much I did not enjoy looking at the tiny LCD screen when driving. This time, I set out to improve my performance.

The components for this project are:

  • The two Arduino Nano boards.
  • Three push buttons.
  • An LCD board with a 16-by-2 size.

It also has an old VDO oil pressure gauge, which displays the current fuel efficiency in miles-per-gallon units divided by 10. JAMES PROVOSTA few MPGuino users, I discovered, sent the output of their device to a flat-panel display for a modern glass-cockpit style. I thought of going oppositely and having my collection show the gas mileage in real-time on the analog side of the gauge.

To do this, I bought (through eBay Naturally) an old VDO oil-pressure gauge salvaged from an old Porsche a few years older than my vehicle. In my younger years, I was driving a Porsche and a Porsche, but even though I’m driving around in a battered Corolla isn’t a reason why I shouldn’t be awed by the look of VDO instruments!

However, using that gauge on the standard MPGuino hardware was a challenge. Although I’m confident it can be done, the MPGuino code is somewhat complex and involves interrupts and clearing flags. My mind was reeling at the thought of trying to hack it. So I decided to include another Arduino Nano in this project I thought I could initially use to control the VDO gauge and then later utilize to calculate other parameters to display. It comes with the ability to connect serially to the Arduino inside the MPGuino software, which I discovered works best when using the 2016-vintage version MPGuino. MPGuino software is designed to output serial data in various formats.

This VDO gauge I found is usually connected to a transmitter unit with a variable resistance based on changes in pressure. To replicate this variable resistance, I used an all-purpose NPN transistor. The base of this transistor is driven (through a 220-ohm resistor) by one of the digital output pins on the second Arduino, which outputs a pulse-width-modulated (PWM) wave of the appropriate duty cycle to drive the meter.

It took experimentation to find a way to calibrate this display. At first, I wrote a program on the other Arduino that gradually increased the frequency of the PWM signal and displayed what was currently happening in the serial monitor of the Arduino. I noted how the PWM values corresponded with every gauge number. I then used linear interpolation to adjust the PWM value for each number between these points and coded things to make the gauge show MPG divided by. (The gauge’s range on the indicator varies between 0 and 10 bar.) The gauge’s needle was initially twitchy, and I rewrote my code to ensure that the hand could display an average of the MPG values determined using the MPGuino.


Leave a Reply

Your email address will not be published. Required fields are marked *