ECU Tuning as per "Down Under".... (Part 1) [Archive] - SR20 Forum

: ECU Tuning as per "Down Under".... (Part 1)


Pages : [1] 2 3

hpro123
09-11-2002, 07:50 AM
SR20DEFORUMS members may have seen lately postings from "badbiki" who is selling daugtherboards for ECU modification (practically a version of the hardware that any modification house like JWT, GRID, TECHTOM etc.) are using. Similar boards are WIDELY available down-under from several (at least 3 persons excluding the aforementioned) and certainly commodity items in Japan.

We all realize that the mod is legitimate if we know what to put in there. In this spirit I include below a "Sort-list" of important pages for anyone that may be interested.

Keep in mind that most of the following originated in the NISSANS13@yahoogroups.com group/list so I am not doing any original work here (and some has been repeated in "badbiki" originated threads).


Best freeware rom editing tool available
(there are 2 more - GTROMeditor and ROMediter- but definitely less capable than this one):

ROMEDITOR from http://www.925style.com/editor_direct.html
You will need to register to download it or simply use:

ID: romeditor
PASS: giveme

to get it.

You can also get from there ROM-address files that describe here in each ECU/ROM the valuable data is. This files are ascii files
editable so you can add additional information about ROM data that is not described in there as of now.

You can also get sample ROM binary images to play with and lternative MAF calibration files in case you plan to use an alternative Nissan MAF.


Most comprehensive 2nd hand site pointing to available information and "Altavista"-translated Japanese pages
(this is a brand new one):

http://www.boostcruising.com/members/chado/

and follow link ECU TUNING on the left.


Most helpful write-up: from Diarmuid Tyson whose simple pages are located in:

http://members.optushome.com.au/silent8ob/
and
http://members.optushome.com.au/silent8ob/ecu.htm

Those pages are incomplete but the ROM Analyser program he has in there is a VERY NICE little utility to help anyone figure out what goes on in a Nissan ECU. granted, it is for the CA18DET ECU but the principles are the same.

Now, since those pages are incomplete I am posting below a LENGTHY message he sent today. This is the realy detailed info and it is reproduced here after asking for his permission.


==============================================
POST FROM Diarmuid Tyson STARTS HERE
==============================================

I currently modify my ROMs with a hex editor and a custom ROM Analyser I wrote in Delphi. I've also used ROM Editor, which is excellent to get started. I'll try and make these articles application neutral so you can use
whatever tools you're comfortable with

--

Firstly - Background

(If you object to me using Horse Power (hp) as a measurement of airflow,
simply substitute in CFM or whatever you're happier with...)

Air Flow Meters (AFM), a.k.a Mass Airflow Meters (MAF):

The basic function of any ECU is simple. Calculate the correct amount of
fuel and ignition advance required by the engine at any time. To make these
calculations it needs to sense how much "load' the engine is under.

The primary load sensor on the Nissan ECCS ECUs is the Air Flow Meter. It is
the ECUs biggest asset and also it's achilles heel (from a performance
viewpoint).

The AFM measures the true mass of air entering the engine. Since mass of air
entering the engine is known, determining the mass of fuel required for an
appropriate Air Fuel Ratio is a straight forward calculation. This also
means the majority of modifications will not require a retune, unlike MAP
based systems.

Unfortunately the standard AFM can be a considerable restriction in the
intake. A 50mm diameter is not a large area for a turbo to draw through.
AFMs also have a set operating range from 0-5V, representing a flow of air
from 0 to their max rating. 5V on a CA18DET AFM is equivalent to enough air
to make around 200hp. 5V on a 300ZX TT AFM is enough for over 500hp.
Fortunately, retuning for a larger, less restrictive AFM is possible.

Once the CA18 ECU senses the AFM is at its limit (ie at or close to 5V), it
will cut fuel to protect the engine. The dreaded boost cut. Or more
accurately, Air Flow Cut.

Once the Airflow meter is at 5v, any increase in flow will still result in a
reading of 5v, as the sensor is at its limit. The ECU can no longer
calculate the correct amount of fuel, so it shuts down the engine to prevent
a lean out. Once the AFM reads below 5v, the ECU will inject fuel once
again.

--

ECU Injection Calculation - Overview

Ok, we need to know about a few of the ECU's basic variables first.


K Required Number:
This constant is the basic injector pulsewidth time. All calculations of
injector pulsewidth start here. If you make it larger, all injector
pulsewidths will get longer. If you make it smaller, all injector
pulsewidths will get shorter. This is a very powerful tool when it comes to
changing injectors, AFMs etc.

VQ Map:
The VQ Map is used to translate the AFMs non-linear voltage response, into a
linear load reading. Confused? Don't worry too much. For the moment just
think of the VQ Map as a "filter" that the AFM voltage goes through, and
gives a load percentage as a result.

Eg, 5v = 100%,
4v = 75% etc...

Fuel Maps:
The ECU has two fuel maps, High Octane and Low Octane. It will always run on
the High Octane Map unless it senses a problem.

The Fuel Maps have 3 components, the RPM scale, the Flow scale and the AFR
correction Map itself. All Maps are 16x16, giving 256 load points. The
scales must match the sides of the map so are 16 entries each.

Flow Scale a.k.a TP Scale:
(labelled 'Boost' in Rom Edit)
The Flow scale (as I call it) gives a basic injector pulsewidth(K constant)
multiplyer, depending on the load sensed by the AFM.

RPM Scale:
This scale determines what RPM each axis of the AFR correction map is
plotted against. Stock is from 500 rpm to 6800 rpm, in (mostly) 400 rpm
increments.

AFR Correction Map:
This is the business end of tuning. Full mapping of your AFRs across load
and RPM.

Putting it all together:
Ok, go through a quick example to see how all the above works
together in determining an injectors pulsewidth for a given load and RPM.
For the example lets suppose:

K constant = 0.125 Milliseconds
AFM reading = 5 Volts
RPM = 6800.

1) ECU reads AFM - 5v.
2) 5v is "filtered" by the VQ Map - 100% load.
3) Flow scale at 100% load is consulted (column 16) = 83.
4) Basic Pulsewidth = K constant x Flow scale
Basic Pulsewidth = 0.125 x 83
Basic Pulsewidth = 10.375ms
5) ECU consults RPM Scale,
6800 rpm corresponds with row 16 of the RPM scale.
(We have already calculated column 16 for the Flow scale.)
6) Entry in the AFR correction Map: row 16, col 16 = 1.6.
7) Injection Calculation = Basic Pulsewidth x AFR Correction
Injection Calculation = 10.375 x 1.6
Injection Calculation = 16.6ms


There you have it. In our imaginary ECU, at 5 volts on the AFM, 6800 rpm,
it will pulse the injectors for 16.6ms or around 95% duty cycle.

If you followed all that, then you're now prepared for the good stuff. The
next section will give you all the specifics about the above variables,
where and what the values are in the ROM image, how to interpret them into
meaningful values, and how to use them in tuning your ECU.

--

ECU Injection Calculation - Detailed Analysis

K Required Number: (Nice and simple, some unknowns though)
CA Rom Address: 3F80 - 3F81. 2x 8bit Values. Quanta: 00 B7 seems to equal
0.125ms(!)
SR Rom Address: 000A - 000B. 2x 8bit Values. Quanta: ? ms

As said before, the K required number is the basic injector pulsewidth. On
a stock CA18DET map it appears to be 0.125ms. For now that is all you need
to remember. You'll see how it fits in the "Putting it all together 2"
sections.

How do I know that the K Constant in a CA18DET (00 B7) = 0.125ms?
Well to be honest, I don't. I received this vital piece of info from a
Japanese CA tuner. Sceptical (as I am) I deconstructed all the maps on my
CA18DET to calculate Duty Cycle and AFR with the 0.125 ms value and it fits
perfectly. So, I'll continue with this assertion until I can be proven
wrong/right.


VQ Map: (This could take a while)
CA Rom Address: 3E18 - 3E74. 52 x 16bit Values. Resolution: 0.1Volt.
Quanta: 16bit Precision Quotient
SR Rom Address: 0700 - 077F. 64 x 16bit Values. Resolution: 0.8Volt.
Quanta: 16bit Precision Quotient

If you know nothing about AFMs, or Math, I might confuse you here. I've
made this as simple as I can, but if I confuse you, or you disagree, email
me. If you already know lots about AFMs, you could probably just skip to
the "* So how do I read a VQ Map? *" paragraph.

Where do I start. As I've stated before an AFM doesn't have a linear
response. If it did, we wouldn't need a VQ Map. Therefore we need a
mechanism that will convert this non-linear Voltage into a linear Quotient
(or percentage) of the AFM's maximum flow. Hrmm...

Voltage... Quotient... Map... VQ Map?

What do I mean by non-linear? Ok, lets say we have an ACME AFM, good for
about 500hp and 0-5v. At 0v we know its flowing 0hp worth of air. At 5v
its flowing about 500hp worth of air. But what about inbetween? If it was
linear, 1v might equal 100hp worth of air. So:

1v = 100hp
2v = 200hp
3v = 300hp
and so on.
So if you read 2.48v at the AFM you'd know you were flowing 248hp worth of air.

==============================================
POST FROM Diarmuid Tyson CONTINUES IN NEXT POST
==============================================


Chris
1992 Sunny 2.0GTi
Athens - GREECE

hpro123
09-11-2002, 07:52 AM
But that would make this section far too easy to write. The response of the
AFM is non-linear in that, its voltage gradient decreases as the flow
increases. Gradient means 'rate of change'. In other words "it takes more
air flow to increase the voltage, as the air flow increases". I'll try and
explain a little clearer. Lets take our ACME AFM, and give it a non-linear
response.
0v = 0hp
1v = 25hp
2v = 75hp
3v = 175hp
4v = 300hp
5v = 500hp
So it takes
25hp worth of air to progress from 0-1v
50hp 1-2v
100hp 2-3v
125hp 3-4v
200hp 4-5v
thus "it takes more air flow to increase the voltage, as the air flow
increases"



Lets plot this little map out with some bad ascii art to further
demonstrate.
See how the marks are further spread out as you go right along the axis...

Vertical Scale is Voltage
Horizontal is Airflow

V 5 *
o 4 *
l 3 *
t 2 *
s 1 *
0 1 2 3 4 5

Air Flow

So if you read 2.48v at the AFM, how much air are you flowing now?
Somewhere between 75 and 175hp is all we really know! We could (linearly)
interpolate between 2v and 3v and calculate 123hp (2-3 = 1v, 75-175 =
100hp -> .48v = 48hp, 75hp + 48hp = 123hp)
But thats guess. Quite a big guess. And you don't want your ECU making big
guesses.

So what is the solution? An accurate VQ Map. See our little maps above
that say 1v = 25hp and so on? Well that is a crude VQ map. To make it
useful, we need more precision. Much more precision. The CA ECU's VQ Map
has 52 points, mapping the airflow at 0.1v intervals. The SR's has 64
points, mapping the airflow at 0.8v intervals.

Sounds simple? Well to make things harder, the VQ map doesn't (directly)
give you a hp reading. It gives you a quotient. Think of it as "Percentage
of Maximum Flow". If you know how to read a VQ Map, you could look at the
point for 2.48v, and say - the AFM is flowing 32% of its maximum at this
point. If you happened to know that your AFM was good for 500hp, then its
flowing about 160hp at 2.48v. Simple.

* So how do I read a VQ Map? *

This might be easiest to explain using ROM Editor. Go onto the VQ Map Tab
and you'll see a list of 52 or 64 numbers depending on what type of map
you're looking at. If you look at a lot of different cars VQ Maps, you
might notice that all the values range from 0 - 65535. 65535 just happens
to be the largest value possible with 16 bit unsigned integers. This is
handy to know, as the VQ map uses 16 bit unsigned integers to store it's val
ues. I still haven't told you how to read a VQ Map have I. I'm sorry that
you didn't find a tuning website written by someone more to the point, and
you are stuck reading mine, but eh, what're you gonna do? Ok - Take a value
in the VQ Map - any value. Divide it by 65535. What do you get? Well
that's your quotient. Multiply that by 100 and you've got your "Percentage
of Maximum Flow". At what AFM voltage is that % value for? Well if its on
a CA map, the first value is for 0.1v, the second for 0.2 v and so on. For
an SR (and most others) the first value is for 0.08v, the second for 0.16v
and so on...

Want an example? Yes? Well you'll have to wait till I give you one. But I
will put one here soon.


RPM Scale:
CA Rom Address: 3BD0 - 3BDF. 16 x 8 bit Values. Quanta: 50 rpm
SR Rom Address: 00E0 - 00EF. 16 x 8 bit Values. Quanta: 50 rpm

The Vertical Scale of the AFR Correction Map is RPM. The stock range is
500 - 6800 rpm. If you built a de-stroked screamer that revs to 12000 rpm
you might get a bit worried about what the ECU will do above 6800rpm.
Fortunately Nissan thought of this, and allows you to modify this scale and
specify the operating rev range of your motor.

The stock Nissan specified values are fine for me, as I have my redline set
at 7500rpm. Keeping them the same also means you don't have to recalibrate
the AFR Map, and extrapolate values for the new rev ranges.

If you do decide to make changes here, this is what you need to know. The
ROM image contains 16 values that makes up the scale. To decode these into
RPM simply multiply them by 50. Open a Map in ROM Editor, and modify some
of the RPM values - you'll notice they increment and decrement 50 rpm
intervals.


Flow Scale:
CA Rom Address: 3BC0 - 3BCF. 16 x 8 bit Values. Quanta: None -
Multiplication Factor
SR Rom Address: 00F0 - 00FF. 16 x 8 bit Values. Quanta: None -
Multiplication Factor

The Horizontal Scale of the AFR Correction Map is what I call Flow, and it
is important because its the primary load axis. You already know the AFM is
the primary load sensor, so it makes sense that these two are closely
linked. When the AFM is flowing close to minimum, the minimum values on
this scale are referenced, when the AFM is flowing close to maximum, the max
values are referenced.

But what are these values? Well they are a multiplier, that when applied to
the K Constant give a basic injector pulsewidth for a given airflow measured
by the AFM. Now the clever thing that the Nissan engineers did here, was to
set the injector pulsewidth to that required for a Stoich (14.7) AFR.

How could they do this? Well that's the beauty of AFMs. Air Fuel Ratio is
determined by Mass. An AFM will accurately determine the mass of air
entering the engine at any given instant. Now we just need the
corresponding mass of fuel to enter the engine to have our 14.7 AFR. Since
the Nissan engineers knew the flow rates of the injectors, they could then
calculate the required injector pulsewidth.

Using the Flow Scale to calculate basic pulsewidth will be covered in depth
in "Putting it all Together 2".

AFR Correction Map:
CA Rom Address: 3D00 - 3DFF. 256 x 8 bit Values. Quanta: None -
Multiplication Factor
SR Rom Address: 0100 - 01FF. 256 x 8 bit Values. Quanta: None -
Multiplication Factor

These maps are the business end of tuning. If you've read how the flow
scale works, you'd realise that it alone, is enough to calculate an injector
pulsewidth that will provide a 14.7 AFR at all loads measured by the AFM.
Thing is, we don't want a Stoich AFR at all loads and RPMs. Nice and rich
at high loads/rpms to keep the engine together, and lean it out somewhat at
light loads for good cruising economy and throttle response.

To do this the AFR correction map will provide a(nother) multiplyer that is
applied to the basic pulsewidth, to give a final injector pulsewidth. Since
the basic pulsewidth provided by the flow scale is a known 14.7 AFR, this
multiplyer will also allow us to calculate the new 'corrected' AFR.

Lets say we wanted a Stoich AFR at idle (say 800rpm, at minimum load on the
map). The basic pulsewidth is already stoich, so to lets keep it the same
(Set the multiplyer to 1).

Want a Rich AFR? Make the Multiplyer greater than 1. Lets say bulk rich -
around 10:1. We'd want a multiplyer of 1.47 (14.7 / 10).

And Lean? You guessed it, Multiplyer of less than 1. Targetting an AFR of
16:1? Use a multiplyer of 0.92 (14.7 / 16).

Open up ROM Editor again and have a look at the Fuel Maps (hi/lo octane,
doesn't matter). Those numbers don't look anything like 1, or 1.47 or 0.92,
do they? So how do we read them? I'm glad you asked. Here's the little
forula you need.

if DATA > 128 then MULTIPLYER = (DATA - 64 / 128)
else
MULTIPLYER = (DATA + 128 / 128)

This formula dictates the range of multiplyers we have access to, ie:
0 = 1x (0 + 128 / 128)
128 = 2x (128 + 128 / 128)
&
129 = 0.5x (129 - 64 / 128)
255 = 1.5x (255 - 64 / 128)

Thus we can target AFR of 7.35:1 (2x) through to 29.4:1 (0.5x) which should
be enough for anyone.

Putting it all Together Part 2:
Lets repeat the exercise we completed the first time around, but this time
use the raw data, and formula we now know. Lets use it on a stock CA18DET
Map

So - Air Flow Meter is reading 4.9 Volts & Car is revving to 6800rpm.
What Injector pulsewidth will the ECU use, and what is the target AFR.
For bonus points, what will the dutycycle of the injectors be?

Start - Determine Flow Quotient.
AFM is reading 4.9 volts. Check the Value of the VQ map at position 49
(0.1v resolution remember).
Divide it by 65535. What did you get? Ok, our AFM is measuring X% of it's
total flow.

Next - Read Flow Scale.
The Flow Scale has 16 columns. We need to know which column to read.
Multiply your Flow Quotient by 16 and round up. Ok, Column 16 on the Flow
Scale is 83

Next - Determine K Constant Pulsewidth.
I'm going to lay a new fomrula on here
Next - Determine Basic Injection Pulsewidth.
Basic Injection Pulsewidth = Flow Scale Multiplyer x K Constant

K Constant Pulsewidth = 00 B7 = 0.125ms.

Basic Injection Pulsewidth = 83 x

--

[UNDER CONSTRUCTION]

Tuning (or doing something useful with all the knowledge we have just
gained)


General Retune:

Rev Limits & Speed Limits: (Good starting point)

Changing Injectors: (K Constant is your friend)

To work out the pulsewidth of a different K constant do the following.
Pulsewidth = K Constant * 0.125 / 183 (183 is B7 in Decimal).

Changing AFMs: (K Constant or Flow Scale - the choice is yours.)




==============================================
POST FROM Diarmuid Tyson ENDS HERE
==============================================


Chris
1992 Sunny 2.0GTi
Athens - GREECE

art_from_ct
09-11-2002, 09:31 AM
Nice consolidation of info.

skyliner
09-11-2002, 06:06 PM
Good Lord!!!!!!!!! I'm gonna need a day off work and some strong medication to sort through that. Very nice glimpse into what JWT and such have to go through to tune the ECU.

SENTRASER
09-11-2002, 10:16 PM
So how exactly do you hook your ECU or ROM up to the compputer to program them? heh...I see the progams...but what elce(as far as hardware?)

~Ryan:confused: :confused: :confused:

Probedude
09-12-2002, 01:09 AM
You need a rom burner, and unless you're using flash ROMS, you'll need a UV eraser to erase the ROMS. The rom burner software will be able to take in the .BIN or .HEX etc file that the rom editor software generates.

I don' t know what's out there today price wise for a rom burner. The one I use at home I bought eons ago for ~$129. The one I use at work runs $1K but does almost everything under the sun.

UV erasers run as little as $39 new, though I had picked one up at a thrift store for $5.00 - again eons ago.

Dave

badbiki
09-12-2002, 04:41 AM
you guys are also going to require the daughterboard to allow you to even think about tunning your ecu's aswell.. along with the BASE MAP FILES for all your cars..

i have the boards for $48usd..

the US maps i dont have.. unlucky..

Soupaflie
09-12-2002, 09:19 AM
ok, So would some like myself who owns a JWT ecu be able to take this unit and use it to improve apon the maps and such that JWT provided? Or would you in a sence be starting over from scratch?

I feel there are some holes in the programming of the C series race ecu that could be improved.

hpro123
09-12-2002, 09:43 AM
Originally posted by Soupaflie
ok, So would some like myself who owns a JWT ecu be able to take this unit and use it to improve apon the maps and such that JWT provided? Or would you in a sence be starting over from scratch?

It depends. How many chips are on the JWT daughterboard? If there is one it is a bit more involved than that. If 2 then you could do it and you do NOT need the unit!!!! Just the freeware ROM Editor, the info above, some experience in tuning and access to an EPROM reader/writer.

I feel there are some holes in the programming of the C series race ecu that could be improved.
You are an adventurous person aren't you? :)


Chris

Soupaflie
09-12-2002, 10:48 AM
Originally posted by hpro123


You are an adventurous person aren't you? :)


Chris If I had a tuning facility closer by than 200 miles I might be. My local dyno is ghetto fabulous. They don't even have cooling fans let alone a wideband o2. :rolleyes:

art_from_ct
09-12-2002, 12:47 PM
Originally posted by badbiki

i have the boards for $48usd..



I'm still waiting for the board...damn mail service...

badbiki
09-12-2002, 01:27 PM
are you?

the first batches i sent via air mail arrived on... monday i think *scratches head*

email me if there are any problems

art_from_ct
09-13-2002, 11:14 AM
Badbiki: I recieved the chip today. Thanks.

Chris: Do you have any information about the different sensors on the US ecu's than the Aus or JDM ones ? Besides the EGR/BPT can you suggest any other changes?

I currently have the EGR system removed, no check engine lights and my AAC/(acronym ?)is working , the warmup process is working.

SENTRASER
09-13-2002, 01:44 PM
Originally posted by art_from_ct
Badbiki: I recieved the chip today. Thanks.

Chris: Do you have any information about the different sensors on the US ecu's than the Aus or JDM ones ? Besides the EGR/BPT can you suggest any other changes?

I currently have the EGR system removed, no check engine lights and my AAC/(acronym ?)is working , the warmup process is working.

What ECU are you running? What programs did you have him put on there?

~Ryan

art_from_ct
09-13-2002, 03:15 PM
Ryan:
My 'regular' ecu is a JWT reprogrammed ecu. This I am not going to mess with.

My other ecu is a stock 97 ecu that I will solder the board too.
I don't remember what programs are on the eproms, but it doesn't really matter since I'll be loading new ones on there anyway and most likely not using the ones already on the eproms.

se-r sam
09-13-2002, 09:59 PM
How does it connect to the stock board? ribbon cable?

Probedude
09-14-2002, 01:28 AM
No, unlike JWT who uses a soldered in ribbon cable, Badbiki is supplying a 2x20 header and socket.

Also, unlike the JWT that mounts on bosses in the stock ECU case, Badbiki's board is unsupported except by that 2x20 connector.

Oh so my interpretation is of his scan.

Dave
Originally posted by se-r sam
How does it connect to the stock board? ribbon cable?

badbiki
09-14-2002, 02:06 AM
yup, i'm trying to find some locking sockets.. but they all latch to high up.. foam does the trick, rest between ecu -> board -> lid..

also you're comparing a $600 usd $48 usd product =P

i could mount mine via a ribon cable if i liked.. and just have it sitten sindie the ecu *shrugs*

i may look at mounting it to the points inside on my next run

Probedude
09-14-2002, 02:48 PM
Quit comparing your $48 product to JWT's $600 product.
JWT alters the firmware the ECU runs, not just the maps, they do the installation (completely professional I might add) and the resulting 'marriage' is tested before it is returned to you.

Alluding that you are not using a ribbon cable because it would add $552 to the price is ludicrous.

As far as using locking sockets, why? Locking sockets are designed to prevent the connection from coming apart. Is this a possibility in your setup? You already said that foam keeps them together.

I'd just be worried about intermittents after prolonged vibration but what do I know.

Dave

Originally posted by badbiki
also you're comparing a $600 usd $48 usd product =P

MauiBlueGride
09-30-2002, 09:25 PM
Probedude...

How and where does JWT modify the firmware of the ECU???????


Everyone I've ever seen is a add on EPROM....
Which = new map.

Chris