MPGuino
From EcoModder
Still messing around, go to post 1 for the latest for now:
MPGuino Page
Contents |
Assemble the Electronics
If you are using the kit refer to http://spiffie.org/kits/mpguino/assemble.shtml Other wise follow the Schematics.
Here are the schematics. This should be enough for most of you. There are two assemblies that are possible to build. The Arduino or the IDuino.
Notes:
- The only inputs are leads for the VSS and the injector, and a 12vdc supply, that is it.
- The Analog pins in this schematic show 0-5 are used as digital I/O, therefore, Analog pin 0 is Digital pin 14 then count up from there.
- After assembly, use the Mpguino_tests to verify your interface wiring.
Arduino Assembly Schematic
IDuino Assembly Schematic
comment3, http://www.poetryireland.ie/forum/member.php?u=782 buy viagra, abvx, http://www.agriculture.gr/forum/member.php?u=865 cheap viagra, 131, http://www.forum.hr/member.php?u=203859 buy viagra, vnqt, http://www.agriculture.gr/forum/member.php?u=863 online cialis, 8P,
2ZMm2r <a href="http://cptvxkiweejg.com/">cptvxkiweejg</a>, [url=http://vcivrtjfhhei.com/]vcivrtjfhhei[/url], [link=http://fkkoalygoefi.com/]fkkoalygoefi[/link], http://cuizxqzoqmos.com/
Table of Car Settings
If you have mpguino data for your car, add a line for it here (by year/make/model)
| Car Year Make Model | Engine | Transmission | VSS (count/mile) | usec/gal |
|---|---|---|---|---|
| 1989 Chevy Celebrity | 3.1 | 4 spd auto | 4002 | 0252000000 |
| 1989 Pontiac Grand Prix | 3.1 | 4 spd auto | 4000 | TBD |
| 1990 Mitsubishi Eclipse GST | 2.0 litre | 5 speed | 16364 | 126180393 |
| 1990 Toyota Camry LE | 2.0 Liter (3S-FE) | Automatic | 8396* | 1584108048* |
| 1991 Geo Metro Xfi | 1.0l | 5 Spd. | 8208 | 0488554960* |
| 1992 Mazda B2600i | 2.6L | 5 spd Man | 8390 | 0208212230 |
| 1992 Plymouth Acclaim | 3.0L | 3 spd auto | 6000 | ? |
| 1992 Pontiac Trans Sport | 3800 | 4 spd auto | 8005 | 0178435000 |
| 1994 Suzuki Swift GA Sedan | 1.3L DOHC | 5MT | 7880* | 0468436463* |
| 1995 Acura Integra LS 2DR | 1.8L DOHC | 5MT | 8188 | 0201012289* |
| 199X Jeep Wrangler** | 4.0 Liter | Manual | ???? | ???? |
| 1997 Saturn SL2,SC2,SW2,S2 | 1.9 | 10000 | 0289967320 | |
| 1998 Metro | 8208 | 0500000000 | ||
| 1999 Ford Escort ZX2 | 2.0L ZETEC | 5MT | 16000* | 0284210526* |
| 2003 Nissan Xterra XE | 3.3L | Automatic | 4100 | 175566524* |
| 2005 Subaru Impreza Outback Sport, 2.5RS | 2.5L N/A | 5MT | 8000 | 183165000* |
(*)Calibration still under way. (**)The infamous 1996 Jeep Wrangler was never produced. Jeep did not manufacture a Wrangler for that Model Year. It was cut off in 1995 and resumed in 1997. 1986-1995 Wrangler YJ's had Square Headlights, and in 1997, they went back to round headlights, if that helps the owner distinguish which model year they have.
Troubleshooting/FAQ
Will unplugging the ECU of my vehicle mess anything up?
No, granted you make sure you restore the original connections/plugs.
Do I need to disconnect the negative terminal of my battery before connecting the MPGuino to my vehicle?
It is generally a wise idea to do so when working with any vehicle wiring or power, as is the case with this project.
What if my LCD text is messed up?
First, try power cycling the unit. Unplug the power source, wait 20 seconds, then plug it back in. Make sure the jumper is correctly placed for the power source that you are using. You can also try simultaneously pressing the left and right buttons in order to reinitialize the LCD.
When connecting the injector lead to the MPGuino, do I need a signal from each injector?
No, you only need one injector signal. Make sure it is the 0V side of the injector that receives the ECU signal.
Can I use any LCD, or am I stuck with the one in the parts list?
You may use another LCD, but the connections and source may have to be changed in order for the LCD to function properly. It is best to stick with either the green LCD or the blue LCD. A number of users prefer the Green LCD as it has less glare in daylight, but others like the looks of the blue one.
What power source should I use for my MPGuino?
You should tap into battery. In other words, you don't want switched power (i.e., power that is only on when the key is turned). A couple of places to start would be the power and ground leads of the ECU or the non-switched power of your stereo head unit. Consult wiring diagrams or documentation for more details for your specific vehicle.
What are good starting values for VSS pulses per mile and injector uSeconds/gallon?
For the injector numbers, please look at this post. The injector number can be fine-tuned after comparing the gallons displayed on the MPGuino with the actual gallons used to fill up. Repeat for a few fillups to get a more accurate reading. Multiply or divide the usec/gallon by the factor you are off in order to fine-tune the number. For the VSS, start with a multiple of 8204 for foreign cars and 10000 for GM vehicles. In order to get a more exact number, you need to calibrate it based on a known distance and multiply (or divide) by the factor that you are off. Repeat until you are satisfied with the accuracy.
Why is analog pin 0 labeled as digital pin 14?
They are one in the same. digital pin 14 is analog 0, digital pin 15 is analog 1, and so on.
Can this be used on a carbureted engine?
See this post or this thread for more information.
SW Release notes
Here are the latest release notes as of this writing. Get the latest SW from opengauge.googlecode.com
9/20/2008 updates for v0.73
added large comment about only running on arduino 0011 to top of program
fixed strange instant bignum eoc display
added VSS Delay ms setup parm (default to 2, can set to 0 but distance accuracy may suffer)
added "move to next field" in editor, press left and right simultaneously to move to OK, XX, first digit.
replaced RPM with GPH on custom screen, more universal.
Updated eprom loader/saver. Keeps track of number of parameters in eprom so a new version can default new setup parameters.
updated addEvent to just call the event if time parameter is 0
9/10/2008 updates for v0.72
to get to setup, use left and right buttons now. No middle button there, so less accidental resetting of current or tank trip.
Added eoc miles/Idle gallons screen after tank data. Tracked for current and tank. Layout: Current EOC Miles, Current idle Gallons Tank EOC Miles, Tank idle Gallons
removed raw screens
default contrast set for green display 95
Default to metro values, 500000000 us/Gallon, 8208 vss pulses/mile, 3 pulses/2 revolutions
instantmpg returns 999999 in eoc now
used ishi's formatter, and jmilk's brightness suggestion to get it to fit.
sketch 14104 bytes, 303 bytes ram free, cpu %51
9/8/2008 updates for v0.71
1. Settled on 1/2 second average for vss. Metro is reasonably smooth now.
2. Added Custom screen as first screen with following layout. INSTANT MPG, MPH RPM, CURRENT MPG Tweak doDisplayCustom function to put different values if you like.
3. Added rpm (you have to get the pulses per 2 revolutions parm right)
4. Added instant gph function (not displayed by default)
Notes, instant mph is a small bit wobbly on the signal generator and rpm also seems to read a bit high. But it is definitely an improvement.
I also had to ifdef out tons of stuff when in debug mode just to get the Serial library to fit. So bignumbers and parameter editor won't work in debug mode as-is.
sketch size: 13814 bytes, free mem 325, CPU% 52.42. We are for all practical purposes at the limit without a major re-write or some serious optimization and retest work, or an atmega328, or?
8/9/2008 updates for v0.70
More experiments with vss processing. Instant mph is very smooth on saturn but still jumps a bit on the metro. Distance reading on metro appears reasonably accurate (102.6 miles on odo, 102.18 on mpguino using 8208 vsspulses/mile). So the guino is doing a pretty good job of counting the vss pulses, it is a little erratic in timing the pulses though.
want to add EOC miles to the trip next, don't know if it will fit sketch size: 12884
8/1/2008 updates for v0.69
Added event handler and added debouncing on vss. Still trying to clean up reed switch vss signal via software with no luck. will make separate post for vss issue.
Added instantaneous mph (mpg is next), this looks at the time between vss peaks to determine the speed instead of the number of pulses in the last half second, which was jumpy at slow speeds. We are getting really really tight on space. That might also be an issue when 0012 comes out (don't know when).
8/1/2008 updates for v0.68
Removed all dependencies on timer0 so we should be arduino 0012 compatible. This also establishes an ISR under our control for scheduling events. Disabled Timer0 so use millis2(), delay2(), etc.
Knocked off a few hundred bytes by converting LCD to a namespace instead of a class.
7/10/2008 updates for v0.67
Incorporated LCD timings from Yoshi, removed pin 15 code and power up detection code.
moved source code to google/svn Revision 32: /trunk
other happenings: did a test with the scope regarding the voltage drop at peak pulse. I had the guino set a pin high and low within the interrupts receiving high and low and the pulse widths were the same except the generated one was perfectly square. So that is a good thing. Will need to test exactly what voltage level is acceptable.
The power supply on the scope died I think I just need a new TL431C or NTE999 though. I didn't get a chance to witness the vss bounce, the scope died during the attempt.
I am planning on moving all timing critical code to timer 2 with an event handler. I need real interrupt style debouncing for the vss and might as well use it as an event scheduler for debouncing the buttons as well as whatever else. This move will also allow for arduino0012 compatability.
6/27/2008 updates for v0.66
ADDED AN ONBOARD VARIABLE EDITOR!!! VARIABLES STORED IN EEPROM!! Now you can upgrade and not lose your settings and make adjustments in the car. Refer to post 1[/url] for screens and edit usage.
Updated screens descriptions in post 1
Checked source into sourceforge.net, linked post 1 to sourceforge (ran out of room again and wiki didn't like the extension .pde).
Sketch size 11734, 448 bytes free
6/26/2008 updates for v0.65
Added 7 minute activity timeout. It saves the state of the persistent trips (just tank for now) at the point of last activity and after 7 minutes of no injector pulses/vss pulses/or button presses, it turns off the LED backlight and sets up current to be reset and tank to be restored when activity resumes.
Despazed the buttons and Screen labels so they display for a second and accidental double button presses are minimized.
Running out of excuses (and room) to no do the user input/eprom setup screen thing Sketch size 10502 bytes.
6/23/2008 updates for v0.64
Fixed instant/tank screen (was displaying instant/current on that screen).
Improved LCD reinit on reprogram/reset. Can (usually) tell if LCD needs reinitializing. Press left and right buttons to force an LCD init if necessary. Want to free pin 15 for future tasks if it works well enough.
Added a bit of default verbiage to debug mode.
Working on a portable scope deal.
6/20/2008 updates for v0.63
Wrote 64bit arithmetic routines, yay no more messing with "ifs" when it should be math!
Noticed double vss count didn't make it in .62, fixed.
Subtracting 500uS from each injector pulse.
Added cli/sei around top of loop trip copy.
Made big font a smidgeon bolder.
Code updated, sketch size 9812, CPU 54%, free mem 602
