[rusEfi] red 2003 VVT test mule Miata NB2 #27

Your chance to introduce yourself and your vehicle
Abricos
contributor
contributor
Posts: 849
Joined: Mon Aug 18, 2014 12:32 am
Location: Carteret, NJ 07008

Re: red 2003 VVT test mule Miata #27

Post by Abricos »

I need one to ...(((
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: red 2003 VVT test mule Miata #27

Post 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]
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: red 2003 VVT test mule Miata #27

Post 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?
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: red 2003 VVT test mule Miata #27

Post 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.
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
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: red 2003 VVT test mule Miata #27

Post 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%
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: red 2003 VVT test mule Miata #27

Post 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?
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: red 2003 VVT test mule Miata #27

Post by AndreyB »

400Hz and yes a flyback, same as on IAC.
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: red 2003 VVT test mule Miata #27

Post by stefanst »

Maybe a reduction to 300Hz (which I believe is stock) may help to improve the usable range a bit...
DaWaN
Posts: 51
Joined: Sat Sep 20, 2014 6:54 pm
Location: Benschop, Netherlands

Re: red 2003 VVT test mule Miata #27

Post 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.
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: red 2003 VVT test mule Miata #27

Post 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"?
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
DaWaN
Posts: 51
Joined: Sat Sep 20, 2014 6:54 pm
Location: Benschop, Netherlands

Re: red 2003 VVT test mule Miata #27

Post 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
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: red 2003 VVT test mule Miata #27

Post 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.
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: red 2003 VVT test mule Miata #27

Post 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?
DaWaN
Posts: 51
Joined: Sat Sep 20, 2014 6:54 pm
Location: Benschop, Netherlands

Re: red 2003 VVT test mule Miata #27

Post 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.
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: red 2003 VVT test mule Miata #27

Post 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/
Attachments
screenshot.png
screenshot.png (119.05 KiB) Viewed 40863 times
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
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: red 2003 VVT test mule Miata #27

Post 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
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
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: red 2003 VVT test mule Miata #27

Post 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]
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: red 2003 VVT test mule Miata #27

Post 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?
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: red 2003 VVT test mule Miata #27

Post 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?
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
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: red 2003 VVT test mule Miata #27

Post 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.
Welcome to the friendlier side of internet crazy :)
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: red 2003 VVT test mule Miata NB2 #27

Post 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?
Attachments
miata_NB2-abs-internal.jpg
miata_NB2-abs-internal.jpg (332.65 KiB) Viewed 38792 times
miata_NB2-abs.jpg
miata_NB2-abs.jpg (202.05 KiB) Viewed 38792 times
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
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: red 2003 VVT test mule Miata NB2 #27

Post 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

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
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: red 2003 VVT test mule Miata NB2 #27

Post 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.
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: red 2003 VVT test mule Miata NB2 #27

Post 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
Attachments
two_melted_fans.jpg
two_melted_fans.jpg (444.16 KiB) Viewed 38598 times
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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: red 2003 VVT test mule Miata NB2 #27

Post 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.
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: red 2003 VVT test mule Miata NB2 #27

Post by AndreyB »

First ETB NB2 MRE run sounded... Well, scary. Unexpectedly scary.

What is this scary popping sound? Logs attached.

Attachments
OMG_WHAT_IS_THIS_SOUND.zip
(160.38 KiB) Downloaded 340 times
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: red 2003 VVT test mule Miata NB2 #27

Post 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?
Crazy Striker
kit assembler
Posts: 145
Joined: Wed Aug 08, 2018 6:05 pm
Location: Brest, Britanny, France

Re: red 2003 VVT test mule Miata NB2 #27

Post 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
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: red 2003 VVT test mule Miata NB2 #27

Post 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.
Welcome to the friendlier side of internet crazy :)
Crazy Striker
kit assembler
Posts: 145
Joined: Wed Aug 08, 2018 6:05 pm
Location: Brest, Britanny, France

Re: red 2003 VVT test mule Miata NB2 #27

Post 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).
Post Reply