07-22-2007, 07:26 AM
|
#11
|
Registered Member
Join Date: Jan 2007
Posts: 771
|
Quote:
Originally Posted by sonyhome
Pretty cool ... but I don't quite understand your diode clamp interface you used.
Could you explain how you make it work?
You connected directly to the injector via a 10K resistor?
And then you grounded the signal via a diode bridge? Is that to avoid having signals above 0.6V? Don't understand...
|
the diodes are supposed to limit the max voltage going into the sound card, yes. The resistor is supposed to prevent the diodes from trying to clamp the vss and injector to .6 volts. The VSS side could use some work in my case.
Quote:
Originally Posted by sonyhome
And what's VSS for?
I though you'd use a coil to detect the pulses so the laptop would be totally independant from the car's electrical circuit...
|
To do Miles per Gallon, you need to know how many miles you have gone. A direct signal is much easier to parse than an induced signal in a coil. The resistor provides enough independance.
Quote:
Originally Posted by sonyhome
All you have to do now to compute duty cycle is count the number of samples above a threshold vs all the samples.
You may need to adjust with a constant, or adjusting the threshold since the ramp up slope is not vertical, but seems constant.
|
Yah, I just have a fudge number, there probably is a constant component to the injector pulse that could be factored in for greater accuracy.
*Note, if one were to add a "injectorPulseCount" field to the Trip class, and detect it like the vss pulses, then RPM and a constant value adjustment per pulse could be accomplished.
*also note that it is trivial to add more trips, like "trip 1", "trip 2", etc, and have them save to disk when the window is closed.
Here is the sample a mpg.properties file it creates in the current directory, you can tweak the thresholds and fudge factors (and even pipe in a .wav file of a recording of your probes):
#
#Sun Jul 22 11:13:47 CDT 2007
dummyFile=
tank.injHi=3984869
tank.vssTot=1076
fuelFudge=8000000.00
injThreshold=-30
vssThreshold=100
tank.sampleCount=3984876
distanceFudge=3200.0
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Car Talk & Chit Chat |
|
|
|
|
|
» Fuelly iOS Apps |
|
» Fuelly Android Apps |
|
|