How To Megasquirt Your 2nd Gen RX-7: Basic Tuning


Home > RX-7 > Tech/Mods > Mods > Megasquirt > Basic Tuning Buy Me A Coffee

Now that you have the car running (or at least starting and idling), here are a few basic tuning tips to help out. This is not a complete tuning guide, only a set of tips to make the process a little easier. It is suggested that you find someone with experience to help you through the rest of the process, because while the concepts are rather simple, it does take some experience an intuition to end up with a good tune. Remember: If you tune too lean under load, you will blow the engine!

Getting The Car To Start (Again)
While the car may have started well the first time, during that process you likely significantly leaned out the idle areas of the map. So if you find the car hard to start, or it starts and then stalls, increase the amount of warmup enrichment using the Warmup Wizard. Put more fuel into the temperature bin the ECU is currently reading from and then try again. If you find yourself having to add a lot more fuel, to the point where the bin becomes larger then temperatures below it, go over all the bins and add fuel until they form a progression from more fuel (cold) to less fuel (hot). This will give you a good place to start your tuning since in this case it is far easier to start rich then it is to start lean.

Fine tuning the warmup enrichment cannot take place until the rest of the map has been tuned.

Tuning The Idle AFRs
You will find that the car will idle best between an AFR ratio of 12.5:1 and 13.5:1. Most likely you will end up right around 13:1 for batch fired MS1/MS2 MegaSquirts. Depending on porting the sequential injection of the MS3X, when properly adjusted, will allow idling closer to the low to mid 14s. To tune the idle, make sure the idle speed is set to its final value (1000 RPM is a nice smooth idle, 750 RPM is a stock idle, I aim for around 900RPM) as described in the last section. One quirk of MS1 is that trailings do not fire below 1000 RPM, so MS1 users will likely want to aim for 1000 RPM as an idle so that the tach functions. With the car fully warm, you can adjust the idle fuel bins. Try to find an AFR at which the engine is most smooth and pulls the most vacuum. That will result in the strongest idle. Remember, if the idle wants to hunt then you have gone too lean. If it wants to bog out and sound labored, you have gone too rich. When tuning these bins, try to make the idle area of the map look like a small valley where the bin closest to the actual idle RPM/MAP value is in the middle. Leaving a slightly rich spot to the left helps "catch" the engine should the RPMs dip below idle and having the right side blend into the rest of the map will smooth the transition into load. When you tune a bin, tweak the bin closest to the current engine load point the most, but apply small changes to the surrounding bins. This keeps the map smooth.

MS3X/MS3-Pro ECUs have two tables specifically for idle; Idle VE and Idle Advance. These are small VE and spark tables which are used only at idle. Once you have your main VE table tuned, you may wish to explore these tables. Idle VE (under the Startup/Idle menu) is the most useful. Once enabled you can set it to activate "Use PID idle detection" so that the Idle VE fuel table is active when the idle valve is. Then tune your idle VE table on the top right. This gives you a little more resolution in the idle area and you can select a load range and RPM range within your idle area. Very useful when your idle will see varying loads such as those from A/C or an e-fan. Just remember that you have idle VE enabled because changing the idle area on the main VE table will have no effect when it is. Tuning the idle VE table is the same as tuning the idle area of the main VE table.

Tuning AFRs At Low to Medium Load
This is most easily done with someone else to work the laptop (or drive the car). Drive the car easily at first, working in the most common area of the map (for most cars, 2000-4000 RPM at 40-70 KpA). Slowly observe the wideband while adjusting the VE bins to maintain a ratio of around 14.7 (give or take a tenth or two) in this area. This it stoichiometric and the ideal ratio to result in a clean burn. Of course, ultimately the wideband is just a tool so if the car likes richer ratios, tune richer. You may find that running exactly stoich in some areas make the car seem anemic. At first you will find yourself making major changes to the map, but always remember to try and maintain a smooth map. The smoothness of the table will directly represent how well the car drives. Slowly work up the RPM range while working the table. Do not forget the often missed high RPM high vacuum area (down at the bottom right of the map). Work both to the right of the map and up. Once you have crossed about 80 KpA, you will find that the engine is much happier at richer ratios. These could be near 13.5:1, or as rich as 12.5:1. You will have to determine what feels best for the car you are running. Most rotarys will be very happy at 13.5:1 - 13.8:1 but ultimately the AFR will be determined by feel and/or a dyno reading.

Tuning In Boost
In some ways, tuning in boost is quite easy as there is only a very narrow range of AFRs that are suitable. But if you do it wrong, you will be picking apex seals out of your muffler.

Once you have crossed 100KpA, you are now in boost. I would recommend running 12:1 until approximately 4-5 PSI (135KpA), then taper down to 11.5:1 and carry that all the way until about 15 PSI (204KpA) where you should start aiming for the high 10s. Overall I have found these ratios to be very safe with the timing I have provided in this writeup, and they will provide excellent power with great turbo response. As always, the ultimate deciding factor for your boost AFRs will be your car. If you find that running richer down low provides better turbo response, then by all means do it. If you are nervous about running into the 11s under boost, tune for high 10s but you will be leaving some power on the table.

Don't neglect the low RPM boost areas. This means finding a big hill (or using a dyno) and doing wide open runs starting from 1500RPM in high gear. That is a typically ignored area but makes a huge difference in how the car drives. Don't just start all your boost runs at 3500 RPM because that leaves all points on the map below probably far too rich. The last thing you want is to be in the wrong gear (for whatever reason) and have the car fall on it's face with a cloud of smoke if you get on the throttle.

Getting a smooth transition between vacuum and boost will take some time. Don't be over aggressive in tuning one point. Make sure to keep the map smooth around 100 KpA and make small changes. MS1 users which are using the old injector staging method will require working a range of bins around the secondary injector stage point all at once to keep a smooth transition. MS2/MS3X/MS3-Pro users who are running table based staging can tune right through the injector stage point typically without additional effort.

I'll expand a bit on secondary staging with the table for MS2/MS3X/MS3-Pro for a moment regarding large changes in injector size. If you have a big difference between primary and secondary size, say 550/1680 as is common, then you may need to reduce the amount of secondary injector in the stage table. This will require rescaling the table a bit to shift all of the load bins "down" so that you have 2 or three rows above 100KPA. Then once above 100KPA bring your secondaries in a little smoother instead of the example table that basically goes to 100% at 110KPA. This will make the VE table a lot more sane as those big secondaries are brought online.

Tuning Over Run (Decel) Fuel Cut
Decel fuel cut will cut all fuel to the engine during deceleration. This prevents large amounts of unburned fuel from going through the engine. Not only does this save fuel, but it stops your car from suffocating those drivers behind you.

The overrun settings I have provided should be good for 99% of applications. The two settings you will likely tweak are the KpA and TPS activation points. Fuel will not be cut unless the Megasquirt is reading KPA and TPS position below those points so you will need to pay attention to both when tweaking the overrun. If overrun is not coming on consistently because your TPS doesn't fall below the activation point, lower the activation point. The same goes for the KPA point. You should not change the RPM cutoff point from 1500 RPM as lowering it will make the engine have a tendency to stall. Raising it will just waste fuel needlessly. Unless your porting (ie. bridgeport) shifts your operating range up so that 1500 RPM is basically idle. Then you may wish to bump up the "RPM greater than" value.

MS2/MS3/MS3-Pro ECUs have the TPS position set in percent instead of a raw number like MS1. So make sure your TPS calibration is correct before spending any time on any TPS related tuning.

Tuning Throttle Transitions and The Accelerator Pump
This is an area of tuning that requires a little experience and intuition. It also relies on the rest of the map being pretty close so don't bother trying to get these settings right until the rest of the map is tuned.

To tune the accelerator pump, start at idle and then stab the throttle slightly. From within the accel/decel window, observe the graph beside the bins to decide which ones need to be changed. If the engine hesitates for a second and sounds as though it is momentarily "stopped running", you will need to add fuel. If it falters and drops RPM, you will need to remove fuel. Minor changes can make big results, so work slowly. Gradually increase the amount of throttle you are using until you reach wide open. Essentially, you are sitting at idle and then pressing the throttle to various degrees while observing the result.

If you find that you need to add a load of fuel in the accel pump, revisit the VE table and richen up the bins directly above the idle bins a little. You will find that when you stab the throttle, the engine will shoot towards atmospheric/boost directly above the idle. It is important that these bins provide enough fuel with a smooth transition into the rest of the map.

It will take some time to get this right.

Going further, MS2 and MS3X/MS3-Pro support Enhanced Acceleration Enrichment (EAE). This method of AE takes into account that all the fuel may not enter the engine once injected; some may stick to runner walls or puddle. By telling the ECU how much fuel may stick to the walls, how much may be sucked from the walls and how this all changes with airflow (RPM), the ECU can get a much better model of the engine. This results in much more accurate fueling across the entire VE table, not just during transients (accel/decel). It is well beyond the scope of a basic tuning rundown to cover this. Tuning EAE requires a well dialed in VE table so once the table is fully tuned, you may wish to explore it as the result will be better engine response than the old accel pump can deliver and more accurate fueling. Read up on the documentation for an idea of what's involved then hit up the MSEXTRA Forum to see other people's experiences tuning EAE.

Tuning Warmup Enrichment (Warmup Wizard)
Now that you have a fairly well tuned VE table, it is time to tweak the warmup enrichment. Keep in mind that you only have one chance per day to make a truly cold start, which is the best place to start when dealing with the warmup enrichment. Start the car and use the Warmup Wizard to slowly adjust the warmup enrichment to keep the engine running smoothly. You will likely need to run high 12s for the first few bins and then taper to low 13s for the rest. Whatever keeps the engine happiest. Note that the engine doesn't really need to run richer during warmup. The reason for the richer ratio is because so much fuel will end up on the walls of the intake runners due to condensation within the cold engine. Those of you with MS3X/MS3-Pro will likely be able to run much leaner during warmup due to the sequential injection.

This may take days, or even weeks, to get right. Obviously you cannot tune temperatures lower then ambient when you cold start a car, so it may even take months until you have weather appropriate to tune the lower temperature corrections.

Tuning Closed Loop AFR Control
Closed loop uses the oxygen sensor to correct the air/fuel ratio under light load. The Megasquirt offers fairly robust closed loop controls and the settings I gave you will suit most applications. However, there are a few changes you may have to make.

If you find that the car rarely goes into closed loop, you will need to determine which value keeps it out of range.

For MS1 people using the settings I have provided, this will be manifold pressure. I have set up 70 KpA as the cutoff point for closed loop, thus anytime the ECU sees over 70 KpA it will go back to reading only from the VE table. If you have as small turbo, or an aggressive port, your car may pull less vacuum then this on the highway. If that is the case you may wish to set the settings in "Open Loop Mode" to use the TPS as the determining factor instead. The only annoyance you will run into here is that you can end up with the engine spending too much time in closed loop while driving in the city in traffic, which makes for an anemic feeling car.

MS1 people have a few more parameters to adjust then MS2 users. The "EGO Switch Point" represents the output voltage from the O2 sensor that the Megasquirt will seek to maintain. The settings I gave with the AEM UEGO I specify in this writeup, represent an AFR of about 15.2:1. A higher voltage is a leaner ratio and a lower voltage is a richer ratio. You will find these ratios on a chart in the UEGO Instructions. Head over to the AEM Website and click "Instructions". "Ignition Events" represent the number of ignition events between adjustments of the A/F ratio. Around 20 is a good number for 2 rotor and 4 cylinder engines. Another option (down at the bottom of the dialog box) is to use a fixed number of milliseconds between changes. However this can result in a rather choppy closed loop. I'd suggest leaving it as a function of engine speed. "Controller Step Size" determines how many percent the controller will alter the A/F ratio by at each change. 2 is about the limit. Any more and the change will be two great for the Megasquirt to handle quickly. If you find 2 leads to wild oscillation of the AF ratios, go down to 1. "Controller Authority" is how much the controller is allowed to alter the injector output to maintain the AF ratio. If closed loop is making more then 30% worth of changes, you need to dial in you VE table a little more!

MS2 and MS3X/MS3-Pro share many closed loop settings so they will be covered together. They build on MS1 so see the MS1 instructions for the basics on some of the settings. Most of the settings in AFR/EGO Control you can leave alone. The ones you may need to adjust are the minimum RPM and the min/max load and TPS values. These will have some variance depending on how the engine is ported. More radically ported engines may leap towards atmospheric at much lower throttle than a stock port. So for these engines, you may want to rely mainly on TPS value to activate/deactivate EGO control. The PID settings govern how the algorithm actually seeks the appropriate AFR ratio. The provided settings set PID up for a smooth transition to the programmed ratio but quick correction if it strays. If EGO control isn't finding the AFR you have commanded in the AFR table, then you may have to readjust PID. Start by zeroing the three settings out. Then increase I until the target AFR is reached with as little oscillation as possible. Then increase P a little until the oscillation minimizes or ceases. Full details can be found in the documentation. The air/fuel ratios which the EGO control actually seeks are found in the "AFR Table 1". The table I have provided is a good place to start providing a smooth tune with a lean spot in the center for economy during cruise. It is, however, richer than need be. Most of those 13.8s can be 14.7s until you get into the higher load (greater than 5000 RPM, greater than 80 KPA). This is also the table that autotune uses as an AFR target.

One thing to note for all MegaSquirt users with S4 narrow range TPSs is that you will likely have to set closed loop to come on via a manifold pressure set point only. This is because the TPS value will show near full throttle even at less then 1/4 pedal due to the fact that it is narrow range.

Tuning The BAC Valve (Warmup, Closed Loop Idle)

Closed Loop Idle Tuning For MS1 Users
Under closed loop idle, the Megasquirt is using the BAC valve to actively regulate the idle at a set RPM point. This is quite useful in that it allows a high idle when the car is cold and will keep a steady warm idle regardless of air temps, engine electrical load or other factors. Earlier in this writeup you set up the closed loop idle parameters, then set the BAC valve as "Warmup Only". Warmup only is a duty cycle only setting that opens the valve while the engine is cold and then gradually closes it as the engine warms up. This creates the high idle and makes starting/driving a cold car fare more pleasant. Now that you have a good VE table and your cold start enrichments are dialed in, the controller can be set to enable closed loop idle.

Note: Don't bother trying to set up closed loop idle until the VE table, warmup enrichments and idle are properly set up. It will be very difficult to get a stable idle if the BAC valve is trying to compensate for wildly wrong AFRs. If anything, tune the AFRs at idle and cold start slightly rich to start and then adjust them once you have closed loop idle set up.

To turn on closed loop idle, go back into the "Idle Control" dialog and set "When to use PWM idle" to "Closed loop only". A bunch of options will change on that dialog and when you burn the changes, you should notice an immediate change to the idle. The ECU will try to regulate your idle speed to 1000 RPM if it is at or below 1000 RPM. You can observe this action by switching one of the gauges in Megatune/TunerStudio to "Idle DC". The more the duty cycle increases, the more air the ECU is letting in to increase idle speed.

Tuning closed loop idle involves adjusting how the BAC responds to engine changes to achieve the most stable corrections. Everything in the "Idle Control" dialog should be fine for most engines. We'll cover the "Dashpot Settings" a little later. Most of your tuning will take place in the "Idle Control (Closed Loop Settings)" dialog. The "Deadband Range" sets an RPM range close to the set idle speed at which the ECU won't bother correcting changes. 40 RPM is a good place to start. If you are tuning for lower idle speeds, you will want to lower this value a little. The upper and lower RPM limits tell the Megasquirt when to recover the idle quickly (if the difference is at the upper limit or above) and when to recover it slowly (if it is near the lower limit). The lower limit should always be around the deadband range, and the upper limit tends to work best when it is double the lower limit. Much of your tuning will be in adjusting the "Fast recovery" and "Slow recovery" times.

If the idle is unstable (hunting or oscillating) when the RPMs are far away from the target idle (for example, if you accidentally almost stall the engine when coasting down) then you need to increase the fast recovery time. If the opposite is true, where the engine lazily returns to the correct RPM, then you need to decrease this time. The numbers I have provided were obtained with a considerable amount of experimentation and should be a good place to start.

Slow recovery is used basically only when the engine is already around the idle speed. For example, if the electric fan switches on and tries to drag down the engine while idling, slow recovery will be used. If you slow recovery number is too large, then the engine will tend to hunt for a second or so to find the idle. If this is the case, decrease the slow recovery time a little and try again. If the slow recovery time is too short then the ECU will overcompensate and the idle will bounce.

As you can see, most of the problems will result in a bouncing idle so you will likely have to observe the Idle DC gauge to determine exactly what the ECU is trying to do and apply the appropriate changes.

If your idle is always hunting, check your air/fuel ratios. You will probably find a lean spot in the map directly above the idle bins. Richen it up and the idle will probably stabilize.

"Closure Speed" determines how quickly the Megasquirt should close the valve. By decreasing this setting, you cause the Megasquirt to act more quickly on its changes. Increase the number and the changes are made more gradually. "Startup Delay" is the number of milliseconds between when the engine has started and when the Megasquirt starts correcting the idle.

Back in the "Idle Control" window, the "Dashpot Settings" are for the software dashpot which is designed to slow down the drop in engine speed when the engine is returning to an idle after the throttle snaps closed. If you have removed the mechanical dashpot during the throttle body mod, these settings can help prevent the engine from stalling on quick throttle closure. "TPS threshold" tells the Megasquirt when the throttle is closed enough to activate the dashpot function. "Idle Activation Adder" tells the Megasquirt how many RPM above the idle RPM the dashpot should be triggered at. For example, the idle speed in this writeup is set at 1000 RPM, so with an idle activation of 250RPM the dashpot function will be enabled at 1250 RPM. The "Dashpot Settle Time" is how long the Megasquirt will wait for the idle to settle down after the dashpot has been activate. Finally, the "Dashpot Adder" tells the Megasquirt how much to open the BAC to activate the dashpot. With a setting of zero, the dashpot function is disabled. To enable it, put in a low value of under 10. Rev the engine and allow the RPMs to settle. At 1200RPM the dashpot will be activated. What you are looking for is an almost unnoticeable pause as the tach falls. If the RPMs shoot up, you need less Dash pot Adder. If there is absolutely no change, you need more.

Closed Loop Idle Tuning For MS2 and MS3X/MS3-Pro Users
Under closed loop idle, the Megasquirt is using the BAC valve to actively regulate the idle at a set RPM point. This is quite useful in that it allows a high idle when the car is cold and will keep a steady warm idle regardless of air temps, engine electrical load or other factors. Many of the settings between MS2 and MS3 are the same, so we'll cover both here.

Note: Don't bother trying to set up closed loop idle until the VE table, warmup enrichments and idle are properly set up. It will be very difficult to get a stable idle if the BAC valve is trying to compensate for wildly wrong AFRs. If anything, tune the AFRs at idle and cold start slightly rich to start and then adjust them once you have closed loop idle set up.

If you turned off your closed loop idle during initial startup, turn it back on now by going to "Startup/Idle: Idle Control" and setting "Algorithm" to "PWM Closed-loop". That will re-enable all of the functions in "Startup/Idle: Closed-loop idle control".

The settings I have provided should result in a stable idle if your VE table is smooth. As you can see there are a lot of settings here which govern the way the idle valve operates. You can see the documentation to learn exactly what each function does but here are some quick tips for getting a stable idle. It really helps when working with the idle control to set one of the gauges in TunerStudio to "Idle PWM%" found under "Outputs 2".

If you find that as the RPM drops back to idle it spike back up a little before settling down, reduce the Dashpot adder(%). The dashpot adds a little idle valve duty as the RPMs drop to smooth the reduction and prevent them from falling below idle, potentially stalling the engine. Too much dashpot will open the valve too much and bump the idle. You can see this on the PWM gauge as a slight spike as the RPM drops down.

If your idle is hunting around and you are sure the VE table is smooth then you can readjust the PID algorithm. Zero out the P, I and D values. Increase I until the idle reaches the target value with a little oscillation as you can manage. There will always be some hunting with P as zero so the goal here is to minimize it while making sure that the target idle RPM is reached. Now increase P until the oscillation goes away. That should be the ideal setting as long as the idle is stable. Momentary engine loads (e-fan) will cause a slight dip in RPM then the algorithm will open the valve and recover. D should in most cases be left at zero. The more D added, the less response the algorithm is. Use it only if there is no other way to control oscillation.

PID idle control will only be engaged if the TPS is reading at or below "Idle Activation TPS threshold(%)" so make sure that setting represents the TPS value at idle.

"RPM with valve closed" represents the RPM at which the car idles with the valve closed. With no electrical load this should be set by the hard idle stop screw. "RPM with valve open" is the engine RPM with the valve fully open which is typically somewhere around 4000 RPM on a 2nd gen. The PID algorithm uses this to help judge how far to open the valve to achieve a specific RPM. It should be a roughly linear relationship. Note that you can drop the valve open setting down to artificially restrict the valve movement and RPM range of PID. This will also allow more precise control over the set range. The two delay settings simply determine how long the ECU will wait once it's time to enter PID, to actually enter PID. If you find the idle unstable for the first few seconds, reduce "PID delay(sec)" a bit. "Crank to run delay(s)" typically has little effect unless set to a high value. The control interval can be decreased to make the algorithm more responsive.

You may need to radically reduce "PID lockout RPMdot threshold" to a value around 50 - 100 RPM if you find PID isn't responding. This setting is the RPM change at which point the PID algorithm decides RPM is actually changing, not just natural jitter in the reading.

As you can see, closed loop idle has probably the most adjustment of anything we've covered here which really underscores how important it is that the fuel and spark tables be correct first. Oh, I guess I should point out that you actually set the idle speed closed loop is trying to achieve in the "Startup/Idle: Closed-loop PWM idle target curve" window. At this point it may be obvious but you never know.

Navigation
<< Starting The Car For The First Time

How To Megasquirt Your 2nd Gen RX-7
Prerequisites And Requirements
Parts List
Building and/or Modding The Megasquirt MS1/MS2
Modding And Setting Up Megasquirt MS3X
Remove Stock Wiring and ECU
Modify Stock Wiring
Mount The Megasquirt ECU
Install CLT and IAT Sensors
Wire The Megasquirt MS1/MS2 Harness Into The Car
Wire The Megasquirt MS3/MS3-Pro Harness Into The Car
Wire The ECU Panel, Wideband and Fuel Pump
Reassemble The Engine Bay
Programming The ECU (MS1)
Programming The ECU (MS2)
Programming The ECU (MS3X / MS3-Pro)
Starting The Car For The First Time
Basic Tuning
Installation Video and Resources
Installation Video and Resources >>

Back To Mods Page | Mail Me | Search | Buy Me A Coffee