View Single Post
Old 03-18-2008, 07:14 PM   #34 (permalink)
LostCause
Liberti
 
LostCause's Avatar
 
Join Date: Feb 2008
Location: California
Posts: 504

Thunderbird - '96 Ford Thunderbird
90 day: 27.75 mpg (US)
Thanks: 0
Thanked 7 Times in 7 Posts
EcoMeter, EcoModder, eh? eh? I like to think of the important stuff first.

Before we all start hashing away at this in detail, we should agree on hardware. While open-source means open-ended, if we all work towards the same device then I think it'll be easier to collaborate. I think useful goals will be maximizing bang per buck and staying simple...

Hardware
*Arduino/Freeduino MicroController
*16 x 4 LCD Display
*4 surface mount buttons

The display is important for standalone functionality. 16 x 4 appears to be 40%+ cheaper than a 20 x 4. 4 surface mount buttons allow simple device interaction.

For tapping into the OBDII port later down the road, can someone post the pinout the ScanGauge uses? It looks like it uses a 4 wire telephone cord, so it can't be too complex.

Software
At this point, KISS...

The number one priority should be instantaneous MPG as determined with data from ECU injector output #1 and VSS. Once Inst. MPG is perfected, other details can be easily added. I think it's important not to take too big of a bite.

Conceptual Layout
We should also outline how this will be done conceptually. Here is my understanding.

Injector pulse width:
*Injectors are rated in cc/min
*The ECU sends out a digital signal of either 0V or 5V
---0V means closed, 5V means firing
*The arduino will sense the 0V, 5V states at one digital input
---The length of 5V state will determine injector pulse width
*The pulse width times the cc/min rating will give fuel consumed

Injector Pulse Width Diagram


VSS:
*VSS gives off an analog signal that varies between 0V and 5V
---i.e. 45mph shows a voltage of 3.13V
*The arduino will sense voltage at one analog input
*Voltage gives vehicle speed

VSS Diagram


Instantaneous MPG:
*(Fuel consumed over full pulse width [peak + trough] * # cylinders) / vehicle speed
---multiplied by whatever conversion factor desired (km/l, l/km, mpg)

__________________________________________________ _________

If this conceptual logic makes sense (voltage values are made-up, BTW), then the next step would probably be language logic. Since most of us aren't coders, developing the code in understandable terms first will help outline the software. The use of and, or, nor, not, if, then, else statements would probably help.

For example:
If pin 1 = 5V
then start counter
If pin 1 = 0V
then stop counter


Anyways, that's my logic

Lastly, for motivation?
A potential payout:
*Instantaneous MPG
*Trip MPG
*Fuel Consumed
*Engine Off %

Potential Layout


- LostCause
  Reply With Quote