MEGAsquirt A place to collectively sort out this megasquirt gizmo

DIYPNP install: inital tuning

Thread Tools
 
Search this Thread
 
Old 04-28-2011, 07:10 AM
  #101  
Newb
 
mxnige's Avatar
 
Join Date: Mar 2011
Location: Sussex, England
Posts: 25
Total Cats: 0
Default

Hi Greg#

Sorry to highjack your thread but i have a few questions for you.
I've just built the main board on my diypnp and im now looking at the adapter board.
I can't seem to find the pinouts for the '96 euro ecu anywhere.
How did you figure yours out?
And did you install the pullups that are shown here on your ecu? http://www.diyautotune.com/diypnp/ap...3-16b6-mt.html

Thanks
mxnige is offline  
Old 04-28-2011, 07:36 AM
  #102  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

I had my ECU built by Braineack to these pinouts. Found this on M.net (credit to BaktusBor, IIRC). Check your harness that the wiring actually exists! I had to add 2T to gain control of the fuel pump relay, as there was no such wire in the harness.

Name:  MX5_ECU_Pinouts-1hidif.jpg
Views: 342
Size:  198.6 KB
Greg G is offline  
Old 04-28-2011, 07:58 AM
  #103  
Newb
 
mxnige's Avatar
 
Join Date: Mar 2011
Location: Sussex, England
Posts: 25
Total Cats: 0
Default

Cheers mate,
Like you said there's a few discrpencies with what i've found, like wires shown in the pinout above that aren't there. But it also fills in alot of gaps.

Where did you wire 2t to?
mxnige is offline  
Old 04-28-2011, 08:07 AM
  #104  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

To the fuel pump relay. So you don't need to jumper the fuel pump at the diagnostic connector.
Greg G is offline  
Old 04-29-2011, 06:48 PM
  #105  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Originally Posted by Greg G
When I unplug my idle valve connector, I expect idle to drop--but it goes up!

Left side--unplugged; right side--plugged


What's up with that? Do I have a strange valve that should be running in inverted mode?
Bumping this since it may have gotten lost with the OT of the previous posts.

Can anyone school me on idle valve frequency? I'm running a multiplier of 5, so it's at 156 and 2% steps- coarser. Can I run it at finer steps but lower frequency, or will that slow down the reaction of the valve?
Greg G is offline  
Old 04-29-2011, 07:28 PM
  #106  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,498
Total Cats: 4,080
Default

the quoted log looks like you need a lot more dashpot, thats about it.

once I'm idling, the valve position stays put...you dont want it constantly correcting.
Braineack is offline  
Old 04-29-2011, 08:09 PM
  #107  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Thanks, will make the adjustments. Any comment on the apparently open idle valve when unplugged? Seems unusual
Greg G is offline  
Old 04-30-2011, 02:41 AM
  #108  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

My curiosity piqued, I cleaned the idle valve (allegedly cleaned before MS install). Quite a bit of carbon removed from the air passages. The water lines were also clogged with rust. Cleaned that off. Idle valve seems to be a little more responsive. Maybe the part of the idle valve that reacts to water temperature changes is working better?

I did try inverted mode-- umm no. idle spiked way up, like idle test mode

I also reversed the check valve for idle air, just to make absolutely sure the check valve was oriented correctly-- nope that froze the valve at 40 duty! Engine was too hot to get to the reversed check valve, so I just unplugged the hose at the dummy throttle body. Which leass to this question-why can't I just put an air filter right at the idle valve? Would there be a difference if it was "unthrottled air"? Or run that hose to a source of ambient temp air (every little bit helps)??


Idle is probably as good as it gets for now. I enabled EGO control from 900 rpm up, and this seems to have stabilized the AFRs even more without upsetting the balancing act of the PID.

Looking at the battery/alternator voltages-- 10.7v on AC engagement just can't be correct. It also corresponds to the idle droop on AC engagement. I think I'll be changing to a new alternator, at the very least for peace of mind.

Name:  430voltagedrop.png
Views: 195
Size:  82.2 KB
Attached Files
File Type: msl
2011-04-30_13.49.39eoidl.msl (978.9 KB, 112 views)

Last edited by Greg G; 04-30-2011 at 08:24 AM.
Greg G is offline  
Old 04-30-2011, 10:31 AM
  #109  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,498
Total Cats: 4,080
Default

you dont need a new alt.

you dont need to change the polarity

you dont need to change check valves

you dont need to hire a voodoo magic lady

you dont need to change the headlight fluid.

everyone has voltage drop with activation. if you check your battery with a DMM it will probably show higher voltage than what TS shows.



and of course the rpms go open when you unplug the valve...that way if it fails the car can idle in a sort of limp mode.

you are going crazy trying to prevent the idle from drooping a little when you turn on the a/c. sure its not perfect but there's really nothing more you can do, you could try opening the purge valve at the same time as some people report back saying that helps. but all the MS can do is react to the change. the rpms drop due to the increased load and then the MS says oh ****, gotta increase idle speed. it looks like you have it well tuned to stabilize and idle smooth at that point. so i dunno why you are pulling hairs here. how many times do you turn the a/c on and off in a drive at idle?
Braineack is offline  
Old 04-30-2011, 11:00 AM
  #110  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Well damn I forgot the headlight fluid! :P

Well practically everyone in this forum has a higher voltage than me! And considering there are correction factors that come into play to extend dwell time and adjust injector pulses based on voltage...I figure it's worth a shot But thanks for noticing the nice idle

And Manila traffic? Mmm, I could spend long stretches at idle in the tropical heat... :P
Greg G is offline  
Old 04-30-2011, 12:34 PM
  #111  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Looks to me like insufficient 'P'. In post #108 the duty cycle appears to be driven by mostly 'I' and no 'P'.
JasonC SBB is offline  
Old 04-30-2011, 06:44 PM
  #112  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Originally Posted by JasonC SBB
Looks to me like insufficient 'P'. In post #108 the duty cycle appears to be driven by mostly 'I' and no 'P'.
When you say that, are you looking at the idle duty (response), or the RPM (result)? I usually look at RPM, but now that I look at the idle valve duty--it does look like too little P! <--cue lightbulb over head

Yup PID is 4/40/2. Seems to be very sensitive to P, will add a little and post results. Thanks!

Last edited by Greg G; 04-30-2011 at 07:19 PM.
Greg G is offline  
Old 05-03-2011, 07:50 AM
  #113  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Added P, as suggested. After much fiddling about (made about 20 variations), the 2 stable closed loop PID settings or my car are:
1. 45/42/2
2. 85/40/25

Seen in the graph is the first, 45/42/2. The ghost graph is 85/40/25.

Both stabilize the idle in about the same time, but the 2nd combination ramps up the PWM duty a bit faster, and you can see the idle droop recovery starts faster. The idle duty values are a little different, but the relative values are similar. Combination one is juuust a bit more sedate when it reaches steady state.

Name:  53pidtuned.png
Views: 198
Size:  152.3 KB

So today's lesson-- don't be afraid of D! Jason gave me a great analogy--suspension tuning! The P is like the spring rate, and the D is like the shock damping. That helped the concept gel together even more in my head. All this time I was trying to keep D to the absolute minimum. Hope this helps others with their tuning adventures!
Greg G is offline  
Old 05-03-2011, 04:08 PM
  #114  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

To extend the analogy, the 'I' is like a self leveling rear suspension in a minivan. When you add load to the rear, it will slowly pump up the suspension.

Hmm, the D seems to be implemented funny. The downward slope of RPM in and of itself should cause the duty cycle to increase and peak before the RPM reaches the lowest point. This helps arrest the dip, making the dip shallower. Here it peaks *after* the RPM has reaches its lowest point.

And why the heck does the duty cycle go down when the RPm is still below target??

Greg can you try adding more D?

Did the coders put in a too aggressive "high pass filter" on the input or output of the D ? This would reduce its effectiveness.

What's the time between updates that the idle PID loop takes?
What's the time it takes from the point where the RPM begins to drop, to the time it reaches the min point?
If the former is > ~ 1/4th of the latter, then the sampling rate is too slow; the loop reacts too slowly.
Additionally the "phase lag" that the slow sampling produces, will cause 'P' to be prematurely oscillatory - i.e. you can't run an aggressive 'P'; and the said lag renders the 'D' less effective too.

Greg, first try halving the loop time to see if it affects the response then increase D then P.

Last edited by JasonC SBB; 05-03-2011 at 04:35 PM.
JasonC SBB is offline  
Old 05-03-2011, 04:13 PM
  #115  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,498
Total Cats: 4,080
Default

you should turn on the A/C and add I until you reach your target. that's all you need.

then tune P to react to changes and keep **** steady when it gets upset form AFR changes or whatnot, and D to smooth it out all....that's what I do at least.
Braineack is offline  
Old 05-03-2011, 04:19 PM
  #116  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Originally Posted by Braineack
you should turn on the A/C and add I until you reach your target. that's all you need.
Nope. Wash your mouth out.

P and D work hand in hand. D prevents P from oscillating; it allows aggressive P. Lots of P is what makes the duty cycle open up as the RPM dips.
In the same way stiff springs (high P), require matching stiffer shocks (high D).

Additionally, 'D' is "anticipatory" in that it doesn't wait for the RPM to dip before applying lots of duty cycle. The downward *slope* in RPM caused D to produce lots of duty cycle. This is important in reducing the depth of the dip. You need duty cycle to open up *before* the RPM reaches its bottom.

A control loop relying on 'I' will be slow.


Cheers,
Jason
Control systems engineer
JasonC SBB is offline  
Old 05-03-2011, 04:47 PM
  #117  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,498
Total Cats: 4,080
Default

thats what works for me. i have razor smooth idle logsssss.


right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.



also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.

Last edited by Braineack; 05-03-2011 at 05:10 PM.
Braineack is offline  
Old 05-03-2011, 06:49 PM
  #118  
Junior Member
Thread Starter
 
Greg G's Avatar
 
Join Date: Jun 2007
Posts: 411
Total Cats: 0
Default

Originally Posted by Braineack
thats what works for me. i have razor smooth idle logsssss.

right now I have 3/15/45. any more P and it oscillates like a bitch...but i think that's because theres no adjustable deadzone.

also probably because my min and max rpm points are fairly tight at 700-1300. It was suggested to me to expand the range to reduce sensitivity.
Brain, can you post a graph from MLV? I wanna see what I am aiming for

The 3.1.1 'mariob v5' firmware added an adjustable dead zone around target (PID RPM hysteresis). I have it at 30rpm, perhaps that's why I was able to run more P. I should also mention that when i found 85/42/25 to work, I tried fine tuning it. Very small changes in any of the 3 variables (for example 85/45/25 or 85/42/20)upset the balance, causing big oscillations.

The PID control interval is currently set to 100ms. I'll try reducing it.

With regard to D, I do have some data on it, maybe you can spot something I don't see. In the following graphs, the ghost graph is always 85/40/25. Only D is changed.

85/40/20
Name:  53d20vs25-1.png
Views: 133
Size:  31.4 KB

85/40/30
Name:  53d30vs25-1.png
Views: 130
Size:  29.9 KB

85/40/40
Name:  53d40vs25-1.png
Views: 132
Size:  38.0 KB

Last edited by Greg G; 05-03-2011 at 07:19 PM.
Greg G is offline  
Old 05-03-2011, 07:34 PM
  #119  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Such small changes causing oscillation means the control loop is not robust.
Any external factors, such as higher ambient temps, will probably cause your "good" setting, to oscillate.

A control loop should be stable and reasonably fast with 30% changes to P, I, or D. (3 dB changes in control system parlance).

Also, the fact that the duty cycle and RPM sinusoids are nearly perfectly out of phase, as opposed to the duty cycle "leading" the RPM waves, tells me the D isn't helping prevent the oscillation. The simple out of phase relationship suggests it's all P and no D.

Something funny's going on. It may simply be sampling rate too slow. Or it may be that you need to reduce I to be able to use an aggressive P and D.

Lastly, the large "throttled volume" in a hotside s/c setup requires a lot of 'D' to make stable. This is because the volume appears as a "phase lag" (delayed reaction) in the system, and 'D' is "anticipatory" and thus counteracts said lag.

However, if the 'D' calculation is screwed up....

Last edited by JasonC SBB; 05-03-2011 at 07:45 PM.
JasonC SBB is offline  
Old 05-03-2011, 08:01 PM
  #120  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,978
Total Cats: 356
Default

The throttled volume is the problem here. Every car I've tuned so far on the new firmware works very well - except for SCed cars without the dual throttle body mod. I'm able to keep a steady 800/1000rpm idle on my car, without/with the A/C on, +/- 20rpm, which is what the OEM behaves likes.
Reverant is offline  


Quick Reply: DIYPNP install: inital tuning



All times are GMT -4. The time now is 03:10 PM.