[rusEfi] 93 1.6l Miata stock engine (for now)

Your chance to introduce yourself and your vehicle
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: 93 1.6l Miata stock engine (for now)

Post by kb1gtt »

hmmm, what died and why did it die? Then how do we make it more robust against what ever situation that caused that.
Welcome to the friendlier side of internet crazy :)
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

I was logging at the time it first happened. No trace of anything suspicious in that log.
The NA6 Miata does have a weird sensor ground loop which seems to cause all kinds of noise. So I can't say for certain that we didn't have a signal above 5V on some sensors at some time. But I am under the impression that our signal conditioning should take pretty good care of that.
Also worthy of note is that the MAP sensor, where the problem occurred, is grounded properly. So the signal quality is better than the other sensors.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

russian wrote:
Fri Sep 06, 2019 3:35 am
Hardware and reality. Two things we cannot trust :( But we probably do not have resources to deal with limping mode and automatic switch to limping mode :(
In my particular case, I think it would have helped to set the MAP value to let's say 60 when it's out of reasonable range. It would have run terribly- rich as hell at low throttle and super lean at more throttle, but it maybe would have run.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: 93 1.6l Miata stock engine (for now)

Post by kb1gtt »

Hmmm, should I just consider the board was zapped while it was on the bench, and it took this long for the ESD issue to produce a noticeable result? I'm a skeptic about that, but also it's possible. I'm mostly trying to make sure there isn't some kind of data here that could help make the design more robust. It would be great if we could get to root cause. However it sounds like it's simply an unknown as it's to hard to track down for sure. If you have any intuitions or similar gut feels about what happened, feel free to let me know.
Welcome to the friendlier side of internet crazy :)
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

kb1gtt wrote:
Fri Sep 06, 2019 4:05 pm
Hmmm, should I just consider the board was zapped while it was on the bench, and it took this long for the ESD issue to produce a noticeable result? I'm a skeptic about that, but also it's possible. I'm mostly trying to make sure there isn't some kind of data here that could help make the design more robust. It would be great if we could get to root cause. However it sounds like it's simply an unknown as it's to hard to track down for sure. If you have any intuitions or similar gut feels about what happened, feel free to let me know.
You may have a point there. I do swap brainboards around, without care, all the time. No grounding, no static protection at all. This particular board has probably sat in a plastic bin for at least 2 years I think.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

So, on to my Ground problems. It appears that, when the injectors are REALLY firing, my ECU ground is floating up by approx 0.3V or so. Since the sensors are essentially (more or less) externally grounded, this really messes with the readings from the sensors. The reading of my coolant temp sensor varies by almost 50*C from idle to full throttle. IAT only varies by about 15*C. Both happen within a few seconds. No way this is a real value.
Vbatt, as measured by rusefi changes by about 0.25V from FT to idle.
Hard to say what the variation of MAF is, since I don't have a means of comparison, but all these signals are super-noisy.
Only my MAP and EGO sensors that are grounded straight to the ECU show low noise and proper behavior.

Is anybody else experiencing something similar with an NA Miata? It looks like this particular style of ground wiring may be unique to the '93. See below:
Miata NA6 93 Grounds.png
Miata NA6 93 Grounds.png (197.99 KiB) Viewed 12823 times
All we have is two wires, I'd say about 20 gauge, to supply everything, including ECU, sensors, relays, injectors, valves etc. with grounds. Just an awful design.

To add insult to the small wire injury, The sensors are grounded at the cylinder head, where everything else is getting it's ground from AND at the ECU. So we essentially have two wires, crossing at some point, turning into three wires at another point, crisscrossing and being a general mess.
I'm thinking about trying to find the wire that grounds the sensors to the block and not the ECU and just cutting it.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

So, after this rant it occurred to me that Mazda just CAN'T be THAT stupid. So I decided to test my ground connections. Turns out my power grounds going to the ECU are not grounded at all. Near infinite resistance to ground. Something is fubared.
This MAY explain why my stock ECU failed. It may have relied on those grounds. The rusefi is getting grounded via the sensor grounds which are tied into power grounds on the board. So it runs. Just with terribly noisy signals.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

So this block and another one just like it, as well as the connectors hooking into them are apparently the reason why my sensors don't read so good.
Bad Ground Dist Block.jpg
Bad Ground Dist Block.jpg (52.96 KiB) Viewed 12804 times
These are in the passenger footwell on the '93 Miata (pretty sure '94 as well, maybe 90-92 too). It appears that this footwell likes to get wet when the AC drain is blocked or some such. Need to do more research.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

Just an update:
The car is driving very well on rusefi now. Either with the built-in MAP sensor, of just the stock AFM (MAF mode). Idle is fairly stable. AC and all other things one would expect, work.

It's time to sell!
Anybody in need of a rust-free 1993 NA6 Miata in classic red?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 93 1.6l Miata stock engine (for now)

Post by AndreyB »

Is https://rusefi.com/online/view.php?msq=42 the best tune for both MAF and MAP or do you have or plan a better one? I need an exact tune to hard-code into the firmware :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

We need to have two tunes. One for MAP and one for MAF. This is necessitated by the double use of the VE table.
Once the idle issue is all sorted, I post two sample tunes.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

Did some more idling of the Miata. Please see attached logs/tunes.
At various times I played with electrical loads and AC to see reactions to increase/decrease in load. The only part documented in the log is the AC switch, other loads can not be identified. Typical sequence of loads was: Headlights, high-beams add interior fan

1. Testing response to Idle valve
From this test we can determine that response to the idle valve in terms of increase in MAP takes about 20ms. It takes 600ms or so for the increase in rpm to realize about half-way
fully_manual.zip
(79.56 KiB) Downloaded 248 times
2. Testing response to CL idle timing only
Observations: Negative authority seems to mostly not have any effect on timing at all and rpm-gating of the CL timing algorithm appears to be flawed. Timing goes back to base timing seemingly randomly. Possibly when the actual rpm falls far below target rpm which can be rather counterproductive
Also: Even giving timing very wide authority has very little appreciable effect. Offset was at 5* and authority was +20* / -10*. The effect on varying loads, even small electric loads was negligible.
CL_timing.zip
(376.31 KiB) Downloaded 255 times
3. CL Idle valve response
Even trying idle valve increase during coasting conditions has zero effect on idle droop after throttle blip. IAC increases briefly, but if the I-term is set to a value that will have a reasonable response, it will also go into negative saturation after a throttle blip- even with narrow rpm gating for CL algorithm to kick in.
CL_idle.zip
(182.9 KiB) Downloaded 291 times
4. CL idle and CL timing
The addition of CL timing has no appreciable effect on idle droop
CL_timing_CL_idle.zip
(198.9 KiB) Downloaded 244 times
5. CL idle, CL timing and Anti-windup
The addition of anti-windup makes no appreciable difference to idle droop.
CL_idle_CL_timing_Anti-windup.zip
(98.91 KiB) Downloaded 263 times
Conclusion:
The current options are insufficient for proper idle performance on this particular type vehicle. The problem is one of gating.
First of all it appears that rpm gating is applied also to rpms below target. Let's say the gate is 200rpm, target is 1000rpm. It would appear (but I may be wrong) that the CL timing algorithm only works in the window between 800rpm and 1200 rpm. This had the effect of timing going back to offset when the rpm dropped to low. This is not desirable. Therefore I increased the window to 500rpm.
HOWEVER: This is not the actual problem, since CL timing has very little appreciable effect anyway. While this should be fixed, it will not really help.

Secondly, rpm gating for IAC, seems to not be of much assistance either. If the rpm gating is set to a value that is likely to be reached, for example 200rpm, I-windup will be in full force and cause severe droop.

As stated before, the only way I can see for CL idle on this type car to work is to have an offset table that is safely above target rpm. Once rpm has stabilized at the rpm determined by the offset, or rpm drops below target, the CL IAC algorithm kicks in. Any other gating will lead to non-acceptable idle droop.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 93 1.6l Miata stock engine (for now)

Post by stefanst »

As requested, here is more idle data.

1. CL timing only. Settings as suggested by @andreika.
CL_Timing_Settings.png
CL_Timing_Settings.png (34.24 KiB) Viewed 9566 times
Adding electric loads (low beams first, then interior fan) we see that the idle timing is increasing, yet the rpms drop from approx 1000 to approx 300 at the lowest point.
CL_Timing_Only.zip
(33.52 KiB) Downloaded 272 times
2. CL Idle with suggested settings in addition to CL timing.
CL_Idle_Settings.png
CL_Idle_Settings.png (77.78 KiB) Viewed 9566 times
We can see idle regulation works (P and I do their job) when adding loads. Settings may be a bit aggressive, as we can see in log {2020-07-18_19.51.00.mlg] at approx 13s idle starts to oscillate after turning on AC. But that's tunable. However, throttle-blip behavior seems unimproved (check 37s and 47s). I-windup still occurs and idle droops or engine stalls.
CL_Idle_CL_timing.zip
(82.75 KiB) Downloaded 265 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 93 1.6l Miata stock engine (for now)

Post by AndreyB »

This car is sold but it gave us official MAP tube TBD and official MAF/VAF tune https://rusefi.com/online/view.php?msq=172
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply