View Single Post
Old 04-18-2011, 05:11 PM   #30 (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
Quote:
Originally Posted by mcmancuso View Post
Are you planning on adding any code modifications like the rounder large font, the eeprom tank data save or others? Personally I'd also like to see a clock added, and a miles/time till empty
I can't speak for this project, but all of the above have been on my to-do list. I just haven't gotten to them between school (finishing up my EE AAS degree) and other projects I have kicking around.
Figuring out storing variables to internal EEPROM is my planned next step in development (see below).
Making a trip log on external EEPROM might be a little more involved (deciding what a trip is, formatting and storing the data, programming a way to read it back), but still on the list... I already have such a chip hooked up on my shield.
I have a DS1337 real time clock and backup battery all soldered up and ready to go on some strip board. I also got some DS3231M high-accuracy real time clocks as (free) samples from Maxim Semiconductor (yay for being an engineering student!), so i'll be playing with those at some point as well.
At this point, miles/time to empty should be a simple matter of figuring out the calculations and writing a text page to display them.

In addition to the above, I would like to depart from the MPGuino's always-on method by using a voltage regulator with an on/off lead such as the Sharp PQ05RD21J00H. These regulators have the standard Vin, Vout and Ground pins, plus a fourth control pin that shuts off Vout and puts the regulator in a very low power draw state. In our case, Vin would be constant battery power from the car, Vout goes to the 5V+ power bus of the MPGuino/MPGshield/(/Fork name TBD), replacing any stock regulator and Ground gets shared by the two voltage systems... This is exactly the same way the MPGuino and most Arduino systems are presently set up AFAIK. The difference is that fourth control pin.
When you switch the ignition on, the car's switched 12V+ would send 5V+ to the regulator's control pin via one of the typical resistor-zener pairs used for input conditioning on the MPGuino and MPGshield. The regulator kicks on and powers up the system. Part of the system's setup routine would drive high a digital output that feeds the regulator's control lead in tandem with ignition switched power (diode isolation would be used). Setup would continue on to read various variables (distance traveled, fuel dispensed, similar trip values and such) out of the EEPROM storage on the ATMEGA chip. For those of you who see where I'm going, the EEPROM memory is rated for way more read-write cycles than flash, so I don't see any problem using it this way and is actually preferable to somehow writing the variables to flash.
When the ignition is turned off, the switched 12V+ line to the regulator cuts off, but the system keeps the regulator active with its own line. The system would read that the ignition had been turned off either by a second line, or possibly by reading that fact over the driving regulator line (it would have to be an analog pin), and kick into a power-down routine. This routine would save any necessary variables into EEPROM, do any other power-down stuff that is needed, then let the regulator control line drop, shutting down the regulator and cutting power to the system.
  Reply With Quote