View Single Post
Old 03-08-2011, 03:10 PM   #1 (permalink)
bobski
EcoModding Apprentice
 
Join Date: Jan 2010
Location: Newark, DE
Posts: 143

'91 CRX - '91 Honda CRX DX
90 day: 34.91 mpg (US)
Thanks: 0
Thanked 14 Times in 14 Posts
MPGuino shield: Fork? V2?

Hey folks.

I've been following the development of the MPGuino for a while now. It's a great little device, but I've had some complaints about the hardware and software design (what can I say? I'm an engineer ^_^). Since the software end only seems to be getting worse IMO (no arduino boot loader at all?), I thought I would take a crack at making a new version of both the hardware and software that incorporates some of the suggestions made here and is fully compatible with the current Arduino IDE.

So far, the hardware is functional in the form of a Freeduino through-hole solder kit board with '328 controller, a protoboard with a standard 16-pin character display connector (PWM backlight, potentiometer contrast), a 16x2 character display (which can be swapped out for other colors, larger character count, etc.), optoisolated injector and VSS inputs (no more playing with voltage divider resistors), four control buttons that use a voltage divider setup to occupy just one analog input pin, and an I2C port. I put an I2C EEPROM on the protoboard as well for the sake of trip logging, but I'm not that far along yet in the software department. That leaves digital pins 0, 1, 9 and 10 open, as well as analog pins 1, 2 and 3 for any future additions (temperature sensor(s), a pitot tube air speed sensor, automatic display dimming via a light sensor, whatever). Really, the sky is the limit if you consider the I2C bus. Since this is all mounted on a shield and Arduino compatible, its easy to swap in different hardware (such as a Mega board) if your development needs require it (driving a parallel graphic LCD or whatever).

On the software side, my compatibility goal means using existing libraries where possible so as to maintain compatibility with the widest range of hardware and to facilitate any user modifications and additions to the unit.

I'm only a couple of nights' work into the software, but the display's working (really just troubleshooting wiring and loading up liquidcrystal.h), it's reading the buttons, the interrupts for the injector and VSS are working and I have a functioning framework for switching pages and providing unique button functions for each page. That should lend itself nicely to hierarchical menu systems, confirmation dialogs and such.

For now, I guess I'll write some data display pages, hook it up to my CRX and give it a whirl.

I would like to *ahem* borrow the big numbers code from the MPGuino, but I'm not sure how compatible it is with the standard liquidcrystal library (to be honest, I haven't even looked at the code). If anyone's interested in helping out, a standardized port would be very useful.

I've never had a genuine MPGuino to play with, so if someone is willing to list the functions and information it provides, that could be useful for whipping up the first pages.

I'm open to suggestions, so long as you're willing to discuss and answer questions about them.

A few pics of the hardware and a vid of my button test page:
http://dl.dropbox.com/u/9882625/MPGuinoShield_0180.jpg
http://dl.dropbox.com/u/9882625/MPGuinoShield_0184.jpg


Links to previous and current versions of working code:
http://dl.dropbox.com/u/9882625/MPGshield_0.1.pde
http://dl.dropbox.com/u/9882625/MPGshield_0.2.pde
http://dl.dropbox.com/u/9882625/MPGshield_0.3.pde


Last edited by bobski; 04-20-2011 at 02:18 PM.. Reason: Updated with code links
  Reply With Quote
The Following User Says Thank You to bobski For This Useful Post:
firehawk618 (03-29-2015)