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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-10-2008, 01:34 AM   #641 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: S Fla
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
This looks great, and I'm going to do it. The problem is that I have no experience at all with electronics. I figured out the schematic, and how everything is soldered together. I haven't soldered anything this small for years and years, though, so I am looking at buying the board preassembled. When I clicked on your link for the freeduino board, I saw the kit you are suggesting, and I also saw this one already assembled. Arduino Diecimila Item#: ARD-0020 for $33. I'd like to order it, but I'm not sure it's exactly the same as the one you suggest we use. Could someone please tell me if it's the same. I'd love to get my order in, but I'd hate to get the wrong thing because I got in a hurry.
Thanks, and sorry for taking up time with such a simple question. I looked for a customer service number on the site, but all they had was e-mail, and I thought I would trust an answer I got from you guys more than an e-mail response from someone who may be on their first day there.
Once I get it together, I'll get the values figured out for my car and put them in the wiki. It's a 1990 Honda crx hf.
Thanks again, Gas.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-10-2008, 02:43 AM   #642 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Home
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
9/8/2008
updates for v0.71
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?
Without serious optimization, I was able to push the code size to 13494, freeing another 320 bytes of flash. Mind you, this isn't tested on hardware, but I don't see any glaring reasons why this shouldn't work. Feel free to test.

36 Bytes - Brightness Fix (inverted brightness values, removed (255-")
Code:
byte brightness[]={255,213,170,127}; //middle button cycles through these brightness settings
34 Bytes - LCD/CGRam programming, removed nested loop
Code:
    for(byte x=0;x<40;x++)
        LcdDataWrite(pgm_read_byte(&chars[x])); //write the character data to the character generator ram
14 Bytes - Remove default value for char * r in bigNum()
Code:
  char * r;// = "009.99"; //"009.99" "000.99" "000.09"
38 Bytes - Various LCD opts:
Code:
namespace LCD(
...
  void LcdCommandNibble(byte value, byte delay);
...
);
  ...
void LCD::init(){
  delay2(16);                    // wait for more than 15 msec
  LcdCommandNibble(B0011000, 5 );
  LcdCommandNibble(B0011000, 1 );
  LcdCommandNibble(B0011000, 1 );
  LcdCommandNibble(B0010000, 1 );
  ...
void LCD::LcdCommandWrite(byte value){       
  LcdCommandNibble(value,0);
  LcdCommandNibble(value<<4,5);
}       

void LCD::pushNibble(byte value){       
  digitalWrite(DB7Pin, value & 128);       
  value <<= 1;       
  digitalWrite(DB6Pin, value & 128);       
  value <<= 1;       
  digitalWrite(DB5Pin, value & 128);       
  value <<= 1;       
  digitalWrite(DB4Pin, value & 128);       
}     

void LCD::LcdDataWrite(byte value){       
  digitalWrite(DIPin, HIGH);       
  pushNibble(value);      
  tickleEnable();       
  pushNibble(value<<4);      
  tickleEnable();       
  delay2(5);       
}
20 Bytes - changed gotoXY to gotoYX with default parms:
Code:
  void gotoYX(byte y=0, byte x=0);
(then change all occurrences, swap params and remove trailing 0s; gotoXY(0,1) becomes gotoYX(1); gotoXY(0,0) becomes gotoYX()) and optimize gotoYX (line 3 offsets 0x54, which can be achieved using binary)
Code:
void LCD::gotoYX(byte y, byte x){      
  byte dr=x+0x80;      
  if (y&1)       
    dr += 0x40;      
  if (y&2)       
    dr += 0x14;      
  LCD::LcdCommandWrite(dr);        
}
60 Bytes - introduced format1000:
Code:
char* format1000(unsigned long num){
  return format(num*1000);
}
(then changed four occurrences of format(x*1000) to format1000(x) ) and optimized doDisplay7:
Code:
void doDisplay7(void){      
  LCD::gotoYX();LCD::print("C%");LCD::print(format1000(maxLoopLength*100/looptime));LCD::print(" T");LCD::print(format(tank.time()));     
  LCD::gotoYX(1);LCD::print("FREE MEM: ");LCD::print(format1000(memoryTest()));      
}    //display max cpu utilization and ram.
118 Bytes - fixed bigNum and compressed data
Code:
byte bignumchars[]={0x44,0x21,0x44, 0x21,0x44,0x25, 0x43,0x23,0x24, 0x21,0x23,0x44, 0x54,0x52,0x44,   
                    0x24,0x23,0x43, 0x44,0x23,0x43, 0x51,0x41,0x54, 0x44,0x23,0x44, 0x24,0x23,0x44};

void bigPrint(char c, byte line=0, char suffix=' '){
  byte i;
  byte v;
  for(i=0;i<3;i++){
    v = bignumchars[(c-'0')*3 + i];
    if(line){
      v>>4; // shift high nibble low for second line
    }
    v &= 0x0f; // or mask out high nibble for first line
    // above code could have been "else", but that seems to cost 10 bytes!
    
    if(v==5) v=32; // turn 5s into spaces
    LCD::LcdDataWrite(v); // and out
  }
  LCD::LcdDataWrite(suffix);
}

void bigNum (unsigned long t, char * txt1, char * txt2){      
  char  dp = 32; 
 
  char * r;// = "009.99"; //"009.99" "000.99" "000.09" 
  if(t<=99500){ 
    r=format(t/10); //009.86 
    dp=5; 
  }else if(t<=999500){ 
    r=format(t/100); //009.86 
  }   
 
  LCD::gotoYX(); 
  bigPrint(r[2]);
  bigPrint(r[4]);
  bigPrint(r[5]);
  LCD::print(txt1); 
 
  LCD::gotoYX(1); 
  bigPrint(r[2],1);
  bigPrint(r[4],1,dp);
  bigPrint(r[5],1);
  LCD::print(txt2); 
}
320 bytes savings
Available before: 522, now 842.

We could save another 28 bytes (and more), if LCD pins would map to 4,5,6,7...
Code:
void LCD::pushNibble(byte value){
  PORTD = ( PORTD & 0x0f ) | ( value & 0xf0 );
}
  Reply With Quote
Old 09-10-2008, 08:08 AM   #643 (permalink)
EcoModding Apprentice
 
ptsmith24's Avatar
 
Join Date: Aug 2008
Location: Statesboro, GA
Posts: 177

El Camrino - '90 Toyota Camry LE
90 day: 32.47 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jmilk View Post
I'd be curious what you find. I tried EOC on my automatic (sigh) Kia on a stretch of country road, and it's just not feasible. Put tranny in neutral, turn key, and what you get is something that moves like an oil tanker. Interior lights come on (minor annoyance), steering is essentially gone, and brakes are abysmal. The vehicle won't start up again while rolling; has to be in Park and foot on break, so it's a no go for pulse & glide.

The brakes are fine for slowing to a stop if you apply them before killing the engine. I've taken to EOC red lights -- Neutral, brake, kill engine, coast/brake to stop; once stopped, put car in Park and ready for start.

(sorry for the OT'ness...)
My car will start in neutral while rolling. The reason I don't do it is because of damage I may be causing and not know about. I'm trying to just change one or two things each tank to see how it affects my mileage.
__________________
"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton, Jr

  Reply With Quote
Old 09-10-2008, 08:09 AM   #644 (permalink)
EcoModding Apprentice
 
ptsmith24's Avatar
 
Join Date: Aug 2008
Location: Statesboro, GA
Posts: 177

El Camrino - '90 Toyota Camry LE
90 day: 32.47 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by gasnmyveins View Post
This looks great, and I'm going to do it. The problem is that I have no experience at all with electronics. I figured out the schematic, and how everything is soldered together. I haven't soldered anything this small for years and years, though, so I am looking at buying the board preassembled. When I clicked on your link for the freeduino board, I saw the kit you are suggesting, and I also saw this one already assembled. Arduino Diecimila Item#: ARD-0020 for $33. I'd like to order it, but I'm not sure it's exactly the same as the one you suggest we use. Could someone please tell me if it's the same. I'd love to get my order in, but I'd hate to get the wrong thing because I got in a hurry.
Thanks, and sorry for taking up time with such a simple question. I looked for a customer service number on the site, but all they had was e-mail, and I thought I would trust an answer I got from you guys more than an e-mail response from someone who may be on their first day there.
Once I get it together, I'll get the values figured out for my car and put them in the wiki. It's a 1990 Honda crx hf.
Thanks again, Gas.

I'm using the preassembled board for $33.
__________________
"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton, Jr

  Reply With Quote
Old 09-10-2008, 08:34 AM   #645 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: S Fla
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, as soon as I get home from work, I'm ordering. I really need one of these. My last tank (admittedly only 111.2 miles) I tried a new technique and lost at least 5 mpg. I went from 48 mpg average to 43. I had also gone from 35 psi to 40 psi. It took me a week to find out what was happening. MPGuino------- Here I come.
  Reply With Quote
Old 09-10-2008, 09:09 AM   #646 (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
Thanks, J
Quote:
Originally Posted by jmilk View Post
Feel free to test.
I really do appreciate it, it would save me time/frustration if it were already tested, but not everyone has the hardware yet. I've got another page of stuff from ishi sans testing (has a an untested format function that saves a few hundred), I will keep these in mind as well.

Quote:
Originally Posted by jmilk View Post
We could save another 28 bytes (and more), if LCD pins would map to 4,5,6,7
I cannot introduce hardware changes at this point, not for 28 bytes anyway.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 09-10-2008, 09:45 AM   #647 (permalink)
EcoModding Apprentice
 
ptsmith24's Avatar
 
Join Date: Aug 2008
Location: Statesboro, GA
Posts: 177

El Camrino - '90 Toyota Camry LE
90 day: 32.47 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by gasnmyveins View Post
Thanks, as soon as I get home from work, I'm ordering. I really need one of these. My last tank (admittedly only 111.2 miles) I tried a new technique and lost at least 5 mpg. I went from 48 mpg average to 43. I had also gone from 35 psi to 40 psi. It took me a week to find out what was happening. MPGuino------- Here I come.
Keep in mind that you still have to solder a little bit (the misc. components, as well as the LCD). I hadn't soldered anything in quite some time (completely forgot) and I did OK. There are several tutorials out there to help you out. When you get a piece of perfboard for the transistor/diodes/resistors, get a large enough piece so you can practice in the corner a little bit before going all out on the LCD. Mine doesn't look pretty, but it's functional.
__________________
"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton, Jr

  Reply With Quote
Old 09-10-2008, 09:46 AM   #648 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Home
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
I really do appreciate it, it would save me time/frustration if it were already tested, but not everyone has the hardware yet. I've got another page of stuff from ishi sans testing (has a an untested format function that saves a few hundred), I will keep these in mind as well.
I'll see if I can put something together on protoboard. I should have all the parts. Just won't be connecting it to the car.

I think we can probably shave another 100+ by organizing the string resources. You know, replace the LCD:rint(getStr()) with LCD:rintStr() and remove duplicates.
  Reply With Quote
Old 09-10-2008, 09:48 AM   #649 (permalink)
EcoModding Apprentice
 
ptsmith24's Avatar
 
Join Date: Aug 2008
Location: Statesboro, GA
Posts: 177

El Camrino - '90 Toyota Camry LE
90 day: 32.47 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
The speed reading on my 'guino (after updating to v0.71) is still just as jumpy as before. The distance reading still seems accurate (to my odometer), so it's about the same as before.
__________________
"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton, Jr

  Reply With Quote
Old 09-10-2008, 09:59 AM   #650 (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
Just curious, what do you consider jumpy? Folks were seeing it drop 10mph on certain cars prior to 0.71.

__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  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