Setting Up and Troubleshooting Stepper IAC Control on MegaSquirt
How to: Get the stepper IAC working right on MegaSquirt
The MegaSquirt-II and MegaSquirt III (as well as related systems like the MS3-Pro) can control a stepper Idle Air Control valve, but these are a little bit more involved to set up than a PWM type. Here, we’ve put together a range of tips for how to set up and troubleshoot stepper idle air control valves.
Stepper air control valves are a bit more complicated than PWM valves. PWM valves use a solenoid, and commanding a specific duty cycle opens it to a specific amount. Steppers use two separate windings which can be energized to turn the motor backwards or forwards, and take a discrete step every time you energize one of the motor windings.
Initial setup
Fixing common problems
Making sure the circuit is working
The screenshots in this article are for an MS3-Pro, but the settings are similar between MS2 and MS3.
Initial setup
First, make sure that the idle air control valve is set to “Stepper Valve”, not PWM or on/off idle control. For initial testing, we recommend using open loop instead of closed loop. Closed loop requires more complicated settings and has more that can potentially go wrong.
The time step size is how long the stepper driver will command an individual step. If the valve is perfectly dialed in, this will match the time it takes the coil to move the motor through a single step. If this value is too low, the step is not completed, and the valve does not move. If the step is too high, the air control valve will move more slowly than it can – but otherwise there aren’t any consequences. Your best bet is to set this for 10 ms, then decrease until the valve no longer moves. Then add 0.5 to 1.0 ms.
4 wire air control valves that turn freely usually needs to use “Always On” mode. Valves that are difficult to spin by hand usually need to use “Moving Only” mode; the same goes for all 5 or 6 wire valves.
The homing steps (called “start value” in older code versions) needs to be set to a large enough value that the valve retracts fully from any position the valve can reach during operation.
The current MS3 and MS2/Extra code allow you to specify if the valve closes or opens on startup. Regardless of which position it is set for, you need to set the number of homing steps high enough that it will move all the way to this position no matter where it starts.
Fixing common problems
Problem: Valve vibrates when commanded to move, but does not actually turn. Solution:One coil is wired backwards; swap wire 1A for 1B, or 2A for 2B.
Problem: Valve moves, but in opposite direction of intended. Solutions: Both coils are wired backwards. Switch wires 1A for 1B, and 2A for 2B; With the current firmware, you can simply change the homing direction in the software. Older versions (and original Bowling & Grippo code) do not allow this.
Problem: Valve does not move at all on initial power up. Solutions: One possibility is incorrect wiring. Make sure 1A and 1B are on one coil, and 2A and 2B are on the opposite coil; The other usual problem is the time step size is set too small. Try increasing it and see if the valve moves.
Problem: Idle speed is not consistent from one start to another at the same temperature. Solutions: Usually, this is caused by the homing steps being set too low. Increase this value until the valve retracts fully; If the valve sometimes retracts fully, but not always, this may mean the steps are small enough that they do not always successfully move the motor. Try increasing the time step size.
Problem: The valve retracts normally, but then appears to stop working at some point during operation. Solution: First, check to be sure the algorithm is not set to “15 minute IAC”; this will switch the IAC valve operation mode after 15 minutes, and is only used with a few specific valves that behave differently when warmed up. Next, try increasing the time step size and/or minimum number of steps to move. Some older valves can have problems with stiction. Increasing the time step size will send a longer pulse, while increasing the minimum number of steps to move will send more pulses that can un-stick a stubborn valve.
Problem: Idle speed hunts while the number of steps displayed is constant. Solution: It’s easy to assume the IAC valve is responsible here. After all, it’s supposed to control the idle speed, and the idle speed is behaving wrong. However, this is likely to be an issue with the ignition timing or fueling instead. See our guide to idle tuning for details on how to dial this out.
Making sure the circuit is working
If you’re wondering if the outputs even work, here’s a simple test. First, turn the idle control off under the idle control screen.
Next, set Stepper 1 and Stepper 2 as generic on/off outputs, triggered off the TPS.
Then you can test the outputs with a voltmeter by moving the throttle position. They respond as follows:
If both outputs are off, you have 0V at all points.
If an output is on, it will have 12V at the “A” output and 0V at the “B” output.
If an output is off while the other output is on, it will have 0V at the “A” output and 12V at the “B” output.
If it does not respond (and you don’t have any configuration error messages indicating you’ve accidentally enabled the stepper output twice), it is most likely that the stepper IAC driver chip is damaged.