For any discussion not specifically related to your project
By Pedxing
#51728
I've tuned several engines from scratch on the Ms. I've not actually tried to tune this one on speeduino yet, just disappointed the one for the pnp is so far off. Engine management is engine management so I will get there assuming the board is not defective.

There are no mechanical issues with the trigger on the car. So how is it fixed within speeduino? There are no adjustable pots on this board and wiring to the car is obviously correct as it will sync over 200 rpm. I can search for this (as I've been doing) but since we're talking already maybe you could provide a pointer in the right direction.

Yes, I will tune it. I'm not sure why you want me to end up with a super rich table by turning everything off though. I prefer to have enrichments working basically so I don't have to be reving the engine and dealing with almost stalls until it reaches operating temp. Where I come from, we verify sensors and wiring first, get timing next, then with a base ve (calculated), we tune priming pulse and cranking so it catches correctly. Then get ASE and wue so idle is reasonable during warmup. Then dial in ve when those are off naturally. One or two more cold starts later and enrichments are dialed in properly. This process is less violent on the engine when you're truly starting from nothing.
User avatar
By PSIG
#51730
Pedxing wrote: Sun Jul 11, 2021 1:05 pm… Engine management is engine management so I will get there assuming the board is not defective.
True, in basis. Which leaves you with the methodology used to tune whatever it is. How you tune an engine, what you change first, second, and why. This is where differences in ECMs can alter your plan, so you are not fighting automated responses, or being confused by the engine's response when it's the ECM that is altering what you told it to do. Every tuning plan needs to consider the differences in systems in order to see effective diagnostics - which is what tuning is. Diagnostics. What is your methodical diagnostic plan?
Pedxing wrote: Sun Jul 11, 2021 1:05 pmThere are no mechanical issues with the trigger on the car. So how is it fixed within speeduino?
The same as with other systems that use similar conditioning and software filters. Nearly every aspect of a system requires a tuning review, including the trigger input, both hardware and software. Speeduino is no different, and in-fact bases the input on some MS designs, though not the version using the little pots. ;) The Search bar is your friend.

I don't know which specific VR circuit you're using, but most that have any issues are either external (e.g., noise) or input amplitude (altered with input resistors and/or shunts to balance the operational range), in-combination with the software filters (we strive to minimize filtering with changes previously mentioned). Hope that helps with the direction you're going. All circuits hoping to cope with hundreds of possible hardware combinations are "one size fits most".
Pedxing wrote: Sun Jul 11, 2021 1:05 pmYes, I will tune it. I'm not sure why you want me to end up with a super rich table by turning everything off though.
You can do it any way you like, as it's yours. It will run poorly until you tune it to run well, and is entirely expected in your unique setup, fuel, parts and environment. However, most find best and quickest success turning everything off beyond basic functions, so the engine's feedback is not masked by automated functions. The clearest diagnostic "picture" should then be apparent in response and logs, allowing quicker and easier (and generally more-effective) tuning.
Pedxing wrote: Sun Jul 11, 2021 1:05 pmI prefer to have enrichments working basically so I don't have to be reving the engine and dealing with almost stalls until it reaches operating temp. Where I come from, we verify sensors and wiring first, get timing next, then with a base ve (calculated), we tune priming pulse and cranking so it catches correctly. Then get ASE and wue so idle is reasonable during warmup. Then dial in ve when those are off naturally. One or two more cold starts later and enrichments are dialed in properly. This process is less violent on the engine when you're truly starting from nothing.
Note that most functions are additive to the base tables. So, until your VE and Spark Tables are fully tuned in a warm condition, the additives (e.g., priming, ASE, WUE, etc) are not predictable or effective under those different conditions. If you tune them to be effective before table tuning, then they will of course drift with the table changes. Tune again. And again. :roll:

Random example - enabled O2 reads and logs always. You could also turn O2 corrections ON or OFF. You're trying to tune off-idle and altering those fuel values. Do you think it would be easier to see the engine's response to your changes with O2 corrections quiet, or with it fighting you towards an AFR target you have not found to be correct yet?

Again, you can do this however you prefer, but most tend to trade some milking effort to get the engine started and warmed, so the tables may be tuned "clean" at normal operating temps, and then move to additives based on a good set of tables. Easier to tune and time saved. Can you get there juggling changing tables and additives? Sure. Do your thing. But if you do not grasp how others do some things, then you may be missing opportunities, whether you choose to use the concepts or not.
By Pedxing
#51736
Hey PSIG, thank you for the response. Let me back up a little -- I have years of tuning experience. What I lack is specific knowledge of this ECU. I did not build this board (as stated before, it's a Beta 2 PNP board) like I've done with the ms3. For this reason I'm not familiar with the in-software settings needed to help reduce sync errors like the filter screen, new ignition vs old ignition feature, etc. Most of these things are not documented well in the wiki and forum discussions are centered around when they were first implemented and seem to be out of date. For example, "new ignition" is default in the base tune now but evidently was burning out people's coils when it first came out and so there are a lot of screams to not use it. Also several features from the ms3 that I would use to stabilize things are not there or are called something else, etc. So need to research each item to find a work-around. This has been a bit time consuming.

The other challenge is in rewiring things for a 94 USDM NA8. All those issues seem to be sorted now -- there was a defect in the soldering (from the mfg) and I also made about 6 mods to the board, either to replicate features in the new production PNP boards or to rewire things for the 94/95 oem harness and have it run sequential fueling. This is related to my diagnostic plan, as you call it. People were calling for me to post my tune before I'd even verified the wiring and sensors!

Today is my first actual tuning day. I just got back in from a hour of sitting in my 110 degree garage and tuning. :lol: It idles evenly at 850 rpm at 14.7 afr in closed loop. The fan turns on and off as expected. I can rev up and down and not have it stall. I used my technique of leaving enrichments on and it worked fine. The next cold start will be easier to dial in now -- which is why I like doing it this way.

Issues remaining:

Accel enrichment works differently in this ECU than I'm used to so there's still a bit of a stumble when rolling onto the throttle. Stabbing the throttle mostly works fine so I need to fix the low tpsdot conditions. It's a really quick quarter second pause before it revs that I want to get smoothed out.

Idle advance is different as well -- it doesn't seem to catch itself and apply timing very quickly. Like if the fan comes on, it will drop 50-80 rpm and seem to be ok with that. Normally i'd see a little advance and it would return to 850. So I need to examine that scenario a little closer.

Fueling still seems a little weird -- the numbers are quite high. Maybe it's fine and normal since it works but also maybe something is not correct in the injector setup.

The last and main issue is it seems to want way more air than it should. I need about 20% throttle to start it. For some reason it doesn't seem to want to use the idle valve until it's running and then it holds it completely open. So for this, I probably will turn it off, readjust fuel, and see what I can get. The oem ecu and the ms give open the valve a bit for cranking based on a crank duty cycle. This table is only available in the speeduino with idle mode set to closed + open loop. So still learning about this part.

I have never mentioned the set up of the car in this thread so maybe I should:
1994 Miata 1.8L
Flow Force 640 Injectors
Toyota COPs
Garret SR20 turbo (similar to a GT2554)
Has AC and power steering (so I'll need to make sure the ecu can deal with loads)

I appreciate the help!
User avatar
By PSIG
#51739
No problem, and you are on your way! Image Your hardware is definitely not stock, and is especially receptive to a generic base-tune workup (not a borrowed tune). You also have a unique combination of project goals, such as:
Pedxing wrote: Sun Jul 11, 2021 7:38 pmIt idles evenly at 850 rpm at 14.7 afr in closed loop.
This indicates one of your goals is a partial emissions tune, versus a full performance tune. That's good to know, and just helps to fill-in the gaps and changes the tuning (diagnostic) plan. Likewise, that you're in closed-loop already indicates you are familiar enough with the dynamics of closed-loop that it didn't drive you crazy with un-tuned idle (a common condition with new users, as you can imagine).

Do your thing, and hands-on is by far the best teacher, so figure it out as you go and have fun! 8-)
By Pedxing
#51740
Haha, true that. Came back in for cool down...I can only do a little while at a time this time of year.

So accel enrichment is super close, feels really close to stock.

Fuel is better now that I paid a little more attention to the math on the injector screen...the mfg instructions are for the ms and the voltage adjustments have 2 decimals of precision for the dead time and one decimal for the adjustment and zero (integers only) for the volts. Speeduino has one decimal for the dead time, one for the voltage, and zero for the adjustment. My rounding to make this work in speeduino's side was off by a bit causing things to be confusing.

The iacv started acting better after playing with some different frequencies. I lowered it some and was able to widen the resolution appropriately.

Only issue now is my cranking settings. It's better but not any good, still need a bit of throttle to get it to catch. It was too hot to review logs so I ran a few scenarios and I'll look them over later. Cranking pw seems too much, but then it acts like it doesn't have enough.

It's mostly ready to drive but to be cautious I'll wire open the waste gate on the turbo first.
By Pedxing
#51780
Couple of bugs in the firmware I've stumbled into. They are evidently known issues that are not resolved in the latest firmware.

First is a problem with the "New Ignition Mode". This isn't well documents as to what it even is and things became way more stable when turning it off.

https://github.com/noisymime/speeduino/issues/497

Second, the Idle Advance timing curve is backwards. When the delta is -150 (ie 150 rpm below target) it applies the timing adjustment from the +150 cell. You can work around this by reversing the table of course, but kind of non-intuitive.

Similar to the above, I've noticed two other places where the delta is either ignored or applied in the wrong direction. This could be a PID screwup on my end but it's pretty reproducible for any PID values.

Example: In CL idle, the PWM IAC value is lowered despite being below target. It continually lowers it to be bottom of the duty cycle range and stays there despite being below target. I am configured for normal polarity and raising and lowering DC manually results in the expected changes in RPM.

Example 2: In EGO PID control, if you are exactly on target with no corrections and enable EGO it will not apply any corrections (as expected). If you raise the target from say 14.7 to 14.9 (leaner) it will ADD fuel. It does this immediately and without oscillation. It will do this to the max of it's authority (say 10%) and then will sit there, about .5 or so under target. Changing PID values at this point does nothing to get closer to target, it simply induces oscillation eventually. If the PID values are wrong, I would expect it to pull fuel, either very slowly, or too fast and overshoot. There is no reason to immediately add fuel to attempt to get to a leaner target . Turn off EGO correction and it goes immediately back to 14.7 because this is where the VE is tuned. I should also test it with a richer target and see if it tries to do the opposite.

I feel like in all these cases, the problem is related to the sign of the delta of the current value vs target to be reversed. Maybe I should start a new thread? I can dig into the code to see if I can see anything. I'm not a realtime systems app dev but I am a professional developer in my day job. Just wondering if some of these things are known or reported elsewhere.
By Spork
#51786
Pedxing wrote: Tue Jul 13, 2021 4:40 pm First is a problem with the "New Ignition Mode". This isn't well documents as to what it even is and things became way more stable when turning it off.

https://github.com/noisymime/speeduino/issues/497
Could you please describe the problem this was causing you? We have very similar cars so I'm wondering if it is also causing me problems.
Pedxing wrote: Tue Jul 13, 2021 4:40 pm Second, the Idle Advance timing curve is backwards. When the delta is -150 (ie 150 rpm below target) it applies the timing adjustment from the +150 cell. You can work around this by reversing the table of course, but kind of non-intuitive.
I was having the same issue and assumed that I fundamentally misunderstood what I was doing and turned it off/gave up.

I don't know about the idle or EGO parts of your post. I tried enabling EGO once and I got some horrible results with tons of oscillating, didn't know what I was doing wrong and turned it off. I'm not sure I understand how to verify the closed loop idle part.

The advice you gave me for setting the idle in an earlier post turned out great, thank you. The idle is great and while the idle up still doesn't work the a/c won't kill the car unless I have the headlights and the fan turned on to max.
By theonewithin
#51788
You adjust the CAS NOT the trigger offset.

That's why you are having problems.

Leave offset at 0 and adjust CAS so timing is correct.

This is the correct way to set the timing on this trigger pattern.
By theonewithin
#51789
Pedxing.

Nothing you have posted can be confirmed.

You need to supply your tune and log so others can see what is happening as you may be incorrectly doing something.
By Pedxing
#51792
Apparently not adjusting the offset is required because of the bugs with the new ignition. The recommendation in the link I posted is to leave it at 0. However in general there should be no reason not to be able to adjust it. If this is not the case in speeduino then speeduino is the problem in that it lacks basic functionality of an ecu. I think this is not the case though because previous posts from noisymime indicate this is supported.

In my case, despite leaving it at zero and having the cas adjusted, I still had sync issues on the new ignition mode that mostly resolved when turning that off. Although it was fine in both cases when the rpm was consistently over 200 rpm.

I found that the idle advance issue is here:

https://github.com/noisymime/speeduino/issues/386

Speaking as someone who looks over other people's tunes and logs frequently, I don't want to waste anyone's time (yet) :lol:

I'll try to get a short log that reproduces some issues and the tune that goes with it.
NO2C crank signal issues

Once again PSIG, thank you. Note this is set up fo[…]

I've managed to dig up a few obscure wiring diag[…]

Niiiice... 8-) Looking forward to your updates![…]

I'd be surprised if its not a 32-bit processor on[…]

Still can't find what you're looking for?