[rusEfi] Miata NA 1996, 1.8L stock (#7)
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock
[video][/video]
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
puff
- contributor

- Posts: 2963
- Joined: Mon Nov 11, 2013 11:28 am
- Location: Moskau
Re: Miata NA 1996, 1.8L stock
that wasn't you!
have you checked what it does to keep running at idle? logic analyzer to see ignition timing and injection duration on the stock ecu? it's a bit frustrating. if it takes that effort to start a working engine previously equipped with a properly working ecu, i wonder what issues will face a person when converting from clear carb to efi.
have you checked what it does to keep running at idle? logic analyzer to see ignition timing and injection duration on the stock ecu? it's a bit frustrating. if it takes that effort to start a working engine previously equipped with a properly working ecu, i wonder what issues will face a person when converting from clear carb to efi.
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock
Timing map was in fact not activated on this video, there will be a new one with hopefully better timing. Idle solenoid duty cycle we will start by just trying to guess it and then switch to automatic idle adjustment.
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
Now with timing map, still this horrible sound comes & goes
[video][/video]
[video][/video]
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
After a few rounds of trial and error and speculation, I got a good tip from here:
http://forum.miata.net/vb/showthread.php?p=7158314#post7158314
And isolated the problem to the clutch, disabled the clutch safety interlock and I can start without scaring the neighborhood.
Now I can get a decent start on rusefi with no "horrible" sounds. For added flair I put the frankenstein in a box....
... and got lots of help from russian and kb1gtt. Thanks!
http://forum.miata.net/vb/showthread.php?p=7158314#post7158314
And isolated the problem to the clutch, disabled the clutch safety interlock and I can start without scaring the neighborhood.
Now I can get a decent start on rusefi with no "horrible" sounds. For added flair I put the frankenstein in a box....
... and got lots of help from russian and kb1gtt. Thanks!
You do not have the required permissions to view the files attached to this post.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
Now I need to figure out a way to claim the trough out bearing is making the noise from air pressure some how. That way I can keep my original claims about the problem
I guess you wouldn't have the problem in a vacuum. Also keep in mind if you start it with that bearing problem, the neighbors will probably stop by and see what you hare killing in you garage. This could be some free advertisement 
Good to hear you have the problem isolated. I guess it's time to play with fuel trims and such.
Good to hear you have the problem isolated. I guess it's time to play with fuel trims and such.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I'm trying to get it to idle now. And I'm comparing the stock ECU IAC line to what the Frankenstein does.
Looking at it on an oscilloscope at idle while running on the stock ecu I see pulses about 12v at the peak, about 4ms wide, about 4v p-p, offset by 8v from ground. When I hook up the Frankenstein I hear a semi-loud buzz coming from the IAC. I can adjust the IAC pulse width "set_idle_pwm 200" and it cuts down the noise, but still buzzes.
Here is what the Frankenstein IAC signal looks like with just the keyswitch on, not running.
Looks like the solenoid coil is causing a huge spike when switching on, about 48vdc, ouch. Maybe the drive circuit needs clamp on it?
Looking at it on an oscilloscope at idle while running on the stock ecu I see pulses about 12v at the peak, about 4ms wide, about 4v p-p, offset by 8v from ground. When I hook up the Frankenstein I hear a semi-loud buzz coming from the IAC. I can adjust the IAC pulse width "set_idle_pwm 200" and it cuts down the noise, but still buzzes.
Here is what the Frankenstein IAC signal looks like with just the keyswitch on, not running.
Looks like the solenoid coil is causing a huge spike when switching on, about 48vdc, ouch. Maybe the drive circuit needs clamp on it?
You do not have the required permissions to view the files attached to this post.
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
There is something about clamping in the VNS14NV04 datasheet but Jared should comment. Injectors are also solenoids so they might show something similar, but injectors are usually running at lower frequency.

How does the car react to IAC pwm changes? Can you post the second picture so that we can compare OEM with Frankenstein?
I believe Mazda IAC frequency is about 160Hz, that's a 6.25ms period.

How does the car react to IAC pwm changes? Can you post the second picture so that we can compare OEM with Frankenstein?
I believe Mazda IAC frequency is about 160Hz, that's a 6.25ms period.
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
jfive
- Posts: 20
- Joined: Thu Sep 18, 2014 7:24 pm
Re: Miata NA 1996, 1.8L stock (#7)
Thats easy unplug it. 
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
For IAC you probably want a sluggish reaction, so you probably want the subbing diode instead of the clamping topology. Do you have a large-ish diode? If so can you install it across the IAC line at the ECU? Here is a crappy wiki I put together to help explain the difference from a snubbing diode topology vs a clamping MOSFET topology https://code.google.com/p/daecu/wiki/Injector_driver_theory If you install the snubbing diode, it will prevent the clamping from happening, and will create a more sluggish reaction from the IAC. This sluggish reaction will likely remove most of the noise.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I can try a diode across it. Like a 1N400x, say 100v or more?
I tried a few values for the pwm setting, like default or lower, but didn't seem to be closer to stay up at idle. I'll try again after knocking down that spike.
I tried a few values for the pwm setting, like default or lower, but didn't seem to be closer to stay up at idle. I'll try again after knocking down that spike.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
The reverse voltage is not very important. You want a strong forward peak current and after that the more amps continuous it can handle the better. The typical 1N400X are probably good enough, but keep an eye on heat. They can get hot.
If you decrease your duty cycle (increasing the frequency) you'll probably notice the noise gets less and less. As well you'll probably notice the ripple gets smoother.
If you decrease your duty cycle (increasing the frequency) you'll probably notice the noise gets less and less. As well you'll probably notice the ripple gets smoother.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I put a 1N4002 across the IAC coil (to +12v), and now the pulses are clean. The loud buzz sound is gone, but now there is a new sound while cranking or while running, sounds more like a hum at about 150Hz. I guess it's coming from the IAC. If I adjust the pwm setting down to 200, that hum goes away.
I tried starting after warming up on the stock ECU, and I could not get it to idle with pwm values of 100 or 200. If it set it up to 400, the hum comes back. And it sounds wrong.
This drive signal is very different from what the stock ECU does. Here is a picture of that.
Scale is 5v per div, at 2ms per div, 0 is at the center line, so it's about 12v peak. Seems like we need to get this closer what the stock ecu does?
I tried starting after warming up on the stock ECU, and I could not get it to idle with pwm values of 100 or 200. If it set it up to 400, the hum comes back. And it sounds wrong.
This drive signal is very different from what the stock ECU does. Here is a picture of that.
Scale is 5v per div, at 2ms per div, 0 is at the center line, so it's about 12v peak. Seems like we need to get this closer what the stock ecu does?
You do not have the required permissions to view the files attached to this post.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
Is there a picture of diode subbed IAC wave forms?
Welcome to the friendlier side of internet crazy 
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
Just to confirm:
stock ECU idling IMG_20141004_113036.jpg
rusEfi without diode, igniton on IMG_20141006_203216.jpg
Is that right? This case we need rusEfi with diode picture just to have the full set.
stock ECU idling IMG_20141004_113036.jpg
rusEfi without diode, igniton on IMG_20141006_203216.jpg
Is that right? This case we need rusEfi with diode picture just to have the full set.
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
Ok, here is shot of the IAC drive after putting a diode between the line & +12v. Clean lines at 0 and about 12v.
You do not have the required permissions to view the files attached to this post.
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
How hard would it be to reach the connector on the actual IAC? I am curious how the OEM IAC would look like with IAC disconnected and some 10k resistor pulling the IAC line to +12. Jared please approve this test 
This would tell us if the orm ECU outputs plain 0/12v PWM or more like 8/12v PWM
This would tell us if the orm ECU outputs plain 0/12v PWM or more like 8/12v PWM
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
Can you measure the DC ohms of the IAC. Done by disconnecting it's connector and measuring with a DMM the ohms across the IAC directly.
Do you have a way to measure the Henri's of the IAC? Some times a DMM can make such a measurement. If not we can get a good idea via adding resistance as @russian has noted. We can start high and work our way down. I think that something more like 1k instead of 10k is what we need. However start with 10k if you got it and work your way down. We should see the raising and falling edges to round out and look much more like the OEM wave forms.
Do you have a way to measure the Henri's of the IAC? Some times a DMM can make such a measurement. If not we can get a good idea via adding resistance as @russian has noted. We can start high and work our way down. I think that something more like 1k instead of 10k is what we need. However start with 10k if you got it and work your way down. We should see the raising and falling edges to round out and look much more like the OEM wave forms.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I didn't a chance to work on it yesterday, but here are measurements I did today. I don't have a way to measure inductance of the coil that I know of.
IAC coil R=12.1 ohms
Stock ECU IAC drive line shows:
.6 v with IAC unplugged, keyswitch on, same with engine running
about 2v with IAC plugged in, engine off, keyswitch on, voltage dropping slowly
.78A current on dmm with engine off, keyswitch on.
9.2v average on dmm with engine idling
.35A current on dmm with engine idling
IAC coil R=12.1 ohms
Stock ECU IAC drive line shows:
.6 v with IAC unplugged, keyswitch on, same with engine running
about 2v with IAC plugged in, engine off, keyswitch on, voltage dropping slowly
.78A current on dmm with engine off, keyswitch on.
9.2v average on dmm with engine idling
.35A current on dmm with engine idling
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
So 12 ohms at about 12V-8V = 4V drop from OEM, which means the current is limited to about 4V/12ohms = .3A. So to ball park the same current, you should use a series 12/.3333 = 36 ohms. Then the power it has to dissipate would be less than 4 watts. That's kind of crappy. Do you have a resistor that's about 36 ohms and multi watts?
I suspect on the OEM and MS PNP they limit the current by limiting the bias current in the driving transistor. AKA only allow the transistor to pass .3 amps. We can't do that very well with this MOSFET, so a series resistor should do the job.
I suspect on the OEM and MS PNP they limit the current by limiting the bias current in the driving transistor. AKA only allow the transistor to pass .3 amps. We can't do that very well with this MOSFET, so a series resistor should do the job.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I dug through my junk box and found a few power resistors I could combine to get close. I have to go out of town but will try it in a few days.
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
Did I say that you are helping us a LOT? Because all this helps a lot.
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
I got a set of resistors that will handle about 4 watts at 34 ohms and put that in series with the idle control. Here is the picture a shot of the scope with that:
Edit: Settings are the same as the earlier post, 10x probe, 10v per div, 0 is at the 2nd line from bottom, 2ms per div. Trace is about 22v p-p. Measured at the ecu pin, resistors are between this point and the INJ7 low active pin. (But, I think this is wired wrong, now that I think about it.)
The idle solenoid buzz is gone. I can start with the engine pre-warmed ok, but I could not get it idle after trying a few values for set_idle_pwm. It will run smoothly above 1100 rpm with some throttle help, but dies under 900. And while cranking, timing may not be what it should be, it struggles to come to life. What options are there for adjusting crank timing and idle rpm?
Edit: Settings are the same as the earlier post, 10x probe, 10v per div, 0 is at the 2nd line from bottom, 2ms per div. Trace is about 22v p-p. Measured at the ecu pin, resistors are between this point and the INJ7 low active pin. (But, I think this is wired wrong, now that I think about it.)
The idle solenoid buzz is gone. I can start with the engine pre-warmed ok, but I could not get it idle after trying a few values for set_idle_pwm. It will run smoothly above 1100 rpm with some throttle help, but dies under 900. And while cranking, timing may not be what it should be, it struggles to come to life. What options are there for adjusting crank timing and idle rpm?
You do not have the required permissions to view the files attached to this post.
Last edited by tomiata on Thu Oct 16, 2014 12:47 am, edited 1 time in total.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
Hmmm, 1V DC and about 2Vp-p. Is that measuring the ECU pin, or is that measuring after the series resistors? Is that 12V and 10V, where is the GND level in that picture? I also see the cycle is about 8mS while the OEM was closer to 4mS.
I wonder why the OEM was all jagged, and this is more like I would expect the signal to look. Perhaps the OEM was PWMing the signal at a higher frequency. Or perhaps they have a snubbing capacitor.
I wonder why the OEM was all jagged, and this is more like I would expect the signal to look. Perhaps the OEM was PWMing the signal at a higher frequency. Or perhaps they have a snubbing capacitor.
Welcome to the friendlier side of internet crazy 
- AndreyB
- Site Admin
- Posts: 14777
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B

Re: Miata NA 1996, 1.8L stock (#7)
New command:
set_idle_solenoid_freq X
Where X is the frequency we want for IAC solenoid. You would need to writeconfig and reset the firmware for the change to be applied. I hope to make this adjustable without IAC reboot one day, but for now being able to control it is already a tiny step
Miata default is 160Hz
set_idle_solenoid_freq X
Where X is the frequency we want for IAC solenoid. You would need to writeconfig and reset the firmware for the change to be applied. I hope to make this adjustable without IAC reboot one day, but for now being able to control it is already a tiny step
Miata default is 160Hz
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
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
Sorry, I should have described the scope settings. I edited the post above.
But oops, now I think I wired this wrong.
It looks like
The diode should be just across the coil, right?
But oops, now I think I wired this wrong.
It looks like
Code: Select all
IAC 34 Ohm
12 v -----+--LLLL---------rrrrr---+----INJ7
| |
+--------|<|------------+
1N4002
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
You can try it this way, and you'll probably see a more flat signal, and more heat dissipated by the diode, so that diode might get hot. I'm still a trying to figure out why it appears to be going to 0V. I'm expecting that it should go from 12V to about 8V not 12V to 0V. I expect when the MOSFET is driving, it's a voltage divider across the solenoid and series resistor. The resistor should have a voltage drop.
Welcome to the friendlier side of internet crazy 
-
tomiata
- contributor

- Posts: 236
- Joined: Sat Aug 02, 2014 2:30 am
- Location: Texas
Re: Miata NA 1996, 1.8L stock (#7)
After moving the diode to be only across the IAC coil, the trace is closer to what the oem ecu. After setting set_idle_solenoid_freq 300 and set_idle_pwm 350:
I guess it needs a few more ohms on the power resistors.
And here is a shot from the oem ecu to compare. (Same scope settings,10v per div, 2ms per div, 0 line is 2nd from the bottom.)
I guess it needs a few more ohms on the power resistors.
And here is a shot from the oem ecu to compare. (Same scope settings,10v per div, 2ms per div, 0 line is 2nd from the bottom.)
You do not have the required permissions to view the files attached to this post.
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
QUCS would allow you to simulate that circuit which is safer than the real world. I've been trying to do that but time equals blah lately
Welcome to the friendlier side of internet crazy 
- kb1gtt
- contributor

- Posts: 3779
- Joined: Tue Sep 10, 2013 1:42 am
- Location: ME of USA

Re: Miata NA 1996, 1.8L stock (#7)
I know this resistor diode thing isn't "correct" but it's a start. If we are to try this in a way that is a bit more reproducible, we could use this resistor http://octopart.com/ac05000005009jac00-vishay+bccomponents-12635801 with this diode http://octopart.com/1n4007-mcc-10332445
It appears the OEM is dithering the solenoid with two different currents. This helps prevent "sticktion" Basically if you keep the valve moving slightly, the mechanical parts will be in kinetic friction instead of static friction. Dynamic friction is much more consistent as you don't have to overcome that peak before the valve moves. Keeping the friction constant helps control the valve, as you don't have to bump up over a pressure spike to get the valve moving. Here's a picture of static friction vs kinetic friction.

It appears the OEM is dithering the solenoid with two different currents. This helps prevent "sticktion" Basically if you keep the valve moving slightly, the mechanical parts will be in kinetic friction instead of static friction. Dynamic friction is much more consistent as you don't have to overcome that peak before the valve moves. Keeping the friction constant helps control the valve, as you don't have to bump up over a pressure spike to get the valve moving. Here's a picture of static friction vs kinetic friction.

Welcome to the friendlier side of internet crazy 

