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


Reply
 
Submit Tools LinkBack Thread Tools
Old 05-16-2008, 12:34 AM   #61 (permalink)
MP$
 
Join Date: Jan 2008
Location: Ohio
Posts: 488
Send a message via MSN to diesel_john
Smile

The VSS signal from the transmission transducer on my '91 Ford is fairly weak. In fact, a couple months ago, the connector at the trans had gotten oil in it and that was enough to pull down the signal. I don't think i have a wire from the ECU to the speedo because i have a speedo cable too.


(Support Ecomodder.com & get rid of these annoying ads!)      
 
  Reply With Quote
Old 05-16-2008, 12:45 AM   #62 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Just FYI, the debug screens are accessible via the left right buttons now, as is a "Demo mode" if you press both left and right together once (cycles back and forth through pre-recorded data). So, the data is all there, it is just a matter of presenting it now (and you don't even have to get your hands dirty now). I don't know actually what mpg values it should be, but I'm guessing the end of the array data is 45mpg @ 25mph instant.

The other button combinations are:
middle: brightness
middle+left: Tank Reset
middle+right: Current Reset

The previous patched version debug screen may be out of date, so make sure to use the latest from post 1.
  Reply With Quote
Old 05-16-2008, 12:51 AM   #63 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
Way to go, dcb. Very cool to watch things unfolding.

I'm going to get in on the fun next week with mine.
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-16-2008, 03:34 AM   #64 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

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

So how do I have 64 bit math on the arduino without the 7k libraries. I can't declare one long long without running out of space. But need to do some accurate multiplying/dividing that would benefit from the extra bits. Does anyone know of any short and sweet 64 bit math routines handy that take less than 7000 bytes?
  Reply With Quote
Old 05-16-2008, 09:46 AM   #65 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Well, if I trim down my demo mode so it just uses constant values I can get the 64 bit library to fit (things start breaking before you get to the maximum), so we are officially tight on space and might even need to pare down a couple things, but nobody has to write and debug and integrate any 64 bit math routines for version 1.

Binary sketch size: 14030 bytes (of a 14336 byte maximum)

Last edited by dcb; 05-16-2008 at 10:34 AM.
  Reply With Quote
Old 05-16-2008, 11:05 AM   #66 (permalink)
EcoModding Apprentice
 
awillard69's Avatar
 
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105

Dakota - '00 Dakota Club Cab, Sport
90 day: 19.48 mpg (US)

Jeep - '01 Wrangler TJ Sport
90 day: 16.95 mpg (US)
That would be reason to evaluate your code and see if there are any optimizations that can be done, any old school tricks to eliminate instructions in the compiled code. May need to dig into the compiler to see if there any optimizations that can be leveraged there.

I'm not sure you will need the 64 bit data, you could get more than .1 variation from a signal (timing, weak/faulty unit, etc), so having resolution beyond one decimal may not be helpful and in this case detrimental to other features desired.

BTW, I just got my *duino and display. So, I'll get to assemble it and do my "Hello World" test. Something to do this weekend!

Also, I was thinking of putting together a simple circuit, something based on a few 555/556 chips to provide a generator for test signals (static injector and VSS pulse trains) to allow bench testing of the code without having to deal with the connect issues. I don't have a scope, so I'll have to rely on just the math for the apparent frequencies and pulse widths. Unless anyone has any other ideas...?
__________________

  Reply With Quote
Old 05-16-2008, 12:24 PM   #67 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
awillard: great - another beta tester signs up!

I believe the list of beta testers/second fiddlers now includes:

larrydag - '95 Honda Accord DX
myself - '98 Pontiac Firefly (Geo Metro)
andrewj - '94 Civic CX
mosier - ??
awillard69 - ??
Mr Clean - ??

And of course our fearless leader:

dcb - 97 saturn s2

Did I miss anyone?

dcb: I wasn't aware of the sketch size limitation. Way to squeak 'er in there.

The size challenge reminds me of the5k.org... which now sadly appears to be defunct. It was a great web site where contests were held to build the best web pages that came in under, you guessed it, 5kb. There was awesomely creative stuff there at one point. I'm sure there are other sites like it out there.
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-16-2008, 01:11 PM   #68 (permalink)
FuelSipper
 
Join Date: Mar 2008
Location: Dallas, TX
Posts: 88

HondaHokie - '95 Accord DX 4 door
90 day: 30.47 mpg (US)
I had the debug mode on this morning as I drove into work. I pretty much saw the same results. Injector %D would jump around from 0 to 40% approximately. Although it seemed to go to a very large whole number occasionally (23456 maybe)? I don't know if that is a bug or something. The C would just jump to 0.0, 0.1, 0.2. Don't know if that is accurate but sure doesn't look like an rpm. Maybe needs to be multiplied by 10000 in the code.

Nothing with VC. I'm thinking it might be the connection circuit because I definitely get a reading with the multimeter albeit a small one. I don't think the signal goes above 0.4-0.5 Volts. What kind of signal are we supposed to get with the VSS?
__________________
  Reply With Quote
Old 05-16-2008, 01:46 PM   #69 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
The "%D" tells me you don't have the latest and greatest. I would start with the latest code from post 1.

Last edited by dcb; 05-16-2008 at 08:08 PM.
  Reply With Quote
Old 05-16-2008, 05:59 PM   #70 (permalink)
EcoModding Apprentice
 
awillard69's Avatar
 
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105

Dakota - '00 Dakota Club Cab, Sport
90 day: 19.48 mpg (US)

Jeep - '01 Wrangler TJ Sport
90 day: 16.95 mpg (US)
Thumbs up

Quote:
Originally Posted by dcb View Post
So how do I have 64 bit math on the arduino without the 7k libraries. I can't declare one long long without running out of space. But need to do some accurate multiplying/dividing that would benefit from the extra bits. Does anyone know of any short and sweet 64 bit math routines handy that take less than 7000 bytes?
I couldn't wait for my board to get assembled, so I started playing with the latest code here at work.

I was able to shrink the sketch size from 7464 bytes to 6642 bytes (11% reduction) by just adjusting the data types used. For instance where you have
Code:
for( int x = 0; x < 10; x++ )
You can save space by converting it to
Code:
for( byte x = 0; x < 10; x++ )
It can be anywhere from 1 to 3 bytes, depending on system. Note: I cannot verify that any changes do not negatively impact the operation of the code itself.

Just changing the various loop control variables from "int" to "byte", I was able to reduce the size quite a bit.

Nextly, removing variables from the global scope has an even greater impact.

For instance, moving
Code:
int vsspinstate=0;
into the function where it is used saves 40 bytes! I think that maybe you planned to use it elsewhere, but are not currently. If you don't intend to use it, trim it completely and save the space altogether.

Now that I look deeper into the code, not that I understand everything you build so far, you are using some OO constructs (LCD and trip classes). You may also be adding overhead you don't expect and may gain some significant space by converting to structures and functions. Anecdotal perspective: there is no OO/C++ in the Linux kernel (per Linus) because of the overhead in complexity, size and speed - performance is critical. OO is for the programmer, not the processor/CPU.

Let me know if you want to see my modifications. Since you are up and running, you may be able to evaluate their "properness" better than I can at this point.

It's nice to be more than the sum of our individual parts - together we are stronger.
__________________

  Reply With Quote
Old 05-16-2008, 08:06 PM   #71 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
I see what you mean,
just going from:
unsigned long vssPulsesPerMile =14400ul;
to:
#define vssPulsesPerMile 14400ul

chops off 72 bytes! (was expecting 4 bytes)

I'm thinking though that 7000 bytes is just too big a penalty for 64bit math. The data is there, we just need to figure out how to scale it down to 32 bit math for display purposes, like in the mpg and gallons and miles functions.

edit: one thing with int vsspinstate=0; it gets destroyed if it isn't declared out of the scope of the interrupt handler, just remembered. If i declare it method static, it takes up just as much space as in global scope

Last edited by dcb; 05-17-2008 at 02:44 AM.
  Reply With Quote
Old 05-17-2008, 10:08 PM   #72 (permalink)
EcoModding Apprentice
 
awillard69's Avatar
 
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105

Dakota - '00 Dakota Club Cab, Sport
90 day: 19.48 mpg (US)

Jeep - '01 Wrangler TJ Sport
90 day: 16.95 mpg (US)
You might be counting transitions, from 0 to 5v, and 5v to 0.

So you have 5000 ticks per mile, what about the injector? How often and at what pulse duration?

I assembled by quino today, it was pretty cool. Fun to be doing that stuff again, but my eyes ain't what they used to be.

I haven't fully assembled a working configuration, because I had to run to the Shack to pick up some Zeners.

I used an old IDE cable to interface to the display. Just peeled off the 16 conductors, separated, stripped and tinned the ends, stuffed them into the holes on the board for the LCD. Then did the same for the other end, with a longer "pull back" for more flexibility, and tinned them. Looks nice. I might need to hot glue the ribbon to the back so it won't stress the solder connections.

I had to go scrounging thru my parts piles (more like bins, boxes, baggies, etc), looking for some perf board so I can setup my button interface and the input locations. I had some really nifty little switches that I scavenged from an old VCR some time ago - I knew I was keeping them for something!
__________________

  Reply With Quote
Old 05-17-2008, 11:08 PM   #73 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
I have a pile of parts to scavenge too. Thanks for the ribbon cable idea. It'll come in handy for me this week when I do my LCD hookup.
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-18-2008, 01:01 AM   #74 (permalink)
EcoModding Lurker
 
Join Date: Jan 2008
Posts: 14

grnsat - '95 SL1

metro - '95 Metro LSi
Got mine installed today. I have yet to get any usable mpg readings, but after an 8 mile trip I compared the guino and speedometer to get 9969 ticks per mile. After a 90 mile trip, I was less than .1% (yeah, 1/10th percent) off.. My VSS seems solid. My instantaneous mpg never went over 15 however, even when I decreased microsecondsPerGallon by a factor of 10.

I used a harddrive power connector to connect my car to the guino. Since we only need 4 wires, it seems to work great. An added benefit is you can use another hd power connector to power it on the bench.
  Reply With Quote
Old 05-18-2008, 04:11 AM   #75 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: Central New Mexico
Posts: 18

Bun - '02 Focus ZTS
90 day: 31.3 mpg (US)
Thumbs up

I just tested my guino today! I've been following the project for a while, but I haven't had the time to play until school let out last week. I'll post some pictures when I get my usb ports working.

I also noticed the low numbers on the instant mpg readout. My instant mph was fine. It also seemed that only speed affected instant mpg, not throttle. My instant raw injector time was usually 20000 to 26000 uS at light throttle. I did some quick calculations and noticed that gallons() would underflow to zero for the values typically seen in instant.

My fix for this:
Code:
unsigned long  Trip::mpg(){
  
  unsigned long mi=miles();
  unsigned long gal=gallons();
  if( injHiSec<4 ) // prevent overflow
  {
    gal = ((injHiSec*1000000000) + (injHius*1000))/(microSecondsPerGallon/1000); // 1e-6 gals
    if (gal==0) gal=1;//default to a millionth of a gallon so not division by zero
    return mi*1000000/gal; // 1e3 mi * 1e6 / 1e-6 gal = 1e3 mpg
  }
  if (gal==0) gal=1;//default to a thousandth of a gallon so not division by zero
  return mi*1000/gal; // 1e3 mi * 1e3 / 1e3 gal = 1e3 mpg
}
It seems to work fine on the simulated values. I have not yet tested this in the vehicle.

Other things I've noticed:
My injector line is low when the engine is off. The guino incorrectly counts this as injector firing.
When changing screens the banner text is hard to see because of the leftover text and symbols cluttering the screen.

I'm willing to help with programming this project.
  Reply With Quote
Old 05-18-2008, 09:06 AM   #76 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
Hi, Mr Cheap - welcome to the project.

What kind of car are you testing on?
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-18-2008, 09:08 AM   #77 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
Mosier - you too: what kind of car?

It would be useful if you guys make garage entries for your vehicles, just so we know at a glance at your posts what the context is.
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-18-2008, 01:07 PM   #78 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
That's really cool guys!! mr. cheap, instant is looking good. I'm still getting way too much consumption in the car (might be the low signal, might be the computer mixing up high and low, but it will get figured out). Mosier, I've got your microSecondsPerGallon figure in and it looks ok on instant. We need to get instant to do 999999 on an EOC. I'll update post one asap, but have exceeded the post size limit currently.

Actually someone suggested using wiki, I might just do that, then anyone can maintain it.

Oh, yah, disclose your car models, and some pics if you get a chance. Here is mine after taming the wiring (and doing the 12v hookup through the terminal block also):

Last edited by dcb; 05-18-2008 at 01:12 PM.
  Reply With Quote
Old 05-18-2008, 06:46 PM   #79 (permalink)
Captain Slow
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: Lunenburg, Nova Scotia, Canada
Posts: 6,033

Blackfly - '98 Metro
90 day: 78.69 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 128.28 mpg (US)
Quote:
Originally Posted by dcb View Post
Actually someone suggested using wiki, I might just do that, then anyone can maintain it.
We've got a wiki here on EM - haven't used it yet, but we could fire it up. Do you think it'd help?
__________________
Latest test: Minivan Kardboard Kammback boosts MPG +3.7% (6.6%, counting roof rack delete)

Latest mod project: designing/building front wheel skirts (Geo Metro)





www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 05-18-2008, 08:55 PM   #80 (permalink)
dcb
Master EcoModder
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 1,310

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)
Sure, I'll give it a shot if you are up for it. Send me what I need to know.
  Reply With Quote
Reply

Thread Tools


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


Vauxhall Car Insurance
Vauxhall car insurance is one of the cheapest out there. If you have a Vauxhall, see online for the best car insurance at uSwitch.com!



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC5
All content copyright EcoModder.com