Page 4 of 9

Re: red 2003 VVT test mule Miata #27

Posted: Mon Dec 12, 2016 3:00 pm
by Abricos
I need one to ...(((

Re: red 2003 VVT test mule Miata #27

Posted: Wed Dec 28, 2016 5:36 am
by AndreyB
Wiring diagrams at http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Miata_2003

Having a bit of a problem - details in this boring video

[video][/video]

Re: red 2003 VVT test mule Miata #27

Posted: Wed Dec 28, 2016 7:32 pm
by stefanst
Is it possibly the flyback-diode being installed backwards and installed between ignition and IAC valve (switched side) instead of Master Relay and IAC valve?

Re: red 2003 VVT test mule Miata #27

Posted: Wed Dec 28, 2016 8:11 pm
by AndreyB
stefanst wrote:installed between ignition and IAC valve (switched side) instead of Master Relay and IAC valve?
Bingo! Thank you.

I knew it was too soon to wrap the harness, will go add a wire to master relay output.

Re: red 2003 VVT test mule Miata #27

Posted: Thu Dec 29, 2016 2:30 am
by AndreyB
Moving the other side of the diode has resolved the issue! Interesting how same exact thing was not a problem on the Dodge.

Also played with VVT in open loop a little :) It's pretty ON/OFFish with duty cycle, nothing at 28% and full on at 38%

Re: red 2003 VVT test mule Miata #27

Posted: Thu Dec 29, 2016 3:59 am
by stefanst
russian wrote:[...]Also played with VVT in open loop a little :) It's pretty ON/OFFish with duty cycle, nothing at 28% and full on at 38%
Yikes! only 10% from nothing to allofit? That's going to be hard to control.
Are you using 300Hz PWM? Flyback Diode?

Re: red 2003 VVT test mule Miata #27

Posted: Thu Dec 29, 2016 4:51 am
by AndreyB
400Hz and yes a flyback, same as on IAC.

Re: red 2003 VVT test mule Miata #27

Posted: Thu Dec 29, 2016 5:11 am
by stefanst
Maybe a reduction to 300Hz (which I believe is stock) may help to improve the usable range a bit...

Re: red 2003 VVT test mule Miata #27

Posted: Tue Jan 10, 2017 9:16 am
by DaWaN
russian wrote:Moving the other side of the diode has resolved the issue! Interesting how same exact thing was not a problem on the Dodge.

Also played with VVT in open loop a little :) It's pretty ON/OFFish with duty cycle, nothing at 28% and full on at 38%
I think that is expected.
The VVT valve bascially has 3 positions: Advance, hold, retard.
The behavior you see is what I expect: full retard under 28% and full advance at 38%.
Between those duties you will have the hold duty, which is probably around 33% I guess.
So to advance the cam you have to give it more duty from the hold duty and revert back to hold duty once the cam is in position.
To retard the came you reduce the duty from the hold duty and revert back to hold duty once the cam is in position.
VVT will never work well in open loop.

Re: red 2003 VVT test mule Miata #27

Posted: Tue Jan 10, 2017 4:15 pm
by AndreyB
DaWaN wrote:I think that is expected.
The VVT valve bascially has 3 positions: Advance, hold, retard.
So you mean miata NB2.5 specifically is not really "variable valve timing" but more like "pretty much three position timing"?

Re: red 2003 VVT test mule Miata #27

Posted: Tue Jan 10, 2017 5:21 pm
by DaWaN
russian wrote:
DaWaN wrote:I think that is expected.
The VVT valve bascially has 3 positions: Advance, hold, retard.
So you mean miata NB2.5 specifically is not really "variable valve timing" but more like "pretty much three position timing"?
No, that is not what I mean. The Miata VVT system is perfectly capable of keeping a cam angle anywhere between maximum retard and maximum advance.
Ultimately, the VVT is controlled by oil. Oil pressure moves the cam around.
The oil is controlled by the VVT oil control valve. This VVT oil control valve has three positions: retard, hold, advance.
So you control the cam by moving the valve into these 3 positions.
There is no relationship between the VVT valve duty and the cam position. If you do open loop you will only be able to move it to the extreme positions as you either move the cam completely advanced or completely retarded.
To operate it properly, you must move the cam either forward or backward, read back its position and then hold it at the position you want.

The Miata VVT system works exactly like the first version of Toyota VVT-i, so please have a read and see if it helps you understand the system:
http://toyota-club.net/files/faq/16-01-01_faq_vvt_4_eng.htm

Re: red 2003 VVT test mule Miata #27

Posted: Tue Jan 10, 2017 5:56 pm
by AndreyB
Oh gotcha. We are absolutely going PID closed-loop, the open-loop playing was just trying to control it for the first time ever.

Re: red 2003 VVT test mule Miata #27

Posted: Wed Jan 11, 2017 12:42 am
by stefanst
Looks like we won't need PID if this is true. If I understand this properly, the VVT works more like a three position switch for an electric motor.
Pos 1: move backward
Pos 2: stop
Pos 3: move forward

So all we need to do is figure out the 3 values for the solenoid that shift to these positions and then write a whole bunch new code to achieve this. Maybe the code from stepper control for idle valve can be twisted into service here?

Re: red 2003 VVT test mule Miata #27

Posted: Wed Jan 11, 2017 1:29 pm
by DaWaN
stefanst wrote:Looks like we won't need PID if this is true. If I understand this properly, the VVT works more like a three position switch for an electric motor.
Pos 1: move backward
Pos 2: stop
Pos 3: move forward

So all we need to do is figure out the 3 values for the solenoid that shift to these positions and then write a whole bunch new code to achieve this. Maybe the code from stepper control for idle valve can be twisted into service here?
I am not sure about the best way to do VVT control.
PID control is pretty generic and will work for VVT control.
Downside in my opinion is tuning the VVT control as PID is kind of finicky to tune and it can oscillate if configured wrong.
Reading on the Megasquirt / Miata forums it also seems everybody runs different P/I/D coefficients. OEM car makers run one configuration on all of their cars without issues, so I guess PID is not the most ideal way of controlling VVT.

While there are parallels to a stepper idle valve, the system is far from the same. Stepper idle valves will move exactly the amount of steps you command it.
The VVT will just move and it greatly depends on RPM, oil, how far the valve has opened how much/at what speed the cam will move.
I guess also the hold / forward / backward duties will shift between different VVT valves and battery voltages.
I think some fuzzy logic control might be easier to tune and it might also be more stable, but the implementation might become very Miata specific and/or much more complicated compared to a PID control.

Re: red 2003 VVT test mule Miata #27

Posted: Sun Jan 22, 2017 5:27 pm
by AndreyB
VVT PID I like but it can probably use better values. Here you see offset 20, P=2 and I=0.005

[video][/video]

tune & log - https://svn.code.sf.net/p/rusefi/code/misc/logs/2003_mazda_miata/20170122_vvt_test/

Re: red 2003 VVT test mule Miata #27

Posted: Mon Feb 13, 2017 12:44 am
by AndreyB
@ has stopped by and we took red car for the first rusefi drive. Ice rains like today are not so frequent here, we had to use this rare opportunity! :roll:

Well, before we got on the road we've spend 45 minutes getting car to start reliably - default cranking correction curves would become much less dramatic.

Reviving old http://rusefi.com/forum/viewtopic.php?f=5&t=758 thread, minor bugfix with alternator PID status reporting and a larger issue with PID in general http://rusefi.com/forum/viewtopic.php?f=5&t=1088&start=30#p23689 - good stuff overall :)

https://svn.code.sf.net/p/rusefi/code/misc/logs/2003_mazda_miata/20170212_1st_drive_day.7z

Re: red 2003 VVT test mule Miata #27

Posted: Sun Feb 26, 2017 10:36 pm
by AndreyB
I was finishing harness clean-up (stock ECU externa but noticed RPM oscillation while engine is running. Hard to tell when it has started since you need to run for about 20 seconds for this to start happening.

Engine start smooth with high idle around 2K, stays around 2K for some time but later strarts to oscillate.

Also giving throttle causes RPMs to go DOWN - but it does not stall.

Fuel gauge (the one in the car, not the external one) shows 1/4 tank, battery shows 11.8 volts. I've hooked up ODBII but no usefull error codes - only oxygen sensors and lack of cooling fan is reported.

[video][/video]

Re: red 2003 VVT test mule Miata #27

Posted: Mon Feb 27, 2017 12:20 am
by stefanst
Hook up rusefi instead of stock ECU and see if all sensors report properly.
Check if engine reacts to changes of IAC valve.

It may be running lean- that may cause oscillations like that and respond with drop in rpm to increased throttle.

Is the WBO2 hooked up and feeding WB signal into stock ECU?

Re: red 2003 VVT test mule Miata #27

Posted: Wed Jan 24, 2018 10:58 pm
by AndreyB
I would like to read MAF signal because... I am not sure why.

It seems like MAF signal goes all the way to 12 volts, at least on idle it seems to be about 8 volts. I would like to divide it in more or less 1:3 or 1:25 ratio. What are R1 and R2 I should be using?

Re: red 2003 VVT test mule Miata #27

Posted: Thu Jan 25, 2018 1:25 am
by kb1gtt
See R320, and R321. Let's assume you can use IN7, put 10k in R271, then put 39k in W47. Your divider will match your Vbat calculations.

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Fri Dec 14, 2018 3:13 am
by AndreyB
This red miata has ABS and I found a spare ABS unit really cheap on eBay, cheap enough to open it.

I was _really_ surprised to see how the plastic control part just slides on the shiny hydraulics part. What are these round thingies? There are two kinds of those, blue internals and white internals? Why are top studs rounded and the bottom not?

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Fri Dec 14, 2018 3:28 am
by AndreyB
This video answers some of my questions - but on my car the brain seems to be integrated with the solenoids block - here is the wiring diagram https://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Miata_2001_ABS


Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Dec 18, 2018 12:26 pm
by alexander-n8hgeg5e
So you have 6 valves... 3 rounded and 3 not.
And they control 4 brake lines...
Abs means not esp, so... maybe not all wheels have to be controlled seperately
I mean if one of the front wheels block, maybe both of them get regulated.
I think best is figure out how they are hydraulicly wired.
A bit like a schematic. rounded ones could be some pressure release.
and the other ones for rising pressure or so.

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Sat Jan 05, 2019 7:27 pm
by AndreyB
Weird, we did it again. We play with detonation and what we destroy are radiator fans - motors get so hot that blade breaks apart at the mounting point. I wonder what exactly is going on - battery voltage is about 13v so we are not getting these motors too many volts. Is the fan just running for too long? Is the engine bay just getting too hot on a parked car without air flow? Coolant stays not above 110C

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Sat Jan 05, 2019 9:50 pm
by puff
you can probably build some sort of a coupler to attach the same fans to the shaft. And you can probably mount a temperature sensor to check the temperature of the electric motor. My guess is they are just getting old, and you definitely add some extra stress.

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Sep 03, 2019 2:30 am
by AndreyB
First ETB NB2 MRE run sounded... Well, scary. Unexpectedly scary.

What is this scary popping sound? Logs attached.


Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Sep 03, 2019 3:11 am
by stefanst
It's the cooling fan flying off.
Or maybe a backfire? It's ab NB2 with stock-ish ignition- right? So it's running wasted spark. If there is any combustible mix left in the cylinder during the exhaust stroke, there may be a potential for ignition to occur and feed back into the intake.
Or not.

Where does the noise come from? Exhaust or intake?

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Sep 03, 2019 5:46 am
by Crazy Striker
Yeah backfire on the exhaust, it seems to happen when the throttle opens and air is allowed in again. No big deal except if you had a catalytic convertor, now it's probably toasted 😂not as scartly as when I had my ignition reversed in a closed underground parking ;)

Sounds promising tho

Gwendal

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Sep 03, 2019 9:48 am
by kb1gtt
Hmmm, it doesn't sound quite like what I heat with race cars with the exhaust explosions, but the stock exhaust could be changing that.

A quick note, a back fire is technically in the intake, while an exhaust explosion is semi normal. To me it sounds like your dumping fuel into the exhaust and then it ignites. However with rapid changes in RPM it could be something like the fan, or similar mechanical bits.

Re: red 2003 VVT test mule Miata NB2 #27

Posted: Tue Sep 03, 2019 11:23 am
by Crazy Striker
If the catalytic converter is still in place it sounds pretty normal to me for an exhaust explosion. With the stock ECU on my full stainless exhaust (including cat removal) I sometimes get some pops like that on overrun (with a little bit of help tickling the gas pedal).