diy mpg gauge - Page 3 - GasSavers.org - Helping You Save at the Pump
That's where I ran across the most comprehensive information.
I've attached the zipped file. It's a java application that uses a soundcard input to monitor injector pulsewidth and vehicle speed.
'java -jar Mpg.zip' is the command line that you must use to get the proggy to work. I put the zipped file on the desktop (win2K) and wrote a batch file called mpg.bat that contains the line above. The program will write a file called mpg.properties that contains the scaling factors to get correct vehicle speed and mileage figures.
You have to attach a resistor and clamping diode set to two places on the engine: the vehicle speed sensor, and the switched side of one of the fuel injectors. These inputs go to the right and left channel of a soundcard line input. The thread at gassavers.org has plenty of detail on how to approach this project.
I found the best way was to set the speed sensor scaling first, by comparing the speedometer with the program's reported speed. I used a GPS receiver actually, as it is more accurate than my speedo in the car.
Then keep the program running while you take a nice long drive- maybe half a tank of gas or more. Calculate the gas mileage in the usual way, then compare to the program, and tweak the scale factor.