Jump to content
HybridZ
stupid_fast

re-mapping and live tuning L28ET 1982/83 S130 ECCS

Recommended Posts

1 hour ago, Gollum said:

Before I scored a good deal on MS3X I was strongly considering ordering a RusEFI kit...

 

I have one I've been working on casually for the past year or so for my Honda (maybe it's been 2?). It's still not in the car very often (though it has started and driven). The assembly process is not for everyone and I (as well as everyone else on the forum) strongly recommend a preassembled unit. It's great hardware, and it's awesome being able to request features and get them a week later with personal support, but it's still a bit behind MS3 in the software department.

Share this post


Link to post
Share on other sites

Well, MS software might be more mature, but it's also quite stagnate. I was hoping that the open nature of RusEFI might help it gain ground quicker, and it looks like the project is doing pretty well, but it's not like the software(only) industry. There still needs to be buyers to get growth to happen to accelerate maturity.

 

But yeah, kit or pre-assembled, it's still a great deal to get into what looks like a great community.

 

 

But then alternatively, there's great propriety platforms that are very affordable these days. EMU Black comes to mind...

Share this post


Link to post
Share on other sites
On 8/17/2018 at 10:43 AM, Gollum said:

If you're ever passing through Vacaville you can HAVE my old ECUs....

 

Keep up the neat work. Might not be applicable to most as aftermarket EFI is getting cheaper and cheaper, but it certainly fuels the learning/research data which ends up helping you and others that follow along, regardless of solution chosen. Before I scored a good deal on MS3X I was strongly considering ordering a RusEFI kit...

Hey Nathan!  Its been a while! 
Last time I met you I had just gotten the turbo motor running.

 

This system is definitely very far from ideal and not much cheaper to setup than megasquirt or Z31 with Nistune.  

After a few tuning sessions I've been able to get the AFR's closer to what I want to see, but the analog AFM as a load measure is terrible compared to a modern system with a MAP sensor.

Increased fuel cut to 6700 and fuel scales to 6500, seems to keep pulling strong up there.

 

Megasquirt as you say seems like its stagnated, probably because its 'good enough' for most applications. 

I've been leaning towards trying Speeduino for my next step up, or even DIYEFI with the freescale board.

Mainly did this modification because I was wondering why nobody else had done it before.   Once I started learning a little bit about 8-bit ROM chips it quickly spiraled into what you see in this thread.  It ended up being fairly simple to do, just required lots of research, studying datasheets, interpreting hex data and testing changes. 


Not sure if I need any more ECU's, but I'll keep it in mind! I could use a factory calibrated AFM or two to check how far off my settings are. 

 

 

On another note my o2 correction isn't working like it used to anymore... might've toasted the o2 sensor or broke something.  



Update;

I've setup a public google drive with the related files to this project.
The ROM Address spreadsheet is probably the most interesting file.  It only includes a partial translation for the map portion of the ecu ROM, I have made no progress in disassembling the microcode. 
Any addresses highlighted in green I have tested and verified as correct, all other comments are speculation and unverified. 

https://drive.google.com/open?id=1mRNbCs317YusVA-wutB3DW7AYV1MVt2l



Update;

I found the fuel table calculation, it is in fact target AFR similar to later Z31 ECCS. 
Still a long way off to interpreting the microcode to a point of finding the pulse width calculations. 

 

14.7/((X + 256)/256)
hex 0x00 = closed loop flag.

These are targets, doesn't necessarily mean the ecu will hit these mixtures at every range properly especially with a worn out flapper AFM. 
I have calibrated my AFM in the low end and it hits AFR targets as expected up to about 3200RPM, its inaccurate past this point. 



 

corrected_fuel_table.PNG

Edited by stupid_fast

Share this post


Link to post
Share on other sites

Following Gollum's suggestion, I've added the disassembled microcode to github.  

https://github.com/eccs-reengineering/280ZX-Turbo-ECCS/tree/master/DASMx Disassembled Code

 

Its Motorola 6800 assembly code.
 

The instruction set can be found here: http://www.8bit-era.cz/6800.html#ASL-A-ACC



The 1984 Quatro MAC-02 Hitachi-designed ECU is based on a similar chipset with the 6802 CPU & HD46506 ADU. 
I've found some disassembled code from it, it maybe useful.  I've attached it to this post. 
No idea who disassembled the code or if there's any more information about it online. 

quatro_1984.txt

Edited by stupid_fast

Share this post


Link to post
Share on other sites
Posted (edited)

Here's what I've got on the AFR target table.  I cleaned it up a lot and got it running in the 11.5:1 range from 2800~6000rpm. 

Additionally I've increased the closed loop range and leaned up the part throttle operation up to 0 boost significantly, this gave a lot more responsiveness and torque in the part throttle areas.

The part throttle areas, especially the 5th gear cruising for climbing hills is still a work in progress.  

 

As I understand it so far, based on my testing and documentation on later ECCS systems the ECU calculates a theoretical pulse width for a lambda of 1.0, or 14.7:1 AFR based on current RPM and mass air flow. 
After this TP value is calculated, the TP is used to look up an enrichment percentage from the AFR target table based on a TP (load) and RPM scale.

the AFR target value is a multiplier for the calculated TP before the injectors are actuated. 
Several other enrichment tables are also referenced, I'll go into the details later when I have solid information on them. 


The stock AFM becomes very inaccurate past 3500rpm or so, but does have consistent readings. 

This is possible to correct by bumping the AFR values rich, I have 9.62 AFR targets to get a 11.5 measured AFR above 5000rpm.  

 

Its much more time consuming to tune than something like megasquirt, but definitely has good results. 

 

factory_fuel_graph.thumb.PNG.f5e5ffde21e3afc59b0527a40ae0648c.PNGv21_fuel_graph.thumb.PNG.b420edb314a4f5f2e1a7179316e91545.PNG

 

 

 

I've come up with a calibration procedure for the AFM by disabling closed loop and setting the fuel table to static fuel targets. 

I use the address tracing feature of the rom emulator with TunerPro to see which cells are being accessed, logged next to the wideband output. 

Any value other than hex 00 (14.7:1 AFR target) results in open loop operation, disabling o2 input. 

This makes it possible to adjust the AFM spring tension and idle screw and get the AFR targets almost dead on on low to medium throttle input up to 3000rpm. 
Once the AFM is giving accurate AFRs in open loop below 3000rpm this gives a solid baseline for adjusting the fuel table. 

 

The IAT enrichment table can also throw off the afr calibration, I haven't figured out exactly how that scale works yet. 

 

note; AFM sweep should never be touched from factory, only spring tension and idle screw adjustments. 

Its very hard to get the sweep back to the factory value if its been changed, and it generally only has negative effects.

 

Here's the fuel target table I use for the AFM calibration.

AFM_calibration_targets.thumb.PNG.72f67df2bcb07476aa5e677e50f873af.PNG

 

Edited by stupid_fast

Share this post


Link to post
Share on other sites
Posted (edited)

After chatting with Gollum about tuning and pouring over his megasquirt logs and comparing our timing charts, I got familiar with KPA. 
I noticed something very interesting, the TP scale in the ECCS acts a lot like a KPA scale.

With some logging I compared it to the vacuum gauge, with an in/hg to KPA conversion table handy it looks that my hunch is confirmed.  

The TP scale does convert to KPA!

So, here's some factory tables with the converted KPA scale for reference.
Please note, above 3600rpm and above around 120kpa the AFM is very inaccurate. 
The KPA scale is accurate in same ranges that the AFR targets are accurate.

 

Also note in later ECCS models this is a 'theoretical pulse width' scale, and not KPA. 
But its interesting that it does follow KPA in stock configuration.

1745364284_factory_fueltiming_correctedKPA.thumb.PNG.d24891037fbde46340c2f6e1c6c117b1.PNG

Edited by stupid_fast

Share this post


Link to post
Share on other sites

Very cool!

 

Absolute pressure and theoretical pulsewidth will be proportional to each other, assuming VE and target AFR or lambda are constant. That's why they're both often used as Load axes.

 

Older BMW ecus use the theoretical pulsewidth concept too, if you're looking for more to compare to. The Audi Quattro ecu though similar, has a mechanical fuel metering head and flapper door, so fueling will be different as the injectors are continuously on.

 

Have you checked to see when the AFM maxxes out? I wonder if it's around the same time as you have to start requesting a richer target than you actually want. Of course you'll see how far spring tension tweaks will get you!

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Another thought: on other older ECUs, thinking Porsche 944 here, there was a separate WOT fueling table unrelated to the AFM input. It would have been only a 2D table, not your typical 3D, since it was dependent only on RPM. Might have escaped your search due to that.

 

This being a turbo application of course means this table will be way off if boost or other breathing changes have been made!

Edited by bradyzq

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, bradyzq said:

Very cool!

 

Absolute pressure and theoretical pulsewidth will be proportional to each other, assuming VE and target AFR or lambda are constant. That's why they're both often used as Load axes.

  

Older BMW ecus use the theoretical pulsewidth concept too, if you're looking for more to compare to. The Audi Quattro ecu though similar, has a mechanical fuel metering head and flapper door, so fueling will be different as the injectors are continuously on.

  

Have you checked to see when the AFM maxxes out? I wonder if it's around the same time as you have to start requesting a richer target than you actually want. Of course you'll see how far spring tension tweaks will get you!

  

 

Useful info, thanks. 
I agree I don't think the ECU is actually dealing with a KPA scale.  For tuning purposes, it helps put the tables into perspective and compare to other timing maps and megasquirt logs.  I got a little overexcited that the TP scale was matching up to kpa almost perfectly. 

Good info on the BMW stuff, I'll look into it.  Maybe someone figured those out and that knowledge will help decipher the code here. 

The main reason I referenced the Audi ECM is because it uses the same hitachi chipset, not because its a similar EFI system.  I believe those are a primitive speed density system from what I could tell ... I think you're referencing a different mechanical injection system which were somewhat common in the 80s.  I believe some Volvos also used the system you're describing. 

The AFM as I can tell hasn't maxed out, as my fueling with flat targets from 4400 to 6000 are pretty consistent and don't lean out much in that range.
In that range the afr change is maybe 0.4 from 4400 to 6000, not what I'd expect if the AFM was at its maximum but I've been proven wrong before. 
I need to get something like the Moates SuperLogger or an Arduino with custom code to communicate with Tunerpro so that I can get some proper logs of what the AFM input is actually doing.  My current logging system is primitive at best, using the Innovate AFR output and tracing rom address hits. 
When I get my car on a dyno we should have a better idea of how much flow I'm actually pulling through it. 

The fact the calculated TP drops steadily after 4000rpm seems to indicate the ECU is off somehow, but everything in my setup is pretty much as good as you can get it and there's just not enough of these systems around to compare my results.  I haven't spent enough time cruising above 4000rpm to check if the AFR targets are accurate at lower load. 
Z31 ECCS employed a VQ table for the MAF, I believe they may have implemented that due to the fueling error on the s130. 
There's some lingering unused data on one of my 1982 ECM's that seems to imply they were trying to implement a similar feature. 
 

I no longer use spring tension for tuning.  I set the spring tension so the AFR targets are dead on from 10kpa to 120kpa, up to 4000rpm.  I briefly documented this on the last post on page 1. 
This method works for best closed loop operation and overall driveability in cruise ranges. 

Correcting the top end & boost areas by adjusting the AFR target table I get repeatable results, I can slap a factory sealed AFM on and will get the same AFRs.
 

5 hours ago, bradyzq said:

Another thought: on other older ECUs, thinking Porsche 944 here, there was a separate WOT fueling table unrelated to the AFM input. It would have been only a 2D table, not your typical 3D, since it was dependent only on RPM. Might have escaped your search due to that.

 

This being a turbo application of course means this table will be way off if boost or other breathing changes have been made!

The later E36's and some other cars also have WOT maps, its pretty common to have multiple fueling maps. 
As you say, it won't work for turbo unless its some kind of an enrichment table based off of manifold pressure ... Now that would be interesting.

Edited by stupid_fast

Share this post


Link to post
Share on other sites

That calculated TP drops after 4000 is completely normal, if that's when peak torque is. In a general way, manifold pressure is proportional to injector pulse width is proportional to torque. 

 

To check if the AFM is maxing out, you can use a DVM and some backprobes. 

 

The Quattro is a mechanical continuous injection system with tweaks from the ECU for closed loop (in some markets) and boost. The ignition is crank triggered and completely ecu controlled. 

Share this post


Link to post
Share on other sites

@bradyzq

I see, if the TP drop is normal then I may be maxing out the AFM's flow capability.

L28ET torque curve on a stock turbo is from 3000 to 4000 rpm with the peak somewhere around 3600rpm, so it backs up what you're saying.

My Multimeter doesn't have any logging unfortunately, its kind of difficult to check a voltage meter while driving.  A logging oscilloscope also works, but I don't have one that interfaces with a computer.  
The best approach I thought of would be to log not only the AFM 0-5v output, but also RPM.  That would give the most useful data. 
At least I can correct the top end fueling using the data, and don't have to get a rising rate FPR. 

Re:quattro, 
I think I understand now, the fueling tables make a lot more sense if continuous injection is factored in.  So the ECU fuel control is more for closed loop correction and enrichment in boost using the map sensor.  I was wondering why it was missing any kind of VE table.  



 

Share this post


Link to post
Share on other sites

Well, since airflow, by flapper door or MAF, is proportional-ish to power, if you max the AFM, it will stay maxxed for awhile, possibly til redline, so logging is not needed, just an observant passenger to tell you at approx what rpm it hits 5V or whatever the max is. This itself is testable by simply pushing the flapper fully open manually with the ignition on and noting the max voltage indicated. While roadtesting, you can backprobe at the ECU, since it seems to be pulled down anyways. This obviously saves many feet of DVM wire extensions to the AFM connector.

Share this post


Link to post
Share on other sites

Also worth a look, IMO, is the Porsche 944 Turbo (951) ECU, or DME in their P-speak. It has both boost to deal with, and a similar AFM. Note that it has a WOT fuel map. I haven't tuned one in awhile, so don't remember if it's a multiplier table, or a direct pulsewidth table. It's on the tunerpro dowloads page.

Share this post


Link to post
Share on other sites

Good stuff, based on the megasquirt logs I've found the VE on this motor is somewhat flat from 4000 to 6000 so makes sense that airflow would be consistent. 
A minor detail to include for sake of information sharing;
The S130 AFM uses an inverted signal, approximately 4.78v is the maximum with the flapper closed, and fully open is 84.2mv. 
I've verified these settings as correct within OEM specs across about 5 AFMs, including one that was factory sealed and the PCB traces in very good shape.
There's a +8V reference from the ECCS unit, its also grounded directly to the ECCS unit not the chassis. 

I just need to find a passenger, I live far from most of my friends.  I like the idea of logging for future modifications though.


I'll check out the 944 data from tunerpro.
If its a 3" bosch AFM, its quite possible it could be an identical unit mechanically, however I don't think any other cars in the era used the JECS inverted output resistor board.  Although that detail is more prevalent to comparing code, and not so much the tuning side of things. 

Share this post


Link to post
Share on other sites

Interesting that the AFM output is inverted from normal. 

 

Just a quick correction on VE though... If VE stays the same from 4000 to 6000, airflow would increase by 50% across the same range. So, either the MS VE table in question is hiding a fueling issue, or it's not a true VE table, or both. 

Share this post


Link to post
Share on other sites
Posted (edited)

Ah every time I think I understand something I learn some new information. :)

I've uploaded a video example of how the AFR targets react over the RPM range.
This may illustrate what I've been trying to explain on the lean out above 4000rpm. 

Also the video is slightly offset from the innovate & address tracing, but it gives you a general picture of what the afrs are at a given target.  

 

Edited by stupid_fast

Share this post


Link to post
Share on other sites
20 hours ago, bradyzq said:

[...]or it's not a true VE table[...]

From my experience (granted this isn't my career, so there's that out of the way) there's no such thing as a true VE table. Considering this ECU seems to act like a MAF system in the lower airflow regions, and an alpha-n style of handling of high flow areas, there's no reason it needs to be a true VE table, but it does need a way to account for fuel beyond the capability of the AFM.

I'm just pointing out that even in a perfect speed density setup, VE tables rarely if ever look like what the actual VE of the engine is. There's a myriad of reasons you use the VE table to adjust for other aspects that cause the math to not work perfectly. Idle is a great example. Who cares what the VE actual is? Looking at the curves, it's never "correct". You set the VE to what it needs to be in order to get the engine to idle nicely, because idle is an inherently unstable condition.

 

Are your injectors perfectly linear? No. Is your fuel pump and pressure perfectly linear? No. Are the variances in expected thermal transfer ideals and reality? Yes. Unless you can put ALL your sensors INSIDE THE CHAMBER with absolutely ZERO unintended environment impact, you're going to need "non math-scientific" adjustments to get the results you want.

Share this post


Link to post
Share on other sites

I was referring to your Megasquirt VE table. If you don't have "include AFR" active, it isn't a VE table, but rather a rescaled pulse width table. Maybe this was the issue. 

 

Everything is an approximation anyways, but if the fueling table doesn't look at least a bit like the torque curve, there's an issue.

Share this post


Link to post
Share on other sites
2 hours ago, bradyzq said:

I was referring to your Megasquirt VE table. If you don't have "include AFR" active, it isn't a VE table, but rather a rescaled pulse width table. Maybe this was the issue. 

 

Everything is an approximation anyways, but if the fueling table doesn't look at least a bit like the torque curve, there's an issue.

"Your" might be a bit misplaced there. I've always used include AFR target with my setup, so I'm not exactly clear on what stupid_fast was getting at when saying "air flow would be consistent". Maybe he's seeing or meaning commanded pulse width, which WOULD be similar with VE == VE areas all other variables staying constant.

 

But that last bit you said was the point of what I was getting at. Everything is just an approximation, and the idea of a VE table being "accurate" is a relative term. What matters at the end of the day is how the car drives with the tune.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...