Megasquirt Running with Fuel!!!
Update!
After many hours of looking at logs and vexme tables--I'm pretty close to a good map. I've upped the fuel pressure to 43.5 psi as that is the standard value--a little higher than stock. The car is running pretty good and pulls like crazy. The transition delay is still there but I've been able to compensate for that with the ve map.
The ego stuff you guys posted worked beautifully--that's exactly what I wanted. As soon as I get the ve a little better I'll start trying to run up in the 15 afr's. Right now anything over 85 kpa is open loop. There was actually a few times when I got on the gas and the ego was trying to lean it out and the car wouldn't accelerate--somewhere in the 85-100kpa range. It's like the accel trigger only lasts a second and after that it starts to close loop on ego. At the time I had the ego limit set at 100 kpa--moving it down to 85 seemed to help.
In regards to the staged injection, another excellent feature would be to have the secondaries fire when the primaries reach a setpoint duty cycle. My stock turbo is easily able to reach 12 psi boost at 3200 rpm, but I don't want staging that early (for all other normal operations). I'm not sure what I'm gonna do yet but the duty cycle on the primaries is looking like it will be an issue. The log I have from today shows 91% duty cycle but the afr is below 10 and the ve values in the map need to be adjusted down a little. I'm really hoping to keep duty cycle below 85%. After some more tuning I'll have to see how it comes out.
Scott
The ego stuff you guys posted worked beautifully--that's exactly what I wanted. As soon as I get the ve a little better I'll start trying to run up in the 15 afr's. Right now anything over 85 kpa is open loop. There was actually a few times when I got on the gas and the ego was trying to lean it out and the car wouldn't accelerate--somewhere in the 85-100kpa range. It's like the accel trigger only lasts a second and after that it starts to close loop on ego. At the time I had the ego limit set at 100 kpa--moving it down to 85 seemed to help.
Originally Posted by muythaibxr
Also, for TPS-based, there's a chance that at higher revs, that might cause the duty cycle when you're using primaries only to be too high.... have you looked into this? say at lower kPa values above 5000 rpms? This might not be a concern in normal driving, or in drag racing, but if you're racing on a road course, and you're at 6000 rpms but at 50 kPa sustaining your speed through a turn, this might be too much for the primaries. That's why I've been reluctant to try tps based, and have wanted to do my mappable delay instead. This also might only be a concern for NA cars... as judging from the map above, turbo guys don't expect to be off boost that often.
Scott
Last edited by Rex4Life; Nov 19, 2005 at 11:51 PM.
TPS Based Staging
I tried out the TPS staging today using an S4 TPS--didn't work out very good.
From a dead stop the engine bucks real bad, even city traffic there is some jerking around. Once on the highway it seem to come on OK. Maybe in the future I'll try using a wide range TPS instead of the stock S4 TPS.
Thought it was worth a try.
Scott
From a dead stop the engine bucks real bad, even city traffic there is some jerking around. Once on the highway it seem to come on OK. Maybe in the future I'll try using a wide range TPS instead of the stock S4 TPS.
Thought it was worth a try.
Scott
Originally Posted by Rex4Life
I tried out the TPS staging today using an S4 TPS--didn't work out very good.
From a dead stop the engine bucks real bad, even city traffic there is some jerking around. Once on the highway it seem to come on OK. Maybe in the future I'll try using a wide range TPS instead of the stock S4 TPS.
Thought it was worth a try.
Scott
From a dead stop the engine bucks real bad, even city traffic there is some jerking around. Once on the highway it seem to come on OK. Maybe in the future I'll try using a wide range TPS instead of the stock S4 TPS.
Thought it was worth a try.
Scott
Did you check the actual throttle plate position at your chosen TPS transition point? If that narrow-span TPS is out of range before the secondaries moving well, then TPS staging will never work properly. If the secondaries are part open at your staging point, then I'd be interested in seeing a datalog, as there is something clearly wrong.
Roger.
i think i would adjust the secondary VE table FATTER ,then lean out the primary VE to keep primary duty cycle down. kinda like tuning a 4barrel holley carburator. or was it the other way around... i forget.
Originally Posted by renns
Scott,
Did you check the actual throttle plate position at your chosen TPS transition point? If that narrow-span TPS is out of range before the secondaries moving well, then TPS staging will never work properly. If the secondaries are part open at your staging point, then I'd be interested in seeing a datalog, as there is something clearly wrong.
Roger.
Did you check the actual throttle plate position at your chosen TPS transition point? If that narrow-span TPS is out of range before the secondaries moving well, then TPS staging will never work properly. If the secondaries are part open at your staging point, then I'd be interested in seeing a datalog, as there is something clearly wrong.
Roger.
Anyway, here is a log of the rpm based staging at 3600 rpm setpoint--I think you'll see why I'm concerned:
1) Fattening up the map around staging results in a primary duty cycle that way too high. This is just a bandaid, the stock 550's should be OK for a stock turbo. I've had thoughts of getting bigger secondaries and putting the 720's in for primaries. Then I could go with the low impedance setup for injectors and get better transient response. This would be a last resort, since then I couldn't just swap back in the stock ECU if needed (like I can now).
2) The afr goes up to 12.5 even with the increased fuel.

And to top it off I'm up at about 13 psi of boost. Cool thing is you can actually measure the turbo response and see the stock turbo does pretty good--even with the big 'ol FMIC.
At this point I'm still not sure what I need to do to get a good transition--any better ideas.
TIA,
Scott
After thinking about the graphs some more, two things to note:
1) The throttle plates have nothing to do with the leaning out since they have been open for some time before staging.
2) The injector duty cycles after staging are the same--as they should be. MLV just scales the graphs differently based upon the min and max values. At first I couldn't understand why the secondaries had a higher duty cycle--my bad.
1) The throttle plates have nothing to do with the leaning out since they have been open for some time before staging.
2) The injector duty cycles after staging are the same--as they should be. MLV just scales the graphs differently based upon the min and max values. At first I couldn't understand why the secondaries had a higher duty cycle--my bad.
Originally Posted by Rex4Life
Well for now I've given up on TPS staging using the narrow band TPS. Last time I checked the secondary throttle plates were opening just before the TPS switch was maxed out.
Fitting a full-span TPS would be ideal. Another option would be to try to modify the mechanism that's actuating the stock TPS to allow a wider operating range. I recall somebody doing this a while ago and achieving near full-span functionality. He never provided pics, though, so I'm not sure how this was achieved. It's certainly something to look at. There's no use contemplating changes in embedded code if it's a mechanical system that's causing the problem.
If code changes are required, I'll dig out my old transition code modification. When the transition point is met, primary pulse width slowly drops, and secondary pulse width slowly increases until they are equal. This transition occurs over a large number of injector cycles (up to 255). This should address the issue if the problem's related to injector location.
Duty cycle based staging is another option, although it takes a bit more coding as duty cycle isn't normally calculated within MS.
Who here is familiar with the operation of other aftermarket ecu's? It'd be interesting to compare staging schemes to see how they operate.
renns: I'd like to give your transition code a shot too just to see what happens... although I'm not having a problem with the code the way it is anymore.
I'd also want to make the transition based on 2 factors.... but I'll probably do that myself if there's enough free flash (I believe there's plenty). That way the secondaries won't come on unless you're above a certain RPM and a certain MAP.... I could make that configurable too... for people with turbos who want the secondaries to always come on when on boost, but off boost they don't want them on until a certain RPM....
I think your change would be enough to get rid of the problem people are having with that lean spot when the secondaries come on, but I just want to add a little more configurability.
I'd also want to make the transition based on 2 factors.... but I'll probably do that myself if there's enough free flash (I believe there's plenty). That way the secondaries won't come on unless you're above a certain RPM and a certain MAP.... I could make that configurable too... for people with turbos who want the secondaries to always come on when on boost, but off boost they don't want them on until a certain RPM....
I think your change would be enough to get rid of the problem people are having with that lean spot when the secondaries come on, but I just want to add a little more configurability.
Originally Posted by renns
Fitting a full-span TPS would be ideal. Another option would be to try to modify the mechanism that's actuating the stock TPS to allow a wider operating range. I recall somebody doing this a while ago and achieving near full-span functionality. He never provided pics, though, so I'm not sure how this was achieved. It's certainly something to look at. There's no use contemplating changes in embedded code if it's a mechanical system that's causing the problem.
Originally Posted by renns
If code changes are required, I'll dig out my old transition code modification. When the transition point is met, primary pulse width slowly drops, and secondary pulse width slowly increases until they are equal. This transition occurs over a large number of injector cycles (up to 255). This should address the issue if the problem's related to injector location.
For my case, I'm running out of options to fix the problem--aside from using 720's , reducing boost level, and running it very rich around the staging bins. It seems like others are also having the problem but not every car exhibits it. As you know, the problem is that the secondaries are taking too long to come online.
Exactly what causes that I don't know--though I've been thru all the grounding and hesitation fixes out there. I've ohmed out all the injector wires and resistances were nominally 0.3 ohms--however, we know under load the wires may be behaving differently. Though not an easy job, I could replace the secondary injector wires and see if that fixes it. It's just weird they work fine once actaully on and running--except for that start-up transient.
Originally Posted by renns
Duty cycle based staging is another option, although it takes a bit more coding as duty cycle isn't normally calculated within MS.
Originally Posted by renns
Who here is familiar with the operation of other aftermarket ecu's? It'd be interesting to compare staging schemes to see how they operate.
http://www.wvinter.net/~flanham/wlan...l/staging.html
Thanks again for helping with this Roger,
Scott
Originally Posted by muythaibxr
I'd also want to make the transition based on 2 factors.... but I'll probably do that myself if there's enough free flash (I believe there's plenty). That way the secondaries won't come on unless you're above a certain RPM and a certain MAP.... I could make that configurable too... for people with turbos who want the secondaries to always come on when on boost, but off boost they don't want them on until a certain RPM....
I think your change would be enough to get rid of the problem people are having with that lean spot when the secondaries come on, but I just want to add a little more configurability.
I think your change would be enough to get rid of the problem people are having with that lean spot when the secondaries come on, but I just want to add a little more configurability.
Scott
Originally Posted by Rex4Life
Yes I also feel a full span TPS would fix the TPS based staging. However, I don't think it will fix the lean out conditions during staging. From the log above, the secondary throttle plates have been wide-open for some time before staging, so there should be plenty of airflow in the secondary intake runners. So I guess in this case the absence of airflow for the secondaries is not an issue.
1.) Transit time difference, as secondary injectors are upstream in the runner from the primaries. This might be an issue for up to a couple intake cycles? Would
2.) Drop in rail pressure due to batch-firing all four injectors simultaneously. This has been a problem in other non-rotary installations, and might be a contributor here.
3.) Post ideas here...
Last night I was looking at the assembler code you wrote for staging. I probably could figure out how to do it but I don't know assembler much at all--too bad it's not C++ then I could.
For my case, I'm running out of options to fix the problem--aside from using 720's , reducing boost level, and running it very rich around the staging bins. It seems like others are also having the problem but not every car exhibits it. As you know, the problem is that the secondaries are taking too long to come online.
For my case, I'm running out of options to fix the problem--aside from using 720's , reducing boost level, and running it very rich around the staging bins. It seems like others are also having the problem but not every car exhibits it. As you know, the problem is that the secondaries are taking too long to come online.
Exactly what causes that I don't know--though I've been thru all the grounding and hesitation fixes out there. I've ohmed out all the injector wires and resistances were nominally 0.3 ohms--however, we know under load the wires may be behaving differently. Though not an easy job, I could replace the secondary injector wires and see if that fixes it. It's just weird they work fine once actaully on and running--except for that start-up transient.
This makes sense because once the primaries are at a limit, the secondaries should come on.
Not so funny but seems like other ECUs also have this problem. Here's a descent write-up for the Power FC:
http://www.wvinter.net/~flanham/wlan...l/staging.html
http://www.wvinter.net/~flanham/wlan...l/staging.html
Originally Posted by Haltech E6K Manual
The ECU will fire only the primary set of injectors until a preset load point, where the ECU will control both primary and secondary injectors. The turn on point for the secondary injectors depends on injector size and engine performance, but will usually occur just after the pressure in the intake manifold of the engine has reached atmospheric pressure. Typically bar number 14 to 16 will work well in most applications. The staging point must occur before the primary injectors have reached 100% duty cycle. Go to the highest speed range in the fuel map that the engine is using, and make sure that the last bar for primary injection is not too high. If it is, you must stage at a lower pressure. (Refer to section 4.8 Duty Cycles). Adjust the bars around the staging point with extreme care to ensure that the engine does not lean out as the secondary injectors come in. When the Haltech ECU begins to stage it begins firing both sets of injectors at once and fires them with the same duration. This means that if both primary and secondary injectors are of the same flow rate then the first staged bar should theoretically be slightly more than half that of the last un-staged bar. Allow a safety margin by using 60% of the last bar.
Originally Posted by Rex4Life
That would be great! I'd be glad to help you guys out in any way. If you do start modifying the staging code, consider also a hard staging setpoint based on duty cycle. RPM, TPS, MAP are all great to use for staging triggers, but once primary duty cycle gets above a certain point, the secondaries should clearly come on.Scott
Have you done any testing with map-based transition? If you could test and plot the results, it'd be interesting to compare. I've heard some Haltech users transition near the 100kPa point, which seems quite high...I'd certainly start lower than that.
If you could email your datalogs to me, I'd like to take a look as well.
Roger.
Originally Posted by renns
Like I said earlier, calculating duty cycle in our ram-limited HC08 is the issue. It could be done if some of the other unused -extra features were deleted, but creating another branch on the embedded code tree is problematic.
Originally Posted by renns
On the other hand, setting up a second staging trigger using either AND or OR requirements is very easy, and could be done with no impact on ram. I can see this being of value, particularly in boosted applications when you may run out of primary injector at low rpm.
Originally Posted by renns
Have you done any testing with map-based transition? If you could test and plot the results, it'd be interesting to compare. I've heard some Haltech users transition near the 100kPa point, which seems quite high...I'd certainly start lower than that.
Originally Posted by renns
If you could email your datalogs to me, I'd like to take a look as well.
Scott
Originally Posted by renns
1.) Transit time difference, as secondary injectors are upstream in the runner from the primaries. This might be an issue for up to a couple intake cycles?
I'm almost positive this is what was causing me problems in tofuball's install.... which is why moving the point up further in the rpm range helped a lot.... the air was moving a lot faster, and I richened up that bin in the table, which got rid of the problem for me... I just kept an eye on injector duty cycle at full throttle, and when it got somewhat high (around 80%) I just set that point as the cut-in point (around 4500 rpms)... However, at a MAP of less than 60-70 I'm sure I'd still feel a stutter.... I don't think tofuball ever revs that high at partial throttle though, so I have noticed no stutter. This is where the code for 2 staging points would be helpful... for an NA install, you could say below this rpm or below this MAP use primaries only..... effectively creating a box in the upper right hand section of the VE table where the primaries and secondaries are on... but at partial throttle when the duty cycles aren't that high, just leave the secondaries off.
However, if I wanted to keep the stock RPM staging point at 3800 rpms, I'm sure I wouldn't be able to tune out the stutter.... which means some code to make the transition smoother would be good... I think something as simple as letting the primaries stay at their full pulse width for an extra pulse or two until the fuel from the secondaries gets to the intake would work...
Last edited by muythaibxr; Dec 3, 2005 at 10:07 PM.
Originally Posted by muythaibxr
However, if I wanted to keep the stock RPM staging point at 3800 rpms, I'm sure I wouldn't be able to tune out the stutter.... which means some code to make the transition smoother would be good... I think something as simple as letting the primaries stay at their full pulse width for an extra pulse or two until the fuel from the secondaries gets to the intake would work...
Pri,Sec
10,0
10,0 <- staged = true logic occurs just after this squirt
9,1
8,2
7,3
6,4
5,5
5,5
This brings the secondaries on-line over 5 squirts, but of course that could be spread over any number of squirts. As I recall you need some ram for this: a transition squirts counter, and an 'in transition' bit at the very least.
Ok guys I don't have a MS but watch your threads learning more every day. I currently run a Wolf Version 4. I noticed that you wanted some ideas on staging. Well I thought I could help out a little ( I am no Expert though). The Wolf stages its secondry injectors with both RPM and LOAD. Now that said most of us don't use both. I have always found that LOAD staging makes a very smooth transition. What many of us do is set the start the staging at about 30% load which is a little below atmo. We use about 14% at that point up to 100 % at 50%. Now these injectors have have a minimum on time before fuel actually comes out of them. Many times this is what causes the lean spot. Each injector varies every time it fires fuel. The Wolf interpolates from 0% at say 25% to 14% at 30 %. (14% staging @30% load) Now the levels could be preprogramed with a 20% load range 30-50 % and the start point could be user adjustable reducing calulations.
I just though I could shed some light on one other ECU staging system.
Regards
Michael Smith
I just though I could shed some light on one other ECU staging system.
Regards
Michael Smith
Originally Posted by renns
Example below (ignoring injector open-time adder, and assuming equal injector sizes):
Pri,Sec
10,0
10,0 <- staged = true logic occurs just after this squirt
9,1
8,2
7,3
6,4
5,5
5,5
Pri,Sec
10,0
10,0 <- staged = true logic occurs just after this squirt
9,1
8,2
7,3
6,4
5,5
5,5
Originally Posted by renns
I agree, that might work, but keep in mind that lots of other folks use the staging code for non-rotary applications. For those installs with all injectors in the same location, the above code change would result in a momentary over-rich condition, which may also cause undesireable effects. A staging mode that brings secondaries on-line over a number of cycles might be a better solution, as it should be transparent to other users. Example below (ignoring injector open-time adder, and assuming equal injector sizes):
Pri,Sec
10,0
10,0 <- staged = true logic occurs just after this squirt
9,1
8,2
7,3
6,4
5,5
5,5
This brings the secondaries on-line over 5 squirts, but of course that could be spread over any number of squirts. As I recall you need some ram for this: a transition squirts counter, and an 'in transition' bit at the very least.
10,0
10,0 <- staged = true logic occurs just after this squirt
9,1
8,2
7,3
6,4
5,5
5,5
This brings the secondaries on-line over 5 squirts, but of course that could be spread over any number of squirts. As I recall you need some ram for this: a transition squirts counter, and an 'in transition' bit at the very least.
10,0
10,0
10,1
9,2
8,3
7,4
6,5
5,5
5,5
So basically the primaries scaling down would lag a little behind the secondaries coming on... It may not be necessary to do this if the staging point(s) are tuned properly though.... and it wouldn't be that hard to try what I just said, or what you originally said.
I hear you on the RAM thing... no matter what, we'll have to find a spare byte of RAM to use.... Like I said, there might be 1 byte we can use that isn't being used all the time, or isn't usually used by people using staged injection.
Looking at the latest code, I see the following free byte.
GammaE2: As far as I can tell this isn't being used by anything... I searched for it in the asm file and it looks like nothing uses it at all... This is our spare byte.
So what do you say? do you want to add the code to 027d to space out the staging over a certain number of squirts or something like that? (and make it configurable how many to do it over using a byte of flash?)
I'd like to add the second configurable staging point if you don't want to.
Last edited by muythaibxr; Dec 4, 2005 at 08:13 AM.
Ken,
I have my doubts whether an offset is needed (imagine that transition sequence over 100 steps with injector opening time included), but it wouldn't hurt to code it for test purposes anyways. From a ram standpoint, one byte counter, indicating the step number during the transition, and an 'in-transition' bit should be all that are needed. There is another free ram byte, 'ramslot1'. Whatever changes are made should be easily mergable with the existing -extra code. Making a separate dedicated rotary-only code branch might seem tempting now, but then someone needs to continually merge and test new features, bug fixes, etc.
If you have time to code this, have at it. I don't have time for the next week or so.
I have my doubts whether an offset is needed (imagine that transition sequence over 100 steps with injector opening time included), but it wouldn't hurt to code it for test purposes anyways. From a ram standpoint, one byte counter, indicating the step number during the transition, and an 'in-transition' bit should be all that are needed. There is another free ram byte, 'ramslot1'. Whatever changes are made should be easily mergable with the existing -extra code. Making a separate dedicated rotary-only code branch might seem tempting now, but then someone needs to continually merge and test new features, bug fixes, etc.
If you have time to code this, have at it. I don't have time for the next week or so.
I'll give it a shot, I know of at least one free bit of ram for the "transition" bit.
If it's snowing tonight like they're calling for, I'll put off fixing my rx7's stock grounds and write some code instead.
If it's snowing tonight like they're calling for, I'll put off fixing my rx7's stock grounds and write some code instead.
Snow baby Snow!! jk
Just to let you guys know, last nite I put the MS back in and changed the transition up to 4k (like Ken was talking about). It seems to be better--less pronounced, but I haven't had much time driving it this way, just to work this morning.
This week I'm going to try and finish up the fuel map. I'm also going to try and take out some of the extra fuel I have loaded in the VE map for transition.
Tomorrow nite I'll have a good four data logs using the 4k transition--will let you know how it goes.
I'm just hoping I don't run out of primary injectors. That's why Rtek and most others moved the staging to lower rpms. I doubt there is any way to move it up to 4.4k like Ken has.
Scott

Just to let you guys know, last nite I put the MS back in and changed the transition up to 4k (like Ken was talking about). It seems to be better--less pronounced, but I haven't had much time driving it this way, just to work this morning.
This week I'm going to try and finish up the fuel map. I'm also going to try and take out some of the extra fuel I have loaded in the VE map for transition.
Tomorrow nite I'll have a good four data logs using the 4k transition--will let you know how it goes.
I'm just hoping I don't run out of primary injectors. That's why Rtek and most others moved the staging to lower rpms. I doubt there is any way to move it up to 4.4k like Ken has.
Scott


