How To Megasquirt Your 2nd Gen RX

download How To Megasquirt Your 2nd Gen RX

of 21

Transcript of How To Megasquirt Your 2nd Gen RX

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    1/21

    How To Megasquirt Your 2nd Gen RX-7: Programming The

    ECU (MS2)

    This section covers programming the MS2 ECU to run the 13B rotary. Because there is such a

    difference between the setup of MS1 and MS2, each ECU is covered separately.

    Flash The Firmware

    If you have not already done so using a Stimulator during the build/modding section thefirst step is to flash the appropriate firmware into the Megasquirt. For convenience I've

    reproduced those instructions here.

    The stock Bowling & Grippo firmware loaded onto Megasquirt CPUs from the factory will run

    the rotary, but it will run fuel only and without a lot of the features we depend on (such as stagedinjection). It is therefore necessary to load the Megasquirt and Spark Extra (MSnSE) firmware.

    Disconnect the ignition coils from the harness before proceeding! Failure to do this will burnout the coils! Instructions on how to configure Megatune to read your Megasquirt is found on the

    MegaTune website. The site contains full instructions on how to set up Megatune, what to do ifyour laptop doesn't have COM ports, and how to set Megatune to communicate with Megasquirts

    running various firmware versions. Configure Megatune and then plug the computer into theMegasquirt.

    MSII users should see the MS2-Extra Software Manual for installation instructions for the latest

    version of MS2/Extra.

    Don't bother following the instructions on the above websites to configure the Megasquirt to

    your engine. We'll do that later.

    Note that when you use the Configurator to configure Megatune, you need to select theappropriate Lamda Sensor and Idle Controller. Set LAMBDA_SENSOR to "AEM_LINEAR --

    AEM Gauge AEM-30-42xx" and IDLE_CONTROLLER to "PWM_GAUGE -- PWM IdleValve (e.g., Ford or Bosch)".

    Configure The ECU To Run The Rotary Engine

    Basic parameters need to be set up in the ECU to tell it the displacement of the engine, howmany injectors it has, the trigger and ignition setup and what to do with it's outputs. The MS2

    firmware is still being developed (unlike MS1 which is basically done) so it is possible that someof the screens you see here may not exactly match the firmware you are running. Each settings

    page will be shown with a chart of the settings, and a screenshot of what they look like. Anysettings that are not mentioned can just be left default. Keep in mind that you don't have to be

    connected to the ECU to make these settings. You can open up Megatune, keep it offline, set

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    2/21

    everything up, then save it as an MSQ. You can then load that MSQ into the ECU when you arein the car. If you are programming the ECU live, make sure to press "Burn To ECU" before

    closing each window. Otherwise the changes are made to the map in Megatune but not sent tothe ECU.

    I am not going to explain in detail every setting on this page. To do so would be a monumentaltask and simply repeat information in the Megasquirt manuals. With each screen I will give youthe basic idea of what the settings do but if you want to know more, it is up to you to look it up.

    MS2/Extra Settings For 2nd Gen 13B

    The settings are presented below in a list with the title of each item representing the menu

    choices needed to open up those settings. We start with the most basic characteristics of theengine.

    Basic Setup: Engine Constants 1

    These settings are the basic characteristics of the engine. Note that the number of

    injectors is set to two. This is correct, because even though we have 4, the secondaries are

    staged and not always operating.

    Basic Setup: More Engine constants

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    3/21

    More engine constants allows you to set up multiple methods of determining engine load.For example, you could run Alpha-N (TPS vs. RPM) if you have a weak vacuum signal.

    For the stock rotary, we only need speed density of as our control method so secondarymethods can be disabled.

    Basic Setup: Injector Characteristics

    These settings tell the Megasquirt how to control the injectors. The settings presented

    here are for high impedance injectors. For low impedance injectors, the PWM CurrentLimit and PWM Time Threshold settings need to be tuned howeverI have found that

    because only two injectors per driver circuit are used on the rotary, these settings seem towork fine for both high and low impedance injectors with no damage to the injectors or

    the Megasquirt.

    Basic Setup: Fuel VE Table 1

    The VE (volumetric efficiency) table represents the main fuel map for the engine and is

    where you will be doing most of your tuning. Each engine combination is going to need a

    wildly different VE table and even two engines configured exactly the same will end upwith a different table when tuned. Therefore, this table is only suited as a first startup and

    limp to the dyno map. It should start the car and run it reasonably well but is by far not

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    4/21

    ideal for your engine. It will give you a good place to start tuning. Do not just load thistable, start the car and run the engine into boost. While this table should be safely rich

    everywhere, there is no guarantee. Carefully approach boost and judge for your self howmuch you have to richen up that area of the map before getting throttle happy.

    Basic Setup: AFR Table 1

    The AFR table provides air/fuel ratio targets for the Megasquirt to follow when operating

    under closed loop. With a wideband sensor the Megasquirt is able to work to achieve a

    variety of AFRs, not just 14.7 as it would with a narrowband. The ratios presented in thistable are a very good starting point. It is really only the cruise area we are concerned with(the area showing AFRs of around 15:1) as the Megasquirt is set to go open-loop

    everywhere else.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    5/21

    Basic Setup: Ignition Table 1

    This is the main timing table referenced anytime the engine is running. The only period

    during which this table is not used is when the engine is cranking. This table should run

    most rotary engines quite well and you will probably only have to make minoradjustments. It is safe to run in boost as well as in NA applications.

    Basic Setup: General, lags

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    6/21

    The general settings tell the Megasquirt whether to operate in single or dual table mode,how to correct for differences in atmospheric pressure and what kind of acceleration

    enrichment to use. We are only operating in single table mode and we are using standardAE for the moment. You may wish to play with Enhanced Accel Enrichment (EAE) later

    but for now it should be disabled to make tuning more straightforward. As for the lag

    factors, they tell the Megasquirt how log it takes each sensor to register a reading the timewhatever it is measuring has changed. These can be left as default unless you experienceissues (such as jittery sensor readings not caused by bad grounding).

    Basic Setup: Rev Limiter

    There are several rev limiter options available but here we are using fuel cut. Since all

    fuel is cut, there is little risk. However if you are constantly bouncing off the rev limiter it

    will pay to set up a hard and soft limit by cutting spark as this will result in a muchsmoother feel.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    7/21

    Basic Setup: Other Fuel Settings

    These settings set the RPM points for high and low RPM when using EAE. Since we

    have disabled EAE, it really doesn't matter what these settings are so just set "Low RPM

    Threshold (rpm)" to "2500" and "High RPM Threshold (rpm)" to "5000". These are the

    default values. If you enable EAE, make sure to revisit these settings.

    Basic Setup: EGO Control

    EGO control defines how the oxygen sensor is used in closed loop operation. The AFRsit seeks out have already been set in the AFR table so most of these settings just tell the

    Megasquirt that it has a wideband sensor and when to enter closed loop.

    All other options are disabled.

    Once you have made the changes in EGO Control, go back and set the "Controller

    Authority" to 0 (zero) to disable closed loop operation. During the first startup and initialtuning, closed loop will get in the way so it is best to turn it off. Once you have your VE

    table reasonably well set, you can go back to these settings and set it to 30%.

    Basic Setup: Tach input/Ignition settings

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    8/21

    These settings tell the Megasquirt where it is getting an RPM signal (toothed wheel) andhow to use that signal. They also tell the Megasquirt how to fire the ignition coils (bring

    the output low) and that the engine is going to be firing both leadings on one coil (wastedspark). The one setting you may have to change here is Trigger Offset, but only if you

    have stabbed your CAS in a non-stock location.

    Basic Setup: More Ignition Settings

    The aptly named "More Ignition Settings" menu contains, surprisingly, more ignitionsettings. These are the secondary settings such as where to pull timing from, dwells and

    rotary mode. For now, ignition advance should come from the main timing table butduring the initial startup we will revisit this screen and set a fixed advance so the CAS

    position can be adjusted.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    9/21

    You probably won't have to change any of these options past the initial setup. One which

    might end up getting tweaked is "Cranking Advance". 8 degrees may be too much in

    some applications and can cause the engine to kick back against the starter. I have foundthat in stock port setups, around 8 degrees provides a very snappy startup.

    Basic Setup: Trigger Wheel Settings

    We already told the Megasquirt that it is getting it's tach input from a trigger wheel, so

    now it needs to be told how to read the pulses coming from that wheel. Once these

    options are set, they will not have to be readjusted.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    10/21

    Startup/idle: Start/idle settings

    The only setting relevant here is the cranking RPM. At this number and below, the

    Megasquirt knows the engine is cranking and not actually running. For most cars,300RPM is fine as long as the battery and starter are healthy.

    Startup/idle: Priming Pulse

    The priming pulse is the initial injector opening time which occurs just after the

    Megasquirt is powered on. It is there to "prime" the injectors with fuel and to set up aslight vapour cloud in the intake ports to help with starting. These numbers are not really

    critical as long as they are in the ballpark so it's unlikely you will be spending much timetuning them. The table presented here will work for most setups. Of far more importanceis the cranking table which will be covered next.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    11/21

    Startup/idle: Cranking Pulse

    The cranking pulse tells the Megasquirt how much to enrich the fuel mixture while theengine is cranking. Unlike the MS1 where this is specified as a fixed pulsewidth, the

    MS2 specifies it as a percentage of the main fuel map. Thus your final settings willdepend on your VE table. These settings should get you going but should be considered

    quite rich.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    12/21

    Startup/idle: ASE Percentage

    After Start Enrichment (ASE) increases fuel supply to the engine just after starting, for a

    specified number of engine cycles. This helps with both a hot start condition (heat

    soaked) and a cold start condition (fuel tends to collect on the intake runners) as theengine typically runs lean for a few seconds directly after startup. However during the

    initial tuning, this can often confuse things. The engine may attempt to stall which willtrigger the ASE, which will cause it to run unevenly then attempt to stall again, triggering

    the ASE. This can be very irritating. For now I suggest you disable ASE by setting all ofthe "Afterstart (%)" bins in this window to 0. Once some tuning on the car has been done

    and it is starting reliably, then ASE can be revisited.

    Startup/idle: ASE Taper

    ASE Taper is the number of engine cycles that ASE is applied. As ASE has been

    effectively disabled in the previous step then whatever is in this table is irrelevant.However in the beginning, when starting to tune ASE, it helps to set all of these bins to a

    fixed amount. So if you wish you can take this opportunity to set all of the "Taper(cycles)" bins to "250".

    Startup/idle: Idle Control

    There is only one setting in Idle Control that we need to configure. Once it is selected, allother options are disabled. Set "Algorithm" to "PWM Warmup".

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    13/21

    Startup/idle: Idle PWM Settings

    These settings tell the Megasquirt the basics of how to operate the BAC, as well as how

    to open it up during cranking. If you find your car shoots to some ridiculous RPM as soon

    as it starts, lower the "Cranking duty (%)".

    Startup/idle: Idle PWM duty Table

    The Idle PWM Duty Table specifies how long the BAC valve should be open at various

    coolant temperatures. Note that this is highly dependant on your final VE table and

    coolant temp enrichments so don't bother tuning this until the car is running wellotherwise. These numbers are just a decent value to avoid the car stalling out at low

    temps while also keeping it from shooting to crazy RPMs.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    14/21

    Startup/idle: Warmup Enrichment

    Warmup enrichment increases fuel supply to the engine while it is warming up. This is

    necessary because fuel atomizes less efficiently and tends to cling to runner walls whenthe engine is cold. These numbers, like the cranking table, depend on the main VE table

    so don't spend much time here until the VE table is workable.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    15/21

    Extended: Output port Settings

    The Megasquirt has several outputs that are configurable to operate under a variety of

    conditions. The only one we are already using is FIDLE, for the BAC valve which leavesa bunch free. One of the IAC (idle stepper motor) control ports will be used to control the

    e-fan, which gets set up in this screen.

    The "Threshold" is the value of the variable (in this case coolant) at which you want the

    output to trigger. "Hysteresis" is the changed required to turn that output off. Therefore,in these settings, the fan comes on at 195 degrees and switches off at 188 degrees. These

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    16/21

    switching temperatures work well in combination with the stock thermostat. The fan willcycle on and off during low speed driving, and remain totally off when there is enough

    airflow through the rad to keep the car cool.

    Extended: Barometric Correction

    Barometric correction will correct the reading of the MAP sensor for various atmospheric

    pressures. At the moment it is not necessary so just leave the settings at their defaults of

    all zeros. It really only is necessary if you are driving in an area where the pressureswings significantly, for example, in the mountains.

    Extended: Cold Advance

    Cold advance allows you to add or remove timing based upon coolant temperature. This

    is most useful when a little bit more timing is necessary as the engine warms up to

    maintain smoothness. For now and during the initial tune, it won't be helpful. Only after

    all other major fuel and ignition tuning has taken place should these settings be used.

    Extended: MAT-Based Timing Retard

    Manifold air temperature timing retard allows you to pull timing at high manifoldtemperatures. For the moment, just leave these settings at the default. Note: If you have

    high IATs and/or a stock top mount intercooler, you will probably want to tune this later.MAT ignition retard will allow you to pull timing if you are experiencing high intake

    temps that may be caused by an inefficient (like the stock) turbo and/or a stock top mountintercooler. If you are running more then 15 degrees of timing under boost and

    experiencing high intake temps you will want to start pulling out timing to avoid

    detonation.

    Extended: MAT Correction

    MAT Correction allows you to fine tune the air density calculation as performed by the

    ECU relating to air temperature. You can use this to compensate for heat soak conditionsor poorly placed IAT sensors. For the initial tune, this should be left at the default of zero

    across the board.

    Extended: Flex-Fuel

    Unless you actually have a GM style Flex Fuel sensor installed, then set "Flex FuelSensor" to "Disabled". This is only used in flex fuel applications (E85) and even if youhave such a thing installed on your RX-7, it is not covered in this writeup.

    Extended: Knock Threshold

    As there is no knock sensor installed, these settings can be left at defaults. They will noteffect the operation or turning of the engine.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    17/21

    Extended: Over Run Fuel Cut

    The over run settings tell the Megasquirt when fuel should be cut during over run (decel).

    With the TPS and manifold pressure below a certain threshold (set in this window) the

    Megasquirt knows the car is decelerating and will cut all fuel to prevent bucking, save

    fuel and stop from suffocating those drivers behind you. The settings I have providedhere are probably going to be good for almost everyone. One thing you may want toincrease is the RPM setting if you have a habit of engine braking to the very last second.

    Extended: Staged Injection

    To properly run the RX-7s staged injection, the Megasquirt needs to be set up with the

    size of the staged injectors and when to actually stage them. This is done in theappropriately named "Staged Injection" window. Here the injectors are set to come on

    above 3500 RPM and 90 KpA of manifold pressure. This is approximately equal to stocksettings though at a slightly lower RPM point. Note that this window shows 550CC

    injectors as installed in a stock TII. If your car is an NA, then you have 460CC injectors.Obviously, if you are running a different injector combination, these settings should be

    altered to reflect that.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    18/21

    Extended: Tacho output

    The dash tach is triggered by the trailing coil so it's unnecessary for the Megasquirt to

    operate it. Disable tachometer output by setting "Tacho output enabled" to "Off", which

    is the default setting.

    Extended: Launch Control

    Disable launch control by setting "Launch control option" to "Off", which is the default

    setting. There is no need to have launch control enabled at this point or during tuning. Ifyou wish to experiment with it later then do so only after the engine is fully tuned.

    Advanced: Dwell Settings

    Dwell is already setup in "More Ignition Settings". This screen allows you to compensate

    for battery voltage changes by increasing or lowering dwell. For the time being, leave it

    at the defaults. It is unlikely you will have to change any of these options.

    Advanced: Advanced Ignition Options

    Set "False trigger method" to "Simple", which is the default and will disable all other

    options in this dialog box.

    Advanced: Rotary Split Table

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    19/21

    The trailing settings specify how many degrees after the leadings the trailing plugs fire.This is referred to as "split". The table presented here is safe and efficient for both turbo

    and NA cars. As tuning split is a bit of a black art and rather hotly debated, leave thistable alone unless you have an idea of what you are doing. The one thing you may want

    to do is dial in a few more degrees of split under boost for a bit more safety. Though 10

    degrees is safe, many tuners run around 15 degrees.

    Advanced: Rotary Split Table: Rotary Trailing Settings (menu): Rotary Trailing Settings

    (menu option)

    You will find this dialog by clicking the "Rotary Trailing Settings" menu in the "Rotary

    Split Table" dialog box, and then selecting "Rotary trailing settings" from the menu.Confusing enough?

    Advanced: Code development test options

    You can ignore this menu option unless you already know what it means.

    Advanced: Output test mode

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    20/21

    You can ignore this menu option unless you already know what it means.

    Advanced: Noise Filter Settings

    The noise filter can help filter out ignition trigger noise by telling the ECU to ignore

    pulses of too low a duration at various RPM points. Leave this at the defaults for now butif you are experiencing noise that you cannot solve by fixing the hardware, you may needto tune the noise filter.

    You're probably now asking yourself why I didn't just provide a base map that you can load intothe ECU with all of those settings already in place. Well, what would you have learned then? If I

    had just provided a base map without explaining the key settings then you would have no basisof knowledge for possible troubleshooting.

    Now that you've spend the better part of an hour entering those settings, it is time to power

    prepare the Megasquirt for first startup by setting the TPS and telling the Megasquirt how to

    interpret the wideband signal.

    Calibrating The TPS

    Before we can start the car, the Megasquirt needs to know what value on the TPS represents

    closed throttle and what value represents wide open throttle.

    With the laptop connected, power on the car but do not attempt to start it. If you entered the map

    correctly the fuel pump should prime for a few seconds and then shut off. All the gauges inMegatune should come to life. The water temp and intake temp gauge should show ambient

    temperatures if the car is at room temperature.

    From the from the "Tools" menu, select "Calibrate TPS..." to show the following screen:

    With the throttle fully closed, press the top "Get Current" button. A number will now show up

    beside "Closed throttle ADC count".

    Now floor the throttle and press the bottom "Get Current" button. A number will now show upbeside "Full throttle ADC count". If this number is smaller then "Closed throttle ADC count",

    your TPS is connected backwards.

  • 8/7/2019 How To Megasquirt Your 2nd Gen RX

    21/21

    Click the OK button. Thus ends the TPS calibration.

    Calibrating the AFR Table

    The wideband outputs a voltage corresponding to the air fuel ratio it is reading. Not every

    wideband outputs the same voltage per AFR so the Megasquirt must be calibrated so that theAFR tables accurately represent wideband output. From the "Tools" menu, select "Calibrate AFRTable..." to show the following calibration screen:

    For "Sensor Type" select "AEM Linear AEM-30-4200" and then hit "OK". The processor will beprogrammed with the calibration table for that sensor.

    When complete, power cycle the processor.

    The Moment Of Truth! Time For The First Startup

    It's all been building to this and now the time has come. The next section of this writeup covers

    how to start the car, set the base timing and get something resembling an idle.