Page 1 of 1

Standard NA6 Miata 89-93 Configuration

Posted: Mon Jan 14, 2019 1:10 am
by stefanst
Many people entering the aftermarket ECU-world are worried about the complexities. The don't want to have to hack up their car's wiring harness, swap parts and make it difficult to go back to stock. What they want is as plug-and-play as possible. If we can provide a true PNP solution, the initial threshold should be much lower.
If the rusEfi can also offer additional functionality without compromising stock compatibility (meaning you can always swap the stock ECU back in without having to do much else), then we have a true winner on our hands.
The idea here is not to deliver a perfect replacement for the stock ECU. After all, you can pick up a stock ECU for an NA Miata for less than $50, but to have something for an aftermarket enthusiast who wants to tune their car themselves, maybe install an aftermarket ECU as preparation for, or in conjunction with, other engine-mods that render stock ECUs less than perfect solutions.
So the plan is to have ready-to-plug unit that can be ordered, including everything needed to make the car run.

Mostly this is pretty much taken care of with the stock rusEfi board, after adding just a few jumpers. BUT: There's a one main issue that will still need to be sorted out: Stock Miata is running AFM. We currently don't have timing or fuel maps for running with AFM. The plan is to run a car off a MAP sensor while recording MAP, AFM, O2, rpm, fuel and timing data and create maps for AFM from that data. Then we refine the fuel map by using a wideband O2. The ignition timing map will have to be fairly conservative to make sure to avoid knock.

Again, the idea here is not to provide a perfectly driving car, but one that will drive well enough for a few days and for testing.

Highly recommended Updates:
Once users have their cars running on rusEfi, they can then add the basics: MAP sensor, WBO2 and TPS. Again, the plan is to keep the car and the wiring harness as stock as possible. In order to achieve this goal, the plan is to have an external MAP and WBO2 sensor wired into the unused spare center plug that is offered by the frankenso board. They will both be powered by and grounded at the ECU, so rusEfi is providing all needed connections and no messing with the stock harness is needed. Unfortunately, adding a WBO2 will require removal of the stock O2 narrowband sensor, or addition of a second bung. A small price to pay for rusEfi-awesomeness.

TPS: While an upgrade to a true TPS may not be needed, depending on how experiments with the wall-wetting algorithm go, there is an easy upgrade version: The TPS from a KIA actually has the same electrical connector and hooks up mechanically to the throttle shaft. All it needs is an adapter plate for the screw mounts. 3D printed versions of those adapter plates are available from SADFAB. We then just have to jumper the frankenso board, so it sends 5V to the TPS and sends the signal to the correct AN-input.

Maybe all these components could be included in a comprehensive kit.

One possible option for a Wideband O2 would the the 14point7 Spartan OEM. It's only $35 and looks like it could be integrated inside the frankenso case.

Today @ (whose idea all this was) stopped by and we played a little with my near-stock '93 NA6. Getting it to run was no problem, but now, of course, we need to mod the car, so we can do the data recording and engineer some starting fuel and ignition maps for the car.

We'll also take a look at what other in- and outputs we can include. Make AC work, have proper idle-up for AC load and PS pump. Maybe clutch switch for launch-control Add an output to the center-connector for electronic boost control, maybe one for VVT as well if people want to VVT-swap their NA.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Tue Jan 15, 2019 9:34 am
by Thommm
Sweet, this would be a great step for RusEFI. I'm a bit worried about the AFM though: it's very sensitive to transients in airflow. Just hookup a scope to the AFM output and move the TB quickly. If we have a big board anyway, why not add a footprint for a 10$ pressure sensor and skip the ancient AFM.

AFM also does not account for air pressure variation, it gets messed up if you angle it, it doesn't respond wel to transients, there is no headroom for performance increases (it's maxed around 120hp).

Second: I drove around for a year with just MAP, no TPS, on the firmware from 2 years ago. It was very doable.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Wed Jan 16, 2019 6:29 am
by mck1117
stefanst wrote:
Mon Jan 14, 2019 1:10 am
The plan is to run a car off a MAP sensor while recording MAP, AFM, O2, rpm, fuel and timing data and create maps for AFM from that data.
Why would you do this instead of just building a MAF table from scratch? I bet you could get within 20% eyeballing it.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Wed Jan 16, 2019 6:35 am
by mck1117
Thommm wrote:
Tue Jan 15, 2019 9:34 am
AFM also does not account for air pressure variation
It doesn't, but it turns out that isn't necessary. The barn-door style AFM (as well as hot-wire MAFs) measure mass flow rate, not volumetric flow rate. IAT and baro pressure are already accounted for!

Re: Standard NA6 Miata 89-93 Configuration

Posted: Wed Jan 16, 2019 9:05 am
by Thommm
mck1117 wrote:
Wed Jan 16, 2019 6:35 am
It doesn't, but it turns out that isn't necessary. The barn-door style AFM (as well as hot-wire MAFs) measure mass flow rate, not volumetric flow rate. IAT and baro pressure are already accounted for!
The hot-wire MAF indeed accounts for IAT and baro, but the barn-door AFM doesn't, it does measure volumetric flow rate. How can a mechanical flapper account for IAT and baro? That's also the reason why the cheapo turbo builds always have the AFM before the turbo, at atmospheric pressure level. Maybe this helps explain it: https://www.zcar.com/forum/13-car-talk-forum/237882-excellent-write-up-comparison-afm-vs-maf-vs-map-information.html?

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Jan 19, 2019 8:54 pm
by AndreyB
In order for me to borrow the light blue NA6 we needed to put it on the trailer where blue NA6 currently resides. We've failed to start the while diesel van which was only started once since October and nights are getting cold here :(

I now have 5 batteries to charge and just ordered battery load tester. Hopefully we will make another attempt tomorrow.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Jan 20, 2019 1:00 am
by Abricos
russian wrote:
Sat Jan 19, 2019 8:54 pm
We've failed to start the while diesel van which was only started once since October and nights are getting cold here :(
download.jpeg
download.jpeg (13.49 KiB) Viewed 22633 times

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Jan 20, 2019 1:09 am
by AndreyB
Nope, "Ether is a big no-no in combination with glow plugs." and the while van has glow plugs.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Jan 20, 2019 4:03 am
by Abricos
russian wrote:
Sun Jan 20, 2019 1:09 am
Nope, "Ether is a big no-no in combination with glow plugs." and the while van has glow plugs.
Glow plugs they work the first minutes with the ignition on ... and on the dashboard should be an indicator when they glow plug work when there is no work ...


Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Jan 20, 2019 8:13 pm
by AndreyB
All it needed was a properly charged battery. I now have an NA6 in my garage, let me go take a picture.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Jan 20, 2019 9:20 pm
by AndreyB
It's official - I've borrowed my neighbor's spare race car - it's a Showroom Spec Miata (SSM) so engine and electronics everything is very stock. No A/C and no P/S on this one :( Car was sitting outside so there is still ice in the seat and a bit of dust everywhere but I hope it would serve us well!

NA6 OEM Cranking baseline - just avoid confusion, that's me killing the car once it starts.


Re: Standard NA6 Miata 89-93 Configuration

Posted: Tue Jan 22, 2019 6:57 pm
by theflyingdutchp
Thommm wrote:
Wed Jan 16, 2019 9:05 am
mck1117 wrote:
Wed Jan 16, 2019 6:35 am
It doesn't, but it turns out that isn't necessary. The barn-door style AFM (as well as hot-wire MAFs) measure mass flow rate, not volumetric flow rate. IAT and baro pressure are already accounted for!
The hot-wire MAF indeed accounts for IAT and baro, but the barn-door AFM doesn't, it does measure volumetric flow rate. How can a mechanical flapper account for IAT and baro? That's also the reason why the cheapo turbo builds always have the AFM before the turbo, at atmospheric pressure level. Maybe this helps explain it: https://www.zcar.com/forum/13-car-talk-forum/237882-excellent-write-up-comparison-afm-vs-maf-vs-map-information.html?
I'll hop in here. I believe the flapper door AFM will account for the air-temp and baro and provide a reading that correlates with the mass of the air.
The deflection of the door will depend on the volumetric flow and the air density. Intake air temperature and pressure will change the air density, which changes the reading. There might be some viscosity changes with temperature but I don't think that is worth worrying about.

I imagine that air-temp will have some affect on combustion behavior, so then you add a separate air-temp sensor.

There are definitely disadvantages to the flapper AFMs, but I think the biggest one is just the flow restriction. You can tighten the springs on them if you want to move up in power, but then you're only making the restriction worse. They're probably also prone to oscillation - I don't think there is much damping in that system. Anyway, for someone who just wants to play around, its a fine place to start, especially if you want PNP.


@stefanst, can you provide the PN for the stock miata TPS? There is a possibility the Toyota one bolts right on.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Tue Jan 22, 2019 9:55 pm
by mck1117
theflyingdutchp wrote:
Tue Jan 22, 2019 6:57 pm
I'll hop in here. I believe the flapper door AFM will account for the air-temp and baro and provide a reading that correlates with the mass of the air.
The deflection of the door will depend on the volumetric flow and the air density. Intake air temperature and pressure will change the air density, which changes the reading. There might be some viscosity changes with temperature but I don't think that is worth worrying about.
Exactly, both the flapper door AFM and a hot wire MAF measure the same thing by almost the same means. Hot wire MAFs measure the amount of heat transferred by the flow, and the flapper door measures the amount of momentum transfer. Both are dependent upon the density of the gas flowing by, so both compensate for air density, measuring mass flow instead of volumetric flow.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Thu Jan 31, 2019 5:39 am
by AndreyB
Another baseline


Re: Standard NA6 Miata 89-93 Configuration

Posted: Thu Jan 31, 2019 5:44 am
by AndreyB

Re: Standard NA6 Miata 89-93 Configuration

Posted: Mon Feb 04, 2019 6:21 pm
by AndreyB
@ has stopped by and we've made progress! Blue Miata NA6 has started on rusEfi for the first time :)

To be honest we were mostly improving my garage layout but at least we found out that https://raw.githubusercontent.com/rusefi/rusefi/master/hardware/frankenso/www_docs/frankenso_connector.png on wiki was outdated and now I need to swap a couple of wires. Apparently we already have +12v on the middle plug but I have forgotten about that :)

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Mar 17, 2019 1:49 pm
by AndreyB
Jared @ has stopped by and we had some productive fun tracing wideband sensor signal issue on the blue NA6 test mule.

Since I am trying to have it as much PnP flexible, wideband wiring on Frankenso goes to OEM narrow band wire - users would have a choice to either plug wideband OR use OEM narrow bandband. Users would have two options
a) use narrowband (open question why and how - maybe with the narrow to wide interpolation?)
b) disconnect narrowband and connect external wideband controller.

The desire is to use same analog input in both cases.

So, what is the issue with this specific car? Can you see it on the picture? Jared have guessed the problem, I would have never guessed it and it would just take me four months to troubleshoot everything.
narrow_band_issue.png
narrow_band_issue.png (1.13 MiB) Viewed 22255 times
This butt connector goes through the shield on the left side and this grounds the wire! So, this car did not have a working narrowband as the result and I wonder in what mode was the engine running. We cut the connector and now I have wideband data in rusEfi, one step forward :)

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sun Mar 17, 2019 5:32 pm
by kb1gtt
This might not be clear in your post. I'll try to clarify.

The OEM NB wire is shielded. Some one had cut this wire and then installed a splice. When they did that they connected the signal wire to the shield. This caused the OEM signal to fail. As well this was well hidden. I might even theorize it was intentional hidden. I wonder if an OEM ECU might run rich if the sensor wire is shorted to GND. However it also appears they tried to intentionally break the shield in the sensor side of the slice. So perhaps they just didn't understand wiring that we'll. I don't know what was going on in their head. However it was shorted.

Any how when @ reused this wire in the PNP effort it was wrong and caused problems. Now that he is over the hurdle I think we'll see more of this PNP effort.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Fri Mar 22, 2019 4:06 am
by AndreyB
Good news: it starts cold and it starts warm - see cold_start_and_warm_starts.7z

Weird news: I am super confused about idle control. I manually open IAC more and RPM goes up, only problem is that sometimes I manually close IAC and RPM _also_ goes up?!

Hardware-wise, IAC uses SMD schottky now - previously I was using 1N4007. I hope this does not matter, maybe my tune is so weird that air reduction can cause RPM to go up via VE changes? Makes no sense :( Lot attached as well. Latest tune attached.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Fri Mar 22, 2019 8:35 am
by kb1gtt
Does this engine have that throttle tuning flap? If so was it open or closed?

Re: Standard NA6 Miata 89-93 Configuration

Posted: Fri Mar 22, 2019 12:28 pm
by AndreyB
kb1gtt wrote:
Fri Mar 22, 2019 8:35 am
Does this engine have that throttle tuning flap? If so was it open or closed?
Cable throttle, iac solenoid, no variable intake geometry on early miata.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Fri Mar 22, 2019 3:46 pm
by ZHoob2004
I've seen some discussion on other forums saying that many IAC solenoid valves have a built in air leak at 0% duty cycle, and are meant to be at some nonzero value to be completely closed. Something about a failsafe if the valve loses power.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Mar 23, 2019 1:44 am
by AndreyB
ZHoob2004 wrote:
Fri Mar 22, 2019 3:46 pm
I've seen some discussion on other forums saying that many IAC solenoid valves have a built in air leak at 0% duty cycle, and are meant to be at some nonzero value to be completely closed.
Bingo. Thank you, thank all makes sense now!

Looks like 15-20% is the range where Miata NA6 valve passes the least amount of air. So all I needed to do was set idle PID.minValue to 20 and I get some automatic idle control :)

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Aug 24, 2019 3:43 am
by AndreyB
I am trying to wire remote ignition and starter buttons and I get weird non-repetitive result: it would crank half of the time randomly?!

ECU disconnected from vehicle.
My red thick wire is white car wire main fuse & battery hot.
My black thick wire is ignition coil/main relay/engine fuse.
Thin orange wire connects main fuse to starter solenoid.



Full wiring diagram http://www.mellens.net/mazda/Mazda-Miata-1991-1993/1991_wiring.pdf

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Aug 24, 2019 1:13 pm
by kb1gtt
It looks like your OEM switch is connecting significant amps. I think your remote switch is causing a voltage drop which is causing the starter to be on the hairy edge of working. Can you measure the voltage at the starter and tell us the volts with the OEM key and the volts with your remote switch? I suspect you need a better switch.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Aug 24, 2019 1:34 pm
by kb1gtt
Also I wonder if de-bounce is an issue. Remember that low spike in the voltage drop curve is around 10mS to 20mS. A switch commonly has a 5 to 10mS debounce. It might also be that your switch is chattering and preventing a clean engagement. That might be a contributing factor.

Re: Standard NA6 Miata 89-93 Configuration

Posted: Sat Aug 24, 2019 3:41 pm
by AndreyB
As always @kb1gtt can fix my wiring from 3000 miles away. It was about having too much length of thin wire: once I've made most of the length thicker with only 6 inches of thin orange wire, I got reliable cranking!

A video of what was the whole point of this, log attached.


Re: Standard NA6 Miata 89-93 Configuration

Posted: Fri Oct 11, 2019 6:56 pm
by AndreyB
Blue test mule NA6 is for sale by owner on Facebook - I need place in the garage for the GDI Passat and V12 :(

$5,000 listed in "New Jersey Miatas" Facebook group.