View Single Post
Old 06-08-2009, 07:37 PM   #1 (permalink)
skelly
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 09: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)