Basic tuning guide with MazdaEdit
#1
Basic tuning guide with MazdaEdit
This thread is meant to give a helping hand in remapping the stock ecu by gathering all the known shady information on the logic behind it, what map does what, when, and how.
This thread also exists to spite those who gatekeep information - see the topic of "maximum calculated load" which dragged on for lots of pages and years with no clear cut answer.
The guide is not meant to teach you how to tune, how toshow everyone you're an idiot make a pop and bang tune, it means to teach you how to apply what you already know about tuning on this specific ECU. I presume you already know all the buzzwords(such as MAF, KR, IPW, LTFT, STFT, IAT, ECT, EGT, AFR), and know some fairly advanced physics. I don’t have time to spoon feed anyone, but I would want more people to know that the OEM ecu is reasonably capable for any build and purpose; and that tuning is not some black magic.
Note that ideally you'd have someone with a master in computer science decompile the ROM and figure out everything without a doubt - but sadly this did not happen yet for RX8s. Unlike MX5 NCs - similar age, mostly the same ECU, yet that was mapped out entirely but the RX8 one was left short handed. The info in this thread is mostly obtained by trial and error, and experience of other tuners of this ECU and may be incomplete or a "half truth".
Thus, I invite anyone willing to contribute with knowledge to send a PM and I'll add the info here once confirm it personally.
Post will be updated as often as new knowledge is obtained/tested out.
Map names will be as they are shown in MazdaEdit(ME) to keep things clear across calibrations(of which there are many). Support for Versatune is not planned(they name things differently and sometimes replace units shown). Throughout the guide, all measurement units will be in degrees Celsius, AFR will be considered as 14.7:1 for stoichiometric ratio. There is a lot to learn about this ECU by reading the Mazda “Service Highlights 2004”. I don’t want to get sued so google it yourself to give it a good read. As a general word: all OEM ECUs do a lot of stuff we don’t care about, or we should not touch that. For this you will notice that you’ll be touching about 20-30-50 maps, while the ECU has about 700 of them. A 2020 modern ECU has about 20000 maps in it.No tuning solution to this day has defined all maps, not even those that might be of interest. Do not touch any low temperature compensation table. Mazda knows best!
Ch1: ECU inputs
The ecu inputs are numerous and most of them won’t need adjustment. The only one that might ever need rescaling is the MAF. The car already has a wideband O2 sensor and a narrowband O2. The wideband can read as rich as 11, and as lean as 27. The narrowband is still uncharted land as of now – but we do know it is used to provide a precise reference for what really is AFR 14.7 (besides emissions stuff). The ECU has as notable digital inputs(i.e. they come via CAN bus from other modules in the car) the fuel level, wheel speeds, torque down requests from TCM or DSC. A notable case has to be made for EGT: the car doesn’t have a true EGT sensor and whatever it reports is an integral of load/rpm over time. So, EGT is actually computed. By 2024 I hope that everyone knows that the oil pressure sensor is in fact just a switch and that the ECU doesn’t know true oil pressure, nor does it do anything if it feels it has no oil pressure. Same for overheating or lack of coolant/oil - there is no known protection that shuts down the engine or pops a check engine light.
Ch2: ECU outputs
Again lots of outputs but you won’t have to mind most of them. The notable ones that might need adjustment are the fuel injectors(scaling/dead time), divided into 3 stages; then the SSV/VDI solenoids(on/off control), APV motor(brushed DC motor driven forwards/backwards), OMP stepper motor(DC stepper motor driven forwards/backwards), DBW throttle body.
Cooling fans are controlled by the ECU, and those should always be made to start sooner.
Ignition coil dwell time should be adjusted for the coils at hand. Note that the factory coils can take 20% more dwell and produce a fatter spark for boosted cars – NA ones don’t need this.
Ch2: Ignition timing
The ECU splits timing into numerous use cases – and it does so with fueling as well.
For once you have base timing – for idle and for regular driving. Then there are numerous corrections for all sorts of use cases. In general you do not touch ignition timing on an NA car – won’t net you any power. In turbo builds you rescale the main “Leading Timing” (A)(B) and “Trailing Timing” (A)(B) ones to go from 10% load to 200% load in 10% increments. You generally add timing with RPM and subtract it with boost. Do not touch the OEM (<100% load) areas.
Top tip – if you’re experiencing idle problems like the engine stalling out during coasting, or it needing constant throttle pedal input to stay alive, you may add 5 degrees of leading/trailing timing in the 2D idle maps around 750-1000 rpm areas. More timing means more torque (to an extent). More on this in the idle chapter.
Do not expect your logs to show you exactly what you type into the large 20x20 timing maps; as said there are a gazillion corrections running in there that are not documented and probably never will be. More on this in the knock chapter.
There is a table that is not included in MazdaEdit(ME) and which specifies a minimum timing split of -5deg under ~ 70% load and -15 deg above that. This serves as some basic protection against people messing up their trailing timing tables under boost. There are numerous tables used by the DSC(and TCM...) during torque down requests. There is a special running mode during catalyst warm-up; timing is retarded to -25 deg and kept there for a time period while the catalyst is forced to warm up quick. You may notice that the engine has a deep nasty tone while doing so. This mode can be disabled but sadly ME does not feature the map for this. The “Timing Unknown?” table is indeed unknown what/when/how it is used.
Ch3: Fueling
The ECU operates both under open loop and closed loop control. Modern ECUs only do closed loop – this one does closed loop under certain conditions that boil down to limited load and limited RPM.
Under closed loop(CL) the ECU will target an AFR of 14.7 (lambda 1). There are 2 tables which can alter this; their range of adjustment is limited to +- 0.03 lambda(by default, this can be changed but ME won’t show the maps for it). There are numerous CL to OL transition thresholds; most notably by RPM vs Load, RPM vs TPS, ECT, RPM, timers. Top tip: the “Closed Loop Unk” table refers to RPM vs absolute load. The other “Closed Loop Max Load” table(s) also refer to engine load, but inside the ECU it is defined in a different fashion. The logic as to when/why each table is used is still unknown.
Under open loop(OL) fueling the ECU will NOT be using the wideband O2 to keep the desired RPM, set by the “Open Loop Fuel” tables. By the way – these tables are completely mis-named; they do NOT go by gear but by something else – more details under the knock chapter. Boosted builds should rescale the X axis to go from 10% to 200%. NA cars can benefit a little bit from leaning out the AFRs to the 13.5-13-12.5 realm, depending on the cars use case(and if it no longer has a catalyst). The fuel enrich tables(again mis-named; they are not by gear) will specify that AFR if the main/base table is leaner than what the enrich table specifies. The overrun fuel restore will cut fuel above that RPM if the engine is under deceleration. This is the table which holds the most potential to ruin an engine quick – so you want to end it, mess with this one. Open loop will be used also in case of faulty front O2 sensor.
Here is where injector scaling and dead times come into play – one should never toy with those unless you’re really running another set of injectors. Entering a larger injector scaling will lean out the mixture (because the ECU will see that the injectors are large, and WON’T open them for a long time to inject X grams of fuel). Reducing the scaling will enrich the mixture (because the ECU sees that it has small injectors which need to be open a long time to inject X grams of fuel).
Injector scaling A refers to the primary injectors(which are the red ones in stock form), B is for the secondary ones (the large fuel rail; in 4 port engines these are blue; in 6 port engines these are the outer 2 injectors at the front and rear of the engine. C is for the primary 2 injectors – 4 port engines don’t have them; in 6 port engines these sit on top of the middle iron ports and inject fuel in them.
For logging purposes only the primary 1 injectors are available. The other 2 sets are not accessible at all. The secondary injectors come online at the same time as the SSV opens though.
Generally while in CL you’ll never worry about anything – the ECU takes care that fueling is on point... UP to a point! If your injectors are leaking or stuck, nothing can fix that. A minor vacuum leak, the ECU handles that. All (crappy) aftermarket intakes, even those can be compensated for to some degree.
In OL you’ll be on your own – the ECU computes what it can and then fires away the injectors. If the AFR is no where near the specified one... well, that’s that. That’s what OL means – you don’t take any feedback and do things your way. Obtaining the desired open loop AFR can be done by altering the VE (actually engine load compensation) table. Adding in the VE table adds fuel; same for subtracting. More details in airflow chapter. Another method is to bash the open loop tables – say you specify an AFR of 11.8 and obtain 13.8; some tuners will then target 9.8 and probably obtain 11.8. This is a terrible approach but it works – so long as you don’t mind making your desired AFR table completely unreadable – you’ll never know what the car will be trying to get because you’ve scaled that table to not mean anything close to reality anymore.
There are a few special fueling modes: while cranking, after starting, during catalyst warm-up, cut-off, restoring fueling, catalyst overheat protection fueling, and others.
Cranking fueling is dependant on ECT, BARO, TPS, cranking time. The table in ME about cranking fuel does not seem to be used all the time(or at all). However it is known that by altering cranking TPS you can reduce the amount of fuel being injected during cranking. This helps cars with poor compression still start.
Catalyst warm-up fueling is used to go extremely rich during cold startup – unburnt fuel burns in the manifold with the help of the secondary air injection pump. At the moment there is not enough information as to how/when this mode is used; presumably based on ECT/IAT thresholds. In conjunction with retarded ignition timing and very poor compression/ignition system this leads to flooded engines when moving the car for very short distances when cold – that’s why people keep saying “to let them warm up before shutting them down” and proceed to burn half a fuel tank while idling every time they start the car. Catalyst warm-up takes no more than 30 seconds to a minute! You can hear the change in exhaust note when it is over.
Fuel injection cut-off is used by RPM(as rev limiter) and as a deflood procedure. By interpolating TPS @ 0% = full cranking injection and TPS @ 100% = no injection you probably figured out that more TPS = less cranking injection.
Catalyst overheat protection fueling is known to exist but the specifics are not known. Presumably, once EGT is above X degrees, fueling is enriched further.
Chapter 4: Load
Load is a computed parameter; based on displacement RPM, MAF, BARO, IAT, VE, some other 1% variables. Load represents how much air the engine is taking in, as a percentage where at 100% you’d be taking the whole swept displacement of both rotors. Load should generally follow the torque curve the engine makes – and follow it across any BARO/IAT changes. More BARO = more load; more IAT = less load; load varies naturally with the engine not being able to fill its rotor chambers with air at any RPM. That’s why there is a VE table.
Load should be scaled, ideally, so that it is at 100% at 25C ambient temp while taking into account the natural torque curve of the engine(mostly flat, pointy at 5500 RPM, falling down towards redline and idle).
For NA cars, load indicates if the MAF is dirty or otherwise reading a high/ low load. During engine braking, load should be 10% or so. An idle load would be 25-30%, cruising would be 30-35-40-50%, and WOT would be anything over 90% with a peak of 105-110% around 5500 RPM.
For boosted builds, on top of what NA cars do, load should match ambient pressure + UIM boost; this helps with scaling fueling and timing tables.
Load is scaled by scaling the MAF; the more g/s you specify for a given voltage, the higher the load will go. For NA cars the MAF curve should NOT need more than a few % of tweaking – save for (crappy) aftermarket intakes that skew things up terribly. For boosted builds – well, a good intake setup won’t again need much adjustment but it will need it regardless – at least in the 360g/s area. Extend the table to read as high as 460g/s because if you do hit 360g/s of flow, you will stop injecting more fuel than that! About that...
Load is capped – meaning that the ECU doesn’t believe a stock engine can hit a load of 140%. It can’t possibly make power as if its displacement increased by 40%. However, boosted cars can and do hit loads as high as 220%. More information on this in the limiters chapter – this is extremely important for boosted builds.
When rescaling the MAF table, keep in mind that it has 4 important areas.
0 to 5g/s is the cranking area – this is used to determine(partially) the cranking fuel.
5-10g/s is the idling area.
10-20g/s is very light driving at slow speeds
20-70g/s is cruising area – from barely moving to highway high speed driving
Above that... the rest. The 20-70 range is most important because whatever fuel trims are built there will be applied across the rev range at WOT.
Chapter 5: Knock
This is a dark area. Information about renesis knock control is pretty much non existent – most tuners simply disable this function. The ECU will pull timing as it feels it needs to – without ever telling us because KR logging DOES NOT WORK(despite it having a CAN PID and reporting “0” on it all the time). There are 2 tables that define knock thresholds vs load/rpm, there are IAT/BARO compensation tables; KR increment/decrement tables, base KR, a few thresholds for enabling/disabling knock control.
Once the ECU decides someone’s knocking at heaven’s door, it will pull timing. It will keep pulling it for a time period and increase the magnitude as it desires. You can notice this on your logs as some missing timing in the 2000-5000 area where the factory setup is most active. DO NOT rely on this system to guard your engine against knock/preignition. On an NA car I doubt it can even knock so bad as to shatter an apex seal – but when boosted all bets are off. However the S2 RX8 has 2 knock sensors, while S1 only has one. You know what OEMs hate? Wasting money on hardware. Another sensor + wiring + connector + assembly time + software support. The 20B had 3 knock sensors – that was in 1992 even. So, on the S1 RX8 in between “the system does nothing” and “they added another KS in the S2”... the truth must be in the middle! To this day, this system is not well enough understood to provide tangible protection – however I am against disabling it entirely. Adjust it just so that it does not get in the way.
Note that the knock increment/decrement tables are named the other way around. Same for Open Loop Fuelling - instead of gear 1-2, 3-4. 5-6 and timing - those are in reality used depending on knock level. No knock/knock/failsafe(preignition or something) - this is extrapolated from the MX5 NC ECU.
This thread also exists to spite those who gatekeep information - see the topic of "maximum calculated load" which dragged on for lots of pages and years with no clear cut answer.
The guide is not meant to teach you how to tune, how to
Note that ideally you'd have someone with a master in computer science decompile the ROM and figure out everything without a doubt - but sadly this did not happen yet for RX8s. Unlike MX5 NCs - similar age, mostly the same ECU, yet that was mapped out entirely but the RX8 one was left short handed. The info in this thread is mostly obtained by trial and error, and experience of other tuners of this ECU and may be incomplete or a "half truth".
Thus, I invite anyone willing to contribute with knowledge to send a PM and I'll add the info here once confirm it personally.
Post will be updated as often as new knowledge is obtained/tested out.
Map names will be as they are shown in MazdaEdit(ME) to keep things clear across calibrations(of which there are many). Support for Versatune is not planned(they name things differently and sometimes replace units shown). Throughout the guide, all measurement units will be in degrees Celsius, AFR will be considered as 14.7:1 for stoichiometric ratio. There is a lot to learn about this ECU by reading the Mazda “Service Highlights 2004”. I don’t want to get sued so google it yourself to give it a good read. As a general word: all OEM ECUs do a lot of stuff we don’t care about, or we should not touch that. For this you will notice that you’ll be touching about 20-30-50 maps, while the ECU has about 700 of them. A 2020 modern ECU has about 20000 maps in it.No tuning solution to this day has defined all maps, not even those that might be of interest. Do not touch any low temperature compensation table. Mazda knows best!
Ch1: ECU inputs
The ecu inputs are numerous and most of them won’t need adjustment. The only one that might ever need rescaling is the MAF. The car already has a wideband O2 sensor and a narrowband O2. The wideband can read as rich as 11, and as lean as 27. The narrowband is still uncharted land as of now – but we do know it is used to provide a precise reference for what really is AFR 14.7 (besides emissions stuff). The ECU has as notable digital inputs(i.e. they come via CAN bus from other modules in the car) the fuel level, wheel speeds, torque down requests from TCM or DSC. A notable case has to be made for EGT: the car doesn’t have a true EGT sensor and whatever it reports is an integral of load/rpm over time. So, EGT is actually computed. By 2024 I hope that everyone knows that the oil pressure sensor is in fact just a switch and that the ECU doesn’t know true oil pressure, nor does it do anything if it feels it has no oil pressure. Same for overheating or lack of coolant/oil - there is no known protection that shuts down the engine or pops a check engine light.
Ch2: ECU outputs
Again lots of outputs but you won’t have to mind most of them. The notable ones that might need adjustment are the fuel injectors(scaling/dead time), divided into 3 stages; then the SSV/VDI solenoids(on/off control), APV motor(brushed DC motor driven forwards/backwards), OMP stepper motor(DC stepper motor driven forwards/backwards), DBW throttle body.
Cooling fans are controlled by the ECU, and those should always be made to start sooner.
Ignition coil dwell time should be adjusted for the coils at hand. Note that the factory coils can take 20% more dwell and produce a fatter spark for boosted cars – NA ones don’t need this.
Ch2: Ignition timing
The ECU splits timing into numerous use cases – and it does so with fueling as well.
For once you have base timing – for idle and for regular driving. Then there are numerous corrections for all sorts of use cases. In general you do not touch ignition timing on an NA car – won’t net you any power. In turbo builds you rescale the main “Leading Timing” (A)(B) and “Trailing Timing” (A)(B) ones to go from 10% load to 200% load in 10% increments. You generally add timing with RPM and subtract it with boost. Do not touch the OEM (<100% load) areas.
Top tip – if you’re experiencing idle problems like the engine stalling out during coasting, or it needing constant throttle pedal input to stay alive, you may add 5 degrees of leading/trailing timing in the 2D idle maps around 750-1000 rpm areas. More timing means more torque (to an extent). More on this in the idle chapter.
Do not expect your logs to show you exactly what you type into the large 20x20 timing maps; as said there are a gazillion corrections running in there that are not documented and probably never will be. More on this in the knock chapter.
There is a table that is not included in MazdaEdit(ME) and which specifies a minimum timing split of -5deg under ~ 70% load and -15 deg above that. This serves as some basic protection against people messing up their trailing timing tables under boost. There are numerous tables used by the DSC(and TCM...) during torque down requests. There is a special running mode during catalyst warm-up; timing is retarded to -25 deg and kept there for a time period while the catalyst is forced to warm up quick. You may notice that the engine has a deep nasty tone while doing so. This mode can be disabled but sadly ME does not feature the map for this. The “Timing Unknown?” table is indeed unknown what/when/how it is used.
Ch3: Fueling
The ECU operates both under open loop and closed loop control. Modern ECUs only do closed loop – this one does closed loop under certain conditions that boil down to limited load and limited RPM.
Under closed loop(CL) the ECU will target an AFR of 14.7 (lambda 1). There are 2 tables which can alter this; their range of adjustment is limited to +- 0.03 lambda(by default, this can be changed but ME won’t show the maps for it). There are numerous CL to OL transition thresholds; most notably by RPM vs Load, RPM vs TPS, ECT, RPM, timers. Top tip: the “Closed Loop Unk” table refers to RPM vs absolute load. The other “Closed Loop Max Load” table(s) also refer to engine load, but inside the ECU it is defined in a different fashion. The logic as to when/why each table is used is still unknown.
Under open loop(OL) fueling the ECU will NOT be using the wideband O2 to keep the desired RPM, set by the “Open Loop Fuel” tables. By the way – these tables are completely mis-named; they do NOT go by gear but by something else – more details under the knock chapter. Boosted builds should rescale the X axis to go from 10% to 200%. NA cars can benefit a little bit from leaning out the AFRs to the 13.5-13-12.5 realm, depending on the cars use case(and if it no longer has a catalyst). The fuel enrich tables(again mis-named; they are not by gear) will specify that AFR if the main/base table is leaner than what the enrich table specifies. The overrun fuel restore will cut fuel above that RPM if the engine is under deceleration. This is the table which holds the most potential to ruin an engine quick – so you want to end it, mess with this one. Open loop will be used also in case of faulty front O2 sensor.
Here is where injector scaling and dead times come into play – one should never toy with those unless you’re really running another set of injectors. Entering a larger injector scaling will lean out the mixture (because the ECU will see that the injectors are large, and WON’T open them for a long time to inject X grams of fuel). Reducing the scaling will enrich the mixture (because the ECU sees that it has small injectors which need to be open a long time to inject X grams of fuel).
Injector scaling A refers to the primary injectors(which are the red ones in stock form), B is for the secondary ones (the large fuel rail; in 4 port engines these are blue; in 6 port engines these are the outer 2 injectors at the front and rear of the engine. C is for the primary 2 injectors – 4 port engines don’t have them; in 6 port engines these sit on top of the middle iron ports and inject fuel in them.
For logging purposes only the primary 1 injectors are available. The other 2 sets are not accessible at all. The secondary injectors come online at the same time as the SSV opens though.
Generally while in CL you’ll never worry about anything – the ECU takes care that fueling is on point... UP to a point! If your injectors are leaking or stuck, nothing can fix that. A minor vacuum leak, the ECU handles that. All (crappy) aftermarket intakes, even those can be compensated for to some degree.
In OL you’ll be on your own – the ECU computes what it can and then fires away the injectors. If the AFR is no where near the specified one... well, that’s that. That’s what OL means – you don’t take any feedback and do things your way. Obtaining the desired open loop AFR can be done by altering the VE (actually engine load compensation) table. Adding in the VE table adds fuel; same for subtracting. More details in airflow chapter. Another method is to bash the open loop tables – say you specify an AFR of 11.8 and obtain 13.8; some tuners will then target 9.8 and probably obtain 11.8. This is a terrible approach but it works – so long as you don’t mind making your desired AFR table completely unreadable – you’ll never know what the car will be trying to get because you’ve scaled that table to not mean anything close to reality anymore.
There are a few special fueling modes: while cranking, after starting, during catalyst warm-up, cut-off, restoring fueling, catalyst overheat protection fueling, and others.
Cranking fueling is dependant on ECT, BARO, TPS, cranking time. The table in ME about cranking fuel does not seem to be used all the time(or at all). However it is known that by altering cranking TPS you can reduce the amount of fuel being injected during cranking. This helps cars with poor compression still start.
Catalyst warm-up fueling is used to go extremely rich during cold startup – unburnt fuel burns in the manifold with the help of the secondary air injection pump. At the moment there is not enough information as to how/when this mode is used; presumably based on ECT/IAT thresholds. In conjunction with retarded ignition timing and very poor compression/ignition system this leads to flooded engines when moving the car for very short distances when cold – that’s why people keep saying “to let them warm up before shutting them down” and proceed to burn half a fuel tank while idling every time they start the car. Catalyst warm-up takes no more than 30 seconds to a minute! You can hear the change in exhaust note when it is over.
Fuel injection cut-off is used by RPM(as rev limiter) and as a deflood procedure. By interpolating TPS @ 0% = full cranking injection and TPS @ 100% = no injection you probably figured out that more TPS = less cranking injection.
Catalyst overheat protection fueling is known to exist but the specifics are not known. Presumably, once EGT is above X degrees, fueling is enriched further.
Chapter 4: Load
Load is a computed parameter; based on displacement RPM, MAF, BARO, IAT, VE, some other 1% variables. Load represents how much air the engine is taking in, as a percentage where at 100% you’d be taking the whole swept displacement of both rotors. Load should generally follow the torque curve the engine makes – and follow it across any BARO/IAT changes. More BARO = more load; more IAT = less load; load varies naturally with the engine not being able to fill its rotor chambers with air at any RPM. That’s why there is a VE table.
Load should be scaled, ideally, so that it is at 100% at 25C ambient temp while taking into account the natural torque curve of the engine(mostly flat, pointy at 5500 RPM, falling down towards redline and idle).
For NA cars, load indicates if the MAF is dirty or otherwise reading a high/ low load. During engine braking, load should be 10% or so. An idle load would be 25-30%, cruising would be 30-35-40-50%, and WOT would be anything over 90% with a peak of 105-110% around 5500 RPM.
For boosted builds, on top of what NA cars do, load should match ambient pressure + UIM boost; this helps with scaling fueling and timing tables.
Load is scaled by scaling the MAF; the more g/s you specify for a given voltage, the higher the load will go. For NA cars the MAF curve should NOT need more than a few % of tweaking – save for (crappy) aftermarket intakes that skew things up terribly. For boosted builds – well, a good intake setup won’t again need much adjustment but it will need it regardless – at least in the 360g/s area. Extend the table to read as high as 460g/s because if you do hit 360g/s of flow, you will stop injecting more fuel than that! About that...
Load is capped – meaning that the ECU doesn’t believe a stock engine can hit a load of 140%. It can’t possibly make power as if its displacement increased by 40%. However, boosted cars can and do hit loads as high as 220%. More information on this in the limiters chapter – this is extremely important for boosted builds.
When rescaling the MAF table, keep in mind that it has 4 important areas.
0 to 5g/s is the cranking area – this is used to determine(partially) the cranking fuel.
5-10g/s is the idling area.
10-20g/s is very light driving at slow speeds
20-70g/s is cruising area – from barely moving to highway high speed driving
Above that... the rest. The 20-70 range is most important because whatever fuel trims are built there will be applied across the rev range at WOT.
Chapter 5: Knock
This is a dark area. Information about renesis knock control is pretty much non existent – most tuners simply disable this function. The ECU will pull timing as it feels it needs to – without ever telling us because KR logging DOES NOT WORK(despite it having a CAN PID and reporting “0” on it all the time). There are 2 tables that define knock thresholds vs load/rpm, there are IAT/BARO compensation tables; KR increment/decrement tables, base KR, a few thresholds for enabling/disabling knock control.
Once the ECU decides someone’s knocking at heaven’s door, it will pull timing. It will keep pulling it for a time period and increase the magnitude as it desires. You can notice this on your logs as some missing timing in the 2000-5000 area where the factory setup is most active. DO NOT rely on this system to guard your engine against knock/preignition. On an NA car I doubt it can even knock so bad as to shatter an apex seal – but when boosted all bets are off. However the S2 RX8 has 2 knock sensors, while S1 only has one. You know what OEMs hate? Wasting money on hardware. Another sensor + wiring + connector + assembly time + software support. The 20B had 3 knock sensors – that was in 1992 even. So, on the S1 RX8 in between “the system does nothing” and “they added another KS in the S2”... the truth must be in the middle! To this day, this system is not well enough understood to provide tangible protection – however I am against disabling it entirely. Adjust it just so that it does not get in the way.
Note that the knock increment/decrement tables are named the other way around. Same for Open Loop Fuelling - instead of gear 1-2, 3-4. 5-6 and timing - those are in reality used depending on knock level. No knock/knock/failsafe(preignition or something) - this is extrapolated from the MX5 NC ECU.
#2
Chapter 6: Airflow/torque control
Airflow is a direct requirement for torque (when, and how much of it). Airflow is maximised at any RPM based on the VDAIS – Variable Dynamic Air Intake System. Lots of words for essentially keeping air velocity high at any air mass. That’s why the car has a SSV, VFAD, APV, VDI. 4 rotary VTECs. In NA cars you don’t touch these – Mazda spent a lot more time figuring this out than any of us would ever do. Don’t believe your bridgeport will make more power if you open these earlier – if anything, open them later. Don't open them all from idle, you won't make more power. Don't unplug them, Mazda didn't pay for them because their engineers were dumb.
The SSV is a mystical valve as far as knowing what triggers it. The conditions for it to be opened are based on ECT vs minimum RPM (the 2D table in ME), an absolute RPM condition of ~ 6000 RPM (so if you are above 6k RPM the SSV opens regardless), and TPS. Below that, there is a baro compensation table, and 3 other unknown variables. The bottom line is that, at this time and day we do not have an exact outline of how to get the SSV to open sooner or later. However we can alter the 2D RPM vs ECT table to raise the minimum RPM. Factory setting is somewhere around 3750 RPM for WOT; but partial throttle cruising will have you hit 5000 RPM and the SSV will still be closed.
The VFAD is a simple RPM threshold. Go above/beyond and it changes state. Same for VDI and APV; in some tunes there are multiple thresholds, or the tables go by ECT vs RPM
SSV, VDI, APV desired positions can be logged using ME – this helps in validating tunes. When these open, there is a momentary torque dip visible on a dyno or in airflow readings.
As for torque control: the ECU provides an early form of drive by wire throttle body; meaning that the pedal is for the most part directly linked to the throttle body and in a 1:1 manner. In more modern ECUs, the pedal actually represents a % of torque demanded by the driver. In RX8s we happen to have 2 useless tables called desired engine torque and calculated engine torque. To the best of my knowledge these are not used in manual gearbox cars. They might be ref. for the slushboxes to command a TPS closure as part of torque reduction needed when changing gears. At any rate, don't bother (with) them.
Then, there are 4 DBW tables where the inputs are RPM and APP, the output being TPS(where 84 = 100% throttle body opening). There are 4 because the first 3 are for gears 1-2, 3-4, 5-6 and the last is for neutral. These tables generally don’t need touching unless you want to make your pedal a true % of torque request. In the factory tune you would notice that the last half of accelerator pedal is useless – the engine is already at 90% torque with just 50% of pedal travel. The last 10% of torque is spread over 50% of the pedal. Generally you would turn the x=y chart into an exponential curve; where a lot of APP equals less TPS; a lot less than 1:1.
It can help idle and starting to add more TPS in the respective areas. As far as I know, those 4 tables are always used (except for failsafe modes where the ECU detects a fault in the DBW system). If a car is constantly undershooting its idle RPM, adding more air(more TPS) can help. Too much air and the ECU will pull timing back, undershooting and overshooting all the time. Balance air with timing so that the ECU has a decent torque reserve to add just from timing. Adding TPS during cranking reduces fuel injection – so here is the place to add it.
Idle maps set the target idle across varying driving conditions such as driving, standstill, coasting, heavy electrical loads, in gear/neutral etc. I usually set them all to the same RPM vs ECT.
Chapter 7: Oil injection
There are 3 paths that the ECU can take when deciding what amount of oil to inject. It can regulate this by the stepper motor on the OMP – it can go from 0 to 60 steps. 0 meaning no oil, 60 meaning full OMP flow. Do not enter more than 60 in any OMP table.
There are 2 tables that ME brings you: RPM vs load, and RPM vs TPS. On top of that, there is an ECT table too. The ECU will select the smallest number out of each of those, for the driving condition it finds itself in. When starting cold, or overheating very badly, the ECT one takes over and acts as an oil injection amount booster. So does the TPS – when WOT, the OMP is set by the RPM vs TPS table. Otherwise, the RPM vs load table is used.
Chapter 8: Limiters
“Imma raise that rev limiter to 10000 rpm hehe”. Nah you shouldn’t, you won’t be making more power at 10000 than you’re doing at 7000 rpm and you’ll be wearing your engine down a lot. The rev limiter on all OEM ECUs is a fuel cut – meaning that for some time you’ll be running lean while the limiter is triggering. Avoid hitting any rev limiter.
Same can be told for flat foot shift – a stupid thing to do – which basically sets a fuel cut at whichever RPM you were at already.
The most important limiter on this ECU is the load limiter. In ME you have 3 tables for it: Calc load max, Calc load IAT comp, Calc load BARO comp. The load limiter is a separate value from the actual load the engine is at any time.
To understand the load limiter:
0) (zero because computers count from 0 ) There is only 1 kind of load. The value is on 16 bits and then it gets corrected and turned into a float. That is what the ECU uses in all its tables. Say any engine rpm vs engine load table, well that's the load I mean. I shall call it from now on, simply, LOAD.
1) What ME logs as Calculated load... under OBD2 pid at 0X04 is an 8 bit truncated value of load and scaled to be from 0-255 to 0-100%.
2) What ME logs as Absolute load... under OBD2 pid at 0x43 is the full engine load you see in the tables. It is a 16 bit unsigned value, 0-65535.
3) Both "calculated load" and "absolute load" are calculated from the same variable the ECU works with(remember, the one above ! ^^^^^^). Absolute load is the entire variable and the only one used in the ECU tables. Calculated load is the most important part of it.. if you may.
4) "True" load is really how much load there is, with no one limiting it. If you'd run 5 times the athmospheric pressure and in an ideal fashion, then load would be 500%.
If "true" load is under the load limit...then true load = load and is used properly by the ecu. You always wanna be in this area!
How load is computed... the ecu does some math based on maf, rpm, VE, etc etc. It comes up with a percentage. Like 154% for example.
Then these 3 tables come into play. These 3 tables form a load limiter. Multiply the numbers in the 3 tables and you'll get a result like, say, 98.6%. This is our load limiter.
Oops, our load is higher than the load limiter ? Then, our load is the load limit itself!This means that the load the ecu needs to use in an engine load-based table, it will use this capped value of load. Load = load limiter.
When the ecu uses the load limiter and not "true" load:
Why is this so easy to spot, and why 100%... the answer lies in data representation. I wont nerd you with the details but you can math it out if you don't believe me. 8 bits truncated from 16 bits. MSB first representation.
What to do when chasing more power?
It is a load limiter in the sense that it caps fuel injection and timing and so on(recall, every table where engine load is used). If you let it go crazy the ECU can max out the injectors at any time the MAF tells it to... such as a break in the wiring, bad MAF, crazy scaling etc.
Chapter 9: DTCs
ME offers 3 sets of DTC tables: these set if a DTC can be active(be read with a scanner), and if it can light up the check engine light because of it. When disabling a DTC you’d set it to 0 on all 3 maps. Note that some DTCs will still do their thing even if masked in ME – such as OMP limp mode will still take place even if you mask all OMP codes. Like it are a few other cases.
Chapter 10: Security
ME and quite literally any other tuning out there will change the access key to your ECU. What’s that? Well, in a few words, it is a password to the memory of the ECU where the tune is stored. I’d rather not publish them here... because they are security stuff after all. ME will also encrypt the .hex files it touches. You won’t be able to read or write a ME tune with other software – with one exception. Meet RX8Man: https://github.com/Rx8Man who was kind enough to make a tool for reading/writing to the ECU even if it was flashed with ME. This allows you to obtain a clean .hex file into or out of the ECU. Thanks to him, this guide is richer in information, and possibly even better in the future. Browse his github for some more maps that are not in ME. In ME pro (possibly personal too?) you can define your own maps(so add the ones from Rx8Man's github to ME)
There are a lot - A L O T - of ECU firmwares out there. Manual. Auto. USDM. AUDM. UKDM. EUDM. JDM. 4 port. 6 port. Early 2003-2004; 2004 late; 2005 early; 2006 and up. Generally you should never upload a file that didn't originate from what you already had in the ECU. There are some exceptions: the same family of tunes can be upgraded; e.g. N3ZHE0 is the earliest form for EUDM; followed by N3ZHEB, and lastly N3ZHEC. There is N3J1E too, found in 2006 and later EUDM cars but who knows why it exists or what it does different, or if older cars can be upgraded to it. Such experiments are best left not attempted.
Chapter 11: Table logic
The tables axis are always in an ascending order(e.g. 500 750 1000 1500 RPM). If you edit the table header or Y axis, be sure not to mess up! Don’t do 7500 1500 2000 3000 5000 10000 9000 RPM – the last column of 9000 won’t ever be used! This is even more important when rescaling the whole axis for boosted cars. There are lots of tables to rescale in such cases.
The tables interpolate inside them – so if you have 1500-2000 RPM and your RPM is 1750 then the ecu will see what’s the middle value in the cells for that RPM area.
The tables DO NOT EXTRAPOLATE. For example – if your MAF table doesn’t go higher than 360g/s but your turbo would take you there, the MAF won’t read any higher than 360g/s even if in reality it should/can read 440g/s. Same for all tables – like the VE one ending at 8500 RPM. When you hit 9000 RPM, the last column for 8500 is still in use.
Just because you can enter an AFR of 8.23 doesn’t mean you should run that. Just because you can set a timing of -43 degrees or 67 doesn’t mean you should run that. Neither ME nor the ECU cares if the values you enter are sane.
Final words
This ECU is as simple as they get while still doing all the house chores. Fuel injection, timing, DBW, all the comfort and performance features. It is a good base to learn tuning on; however NOT on a boosted car since it lacks protections. When tuning do not go down the rabbit hole by make a VE table 56% richer in some area because the car keeps getting lean there – think logically.
WHY would it be lean there? I shouldn’t need more than 10% at worst – perhaps I’m losing fuel pressure up top when I need more fuel flow. Or a silicone coupler is leaking vacuum.
Did I mis-type something? Did I type an idle RPM of 100 instead of 1000 and now my car just dies when it warms up?
Did I mess up my maf scaling so bad that not even CL can drive my car? Or should I just throw that junk intake away instead of messing for ages with the tune? You can spend a day fixing a poor maf setup, or 30 fuel tanks and 2 years trimming the VE and MAF scaling... your choice. The MAF is the most commonly messed up sensor in modified cars.
Did you forget that there is virtually NO POWER to be found anywhere in the tune? Making 5hp more on a 230 hp engine is hardly 2% more which might as well be lost if you come measure it another day.
If you understood this guide well, imagine what would happen with the stock ECU if faced with 50kpa of boost on the stock tune.... and if the answer isn't "leaning out + knocking itself apart on the first spool" then read the guide again.
Lastly, if I've missed something important that I happen to know I shall add the answer to that question to this topic.
Airflow is a direct requirement for torque (when, and how much of it). Airflow is maximised at any RPM based on the VDAIS – Variable Dynamic Air Intake System. Lots of words for essentially keeping air velocity high at any air mass. That’s why the car has a SSV, VFAD, APV, VDI. 4 rotary VTECs. In NA cars you don’t touch these – Mazda spent a lot more time figuring this out than any of us would ever do. Don’t believe your bridgeport will make more power if you open these earlier – if anything, open them later. Don't open them all from idle, you won't make more power. Don't unplug them, Mazda didn't pay for them because their engineers were dumb.
The SSV is a mystical valve as far as knowing what triggers it. The conditions for it to be opened are based on ECT vs minimum RPM (the 2D table in ME), an absolute RPM condition of ~ 6000 RPM (so if you are above 6k RPM the SSV opens regardless), and TPS. Below that, there is a baro compensation table, and 3 other unknown variables. The bottom line is that, at this time and day we do not have an exact outline of how to get the SSV to open sooner or later. However we can alter the 2D RPM vs ECT table to raise the minimum RPM. Factory setting is somewhere around 3750 RPM for WOT; but partial throttle cruising will have you hit 5000 RPM and the SSV will still be closed.
The VFAD is a simple RPM threshold. Go above/beyond and it changes state. Same for VDI and APV; in some tunes there are multiple thresholds, or the tables go by ECT vs RPM
SSV, VDI, APV desired positions can be logged using ME – this helps in validating tunes. When these open, there is a momentary torque dip visible on a dyno or in airflow readings.
As for torque control: the ECU provides an early form of drive by wire throttle body; meaning that the pedal is for the most part directly linked to the throttle body and in a 1:1 manner. In more modern ECUs, the pedal actually represents a % of torque demanded by the driver. In RX8s we happen to have 2 useless tables called desired engine torque and calculated engine torque. To the best of my knowledge these are not used in manual gearbox cars. They might be ref. for the slushboxes to command a TPS closure as part of torque reduction needed when changing gears. At any rate, don't bother (with) them.
Then, there are 4 DBW tables where the inputs are RPM and APP, the output being TPS(where 84 = 100% throttle body opening). There are 4 because the first 3 are for gears 1-2, 3-4, 5-6 and the last is for neutral. These tables generally don’t need touching unless you want to make your pedal a true % of torque request. In the factory tune you would notice that the last half of accelerator pedal is useless – the engine is already at 90% torque with just 50% of pedal travel. The last 10% of torque is spread over 50% of the pedal. Generally you would turn the x=y chart into an exponential curve; where a lot of APP equals less TPS; a lot less than 1:1.
It can help idle and starting to add more TPS in the respective areas. As far as I know, those 4 tables are always used (except for failsafe modes where the ECU detects a fault in the DBW system). If a car is constantly undershooting its idle RPM, adding more air(more TPS) can help. Too much air and the ECU will pull timing back, undershooting and overshooting all the time. Balance air with timing so that the ECU has a decent torque reserve to add just from timing. Adding TPS during cranking reduces fuel injection – so here is the place to add it.
Idle maps set the target idle across varying driving conditions such as driving, standstill, coasting, heavy electrical loads, in gear/neutral etc. I usually set them all to the same RPM vs ECT.
Chapter 7: Oil injection
There are 3 paths that the ECU can take when deciding what amount of oil to inject. It can regulate this by the stepper motor on the OMP – it can go from 0 to 60 steps. 0 meaning no oil, 60 meaning full OMP flow. Do not enter more than 60 in any OMP table.
There are 2 tables that ME brings you: RPM vs load, and RPM vs TPS. On top of that, there is an ECT table too. The ECU will select the smallest number out of each of those, for the driving condition it finds itself in. When starting cold, or overheating very badly, the ECT one takes over and acts as an oil injection amount booster. So does the TPS – when WOT, the OMP is set by the RPM vs TPS table. Otherwise, the RPM vs load table is used.
Chapter 8: Limiters
“Imma raise that rev limiter to 10000 rpm hehe”. Nah you shouldn’t, you won’t be making more power at 10000 than you’re doing at 7000 rpm and you’ll be wearing your engine down a lot. The rev limiter on all OEM ECUs is a fuel cut – meaning that for some time you’ll be running lean while the limiter is triggering. Avoid hitting any rev limiter.
Same can be told for flat foot shift – a stupid thing to do – which basically sets a fuel cut at whichever RPM you were at already.
The most important limiter on this ECU is the load limiter. In ME you have 3 tables for it: Calc load max, Calc load IAT comp, Calc load BARO comp. The load limiter is a separate value from the actual load the engine is at any time.
To understand the load limiter:
0) (zero because computers count from 0 ) There is only 1 kind of load. The value is on 16 bits and then it gets corrected and turned into a float. That is what the ECU uses in all its tables. Say any engine rpm vs engine load table, well that's the load I mean. I shall call it from now on, simply, LOAD.
1) What ME logs as Calculated load... under OBD2 pid at 0X04 is an 8 bit truncated value of load and scaled to be from 0-255 to 0-100%.
2) What ME logs as Absolute load... under OBD2 pid at 0x43 is the full engine load you see in the tables. It is a 16 bit unsigned value, 0-65535.
3) Both "calculated load" and "absolute load" are calculated from the same variable the ECU works with(remember, the one above ! ^^^^^^). Absolute load is the entire variable and the only one used in the ECU tables. Calculated load is the most important part of it.. if you may.
4) "True" load is really how much load there is, with no one limiting it. If you'd run 5 times the athmospheric pressure and in an ideal fashion, then load would be 500%.
If "true" load is under the load limit...then true load = load and is used properly by the ecu. You always wanna be in this area!
How load is computed... the ecu does some math based on maf, rpm, VE, etc etc. It comes up with a percentage. Like 154% for example.
Then these 3 tables come into play. These 3 tables form a load limiter. Multiply the numbers in the 3 tables and you'll get a result like, say, 98.6%. This is our load limiter.
Oops, our load is higher than the load limiter ? Then, our load is the load limit itself!This means that the load the ecu needs to use in an engine load-based table, it will use this capped value of load. Load = load limiter.
When the ecu uses the load limiter and not "true" load:
- Less fuel will be injected(because, say you have 154% worth of air in the engine, but inject only 98.6% instead of 154% worth of fuel).
- Ignition timing won't be adjusted properly for the "true load" we're getting. You may have set a timing for, say, 154% which is retarded compared to say, 98.6% which is much higher.
- Any and all load-related tables will be capped at the load limiter.
Why is this so easy to spot, and why 100%... the answer lies in data representation. I wont nerd you with the details but you can math it out if you don't believe me. 8 bits truncated from 16 bits. MSB first representation.
What to do when chasing more power?
- Max out the "calc load max" table... the name is wrong. It should be "Load limiter base value". Set it to 200 % in the areas where you expect to hit more load than stock.
- Set IAT and BARO tables to 1.1 for starters. This will allow you to go to 200 * 1.1 * 1.1 = 242%(THIS is your load limiter) which should be plenty for what this engine can take.
- Do your tuning and observe load, under the parameter "Absolute engine load". It should never reach 242%. Say, it reaches 170-180%. Then set the limiter to 200% by using the BARO comp table and that's it.
- You now have the ecu never reach the load limiter under normal conditons, but if your MAF acts up or anything else implausible happens, then the ECU won't go crazy with it.
It is a load limiter in the sense that it caps fuel injection and timing and so on(recall, every table where engine load is used). If you let it go crazy the ECU can max out the injectors at any time the MAF tells it to... such as a break in the wiring, bad MAF, crazy scaling etc.
Chapter 9: DTCs
ME offers 3 sets of DTC tables: these set if a DTC can be active(be read with a scanner), and if it can light up the check engine light because of it. When disabling a DTC you’d set it to 0 on all 3 maps. Note that some DTCs will still do their thing even if masked in ME – such as OMP limp mode will still take place even if you mask all OMP codes. Like it are a few other cases.
Chapter 10: Security
ME and quite literally any other tuning out there will change the access key to your ECU. What’s that? Well, in a few words, it is a password to the memory of the ECU where the tune is stored. I’d rather not publish them here... because they are security stuff after all. ME will also encrypt the .hex files it touches. You won’t be able to read or write a ME tune with other software – with one exception. Meet RX8Man: https://github.com/Rx8Man who was kind enough to make a tool for reading/writing to the ECU even if it was flashed with ME. This allows you to obtain a clean .hex file into or out of the ECU. Thanks to him, this guide is richer in information, and possibly even better in the future. Browse his github for some more maps that are not in ME. In ME pro (possibly personal too?) you can define your own maps(so add the ones from Rx8Man's github to ME)
There are a lot - A L O T - of ECU firmwares out there. Manual. Auto. USDM. AUDM. UKDM. EUDM. JDM. 4 port. 6 port. Early 2003-2004; 2004 late; 2005 early; 2006 and up. Generally you should never upload a file that didn't originate from what you already had in the ECU. There are some exceptions: the same family of tunes can be upgraded; e.g. N3ZHE0 is the earliest form for EUDM; followed by N3ZHEB, and lastly N3ZHEC. There is N3J1E too, found in 2006 and later EUDM cars but who knows why it exists or what it does different, or if older cars can be upgraded to it. Such experiments are best left not attempted.
Chapter 11: Table logic
The tables axis are always in an ascending order(e.g. 500 750 1000 1500 RPM). If you edit the table header or Y axis, be sure not to mess up! Don’t do 7500 1500 2000 3000 5000 10000 9000 RPM – the last column of 9000 won’t ever be used! This is even more important when rescaling the whole axis for boosted cars. There are lots of tables to rescale in such cases.
The tables interpolate inside them – so if you have 1500-2000 RPM and your RPM is 1750 then the ecu will see what’s the middle value in the cells for that RPM area.
The tables DO NOT EXTRAPOLATE. For example – if your MAF table doesn’t go higher than 360g/s but your turbo would take you there, the MAF won’t read any higher than 360g/s even if in reality it should/can read 440g/s. Same for all tables – like the VE one ending at 8500 RPM. When you hit 9000 RPM, the last column for 8500 is still in use.
Just because you can enter an AFR of 8.23 doesn’t mean you should run that. Just because you can set a timing of -43 degrees or 67 doesn’t mean you should run that. Neither ME nor the ECU cares if the values you enter are sane.
Final words
This ECU is as simple as they get while still doing all the house chores. Fuel injection, timing, DBW, all the comfort and performance features. It is a good base to learn tuning on; however NOT on a boosted car since it lacks protections. When tuning do not go down the rabbit hole by make a VE table 56% richer in some area because the car keeps getting lean there – think logically.
WHY would it be lean there? I shouldn’t need more than 10% at worst – perhaps I’m losing fuel pressure up top when I need more fuel flow. Or a silicone coupler is leaking vacuum.
Did I mis-type something? Did I type an idle RPM of 100 instead of 1000 and now my car just dies when it warms up?
Did I mess up my maf scaling so bad that not even CL can drive my car? Or should I just throw that junk intake away instead of messing for ages with the tune? You can spend a day fixing a poor maf setup, or 30 fuel tanks and 2 years trimming the VE and MAF scaling... your choice. The MAF is the most commonly messed up sensor in modified cars.
Did you forget that there is virtually NO POWER to be found anywhere in the tune? Making 5hp more on a 230 hp engine is hardly 2% more which might as well be lost if you come measure it another day.
If you understood this guide well, imagine what would happen with the stock ECU if faced with 50kpa of boost on the stock tune.... and if the answer isn't "leaning out + knocking itself apart on the first spool" then read the guide again.
Lastly, if I've missed something important that I happen to know I shall add the answer to that question to this topic.
Thread
Thread Starter
Forum
Replies
Last Post
Left4Dead
Series I Tech Garage
78
07-02-2023 08:12 AM
Tigger
Series I Engine Tuning Forum
14
03-18-2004 05:36 PM