EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   Instrumentation (https://ecomodder.com/forum/instrumentation.html)
-   -   Analog MPG meter. (https://ecomodder.com/forum/showthread.php/analog-mpg-meter-5032.html)

jim-frank 09-09-2008 06:41 PM

Analog MPG meter.
 
1 Attachment(s)
Here's a block diagram of a pretty simple concept for an mpg meter. The concept is based on the soundcard mpg monitor program- divide the fuel injector pulsewidth into the mileage and use a scaling factor to get mpg.

I've built and tested the prototype circuits for the duty cycle to voltage converter, the frequency to voltage converter, and the signal processors, which are simple comparators. So far, so good; I get voltages proportional to duty cycle and frequency of signals generated on my workbench.

I have a schematic for a simple PWM/analog division circuit that I plan to prototype in the medium future. The whole circuit should be easy to implement with a quad opamp chip, a 555 timer, and a voltage regulator chip plus a handful of discrete components.

If anyone's interested, I'll post schematics of the circuits as I build and test them. It would be nice to be able to read mpg on a simple tachometer style meter without having to lug my notebook computer around...:eek:

dcb 09-09-2008 09:57 PM

Hi Jim, have you had a chance to check out the mpguino? It could be assembled bare bones for less than $7 sans LCD and programming support, and only has a handful of components, and can drive an rpm type gauge with just some more code.

I've been entertaining adding a tach like mpg display to it for a while now.


You can think of the mpguino as a really tiny laptop :)

jim-frank 09-10-2008 11:35 AM

Sure, I've been following the mpguino thread for a while. I just wanted to do an analog design as a design excercise. I didn't realize a guino cold be that cheap- I was under the impression that it would be somewhere over $60 or so...

But I haven't checked back there in a while, either.

pasadena_commut 09-10-2008 11:48 AM

Where and how do you plug in a lead to pick up the fuel injector drive voltage?

Gregte 09-10-2008 12:02 PM

Quote:

Originally Posted by pasadena_commut (Post 60293)
Where and how do you plug in a lead to pick up the fuel injector drive voltage?

I did it on my GMC sonoma 4 cyl. by finding the correct wire on the ECM under the dash. You can just use one of the two wires of any fuel injector. One of them will be hot when the engine is running and the other will be switched, i.e. pulled to ground by the controller. It will be a square wave with a varying duty cycle that varies depending on how much fuel is being asked for. It will not be a varying voltage in the direct sense but can easily be turned into a varying voltage for feeding to a comparator or anything else you wish to do with it.

dcb 09-10-2008 12:12 PM

re: guino costs. The chip itself is like $4, add a couple zener diodes and a regulator/caps/resistors. There is a schematic in this thread. You can leave off the LCD and Buttons but it will be tricky to calibrate.

http://ecomodder.com/forum/showthrea...html#post32427

pasadena_commut 09-10-2008 12:26 PM

Quote:

Originally Posted by Gregte (Post 60298)
I did it on my GMC sonoma 4 cyl. by finding the correct wire on the ECM under the dash. You can just use one of the two wires of any fuel injector. One of them will be hot when the engine is running and the other will be switched, i.e. pulled to ground by the controller. It will be a square wave with a varying duty cycle that varies depending on how much fuel is being asked for. It will not be a varying voltage in the direct sense but can easily be turned into a varying voltage for feeding to a comparator or anything else you wish to do with it.

I was hoping to patch in right at the injector, since it is much more accessible on my cars than is the controller. However, I have not had any success in locating a test "tap", that could be plugged in between the cable and the injector. There are places that sell the "cable" side connector, but nobody seems to carry the "injector side" connector. The only other way I can see in is to strip a small section of the cable to gain access to the wire within, and for future reliability reasons, I would rather not go that route.

jim-frank 09-10-2008 05:24 PM

I used a tap splice connector. It's a plastic doo hickey that you clip over the wire to be tapped into, and insert the tapout wire into a little hole. Then you crimp it down with a pair of pliers and you're done. I did this at the wires to injector number one.

dcb 09-14-2008 06:23 PM

There's been some interest in an analog gauge lately here so I thought I'd put an example together. I've only run it on the bench, but it is a couple lines of code to spit out the current mpg (or whatever) on pwm pin 11.

I found a donor meter:
http://opengauge.org/diympggauge/analog/pic1.JPG


Took it apart, pried off the label plate:
http://opengauge.org/diympggauge/analog/pic2.JPG

Scanned in the plate and doctored it up in paintbrush:
http://opengauge.org/diympggauge/analog/analog.GIF

Printed out the new label and carefully cut it out (used plate as template):
http://opengauge.org/diympggauge/analog/pic3.JPG


Glued the new label to the original label plate w/rubber glue, and glued the plate back with rubber glue. Hooked it up with a 4.7k resistor to pin 11 and ground.

slapped a test program together and played with maxv till I found a good value for full scale deflection. (had to swap meter leads when needle tried to move backwards)
http://opengauge.org/diympggauge/analog/pic5.JPG

Code:

void setup(){
  pinMode(11,OUTPUT);
}
#define maxv 120
void loop(){
 analogWrite(11,0);
 delay(1000);
 analogWrite(11,maxv/2);
 delay(1000);
 analogWrite(11,maxv);
 delay(1000);
}

Confirmed that half scale deflection looked good also:
http://opengauge.org/diympggauge/analog/pic4.JPG

Making the new labeling was the hardest part :D

ac7ss 09-14-2008 07:16 PM

Once calibrated, you could easily use just the meter to show instant MPG. I think I will do that on one of mine.

dcb 09-14-2008 09:09 PM

Ok, married the meter to a MPGuino for a road test, piece of balsa/hot glue, my fave :)

http://opengauge.org/diympggauge/analog/pic6.JPG
http://opengauge.org/diympggauge/analog/pic7.JPG
http://opengauge.org/diympggauge/analog/pic8.JPG

OBSERVATIONS:
1. The refresh rate of 1/2 second makes the meter seem very un-analog. While having a refresh rate works well with an LCD (gives you a chance to read it), the analog gauge should probably be updated with every injector pulse and the average 1/2 second of speed.

2. It needs a backlight.

3. It was a bit bouncy with the road, one of those aftermarket tachs might make a better in-car meter for this sort of thing (might even have a backlight).

So room for improvement certainly, and an instant mpg without a trip mpg is of dubious value unless you are a complete hiway star. But it is certainly a doable thing with very little hardware.

wyatt 09-19-2008 11:38 AM

Multi-Meter able?
 
That's really cool! Would this be the type of thing you could make it a "multimeter", and have a bunch of different things able to be displayed by simply moving a switch/dial? Ex, Instant MPG, Current MPG, and RPM and Gallons Per Hour on a Four way switch. You may have to make a quite complex display depending on how many things you could switch between and what those things would be, but it would be cool!


All times are GMT -4. The time now is 01:31 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com