05-21-2008, 05:12 AM
|
#121 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Quote:
Originally Posted by awillard69
Then, I need to start my input generator. So, I need some basic data:
How many pulses from the injector at 30 MPH, and at what duration?
How many pulses per mile at 30 MPH?
|
Dunno, gotta do the math, depends on the vehicle. my saturn=5000 vss pulses per mile, maybe 80milliseconds per pulse at 1800rpm/40mph. 4 injector pulses per 2 revolutions.
It did occur to me that a number of folks have more than one arduino. It occurs to me that an arduino generating fake vss and injector signals for a mpguino would be an inexpensive and flexible test bed, as opposed to 555s.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
05-21-2008, 08:28 AM
|
#122 (permalink)
|
EcoModding Apprentice
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105
Dakota - '00 Dodge Dakota Club Cab, Sport 90 day: 18.57 mpg (US) Jeep - '01 Jeep Wrangler TJ Sport 90 day: 18.46 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
|
At this point, I have only the one Arduino, but a handful of 555's. They only require a few resisters, capacitors and a calculator and you can make it generate a steady stream of pulses.
That's my situation, anyway.
__________________
|
|
|
05-21-2008, 11:46 AM
|
#123 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
That's cool, the soundcard in a pc can probably generate signals down to 10hz too.
But your idea of an external signal generater has got me thinking, It actually might be worth the effort to build a dynamic test device that could run different profiles and have the guino spit out the lcd data out the serial port, and have the test device confirm that the serial data looks right (aka regression test).
Here is what an acceleration profile might look like, roughly:
, so the testing device would run this through the guino, and see if the current/tank trips looks right when it is done. Also the static inj and vss pulses would be checked on the instant data at various spots. But it would be easiest to implement it with another duino.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
Last edited by dcb; 05-21-2008 at 12:04 PM..
|
|
|
05-21-2008, 11:54 AM
|
#124 (permalink)
|
EcoModding Apprentice
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105
Dakota - '00 Dodge Dakota Club Cab, Sport 90 day: 18.57 mpg (US) Jeep - '01 Jeep Wrangler TJ Sport 90 day: 18.46 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
|
The nice thing about the static generation, you can use it to calibrate if you are aware of a slippage or deviation in a calc - known fixed input should generate a known, fixed output.
Your idea of the different profiles would support a more Arduino-based perspective. Then you could code in profiles like start, acceleration, running, coasting - something that more closely represents a "real world" experience.
I claim the "version 1" clause then on the simple calibration with a simple fixed rate for the device. Can it produce an accurate display with a fixed set of inputs? That way there is a baseline from which to adjust/adapt the overall solution.
Thinking forward to v1.5+ a more broad testing input may make more sense. At least it would be a constant, not varied based on a individual auto setup or scenario.
It would not be a replacement for real world validation, but hopefully get it closer before the real world intervenes - I'm thinking Murhpy here!
__________________
|
|
|
05-21-2008, 08:24 PM
|
#125 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
just FYI, the last release had the mph as 1/2 the correct value. Everything else looked good though (trip distances). A side effect of cutting the refresh rate to half a second for sure. Will update the code shortly. Metro, you are correct, it does look a lot more "instant" at the shorter refresh rate, made a big difference
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
Last edited by dcb; 05-21-2008 at 08:30 PM..
|
|
|
05-21-2008, 08:37 PM
|
#126 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Quote:
Originally Posted by diesel_john
for a dummy vss signal, iwould use a junk yard vss sensor, connected to a dremel or 12v motor with a piece of rubber hose.
|
Just curious, how would you press the buttons in dummy mode?
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
|
|
|
05-22-2008, 03:28 AM
|
#127 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Well, I don't know about all y'all, but I think I might just have a useable mpg gauge here
This looks like a reasonable place to regroup. Can we get a status check from everyone with hardware when you get a chance? I'd like to know if you are hung up on the build or the installation, or if you have it installed but have signficant issues, or you just need to tweak a few things to make the readings look accurate.
The next two most important things I can think of are:
1. be able to modify the parameters in the car and save, then load them automatically!!!
2. go for more accuracy on the instant display:
* keep track of the last injector pulse width
* keep track of the last time between injector pulses
* keep track of the last time between vss pulses
Lets hear from y'all. I'm gonna take a few days off in the mean time.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
Last edited by dcb; 05-22-2008 at 04:11 AM..
|
|
|
05-22-2008, 10:54 AM
|
#128 (permalink)
|
EcoModding Apprentice
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105
Dakota - '00 Dodge Dakota Club Cab, Sport 90 day: 18.57 mpg (US) Jeep - '01 Jeep Wrangler TJ Sport 90 day: 18.46 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
|
Mine is just sitting all spread out on the desk. I haven't completed my test generator yet.
I need to get it into some single unit, or enclosure. I have some plexi laying around, maybe a neuvo looking clear case, that would be sweet.
I dug up some PC drive power connectors (male and female) and was going to use that as a quick disconnect for the unit. What size wire did you use to connect to the VSS and Injector leads?
Did you fuse your power? If so, what amperage?
I probably won't have much time until the weekend to get mine assembled and in my vehicle.
__________________
|
|
|
05-22-2008, 01:23 PM
|
#129 (permalink)
|
SuperMID designer
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 37
Thanks: 0
Thanked 13 Times in 2 Posts
|
Quote:
Originally Posted by dcb
Sorry, what I meant was that if you get X number of injector pulses in a second, then you probably have an indication of RPM, at least for most vehicles. Or if you know the time between pulses (not the pulse width).
|
I see. We observe the injector pulse duty cycle is basically in inverse proportion to RPM.
The exception is...
A. in fuel-cut mode: We can't see the duty cycle but the engine is spinning during such as downhill coasting. Maybe, it'll be more than 1.5 sec that we won't see any injector pulse activity, then the LCD will be off ???
B. all injectors ON: During engine start up and acceleration, the ECU sends short ON signal to all injectors.
Quote:
A method static variable will retain its value between calls.
|
Thank you!
I think I was taught by a wrong C language instructor.
Yoshi
|
|
|
05-22-2008, 01:41 PM
|
#130 (permalink)
|
SuperMID designer
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 37
Thanks: 0
Thanked 13 Times in 2 Posts
|
Quote:
Originally Posted by dcb
2. go for more accuracy on the instant display:
|
Why don't you try cli() and sei() routine?
Such as...
Code:
unsigned long microSeconds (void){
unsigned long tmp_timer0_overflow_count;
byte tmp_tcnt0;
cli(); //disable interrupts
tmp_timer0_overflow_count = timer0_overflow_count;
tmp_tcnt0 = TCNT0;
sei(); // enable interrupts
return ((tmp_timer0_overflow_count << 8) + tmp_tcnt0) * 4;
}
Please let me know if the syntax is wrong.
Quote:
Lets hear from y'all. I'm gonna take a few days off in the mean time.
|
Have a nice off.
Yoshi
|
|
|
|