View Single Post
Old 04-26-2008, 01:04 AM   #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 267 Times in 210 Posts
gunio checkpoint 4/25/08

Open to suggestions and improvements, might need to trim down for 1.0

HARDWARE:
freeduino board and 2x16 display from nkcelectronics.com. Choose serial or usb freeduino to taste and to available ports on your computer (hint, a laptop compatable setup might prove useful in the early stages):

LCD ($9.99) :
** http://www.nkcelectronics.com/16x2-l...backli162.html

rs232 serial freeduino ($16.99) :
** http://www.nkcelectronics.com/arduin...omplete-k.html
OR
USB freeduino ($27.99) :
** http://www.nkcelectronics.com/freedu...elease-bo.html

Three button interface: scroll left, select, scroll right.
+ misc transistors/resistors ($8)

MAIN SCREENS:
Mainscreen
Line 1, top level trip and function
Line 2, scrollable list of selectable trip functions, + "Setup"

Setup
Line 1, Setup
Line 2, scrollable list:
** Go Back, configuration items list (many sub screens there), utilities

CONFIGURATION ITEMS:
injector settle time
number of injector pulses for 2 revolutions
number of vss tics per mile
injector flow rate
fuel tank size
contrast
brightness
fuel adjustment
distance adjustment
time adjustment (would just affect main loop)
vehicle weight (for auto-coastdown CDA computation and hp calculations)
top display (scroll through all the trips and functions and select the ONE to display on the top line of the main screen)
bottom display (scroll through all the trips and functions and select/unselect the ones to scroll on the bottom line of the main screen)

UTILITIES
follow onscreen directions

*Quick setup
** MPG, estimate your mpg at 50mph
** Injectors, hold 2000 rpm, press select, and hold 2000 rpm for 3 seconds.
** Distance, maintain 50mph, press select and hold steady 50 mph for 3 seconds.


*Compute CDA
** accelerate to 50, coast to 40 in neutral w/no brakes, decelerate to somewhere above 5mph and coast (neutral and no brakes) to a complete stop. If you entered the weight and other configuration items correctly you should see a pretty good approximation of your CDA. Repete and average.


AVAILABLE TRIPS
//trips
instant
current
trip1
tank


AVAILABLE TRIP FUNCTIONS
instant: mpg, mph, rpm, gph, update, reset
current: miles, gallons, hours, mpg, mph, rpm, gph, update, reset
trip1: miles, gallons, hours, mpg, mph, rpm, gph, update, reset, save
tank: miles, gallons, hours, mpg, mph, rpm, gph, dte, update, reset, save

** will need to update all the trips once a second. The time for all trips needs to be associated with computing when the "current" trip is over, i.e. no signals for 15 minutes. So if the end of the current trip is computed 15 minutes after the car is shut off, then 15 minutes will need to be subtracted from ALL the persistant trips (just tank and trip1 for now) before saving their state to the eeprom.


ERROR DETECTION
it is easy to go overboard in this category, but some thoughts:

*Pop up lcd messages for:
** cpu at 100% (i.e. no time left when we go to wait for the remainder of a second at the bottom of loop(), so the time tracking will be off).
** exceedingly short/long injector open times

pop up for a second (or whatever the refresh time is).

__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote