Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 02-02-2009, 12:07 PM   #801 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
02/02/2009
updates for v0.75

added the instant gph fix per fx57.

10/01/2008
updates for v0.74

added a small serial transmitter function. The guino now outputs the following data over the serial port at 9600 baud every half second:
instantmpg,instantmph,instant.injHius,instant.injP ulses,instant.vssPulses

So "realtime" laptop/cellphone integration should be a snap if your guino has a usb/rs232 connection or you can build one and you can gather the data on the laptop/cellphone. This also has applications for remote displays.

I also added a #define usedefaults so that you can build the guino without a lcd if you intend to only use it with a laptop/cellphone. It will simply skip the setup screen/loading of eprom values.

Since all the interesting data is already going over the serial port now, I removed the debug ifdef branching.

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

previous updates

__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 02-08-2009, 07:58 PM   #802 (permalink)
EcoModding Apprentice
 
americasfuture2k's Avatar
 
Join Date: Nov 2008
Location: edmond, ok
Posts: 118

SLOLANE - '08 Chevy (Daewoo) Aveo5 SV
90 day: 30.55 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
what line of code would i need to change to have a custom boot up message? "like all your base are belong to us"
__________________
If you cant fix it with a hammer, then you have an electrical problem



http://www.cardomain.com/ride/3159589


shutup, im working on it
  Reply With Quote
Old 02-08-2009, 10:15 PM   #803 (permalink)
Master EcoModder
 
McTimson's Avatar
 
Join Date: Sep 2008
Location: Nyack, NY
Posts: 310

Maverick - '22 Ford Maverick XLT
90 day: 40.31 mpg (US)
Thanks: 1
Thanked 5 Times in 5 Posts
Do you want to change the opening screen where it says 'OpenGauge MPGuino v.xx"? If so, just search the code with a text editor for opengauge, and it should come up. It's around line 300 or so.
__________________
  Reply With Quote
Old 02-08-2009, 10:24 PM   #804 (permalink)
EcoModding Apprentice
 
americasfuture2k's Avatar
 
Join Date: Nov 2008
Location: edmond, ok
Posts: 118

SLOLANE - '08 Chevy (Daewoo) Aveo5 SV
90 day: 30.55 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
ok, thanks!
__________________
If you cant fix it with a hammer, then you have an electrical problem



http://www.cardomain.com/ride/3159589


shutup, im working on it
  Reply With Quote
Old 02-10-2009, 12:41 AM   #805 (permalink)
EcoModding Apprentice
 
americasfuture2k's Avatar
 
Join Date: Nov 2008
Location: edmond, ok
Posts: 118

SLOLANE - '08 Chevy (Daewoo) Aveo5 SV
90 day: 30.55 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
so what fuel injector low do i go after on my 08 since its obd ii and that has individual injector control? of course that is just at low rpms, which is what i will be in most of the time. or is it individual control in low like idle low rpms?

EDIT: also, what do i need to change to have my greeting message stay on a bit longer??
__________________
If you cant fix it with a hammer, then you have an electrical problem



http://www.cardomain.com/ride/3159589


shutup, im working on it

Last edited by americasfuture2k; 02-10-2009 at 01:38 AM..
  Reply With Quote
Old 02-10-2009, 02:38 PM   #806 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Code Question

I'm trying to track down why, when I'm coasting and the injectors are shut off, I see GPH rise to a very large number.

In this routine in v0.75:

Code:
void processInjClosed(void){      
  long t =  microSeconds();
  long x = elapsedMicroseconds(injHiStart, t)- parms[injectorSettleTimeIdx];       
  if(x >0)
    tmpTrip.injHius += x;       
  tmpTrip.injPulses++;      

  if (tmpInstInjStart != nil) {
    if(x >0)
      tmpInstInjTot += x;     
    tmpInstInjCount++;
  } else {
    tmpInstInjStart = t;
  }
  
  tmpInstInjEnd = t;
}
The variables t and x are declared as 'long'. Yet the functions being assigned to those vars are declared as 'unsigned long'. I am not familiar with how this compiler resolves assignment of dissimilar values. Will this introduce an error?
  Reply With Quote
Old 02-10-2009, 08:57 PM   #807 (permalink)
nut
 
Coyote X's Avatar
 
Join Date: Dec 2007
Location: Southen West Virginia
Posts: 654

Metro XFi - '93 Geo Metro XFi Convertible
90 day: 62.17 mpg (US)

DR650SE - '07 Suzuki DR650SE
90 day: 55.26 mpg (US)
Thanks: 0
Thanked 37 Times in 26 Posts
Send a message via MSN to Coyote X
I put on .75 last night and saw it reading incorrectly today on my way to work. I put .74 back on there for now. I will look at the code tonight and see if I can figure something out. If not then I am sure someone will fix it soon.
__________________


  Reply With Quote
Old 02-10-2009, 09:43 PM   #808 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
can you clarify? What vehicle? What adaptations? What was broken?
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 02-10-2009, 11:08 PM   #809 (permalink)
nut
 
Coyote X's Avatar
 
Join Date: Dec 2007
Location: Southen West Virginia
Posts: 654

Metro XFi - '93 Geo Metro XFi Convertible
90 day: 62.17 mpg (US)

DR650SE - '07 Suzuki DR650SE
90 day: 55.26 mpg (US)
Thanks: 0
Thanked 37 Times in 26 Posts
Send a message via MSN to Coyote X
it is reading the gallons per hour incorrectly sometimes. It was showing me using 12 gallons per hour at idle sometimes and sometimes reading correctly.

I am not able to see a pattern in the errors but something is making it seem like the duty cycle is reversed and the more throttle it gets sometimes the lower the gph reading.
__________________


  Reply With Quote
Old 02-10-2009, 11:36 PM   #810 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by dcb View Post
can you clarify? What vehicle? What adaptations? What was broken?
97 Audi A6 V6. Using Fundamental Logic MPGuino. No hardware adaptations. Getting VSS & fuel flow signal from the ECU.

VSS is dialed in, works perfectly. When first installed, the GPH and MPG were working in reverse, i.e. step on the gas and GPH goes down/MPG goes up. The fuel flow signal is a negative pulse so I reversed the FALLING/RISING and now GPH/MPG work the way I'd expect.

However, when I am coasting, not pressing the throttle, over a few display cycles, the GPH ramps down to zero and then back up to a really large value. Something like 30 GPH. And the MPG goes the other way to a very low value. When I step on the gas again, GPH immediately drops to a normal number and MPG rises.

I've confirmed with a scope that the ECU cuts off the injectors when coasting. The signal goes completely flat line. It's when that happens that I see the large GPH number.

I asked about the code because I'm wondering if a variable might be rolling over to a negative number that appears as a very large integer.

  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
My kingdom for a giant, heated workspace MetroMPG The Lounge 14 12-12-2010 10:08 AM
Motorcycle manufacturers beginning to release MPG info MetroMPG Motorcycles / Scooters 1 04-03-2008 06:23 PM



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