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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 04-05-2008, 09:36 PM   #1 (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
Turtle opengauge development: gunio technical considerations

The stand alone opengauge (aka MPGGuino, or guino for short), has a number of issues to consider:

Display:
1. [deleted my 8 bit ramblings, suggest using the 4 bit library that is being worked on:] http://www.arduino.cc/playground/Code/LCD4BitLibrary

2. Display Size.
Displays in general, the more the better. 20x4 would be my vote (or 1024x768), but I am only starting to understand the technical limitations facing a bigger display. But it should be at least as big as the arduino so we can hide the arduino behind it.

3. Display Interface.
[deleted interface stuff, 4 bit libraries look sufficient, moved flow to organization]

Development Environment
I like the ease of the arduino ide, and how it can drop down to AVR with relative of ease. I also like that there are a lot of people using it and posting solutions to real world problem. I also like the fact that it is free, and open source (so you can look and see how millis() is implemented) and the free version is not deliberately crippled.


Persistence:
The atmega specs list the 512 byte EEPROM memoy (where we will keep the trip data that persists when the atmega is turned off) as only allowing 1000000 writes, then apparently it turns to dust. This means we do NOT want to save the persistent trips once a second!!! One logical solution would be to save them when the key is turned off, but we will need a digital pin tied to ignition power to do that.

Trip Organization:
With only 512 bytes of persistent data storage, we need to think somewhat carefully about what we save from run to run. If we have a persistent tank trip and a handful of other trips, they should each take about 20 bytes, assuming a similiar structure as below, which means about 26 persistent trips maximum, that get updated when the ignition is switched off.

//things will start rolling over @ about 1900 hours
class Trip{
unsigned long seconds;
unsigned long injHi;
unsigned long injHiOverflow;//need more precision on the injectorHI time
unsigned long injCount;
unsigned long vssCount;
}

in the one second loop()...
make a copy of the instant trip and reset it
clear lcd
if(english)
print("MPG<TAB/>MPH<TAB/>MLS<TAB/>HRS");
else
print(something besides english);
go to next lcd line
for(int trip = 0; trip < NumLines; trip ++){
trips[trip].printData();
go to next lcd line
}

in Trip.printData(){ //functions handle conversions to english/metric
printConsumption();
printVelocity();
printDistance();
printTime();
}

add setup options to hide the header row, and to keep the instant trip row always viewable.

__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 04-06-2008 at 01:18 PM.. Reason: wrong url, the first one doesn't compile yet
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 04-06-2008, 05:46 AM   #2 (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
[deleted my 8 bit ramblings]

re: LCD hardware.
A bigger display would be nice, but the source we have for the freeduino only has a 16x2 offering for $10. http://www.nkcelectronics.com/16x2-l...backli162.html Simplified ordering is nice too.

Ok, I bought one of those 16x2 to play with. AND an $18 20x4 from http://www.sparkfun.com/commerce/pro...roducts_id=256
(100 or more= $14.36!!)
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 04-06-2008 at 01:11 PM..
  Reply With Quote
Old 04-06-2008, 05:50 AM   #3 (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
simple buttons?

Also want to look into simple to make touch sensitive switches: http://www.bytecraft.com/Touch_Sensitive_Switch


Code:
char touch_switch (void)   {
  pb_direction = output;
  pb.0 = 0;    // Discharge the pin     
  delay_Ms(1);          // Wait
  pb_direction = input; // Turn on the Constant current source     
  delay_Us(5);          // Wait for 5 u_seconds     
  if (pb.0 == 1) return (0);         // No touch detected     
  else return (1);         // Touch detected   
}
Ok, I'm going back to the palmpilot stuff. Just had to get all that out before I left atmega land for a while.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 04-06-2008, 06:01 AM   #4 (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
Last thing for now, thought this was kind of cool

the dCoreDuino
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 04-06-2008, 01:03 PM   #5 (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
Ok, it looks like all the action is on the 4 bit arduino library. Lots of people are working on that and the library compiled out of the box for me, and apparently it is supporting multiple lines and 20x4 displays. And it uses less pins than the 8 bit one:

http://www.arduino.cc/playground/Code/LCD4BitLibrary

It looks like the most promising solution at this point in time, better than the 8 bit solution.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 04-08-2008, 06:50 PM   #6 (permalink)
FuelSipper
 
Join Date: Mar 2008
Location: Dallas, TX
Posts: 99

HondaHokie - '95 Honda Accord DX 4 door
90 day: 26.91 mpg (US)
Thanks: 0
Thanked 8 Times in 3 Posts
Ladyada.net - Hooking up an LCD to Arduino

This is a howto from Ladyada.net for LCD's and *duino's. This should be helpful for us to learn the best methods.

http://www.ladyada.net/rant/2008/04/...to-an-arduino/
  Reply With Quote
Old 04-08-2008, 09:58 PM   #7 (permalink)
Batman Junior
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: 1000 Islands, Ontario, Canada
Posts: 22,530

Blackfly - '98 Geo Metro
Team Metro
Last 3: 70.09 mpg (US)

MPGiata - '90 Mazda Miata
90 day: 54.46 mpg (US)

Even Fancier Metro - '14 Mitsubishi Mirage top spec
90 day: 70.75 mpg (US)

Appliance car Mirage - '14 Mitsubishi Mirage ES (base)
90 day: 62.14 mpg (US)
Thanks: 4,078
Thanked 6,978 Times in 3,613 Posts
So, are you still thinking the 16x2 LCD mentioned in post #2 is the one to get? If so, I'll order one too. I'm a bit out of my depth, but I can at least be beta testing along side you guys.

Also, the Guino is boring with only a blinking LED to program.
__________________
Project MPGiata! Mods for getting 50+ MPG from a 1990 Miata
Honda mods: Ecomodding my $800 Honda Fit 5-speed beater
Mitsu mods: 70 MPG in my ecomodded, dirt cheap, 3-cylinder Mirage.
Ecodriving test: Manual vs. automatic transmission MPG showdown



EcoModder
has launched a forum for the efficient new Mitsubishi Mirage
www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 04-09-2008, 03:13 AM   #8 (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
I don't know 2 or 4. Ease of ordering vs more data display area. how about keeping gunio 1.0 simple and get the 2?

it isn't much to work with though, but it's cute

some examples, (the *'s are buttons outside the LCD area)
Code:
  INS 045mpg   mnu*  
 *< CUR 047mpg   >*

  INS 045mpg   mnu*  
 *< TNK 045mpg   >*

  INS 045mpg   mnu*  
 *< INS 2200rpm  >*
not married to it, just putting it out there as a starting point.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 04-09-2008, 09:06 AM   #9 (permalink)
Batman Junior
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: 1000 Islands, Ontario, Canada
Posts: 22,530

Blackfly - '98 Geo Metro
Team Metro
Last 3: 70.09 mpg (US)

MPGiata - '90 Mazda Miata
90 day: 54.46 mpg (US)

Even Fancier Metro - '14 Mitsubishi Mirage top spec
90 day: 70.75 mpg (US)

Appliance car Mirage - '14 Mitsubishi Mirage ES (base)
90 day: 62.14 mpg (US)
Thanks: 4,078
Thanked 6,978 Times in 3,613 Posts
Agreed: cheap & simple are good goals for 1.0.

I just ordered the 2x16 - came to $13.29 US including shipping to Canuckistan.

Your sample display interface looks good & makes sense. I like it.
__________________
Project MPGiata! Mods for getting 50+ MPG from a 1990 Miata
Honda mods: Ecomodding my $800 Honda Fit 5-speed beater
Mitsu mods: 70 MPG in my ecomodded, dirt cheap, 3-cylinder Mirage.
Ecodriving test: Manual vs. automatic transmission MPG showdown



EcoModder
has launched a forum for the efficient new Mitsubishi Mirage
www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Old 04-10-2008, 07:34 PM   #10 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2007
Location: Ventura, Ca
Posts: 112

Whoop's Wheels - '89 Honda Civic Wagovan
90 day: 39.09 mpg (US)
Thanks: 1
Thanked 9 Times in 7 Posts
Ok, I've got a couple of thought's, for consideration.

In thinking about it, if we are only looking to update the display or send out the serial data, once per second, then the code and hardware don't really need to sample either the speed, injector on time or frequency any more quickly. Consequently, the code could reasonably sample the speed for 10 cycles, average that and store it. The same thing is true for the injector on time and frequency. Statistically this would give us some pretty highly reliable intervals for calculation and display. It should also make the code pretty straight forward.

One request was for RPM to be displayed. In thinking about the above, the RPM can be inferred, largely, from the frequency of the injector pulse. The exception to this would be if the injector is not turned on, as it is not when my rpm is above about 1200 and I have my foot off of the throttle.

Third, one of the things I would like to have is the ability to see if my speed is going up or down and whether my fuel mileage is going up, or down.

On the display, it may turn out that we have to not update the screen, to frequently, as at some rate of change it may become jibberish.

Although I ordered my freeduino a week ago, I still haven't received it.

  Reply With Quote
Reply  Post New Thread






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