Notices
928 Forum 1978-1995
Sponsored by:
Sponsored by: 928 Specialists

LH2.3 MAF input

Thread Tools
 
Search this Thread
 
Old 01-08-2014 | 10:47 PM
  #1  
PorKen's Avatar
PorKen
Thread Starter
Inventor
Rennlist Member

 
Joined: Sep 2002
Posts: 10,177
Likes: 412
Default LH2.3 MAF input

LH2.3 converts the voltage from the MAF into two different digital inputs to be read by the (8051) processor.
Unfortunately, neither are very good for tuning.


The first A/D conversion is to a 8-bit (0-255) number.
It reads up to ~5 volts, or a reading of around 300 maf units (the calculated value for scaling).
It is used for cranking, idle, acceleration pump(?).

The second conversion is to a frequency which is read by the processor as a 16-bit (0-65535) number.
It can read up to the full ~6.5 volts from the MAF (648? maf units).
This number is used for most data work in the code. It is processed into the load frequency sent to the EZ.
It is very sensitive to voltage changes (or is just moody) with seemingly random peaks and valleys throughout.
Over 5400 rpm it is especially bad, making peak HP difficult to make consistent.


Note the 928 MAF is an oddball, with a voltage range of roughly 2~6.5 volts, instead of the more common 0-5V.


Lean spikes will often be accompanied by a knock. And it may not only be because the injector time is going up or down.
At cruise or if you are not using the EZ WOT map, IE. cruise only, then the ignition timing is going up/down, too.


The factory base fueling table goes up to 324 maf units.
Max S4 WOT reading at rpm limit is over 400 maf units.
300 happens before 3000 rpm at WOT, well before the first torque peak!



The last pic shows examples of factory code vs. additional (new) coding to smooth the MAF frequency by setting a maximum rate of change plus or minus.


This post is based on my reverse engineering of the code and logging runs.
I will update it as more information is available.



MAF volts (max ~5 volts, ~300 maf units)


MAF frequency from a typical WOT logging run (compare to the green line in the logs below)


Base fueling table combined with the MAF ideal table ('88 S4 with cat)


AFR, MAF volts, Inj duty, RPM (3rd gear WOT 1500~6500)

Last edited by PorKen; 01-29-2014 at 03:29 PM.
Old 01-08-2014 | 10:48 PM
  #2  
PorKen's Avatar
PorKen
Thread Starter
Inventor
Rennlist Member

 
Joined: Sep 2002
Posts: 10,177
Likes: 412
Default

There is code to average/smooth the MAF signal, which helps cut down on the spikes, but it is not always used.

If the 8-bit MAF number is not changing much, there is no smoothing.
So at full throttle, over ~5 volts/3000 rpm, the 16-bit number is used directly, spikes and all.

Below is the code that sets the 16-bit MAF frequency number (from the timer which reads the A/D frequency).
It takes the new value, adds it to the old, then divides by two (right shift).


For folks using the 'SharkTuner', you can force smoothing all the time by making a one byte change in the code.
This will reduce the spikes/errors for both injector time and ignition at cruise and WOT somewhat.

With a hex editor, change the value at 056F and 456F from D2 to C2.
This changes the SET to a CLR for the flag which controls the smoothing.

(Two places to change as there are two banks of the same code, repeated.)


Example of free hex editor - (HXD hex editor)
File, Open the BIN file to modify.
Press Ctrl-G, type 56F, OK, type C.
Repeat for 456F, Save.






Or, go the full monty with this patch, which could produce graphs like the last one above.

Careful, you may be surprised how off your WOT tune is in places w/o all that noise! (Mine was.)

(Patch includes cruise averaging, so no need to do the above tweak.)


XDF - right click, save as, rename .txt to .xdf
MAF rate patch - TP5_LH23_PK_MAF.txt

TunerPro 5.0
download page

Make a backup of your BIN!

Open XDF, Open BIN, double click on 'MAF patch', click 'Apply Patch', click 'Apply' to close window, Save.

Change both (+) and/or (-) values to adjust the rate. Save.


Last edited by PorKen; 01-29-2014 at 02:16 AM.
Old 01-09-2014 | 12:25 AM
  #3  
AO's Avatar
AO
Supercharged
Rennlist Member
 
Joined: May 2002
Posts: 18,925
Likes: 66
From: Back in Michigan - Full time!
Default

Originally Posted by PorKen
For folks using the 'SharkTuner', you can force smoothing all the time by making a one byte change in the code.
This will reduce the spikes/errors for both injector time and ignition at cruise and WOT somewhat.

With a hex editor, change the value at 056F and 456F from D2 to C2.
This changes the SET to a CLR for the flag which controls the smoothing.

(Two places to change as there are two banks of the same code, repeated.)


Example of free hex editor - (HXD hex editor)
File, Open the BIN file to modify.
Press Ctrl-G, type 56F, OK, type C.
Repeat for 456F, Save.


Ken,

I don't know how you figured this stuff out, but it's pretty friggen cool you did. I attempted to decode the LH2.3 but don't have the chops to do it.

Cheers to you and all your crazy and not so crazy endeavors!

Man I love this crowd... even the ones that make me shake my head from time to time! (You know who you are... Hacker)
Old 01-09-2014 | 01:14 AM
  #4  
FredR's Avatar
FredR
Rennlist Member
 
Joined: Jun 2005
Posts: 10,006
Likes: 804
From: Oman
Default

Ken,

Brilliant stuff.

Not so sure I understand what you have written but is the implication that some of the knocks we see are a result of poor control or interpretation of data inputs rather than an acual knock event per se?

Rgds

Fred

Last edited by FredR; 01-09-2014 at 01:42 AM.
Old 01-09-2014 | 01:48 AM
  #5  
PorKen's Avatar
PorKen
Thread Starter
Inventor
Rennlist Member

 
Joined: Sep 2002
Posts: 10,177
Likes: 412
Default

Knocks caused by random MAF conversion values causing lean spikes.
Also, a low MAF reading could translate to reduced load, which could raise the ignition advance suddenly at the same time.

Also, constant (sometimes huge) rich spikes above 5400 make it look like there's too much fuel in your WOT map there, so you end up taking out fuel.
Next run, no spike, too lean, knock, so you back off timing, HP drops.

You can see this in the after log, where it is a bit more lean above 5800.
With smoothing, the injector duty graph almost matches the WOT fuel map exactly.
There's still a little randomness in there, but it mostly makes for rich spikes, which are OK.
(In my smoothing code, I made the allowed rate for increasing MAF values larger than decreasing.)


Note, because of the way it is calculated, at WOT the load value the EZ sees is pretty much a straight line at full load at any RPM.


In looking for a different variable to send to the EZ at WOT, in place of the max'ed out load value, I came across the code above.
Now that I have figured out to how to mostly straightened out the MAF value, I may be able to make a load sensitive WOT map.
Old 01-09-2014 | 02:10 AM
  #6  
FredR's Avatar
FredR
Rennlist Member
 
Joined: Jun 2005
Posts: 10,006
Likes: 804
From: Oman
Default

Ken,

Fascinating. You may remember the dialogue we had wherein I was puzzled by the way the motor seemed to very inconsistently knock at around the 5300 rpm range. You may also note that I do not run on the WOT map because I had a problem with the icky WOT throttle switch- so by the sound of it perhaps that is not such a good idea after all given your observations that are sinking in now that I have had a cup of tea.

Something else I have also noticed recently that may or may not be connected is that the wiring loom insulation at the MAF connector was crumbling away leaving bare wires. I cut into the loom about 3 inches further back and did a "temporary" r/r job. Since then the motor has been running better [or so it feels] and interestingly, another problem I had- the tacho signal on the clock breaking down at around 5300 rpm also seems to have mysteriously "dissappeared". No idea why this has happened but all this makes me wonder if there is some commonality.

I could probably do to re-wire the entire engine bay and am continuously fire fighting having r/r'd injector plugs, MAF, the 14 point connector and hopefully will be fitting a new front harness soon.

Rgds

Fred
Old 01-09-2014 | 05:12 AM
  #7  
daveo90s4's Avatar
daveo90s4
Pro
 
Joined: Feb 2006
Posts: 693
Likes: 12
From: Australia
Default

Ken, is this the sort of amendment that could be made by you to otherwise stock EZK / LH PEMs / chips, is it the sort of change that would come with no downside, and is it the sort of change that you would recommend be made for a daily driver S4?

Thanks in advance

Dave
Old 01-09-2014 | 05:16 AM
  #8  
Tony's Avatar
Tony
Addict
Lifetime Rennlist
Member
 
Joined: May 2001
Posts: 14,676
Likes: 585
From: Las Vegas
Default

Some of you guys on here scare me.

Where is the "if then...goto" line??
Old 01-09-2014 | 05:57 AM
  #9  
danglerb's Avatar
danglerb
Nordschleife Master
 
Joined: Oct 2006
Posts: 8,575
Likes: 3
From: Orange, Cal
Default

I so prefer ASM, I like to KNOW what my bits are doing.

As I recall the Ljet uses a 9v range, wonder why the differences?
Old 01-09-2014 | 06:14 AM
  #10  
Hilton's Avatar
Hilton
Nordschleife Master
 
Joined: Jun 2006
Posts: 6,286
Likes: 56
From: ɹəpun uʍop 'ʎəupʎs
Default

Very interesting, thanks a heap Ken for posting.
Old 01-09-2014 | 08:58 AM
  #11  
simos's Avatar
simos
Instructor
 
Joined: Oct 2005
Posts: 137
Likes: 0
From: Finland
Default

Many thanks Ken, that should be doable.. You forgot to mention about taking backup copy of LH bin-file before modifying

Is the MAF signal unstable before and after the A/D conversion? Just thinking about turbulence before MAF, it will happen in some specific cfm flow numbers as velocity will increase when flow is increasing.

Definitely something which needs to be tested,,,, in next summer.
Old 01-09-2014 | 02:09 PM
  #12  
PorKen's Avatar
PorKen
Thread Starter
Inventor
Rennlist Member

 
Joined: Sep 2002
Posts: 10,177
Likes: 412
Default

An unstable MAF voltage appears to be amplified by the frequency conversion.

Here is a graph made in the spring with the airbox lid off (for more power ).
Notice the green MAF voltage graph is bumpier than the lines above, with terrible injector duty and AFR spikes as a result.

I would imagine that a supercharged graph could look even worse?


AFR, MAF volts, Inj duty, RPM (3rd gear WOT 1500~6500)
Old 01-09-2014 | 02:46 PM
  #13  
PorKen's Avatar
PorKen
Thread Starter
Inventor
Rennlist Member

 
Joined: Sep 2002
Posts: 10,177
Likes: 412
Default

BTW, big props to Chris F. and his web page on the LH, because 'I don't know tech stuff'.

(928s4.com)

I could not have figured out the workings of the code without his circuit diagram of the LH board.
There are a couple of things which were incorrect which threw me for a loop, threw me for a loop (corrections annotated).

(928_lh5_new.pdf)
Old 01-09-2014 | 03:03 PM
  #14  
Lizard928's Avatar
Lizard928
Nordschleife Master
 
Joined: Apr 2003
Posts: 9,600
Likes: 34
From: Abbotsford B.C.
Default

Very cool info Ken,
Old 01-09-2014 | 03:07 PM
  #15  
FredR's Avatar
FredR
Rennlist Member
 
Joined: Jun 2005
Posts: 10,006
Likes: 804
From: Oman
Default

Well, it is easy enough to modify the bin file as you described with the software you linked.

Maybe I will try out this approach tomorrow. Presumably this implies one has to check/re-tune the AFR and then attempt to dial in more advance at full load conditions.

Rgds

Fred



All times are GMT -3. The time now is 06:42 PM.