2GNT Logo

Member Login Username:


A/C Idle Up

If you are using the MegaSquirt II ECU with closed loop idle control and air conditioning, you have probably spent way too much time trying to get good idle quality. You need the IAC valve to respond quickly enough to keep the engine from stalling when the air conditioning compressor is engaged, but not respond so quickly that your idle is twitchy. Reductions in rotating mass, like an aluminum flywheel, magnify the problem. Older MegaSquirt code forced the ECU to be reactive regarding engine load. If it saw that RPM was above/below setpoint, it would try to get it back to the setpoint. Newer MegaSquirt code allows the ECU to be proactive regarding major engine loads like air conditioning. It sees that you want air conditioning on/off, prepares the engine for the load change, and then turns air conditioning on/off. With this stock-like control strategy, you can have stock-like idle quality.

Here is a generic wiring diagram from a 2GNT shop manual. You can see that the stock ECU has an input to sense that you have requested air conditioning (green wire with red stripe) and an output to the air conditioning compressor relay (green wire). We can cut these two wires at the stock ECU and redirect them to the MegaSquirt ECU. In case you are interested, this strategy retains all safeguards provided by the compressor ECU and dual pressure switch.

I am assuming that have no problem with opening up your MegaSquirt case and adding a couple circuits. I put mine on separate board fitted to the upper part of the case, but you might be able to cram them into the proto area. These are all readily available components that you can even find at larger Radio Shack stores if you are too impatient to wait for shipping from Newark or Digi-key. The references I make to anything internal of the MegaSquirt case are for the version 3.0 board. These modifications can be done to the other boards, but the names of things change, so you have to figure out what the equivalent is for your board. Double check your work because an error here can cause you hours of frustration later (ask how I know).

Here are my personal settings using the Pre3.3 Alpha5 code. There is also a modified version of that code made by gslender and he has done a good job at explaining the purpose of each setting in a nice PDF document found in this thread. I will give a quick and dirty explanation of the settings I understand. Idle up off/on just enables or disables the idle up function. Idle up input lets you choose which input pin you are using on the main MegaSquirt circuit board (PA0 is the same as JS11). Idle up steps adder (steps) is how many steps should be added to whatever number of steps your IAC is currently operating at. You figure this out through experimentation to see how many steps makes up for the A/C compressor load on the engine. For reference sake, my steps at idle with no A/C compressor load is about 15. Adding 39 to that is significant. Idle up target rpm adder (rpm) is how much RPM should be added to your target RPM to get a relatively smooth idle with A/C compressor engaged. Idle up off [idleupcnt] countdown and Idle up off [idleupcnt] rate form a timer that lets you remove the steps you added slightly before the A/C compressor is disengaged. This lets the A/C compressor pull the engine back down to the normal target RPM, so the RPM does not spike when you disengage the compressor. The countdown is what number it will start counting down from and the rate is how quickly it counts down. This is best done experimentally. Mostly play with the rate until you get neither a RPM rise or sharp dip as the A/C compressor is disengaged. Output Port lets you choose what output port to use to engage the A/C compressor relay (Warmup LED is the same as D15). You have to enable the output port and tell it to stay off when the MegaSquirt is powered, but turn on when certain conditions are met. Conditions set up the circumstances when the output should be turned on. You need to set it to turn on this output when idleupcnt is greater than a certain number. That number determines how soon the A/C compressor will be engaged after the steps are added. This must be done experimentally. Start high and lower until the RPM does not spike before the A/C compressor is first engaged. By the way, your idle up off [idleupcnt] countdown must be higher than your idleupcnt condition. The hysteresis just keeps the system from cycling on/off repeatedly when you are close to meeting the conditions set. You can add a second condition. I wanted to be sure that the A/C compressor would shut off if I needed full power (being obnoxious on the interstate or impressing middle school kids).

That is really it for the A/C Idle Up modification. However, this is a good time to further improve your idle quality with adaptive idle advance. This is a relatively new addition to the MegaSquirt code and requires no hardware modifications. This function will adjust your ignition advance up or down slightly to maintain your target RPM. It can react very quickly and really helps smooth out the idle. Set idle advance on to adaptive. This just turns the functionality on. Set apply as to adder. This means that the code starts with whatever ignition advance it would normally use based on your spark table and adds/subtracts from there. I suggest that you set condition is to CL PID. That will start using the adaptive idle advance when you enter close loop idle control.

Now you have to make a curve to determine how much ignition advance to add or remove based on how far the actual RPM is from the target RPM. I am most concerned about stopping dips in RPM, so I agressively add advance when actual RPM is below target RPM. I prefer to let the engine settle gently into the preferred idle speed, so I conservatively remove advance when actual RPM is above target RPM. You adjust this with the engine running and it will put a marker on the curve with your actual RPM. Keep adjusting the curve until the actual RPM marker tends to hover right around zero RPM delta (rpm).

Contributed by Corbin

Cars Modifications Power Tuning Megasquirt A/C Idle Up

Document statistics: Last modified on 2012-11-02 21:02:29 by Corbin

Back | Home

Wiki engine and all content (C) 1998-2021 2GNT.com unless otherwise noted