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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 06-08-2009, 08:37 PM   #1 (permalink)
EcoModding Lurker
 
Join Date: Apr 2009
Location: Clarkston, MI
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Enhancements to MPGuino code -- bargraph display, etc.

I have been playing with the MPGuino code, and I've made a number of usability enhancements:
  • Enhanced large font -- see Code Hacks Wiki page
  • Store tank data in EEPROM -- never again lose your tank info if the MPGuino blanks out for some reason. The tank data is written to EEPROM when the unit goes to sleep.
  • Turn off LCD as well as backlight on sleep -- probably does not save any power or anything, but I just like having the display off when I'm not in the car.
  • Fuel cut indication on all screens -- get a visual indication that "fuel cut" is happening while you are driving in any display mode. If I am in the bargraph display or the "Big Current" display mode, I like to know if fuel cut is happening. I am just writing a lower-case "c" on the screen when the car is in motion and no injector pulses have been measured. (I've also implemented the fuel cut indication as an animated 'spinner'.)
  • Distance To Empty (DTE) big number display -- I have this working right now, but it is based on your tank economy. This means that when you reset the tank economy this value can flop around a bit and I personally don't like it. Needs some improvement.
  • Prius-like economy histogram (bar graph). Get a new bar representing fuel economy every two minutes. The oldest bar is all the way to the left. Here is a photo:


    The "C" value on the top is the "Current" economy and the "P" value on the bottom is the "Periodic" (two minute) value.

Other things I am thinking about:
  • Multiple vehicles, stored in EEPROM, and selected by the user (i.e. if you want to use the MPGuino in more than one car, and keep the configuration for both vehicles)
  • Selectable units for our smarter neighbors who use the metric system.
  • Bar graph display of tank history -- each time you reset the tank, add a new bar, and store this history in the eeprom. (intention would be to use this history for the DTE display too)
  • Visual warning (overwrite any display) when low DTE.
  • "eco" indication -- some kind of indication that your driving style is optimal for fuel economy. Maybe a special display pops up during acceleration from zero, that helps you keep your fuel consumption during acceleration in check. (thinking out loud)
  • User-configurable cost/gallon, and corresponding Current and Tank "cost" of fuel used. My brain in general responds better to dollar signs than it does to a fuel economy readout. Someone on the forum suggested something like this too.

Okay, the above is all fine and dandy. Now the bad news. The bargraph display will not fit into the existing ATMEGA 128 or 168. I bought a 328 (about $5), which has plenty of room, and I'm using it with Arduino-0015. More on the bad news side -- this represents a departure from the official project, which has moved away from the Arduino framework and is moving toward straight gcc. This raises the bar of entry for most casual hackers, who probably don't want to install gcc and take the time to get the project compiling.

The good news: I've made all of the features above available at compile-time, so you can turn on or off various features above until you run out of room. I will be tough, however, to get the bargraph display without upgrading to the ATMEGA328 (about $5).

All of that said, I have talked with dcb about these things, and in general I am making changes for my own benefit, and with zero regard for selling 'prebuilt' units with any sort of guarantee. I do, however, think that the changes I've made make the code more maintainable, and in most cases will reduce RAM and executable requirements.

I am not trying to be disruptive of the project. On the contrary, I'm trying to (and I am, in fact) help add value to the project. This is what I see as the *point* of open source. Open source has no guarantees. Use at your own risk. But also, the beauty of it all -- feel free to crack open the cover and poke around.

I offer up the above as an 'alternative' firmware based on version 0.75. It will not be in lock-step with dcb's changes. Obviously this work is all free of charge and the changes are donated back to the community.

I will figure out a way to post the source(s) if anyone is interested in such changes/features.


Last edited by dcb; 06-09-2009 at 10:51 AM.. Reason: update 'based on version' from 0.73 --> 0.75
  Reply With Quote
The Following User Says Thank You to skelly For This Useful Post:
baddriver (08-22-2009)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 06-08-2009, 09:55 PM   #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: 157
Thanked 266 Times in 209 Posts
It's good stuff, it just hasn't made it to the top of my list yet (and we hit the wall in arduino).

I think you would do well to just make a "Skellys arduino based mpguino mods" wiki page with the code embedded in it to cut and paste into arduino. I can add a pointer to it from the top of the pde file in googlecode for the adventurous sorts. And of course a pointer from the code hacks page.

Also, you might want to incorporate the changes for .75, some fundamental accuracy fixes in there, and of course keep an eye on the mpguino update thread if you are going to try to keep it current. This way I know there is a well tested version published on the main site, but there is a path forward the adventurers. I just can't personally help them much these days, and they are good at getting into trouble

Thanks,
Dave.

P.S.: the prebuilt does not come with any guarantees either, but I do try extra hard to make sure it works My reputation is worth something to me.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 06-08-2009, 11:45 PM   #3 (permalink)
Master EcoModder
 
McTimson's Avatar
 
Join Date: Sep 2008
Location: Nyack, NY
Posts: 309

BMW - '97 BMW 318ti
Team BMW
90 day: 32.45 mpg (US)
Thanks: 1
Thanked 5 Times in 5 Posts
I'm very interested in your code - the bar graph doesn't look too useful to me, as I'm pretty much always watching the screen anyway, so I at least have a general idea of how I've been doing. But, the storing of tank data, fuel cut indication, and DTE look very useful.

I think putting the code up on the wiki would be great, with some sort of disclaimer that adding all the extra code will take up more space, and may not fit on different Atmega chips.
__________________
  Reply With Quote
Old 06-09-2009, 09:28 AM   #4 (permalink)
EcoModding Lurker
 
Join Date: Apr 2009
Location: Clarkston, MI
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by dcb View Post
Also, you might want to incorporate the changes for .75, some fundamental accuracy fixes in there, and of course keep an eye on ...
Oops, yes, I did start with 0.75 and I've just updated my post to reflect that.

Let's think about the best way to store the source, as I've broken it into multiple source files:

Code:
"lcd.h"
"lcd.pde"
"mathfuncs.pde"
"mpguino.h"
"mpguino.pde"
"mpguino_conf.h"
I can use a wiki to post some photos of what to expect, and describe the feature or whatever, but I think it will be a PITA to store source there.
  Reply With Quote
Old 06-09-2009, 09:44 AM   #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: 157
Thanked 266 Times in 209 Posts
Quote:
Originally Posted by skelly View Post
I've broken it into multiple source files
Well that is an issue you created, don't know what to tell you, and don't want to make a huge debate about it either. It was one file when you found it though so that it was easy to load it into arduino (just cut and paste ONE thing, no download and navigating filesystem stuff). So there is plenty of precedent for not fragmenting it. There are PITAs in all directions.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 06-09-2009, 12:29 PM   #6 (permalink)
Dartmouth 2010
 
SVOboy's Avatar
 
Join Date: Nov 2007
Location: Hanover, NH
Posts: 6,427

Vegan Powa! - '91 Honda CRX DX
Team Honda
90 day: 66.52 mpg (US)
Thanks: 92
Thanked 114 Times in 82 Posts
Send a message via AIM to SVOboy Send a message via MSN to SVOboy Send a message via Yahoo to SVOboy
Looks like good stuff! I wish I was more near to my car to play around. Looking forward to what you do and how it is when I get home. Maybe when I get my second mpguino up I will compare side by side :P
  Reply With Quote
Old 06-10-2009, 11:58 AM   #7 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Ithaca, NY
Posts: 6
Thanks: 0
Thanked 5 Times in 3 Posts
More changes

I like the ideas for your mods. I'm actually thinking of other mods for my personal needs. I'm working on data logging capabilities so that I can analyze data on my PC. I'm installing an I2C eeprom on my IDuino board to store the data.

I realize this is blasphemy here but I also autocross my car (Honda Del Sol) so I also want to log my lap times so this will serve double duty. The last reason I want to log speed, etc. is for when my son borrows the car so that I can make sure he isn't getting stupid with it.

Doug
  Reply With Quote
Old 06-10-2009, 12:33 PM   #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: 157
Thanked 266 Times in 209 Posts
for the last one, not that I'm offering to write it, or that there is space for it, but you *could*, without using a separate computer:

1. initialize the guino with the odometer reading
2. have it track max speed (store it and odo in eprom)
3. have it reset max speed/update odo with password (up to 10 digit number for password would be easy)

So you can track max speed (or some sort of average) confidently, or your kid will figure out how to hack it, it's all good
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 06-10-2009, 02:43 PM   #9 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Ithaca, NY
Posts: 6
Thanks: 0
Thanked 5 Times in 3 Posts
Good ideas. I'm not worried about my kid hacking it. I don't even plan to tell him that it logs.
The next trick will be to get the CD down below .35...
  Reply With Quote
Old 07-21-2009, 03:12 AM   #10 (permalink)
EcoModding Lurker
 
Join Date: Jul 2009
Location: USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
skelly,
Where have you posted this code? I really wanted to check out distance to empty. I made a function for it, but it takes up too much memory and won't fit.
Thanks

  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1060 09-27-2016 11:56 PM
Newly assembled Spiffed Kit, Backlight but No Display osme OpenGauge / MPGuino FE computer 9 04-30-2009 07:26 PM
No display on MPGuino LCD, just backlight Wingmn OpenGauge / MPGuino FE computer 27 02-06-2009 07:27 PM
Got my MPGuino Working! Nevyn OpenGauge / MPGuino FE computer 0 12-07-2008 05:38 PM
Help w/ mpguino space shuttle code please forgottenmindset OpenGauge / MPGuino FE computer 14 09-07-2008 04:17 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com