Welcome To Gas Saver Guide
With gas prices on the daily rise this blog is dedicated to bringing you the best advice on how to save cash at the pump, and how to get more miles to that ever more expensive gallon.


Check Out My Newest Book!
Social Bookmark : Technorati, Digg, de.licio.us, Yahoo, Blinkbits, Blogmarks, Google, Magnolia.
RSS : Entries or Comments

MPGuino - DIY Gas Mileage Gauge

Written on October 4, 2008. Written by Zac.

Obviously one of the most important steps for driving more fuel efficiently is to actually be able to see what works better and increases your gas mileage. The MPGuino is a group project do-it-yourself MPG gauge; now you can save a few hundred instead of buying one and get real time readouts of your current gas mileage in any vehicle. Enjoy!

MPGuino is part of the OpenGauge instrumentation effort, which was created to make available efficiency instrumentation of all sorts. MPGuino specifically is a Miles Per Gallon gauge for fuel injected vehicles that is based on the arduino platform with some extra circuitry for monitoring the fuel injectors and the speed sensor in the vehicle. 

This does require some electronical and a minute bit of automotive skill to identify and utilize the hookup points and assemble the electronics so proceed at your own risk. 

Current status: In vehicle testing in progress… We are still working out the bugs in the software and possibly the hardware. The source code is available from here , just copy and paste it into the arduino ide( Arduino - HomePage ). 

Some of the skills required
Identifying the right injector leads with a volt meter. 
Identifying the vss with schematics/ECU diagrams/online tools.
Identifying battery power source with a schematic and/or voltmeter.
Soldering. 
Chasing a wire or two through the firewall. 
Possibly making updates to the circuit if we can’t find a software solution to any problems that are exposed, etc.) 
Being able to reprogram the device when we do find software solutions, or new features.

Parts List:
2 5.1v zener diodes
1 2n3906 PNP Transistor
1 220 ohm resistor
2 100k resistors
3 tactile switches
1 freeduino arduino clone (any arduino can probably be made to work)
i.e. an iduino: http://spiffie.org/kits/iduino/ or a Freeduino 
1 LCD (others might work as well, check pinout and chipset, etc).
16×2 LCD Module While Characters Blue Backlight
Or a green one from sparkfun or mouser 
(a number of folks like the green ones better)

Note: If you would rather work with the CPU directly and can figure out how to program it from arduino IDE then have a at the schematic in this thread:
Open source PCB design and skip the wiring diagram below because you will need to build the whole thing from scratch.

Wiring diagrams:
For the arduino style boards:
LCD is upside down in this diagram. All seems to be working well in the hardware department.

This image has been resized. Click this bar to view the full image. The original image is sized 688×590.

For the iDuino style boards:
Will need to procure a 7805 voltage regulator a 1n4004 diode, a 330 uf cap and a .1uf cap.

This image has been resized. Click this bar to view the full image. The original image is sized 778×647.

For the do it yourselfer:
refer to the diagrams in the Open source PCB design thread

Prototype:
Here is the prototype I’m using (serial freeduino and 16×2 blue lcd hot glued to a piece of thick balsa, with a component board for the transistors/etc. and any extra wire smashed out of the way)

This image has been resized. Click this bar to view the full image. The original image is sized 878×726.

And here is a model built from scratch

This image has been resized. Click this bar to view the full image. The original image is sized 749×659.

Screens:
1. Instant MPG/Speed 
Current MPG/Distance

2. Instant MPG/Speed 
Tank MPG/Distance

3. Large font instant MPG

4. Large font current MPG

5. Large font tank MPG

6. Current MPH, MPG, Miles, Gallons

7. Tank MPH, MPG, Miles, Gallons

8. Instant Raw Data (very useful for connection troubleshooting)
Injector open seconds, Injector open microSeconds, 
Injector pulse count, Vehicle Speed Sensor pulse count

9. Current trip Raw Data
Injector open seconds, Injector open microSeconds, 
Injector pulse count, Vehicle Speed Sensor pulse count

10. Tank trip Raw Data
Injector open seconds, Injector open microSeconds, 
Injector pulse count, Vehicle Speed Sensor pulse count

11. CPU Monitor
Max CPU %utilization, Tank running Time mm.ss,
Free Memory (bytes)

There is also a setup screen that displays the first time the program is run and by pressing all three buttons at once. It walks you through the following setup variables. Use left and right buttons to select the digit you wish to change or the OK or Cancel (XX) items. Use middle button to rotate the current digit or select OK or XX if that is where the cursor is. Selecting OK will save the currently displayed value to the current variable and advance to the next variable. Selecting XX will just advance to the next variable.

Contrast - This comes up first on a brand new run and changes on the screen are immediate so if you can’t see anything try pressing middle button a few times.

VSS Pulses/Mile - use this to adjust displayed speed/miles. If the speed/miles displayed on the mpguino is low then decrease this number by the percentage that it is off and vice versa for high readings. Most asian cars will be a multiple of 8204 and GM will be 10000, we are hoping users will contribute model specific data here.

MicroSec/Gallon - use this to adjust displayed fuel consumption. You may want to readjust this initially to get a ballpark MPG reading (after VSS Pulses/Mile is deemed accurate), then calibrate it with a couple fillups. If the mpguino displayed MPG is high or the displayed tank gallons is low at fillup then reduce MicroSec/Gallon by the percentage that the gallons are low or the displayed mpg is high. Like the vss pulses, this would benefit from user contributions about what values work for what specific cars.

Pulses/2 revs - not currently used, but a single injector on a 4 cylinder sequential system will make 1 squirt in 2 revolutions. Hope to be able to base RPM on this at some point.

Timout(microSec) - defaults to 7 minutes. If there are no injector or speed signals from the car and no buttons are pressed in that time then the display backlight turns off. When activity resumes the display will turn back on and the current trip will reset and the tank trip will be restored to the point of last activity.

Tank Gal * 1000 - not currently used, but defaults to 13300 or 13.3 gallons.

Injector DelayuS - Represents the mechanical delay of the injector in microseconds. Advanced topic.

Buttons:
Current button assignments as follows,
left: cycle through screeens in reverse
middle: cycle through pre-defined brightness settings
right: cycle through screeens forward
left+middle: tank reset
right+middle: current reset
left+middle+right: go to setup screen

Installation notes:
For Identifying where to tap into the fuel injector:
1. turn on the ignition, leave engine off.
2. Unplug an injector.
3. With a voltmeter, measure the voltage on each injector connection. One should be 12 volts and the other should be more like 0. You will want to tap into the one that is at 0 volts.

For finding the VSS hookup, there are several approaches, but at the bottom of 
Technical Support is a tool that might help you identify the VSS wire location and color. Also here is another online source of ECU pinouts, I’m sure there are more: ECU Pin-out Diagrams :: Innovate Motorsports Application Notes

IMPORTANT, you must be very deliberate when hooking up the mpguino to your cars battery power. There have been several cases where people had to reflash their atmegas and it is noted in the datasheet that the flash memory can be corrupted if the power requirements are interrupted. So line up those pins and get it hooked up the first shot.

On my saturn I tapped into an injector ground lead, and used ground and battery voltage and speedo (possibly vss) signal from the ecu plugs. 

This image has been resized. Click this bar to view the full image. The original image is sized 962×456.

Here are some shots of hooking up the prototype on a saturn. I got lucky with the splice clips on the power but had to trim the insulation (carefully) on the injector lead and vss lead and solder the connection. I also had the wrong vss lead, so don’t go by color here. But it was straight forward, and pinching through an existing rubber grommet in the firewall with a piece of coathanger was easy so I could get to the injector tap.








Metro installation
FYI, here is the hookup points in a 98 metro
VSS:

This image has been resized. Click this bar to view the full image. The original image is sized 614×441.


Injector:

This image has been resized. Click this bar to view the full image. The original image is sized 627×469.

Source code: 
Work in progress, just cut and paste into the arduino ide. Available from here

Read more from the General Gas Tips, More MPG, Random Gas Stuff, hypermiling category. If you would like to leave a comment, click here: . or stay up to date with this post via RSS, or you can Trackback from your site.

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

1 Comment so far
  1. Know Your Gas Mileage : Gas Saver Guide November 24, 2008 12:01 pm

    [...] at, then do the simple math at your next fillup. You may also go the semi cheap way and build a DIY MPG guage, or go the expensive way and buy a gas mileage guage (if you do this be sure to check eBay, [...]

Looking for Something?

Privacy Policy

Run Your Car On Water - Do It Yourself

My Book - Gas Saver Guide


Gasoline Prices

Archives

  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008

Blog Topics

  • Alternative Fuel Sources
  • Cheap Gas Tips
  • Gas Scams
  • General Gas Tips
  • hypermiling
  • More MPG
  • Random Gas Stuff
  • Site News
  • Uncategorized

Latest Posts

  • DIY - Convert Lights to LEDs for Less Electrical Use
  • Learn More About HHO Gas Conversion Kits: An Alternative Fuel Source
  • The Time to Test
  • Installing a HHO Kit for More MPG
  • More MPG - Find the Best Route

My Friends

  • DWI / DUI FAQ

  • Offbeat News

  • Free Blog Posts

  • iPod & iPhone News & Reviews
  • © Copyright Gas Saver Guide - Designed by Speckyboy. Brought by Wordpress Themes Header Design by Free Web Icons