Page 1 of 2

'99 Miata in Eastern PA #17

Posted: Wed Feb 24, 2016 9:42 pm
by stefanst
Last Saturday Andrey personally delivered my Frankenso board- thanks! I will hopefully have it hooked up to the car before HPDE season starts.

I currently have two Miatas, one of them is not subject to emissions testing anymore, so this will be my first victim for a rusefi.

About the car:
'99 green Miata with an ancient Flyin' Miata stage 2 turbo kit. I installed the kit in 2000. It's currently running 850cc injectors. Engine is controlled by a standalone MS3X. The car is currently mainly used for HPDE events, some Auto-X and a little bit of cruising under the sun (if it ever comes back).

I am a fan of MS3X, but I don't like MS not being public domain, so I will try and support rusefi as best I can. It appears that there's great potential, the hardware already seems pretty well sorted (definitely better than the MS generic hardware- not sure about MS Pro, since they don't publish schematics).

The software and tuning seem to be, as is so often the case, the bigger project. I have experience tuning two cars with MS3- my Miata and a friend's '64 Ford f150 (running an FI 5.7l Windsor from a '94 f250) and both cars run pretty well. So I hope I can give some support on the tuning side of things.

Here's a pcture for your viewing pleasure :-)

Re: '99 (and '03 Miata) in Eastern PA

Posted: Wed Feb 24, 2016 10:11 pm
by AndreyB

Re: '99 (and '03 Miata) in Eastern PA

Posted: Thu Feb 25, 2016 1:01 am
by kb1gtt
Very nice very nice. If you have any questions feel free to ask. If you have any suggestions for PCB improvements, I'm all ears, and I'll even publish a schematic :)

I don't know if you found the wiki, Just in case you haven't here's a link http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Miata_1999

Re: '99 (and '03 Miata) in Eastern PA

Posted: Thu Feb 25, 2016 1:19 am
by stefanst
As a matter of fact I already downloaded all your schematics!

Thanks :-)

Re: '99 (and '03 Miata) in Eastern PA

Posted: Thu Feb 25, 2016 2:06 am
by kb1gtt
I have several repo's over the years as I've wondered around. I currently use one at SF.net, and russian mergers applicable stuff to the rusEFI sf.net repo. You may find some more stuff of interest found here https://github.com/jharvey and I've got some others that got lost.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Feb 28, 2016 5:29 am
by stefanst
I just took the connector diagram I had from my MS3 install on my NB1 ('99 & '00) MIiata and updated it.
Connections colored black are needed to make the car run consistently at all.
Connections colored red are things that should be implemented soon
Connections colored ochre/yellow are not really needed .
Alternator field, although coded red right now, really needs to be taken care of though, before the car is useful. There is, however, an analog circuit that could be built in the proto area that takes care of that.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Feb 28, 2016 6:10 am
by AndreyB
https://sourceforge.net/p/rusefi/tickets/271/ is maybe done - you can try it once you are ready to try it

Image

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Feb 28, 2016 2:12 pm
by stefanst
You make it sound so simple!
Others have a much more impressive sounding name for it- "High-speed feedback field control" :-)

Re: '99 (and '03 Miata) in Eastern PA

Posted: Mon Mar 14, 2016 2:29 am
by stefanst
Alright, made some decent progress tonight. I have the board all jumpered and it's running successfully on the Jimstim. Hopefully I'll get to scoping the outputs tomorrow to make sure I won't blow anything up and then hook it up to the car on the weekend.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Wed Mar 16, 2016 3:25 am
by stefanst
Got to do some checking/scoping. All the sensor inputs work. Ignition and Injectors are being fired. The ignition looks indeed wasted and the injectors seem to be running sequentially. I did forget to check the other outputs- fuel pump, idle valve, fan, alternator.
Also need to install a MAP sensor. Not sure if I should install it remotely, or in the proto area. Since MAP is pretty important I'm inclined to install the sensor directly on the board in order to minimize noise issues.
I'll be out of town for a few days, but I still hope I'll get some actual in-car testing done this coming weekend, but only if the weather in NJ on Sunday sucks (somebody said we're getting snow!). If the weather is OK, it's off to the track!

Re: '99 (and '03 Miata) in Eastern PA

Posted: Wed Mar 16, 2016 9:16 am
by kb1gtt
Good news, keep up the progress.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 6:28 pm
by stefanst
I was doing some more scoping and found a timing issue:
The dwell on coil 1 (responsible for cylinders 1 and 4) varies up and down by 0.1ms. In theory that wouldn't hurt too badly. However it appears that the beginning of the dwell is timed correctly, but the end either comes too early or too late. And the end is what determines when the coil fires. Now if my math is right (which is not at all certain), at 6,000rpm 0.1ms is 3.6deg. At 7,200rpm that's even 4.3deg. So one cylinder fires 4deg early and the other one fires 4deg late. That's bad for power and may cause detonation. See scope trace below. RPM was simulated internally at 6000 rpm and dwell set at 4.0ms:
Timing Problem.png
Timing Problem.png (57.87 KiB) Viewed 25367 times
I also took a picture of the same issue seen with the internal logger. RPM was set at 2400 rpm and dwell at 5.0ms (just to confuse everybody):
2016-03-20 13_59rpm_3000_maf_NaN.png
2016-03-20 13_59rpm_3000_maf_NaN.png (36.52 KiB) Viewed 25367 times

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 6:36 pm
by stefanst
There seems to be a similar problem going on with injector 4:
2016-03-20 14_35rpm_6000_maf_NaN.png
2016-03-20 14_35rpm_6000_maf_NaN.png (35.59 KiB) Viewed 25365 times
Pulsewidth varies from 4.43ms to 4.53ms. All the other injectors seem perfectly consistent.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 6:50 pm
by AndreyB
What is the source of your signal - is that self stimulation or JimStim?

Can you try the same with engine sniffer and sensor sniffer turned off (there is a checkbox in dev console below engine sniffer. TODO for myself: make this adjustable via TS)
I believe that at 6000 rpm engine sniffer would automatically turn off (it turns off at some magic RPM) so please re-test @ 6000 since it might be non-linear.

I believe this might be related to either the TDC#1 green line or trigger synchronization point - there is some extra activity on these points so events around there might have delays.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:10 pm
by stefanst
It definitley has to do with #1TDC. I'll also try a trigger offset to see what happens. I was running everything at 0deg for testing.
It happens the same with self-stimulation and on the Jimstim. Will turn the sniffers off manually to verify.
The engine sniffer works at 2400rpm, but not at 3000rpm, so somewhere in there is where it turns off. That's why we only get the scope trace at 6000rpm.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:19 pm
by stefanst
Definitely has to do with #1TDC. A trigger offset of 45deg makes the dwell times nice and consistent.
Turning off engine and sensor sniffing has no effect.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:21 pm
by AndreyB
setMazdaMiataNbEngineConfiguration says
engineConfiguration->globalTriggerAngleOffset = 276;

I would need to move this right into trigger shape definition, but in the meantime you probably want this value unless you have used "set_engine_type 9" which I guess you have not used?

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:24 pm
by AndreyB
Just added new dialog: "tuning"->"console monitoring"

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:40 pm
by stefanst
In order to run the car I will use 276 degrees. Just wanted to check timing without any offsets. I must admit that I don't quite understand why 276 degrees. As far as I know the offset between the #1 indicator (I believe that is the single mark on the CAM and actual TDC is 6 degrees). Where do the additional 270 degrees come into play?

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 7:44 pm
by AndreyB
stefanst wrote:(I believe that is the single mark on the CAM and actual TDC is 6 degrees). Where do the additional 270 degrees come into play?
It's 276 degrees from the trigger front which I have randomly selected for the magic purposes. setTriggerSynchronizationGap(0.11f); is the gap ratio used.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Sun Mar 20, 2016 9:44 pm
by stefanst
It's Alive!!!

@russian: Can I have an official rusefi number for my car please?

Plugged in the bare board. Verified that the sensors read correctly and cranked. Took a little, but it fired up no problem. Engine revs, everything that I hooked up seems to be working perfectly.

Before I start tuning there's a list of things that still need doing:
  • Install the board in a proper housing. I realized today that my original '99 Miata housing, even though it's a 64 pin connector housing does not actually fit. Searched in the forum and the wiki and found what should fit. Ordered from Ebay for $15- not too bad.
  • Get a different MAP sensor. I used a SOIC package 400kpa sensor. I got it wired in, but it's not a permanent solution. I'll order an external MAP sensor. Anybody with boost has any experience and suggestion? I need at least 250kpa.
  • Wire up the missing I/O
  • Talk to @russian to get boost control, at least rudimentary open-loop implemented.
Missing I/O:
  • Alternator
  • AC in
  • AC out
  • AC fan
  • VICS
  • Additional wiring for future LS coils
  • Boost control!
One thing that is a little odd is that it takes quite a bit before I see RPMs in TS. May just be a bit laggy, but I don't think it takes that long with MS.

Anyway: WOOOHOOOO!

Re: '99 (and '03 Miata) in Eastern PA

Posted: Mon Mar 21, 2016 1:56 am
by kb1gtt
Congrats, and keep up the good work.

Re: '99 (and '03 Miata) in Eastern PA #17

Posted: Mon Mar 21, 2016 6:49 pm
by AndreyB
#17 :)
stefanst wrote:One thing that is a little odd is that it takes quite a bit before I see RPMs in TS. May just be a bit laggy, but I don't think it takes that long with MS.
There was https://sourceforge.net/p/rusefi/tickets/275/ bugfix couple of days ago which has reduced the number of cranking cycles without spark/fuel from 3 to 2. There is a chance that this could be improved further.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Tue Mar 22, 2016 9:17 pm
by AndreyB
stefanst wrote:
Missing I/O:
  • VICS
  • Additional wiring for future LS coils
  • Boost control!
Two 8x8 FSIO tables are already available via Tuner Studio, the code to use these for table-based PWM control is getting closer. Let me get back from vacations and I will get this stuff finished.

Re: '99 (and '03 Miata) in Eastern PA #17

Posted: Fri Mar 25, 2016 12:19 am
by tomiata
Great see another Miata up and running. How about a video for proof of life? I'm just about ready to get back into rusefi, and get my 1990 Miata going on it.

Re: '99 (and '03 Miata) in Eastern PA

Posted: Tue Mar 29, 2016 7:42 pm
by AndreyB
stefanst wrote:Searched in the forum and the wiki and found what should fit. Ordered from Ebay for $15- not too bad.
But HOW? I need to re-stock on the compatible cases and I see NONE under $75 on eBay!

Re: '99 (and '03 Miata) in Eastern PA

Posted: Tue Mar 29, 2016 7:51 pm
by stefanst
russian wrote:
stefanst wrote:Searched in the forum and the wiki and found what should fit. Ordered from Ebay for $15- not too bad.
But HOW? I need to re-stock on the compatible cases and I see NONE under $75 on eBay!
I got lucky! Broken ECU in functional case.....

Re: '99 (and '03 Miata) in Eastern PA

Posted: Wed Mar 30, 2016 6:07 pm
by stefanst
russian wrote:Two 8x8 FSIO tables are already available via Tuner Studio, the code to use these for table-based PWM control is getting closer. Let me get back from vacations and I will get this stuff finished.
Is there any way to change the Y-Axis value on those 8x8 tables? Right now they seem to be configured for MAP/Load. I'd need TPS for boost control and CLT for idle.

Edit: Actually for boost I can probably deal with a 1D setup for now. Just assume full throttle. It will lead to the turbo working against the throttle under partial load, but that's what's happeniong with WG control anyway. So I'll use the 8x8 table and have all the columns identical.

And for idle PWM I can probably use some FSIO formula- like: 0.2 + (250-CLT) * 0.001 + 0.02 * (AC_ON)

Re: '99 (and '03 Miata) in Eastern PA #17

Posted: Wed Mar 30, 2016 6:31 pm
by AndreyB
These labels are just labels, I will rename to "X-Axis" and "Y-Axis" just to reduce confusion. Whatever you pass info the call would be the value it would use for lookup.

Re: '99 (and '03 Miata) in Eastern PA #17

Posted: Wed Apr 13, 2016 2:10 pm
by AndreyB
Have you applied your own timing table yet? I am wondering if you would want to share it for the sake of other 1.8 Miatas here :)