• Hello Guest, welcome to the initial stages of our new platform!
    You can find some additional information about where we are in the process of migrating the board and setting up our new software here

    Thank you for being a part of our community!

Fuel/Spark tuning for LH 2.4/EZK with TunerPro!

all of them. shows max advance anywhere of like 17 degrees. I'm willing to accept conservative timing, but even that is excessive ;)
 
all of them. shows max advance anywhere of like 17 degrees. I'm willing to accept conservative timing, but even that is excessive ;)

I feel ya. If the EZK is anything like the LH box, the tables are based on clock speed and tooth count... so I'll see if I can find the clock speed.

I have no idea where the X/8.7 formula came from; maybe one of the SAAB boys put it in there. It was in the XDF when I downloaded it.

And I really need to step up and get some ASM skills. :help:
 
If I can usurp my buddy's ostrich I might have a little more to add to this today or tomorrow.
 
If I can usurp my buddy's ostrich I might have a little more to add to this today or tomorrow.

That would be excellent. If you get a chance before I do, crack open your EZK see if you can get the speed of the crystal on the board; it will probably help a lot with the maths... I'm at work right now and the only picture of it I can find has a test mark obscuring the numbers... :grrr:
 
That would be excellent. If you get a chance before I do, crack open your EZK see if you can get the speed of the crystal on the board; it will probably help a lot with the maths... I'm at work right now and the only picture of it I can find has a test mark obscuring the numbers... :grrr:

I posted all that info years and years ago, I think I had the crystal speed for ezk in there as well. not all of the info is correct but the hardware stuff was pulled basically from datasheets off the part numbers from the car(s)
 
I think the highest I have that works was less than 20, so...

*opens google calculator*

9xx LH2.4 runs at 12.5 Mhz

(1/12 500 000) second = 80 nanoseconds

I guess 70 should work, but it is cutting it close. I'd shoot for 40 or less.

I am told that the 5xx ECU only runs at 6Mhz so it might work just fine if you have one of those.

iirc the stock chips are -250, so 250 ns. the 70 ns should be more than fast enough. I'll try the different way of programming this weekend, see if it works. should be cool for E85/gasoline. the 27SF512 is cheap on ebay, directly from china, ~32$ shipped for a 13 pack.
 
All my 9xx ecus have 12 MHz cristals.
LH 2.4 timer is running at 500 KHz (in 950,962,967 ecus which I have disassembled),
rpm signal from EZK is two pulses per revolution.

The following formula is from motronic, but seems to work for the EZK ignition tables:
X * -0.375 + 60

Reg. rpm conversion approximation - 60*e^(0.0215834714*(255-x)) - would be great to
find the exact formula. This is what LH does when converting timer stamps to convert them to one byte values (this is 8051 assembly):
Note there is map lookup in assembly code, the map content can be seen below in C code
<pre>
LOOP:
;; R1 = 6
;; R2 = DELTA_CRC_HI - low byte of (last rpm pulse time - new rpm pulse time, in 500Khz)
;; A = DELTA_CRC_LO - high byte

DEC R1
RLC A
XCH A,R2

RLC A
XCH A,R2
JNC LOOP

MOV A,R2
RRC A
RRC A
ANL A,#0x3F
JNC DONE

INC A
JNB ACC.6,DONE

INC R1
CJNE R1,#0x08,DONE
SJMP TOO_LOW_RPM

DONE:
MOV DPTR,#1x64_MAP
MOVC A,@A+DPTR
XCH A,R1
SWAP A
RL A
ORL A,R1 <-- done

</pre>

Very roughly translated to C this looks like this:
<pre>
int translate_RPM(int real_rpm)
{
int map[64] =
{
0, 1, 1, 2, 3, 3, 4, 5,
5, 6, 7, 7, 8, 9, 9, 10,
10, 11, 11, 12, 13, 13, 14, 14,
15, 15, 16, 16, 17, 17, 18, 18,
19, 19, 20, 20, 21, 21, 22, 22,
22, 23, 23, 24, 24, 25, 25, 25,
26, 26, 27, 27, 27, 28, 28, 29,
29, 29, 30, 30, 31, 31, 31, 31
};

// timer T1 is clocked with 500 KHz,
// RPM signal from EZK is doubled
int v = ((500000) / ((real_rpm) / 30));

for (int i = 6; v < 65536; --i)
v *= 2;

v /= 1024;
return map[ (v % 64) ] + (i * 32);
}

</pre>

This looked to me as some weird logarithmic function, and is very similar to one found here:
http://www.dattalo.com/technical/theory/logs.html#2. Borchardt's Algorithm
 
Last edited:
All my 9xx ecus have 12 MHz cristals.
LH 2.4 timer is running at 500 KHz (in 950,962,967 ecus which I have disassembled),
rpm signal from EZK is two pulses per revolution.

The following formula is from motronic, but seems to work for the EZK ignition tables:
X * -0.375 + 60

editing the data in the xdf, this looks about right

for those doing it through TP, the equation is ((X * .375) * -1) + 60. for whatever reason, multiplying by a -.375 made everything zero.
 
editing the data in the xdf, this looks about right

for those doing it through TP, the equation is ((X * .375) * -1) + 60. for whatever reason, multiplying by a -.375 made everything zero.

Change it to -0.375 and it works. TP's equation parser sucks :-(

Whoa ipdown, thanks for that! I am glad my approximation formula is useful. Looks like we will never have a straightforward formula for RPM though.

I have just re-polished the EZK XDF and posted it, check it out. If you all approve, i'll update the zip...

http://dl.dropbox.com/u/2074311/Volvo_EZK_208-beepee-v2.xdf

Let me know what you think and if I am moving in the right direction... Thanks.
 
Change it to -0.375 and it works. TP's equation parser sucks :-(

Whoa ipdown, thanks for that! I am glad my approximation formula is useful. Looks like we will never have a straightforward formula for RPM though.

I have just re-polished the EZK XDF and posted it, check it out. If you all approve, i'll update the zip...

http://dl.dropbox.com/u/2074311/Volvo_EZK_208-beepee-v2.xdf

Let me know what you think and if I am moving in the right direction... Thanks.

Man it's your zip and xdf, you don't need our approval to update your stuff ;)

Checked the crystal on a 153(i think) ezk (2.4 ezk...) and it's 8 mhz.

grabbed my moates burner at lunch, bouta get that software spun up on the new laptop
 
Man it's your zip and xdf, you don't need our approval to update your stuff ;)

Checked the crystal on a 153(i think) ezk (2.4 ezk...) and it's 8 mhz.

grabbed my moates burner at lunch, bouta get that software spun up on the new laptop

Well I like feedback, if what I am doing is only useful to me, then what's the point?? ;-)

I'll update stuff now.
 
Just added a huge step-by-step to the OP. Let me know if it helps anyone; I went from memory for lots of it so I am sure there will be corrections...

Time to finally install the crank sensor UPS says is sitting on my porch, yeehaw!
 
Amazing. Seriously man. Awesome stuff. Truly set up for idiots. Can't thank you enough.:spin:

Thanks!
icon14.gif
 

Beepee, very cool tutorial, thanks! I should mention that I am driving only with ostrich (without chip) for the last two months in the winter time, and we get some really cold weather sometimes. It just works and works. moates.net sells replacement battery at their site with a note - you should never need this!

And a tip - Porsche 928 used LH 2.3 and there is tuning system for it - SharkTuner. From it's manual they recommend setting rev limit to some low rpm, and tuning afr up to that point. Then gradually increase rev limit up to the range.
 
And a tip - Porsche 928 used LH 2.3 and there is tuning system for it - SharkTuner. From it's manual they recommend setting rev limit to some low rpm, and tuning afr up to that point. Then gradually increase rev limit up to the range.

Neat! Do you have a SharkTuner manual or something I can read? I'm going to Google it now. Maybe I will move up from tinkering to tuning!

Thanks again for all of your hard work, and just in case it isn't clear:

ipdown, blabla, sbabbs, frpe82, mrjaybeeze and many others who I am forgetting from the ECUProject forums are who made this possible!
(if I left you out, let me know, I will update the OP as well!

Thanks guys!!!! :)
 
shark tuner isn't vastly different from TP. I played with one a couple years ago on a supercharged 928. I wouldn't worry as much about setting a low RPM limit per-se, I would just suggest that one should make small changes unless you're scaling an entire map (for say... e85 or bigger injectors or whatever)
 
Back
Top