|
Idle
Valve options |
2 Wired Valves (FIdle wire)
These valves are wired between an ignition switched 12V and the Megasquirt
Idle Valve wire in the loom. (The MS ECU switches ground to make them work.)
Make sure the 12v is switched off when the megasquirt is off. Many looms contain
a protection diode, leave it there.
Some valves will have a spring return
mechanism to shut them, others have a spring to open them, so the duty cycle
at high and low temps depends if the MS ECU has to drive it open against the
spring or shut against the spring.
If the ECU has to shut the valve down against the spring to reduce air going
through it as temp increases then the duty cycle will need to increase with
temp, so the value at low temp will be around 0 and the duty at higher temp
will be 100 or so. The opposite if the MS ECU has to force the valve open
against the spring to increase air flow.
3 Wired valves (FIdle wire) e.g. Bosch Valve
0280 140 505
Three wired valves can also be made to work via the IdleValve output from
an MS1 or an MS2 (Note that all ExtraEFI.co.uk ECU's are modified during the
build process so they can drive a valve, standard ECU's can not drive them
directly!) The centre pin of the valve goes to an ignition switched +12V,
one of the other 2 pins will hold the valve shut when its connected to ground
(0V). This pin needs to go to earth via a resistor (30-40Ohms 50W), the other
pin goes to the Idle valve output in the wiring loom from the MS ECU.
On a 3 wired valve there are effectively 2 windings that fight against each other, one opens the other closes it. So we put a resistor in line to ground with one winding, this shuts (or opens it depending on what winding you use) the valve, so its like having a spring holding it one way. The MS ECU then forces it either shut or open, it can do this as the resistor in the other winding limits how much it can force it one way.

4 Wired Valves (IAC1A-2B) Stepper Motors
If you have a 4 wired valve then its a stepper motor, these can NOT be controlled
with MS1-Extra, but can be controlled by MS2 and MS3 ECUs. If you want to use the
stepper outputs on the MS2 ECU as a programmable output or Boost or NOS, etc,
then you may lose the stepper function as there is a limited amount of output
pins that can be used. See HERE for more details on the output pads available.
If you use a stepper output for an option then you can still fit a suitable 2 or 3 wired valve from an older vehicle and use the FIdle output.
This is the route most people take for MS1 anyhow. (See above)
Other Idle Valves
There are valves that need no control other than a 12V supply when the ignition
is on. These heat up a bi-metalic strip that rotates a plate inside the valve
and shuts the air down as the engine heats up, these are known as Extra Air
Valves. They are becoming rare and hard to get hold of, they were fitted to
various engines, like the Flapper type RV8 EFI's. The Idle Speed has to be
controlled with the throttle stop when using these type of valves, as the
valve is only used to add air when the engine is cold.
Here is a Bosch example:


Base settings for a bosch valve in
Warmup Only mode:
The above settings show that the base frequency for the valve is 200, the Idle duty at the lower temperature (-23C) is set to 115, so the valve will be driven with a duty cycle of 115/200 making it open (allowing more air in) at -23C. As the temperature increases it will linearly decrease to 0/200 (Zero), this will be at 55C and above. To tune this simply get the engine up to temperature and alter the Upper Temp Idle Duty until the engine is at the wanted speed. Next time it is cold change the Duty at the lower temp setting and or change the Fast Idle (lower) Temp setting to get the engine to the desired speed during warmup.
MS2-Extra and MS3 Idle Valve Settings
Algorithm
Closed Loop modes: (These modes use the engine RPM, TPS, MAP and Coolant temperature as feedback to control the engine speed in a closed loop mode)
2 or 3 wired valves:
PWM Closed Loop: This mode is for a 2 or 3 wired PMW idle valve.
IAC Closed Loop Moving Only: This mode only powers the stepper only when changes in pintle position are requested. This is the most common type, it holds its position if not powered, and is difficult to turn by hand
IAC Closed Loop Always On: Powers the stepper at all times. Required if your stepper 'free wheels' when you spin its pintle un-powered with your hand.
To select the appropriate 'Idle Control/Algorithm' for stepper motor control in MegaTune you may need to do some testing. In some cases setting the stepper motor to "IAC Stepper Always On" will cause the IAC to get hot. However setting it to "IAC Stepper Moving Only", might cause a problem with idle speed changing from one start to another if the stepper moves freely.
You can test if your IAC is suitable for 'always on' by leaving your stepper powered on the bench for 15 min or so. If it doesn't feel too hot to you, then set it to "Always On". Apparently this is what GM does. But if you want to be safe they should test it on the bench for 15 min or so, or monitor it closely in the car while not moving for at least 15 minutes, checking the IAC temperature frequently with your fingers. It may get warm, but it shouldn't burn your fingers just touching it.



Idle Control:

Values shown are from an RV8
This feature is implemented by inputting a 'Cold Position' that is the step position at start of extended warmup, typically about 80% of the final, fully closed step position. The IAC behaves normally until the step position commanded from the table just exceeds this Cold position value (either PWM or stepper). From that point on, the steps are tapered in so as to reach the last step value in the table over the 'cold taper time' period. (see the diagram). This slows the reduction in idle air as the engine continues to warm up (increasing the idle speed for longer than the coolant temperature alone would do).
PID Control (Closed Loop Modes)
PID (Proportianal Integral Derivitive) is a control method widely used in industry to control systems in a closed loop setup. It starts by calculating an error between its current position and the target position, in this case RPM. There are 3 parts to the control system:
P (Proportianal Gain): Determins the reaction to the current error calculated.
I (Integral Gain): Determins the reaction based on previous calculations.
D (Derivitive Gain): Alters the reaction based on how much the error has changed.
So a PID setup weighs these reactions together and gives a calculated output for the difference in engine speed.

Values shown are from an RV8
Min Duty/Steps for PID: This is the lowest value (least amount of air let through) that the code will run to when in closed loop mode. Ideally this should be set to a value just under where the stepper needs to be to get to your ideal idle rpm. So when the engine is idling at the correct speed, check the IAC Stepper position in Tuner Studio (set a gauge for it). If it idles around 75ish then set this setting to just under that, e.g. 65. If you find the engine stalls in closed loop due to the idle valve shutting too far then increase this a little.
RPM With Valve Closed: Set this to the RPM that the engine runs at with the valve in the position you have entered for the Idle Valve Closed Steps (see below).
RPM with Valve Open: Set this to the RPM that the engine runs at with the valve closed. (Altering these 2 speed settings can effect the sensitivity of the closed loop. Making the overall range bigger decreases sensitivity, making the range smaller increases it)
PID Delay: Delay the ECU waits for all conditions to enter closed loop to be satisfied before entering closed loop. 1-3S is usually best here.
Crank to Run Taper: The ECU positions the idle valve at a fixed position during cranking (See the IAC Cranking Table). Once the engine starts the IAC will need to take up the closed loop position, this is the delay to allow for a smooth transition from cranking position to closed loop position.
PID Ramp to Target Time: This is how long the code will take for it to reach the target RPM once in closed loop. Larger times here can allow you to increase the P of the PID control. A value of 2-3S works well here.
PID Controller Interval: How often the code for closed loop runs, 80-100mS is a good starting point.
Proportianal Gain: This is best kept reasonably low to stop hunting. See the description for PID Control above.
Integral Gain: This is the gain based on previous calculations, try to keep this over 100%. See the description for PID Control above.
Derivative Gain: This is the gain based on how much the error has changed, zero is a good setting here. See the description for PID Control above.
PID Lockout RPMdot Threshold: This should be set just above the rate of change that the RPM would naturally move at and around idle. If the rate of change goes above this settng it is assumed the engine needs to come out of closed loop mode. This value can be found by looking through datalogs and finding roughly what RPMdot you have just before you enter closed loop and around idle during closed loop. Set this just above the max RPMdot you find, typically 50-150. If you find the closed loop drops out without touching the throttle, try increasing this a little.
PID lockout Max Decel Load: This should be set so that the ECU doesn't go into closed loop mode during overrun (engine in gear during decel). During overrun the throttle will be at zero and the ECU could assume the engine is idling too high and therefore close the idle valve (to reduce the amount of air and bring the engine speed down). When the clutch is then pressed in, the engine will no longer be turning through the car's inertia and the idle valve could be closed causing the engine to stall. This setting is to stop the closed loop starting to work during overrun. To find the ideal value, find the KPa value of the MAP at idle and set this to 5 KPa less than the idle MAP, so if you idle at 45KPa set this to 40KPa.

Values shown are from an RV8
Idle Open Duty/Steps: This is the value needed to open the valve fully (allow max air through it)
Idle Valve Closed Duty/Steps: This is the value the code runs the valve to when it goes out of closed loop mode (minimum air flow). To tune this, increase the throttle at idle to just over your Idle Activation threshold (e.g. TPS 1.5%) so the code no longer runs closed loop. The idle valve will then shut to this position. If the engine tries to stall then increase this value. This helps for very slow driving in traffic. (Adjust the RPM with valve closed value to just below the RPM you find this setting gives you, see above)
Idle Activation RPM adder: The ECU can enter closed loop mode even when on overrun if the engine speed is within this Idle Activation Adder value + the target rpm value. So if your idle target is 900RPM and Idle Activation Adder is 200 then closed loop will begin when the engine speed gets to 900+200=1100RPM. Ideally this needs to be set failry low, 50-150 is typical. (Note that if the Idle TPS Activation threshold isn't satisfied then it will NOT enter closed loop)
Idle Activation TPS threshold: This is the value te TPS must be below to enter closed loop. It is very important to calibrate the TPS correctly and set this to as low a value as you reliably acheive when the throttle is at rest. 0.5-1.0%
Dashpot Adder: The code remembers it's last good value that it had control of the engine speed. This value is added to the last good value for its starting point next time the throttle is lifted. A value of 5-15 is a good starting point, this helps to get the valve close to where it should be when entering closed loop.
Closed Delay: The ECU closes the air valve after leaving the open loop mode (once TPS rises), this is the delay for that to happen (see Idle Valve Closed Duty).