Controlling VVT
#1
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Controlling VVT
Yep, its like you said - they knew they were 'different' and are afraid of them.
I don't know where the pulses are, if the cam pulse comes way out of whack for the MS to pick up.
But since I still might put a VVT head on my car, I'll need to figure it out. Only I'm out of PWM outputs, and don't know if I want to even TRY to get this all up and going. I know I can steal PWM outputs from the fuel injection, but that means a lot of extra coding, etc.
edit: I wonder if I could use the idle out for this? I know 300 hz is just barely inside the envelope...
I don't know where the pulses are, if the cam pulse comes way out of whack for the MS to pick up.
But since I still might put a VVT head on my car, I'll need to figure it out. Only I'm out of PWM outputs, and don't know if I want to even TRY to get this all up and going. I know I can steal PWM outputs from the fuel injection, but that means a lot of extra coding, etc.
edit: I wonder if I could use the idle out for this? I know 300 hz is just barely inside the envelope...
#2
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Dunno about idle. I mean, you can't really set specific duty cycles at specific RPMs, can you? It either ramps to temperature or attemps to run closed-loop.
My idea was to use the EBC driver to control VVT. It's more limited in terms of the frequencies it can operate at, however you could use the open-loop EBC map to set specific duty cycles for different RPMs, and even make them TPS dependant if you really wanted to get fancy.
We'd need to first scope out a proper '01-'05 Miata in order to determine if it's feasible (valve frequency) and if so, learn what the various duty cycles are supposed to me.
When you get the new head in your hands, visually inspect the cam gear and see if the teeth match. Should be easy enough.
My idea was to use the EBC driver to control VVT. It's more limited in terms of the frequencies it can operate at, however you could use the open-loop EBC map to set specific duty cycles for different RPMs, and even make them TPS dependant if you really wanted to get fancy.
We'd need to first scope out a proper '01-'05 Miata in order to determine if it's feasible (valve frequency) and if so, learn what the various duty cycles are supposed to me.
When you get the new head in your hands, visually inspect the cam gear and see if the teeth match. Should be easy enough.
#3
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
If what teeth match?
The idle and the EBC are both (on MS-II at least) the same, they just bit mask a variable to a pin (1 or 0) to get a PWM output on a GPIO pin.
I do like the idea of using the open loop boost control. I can get an open loop idle out based on temperature (IMO the very best idle control there is. :-).... Reverant mentioned the valve works at 300 hz. I'm sure even 150 would work.
There's one catch to all this - everything I've seen on this says it's dependent on oil pressure as well. That's why a closed-loop, single axis table of phase-angle vs rpm would work the best.
Or, I talk Rev. into giving me his code and showing me how to make the board, but I HATE having seperate computers for every little thing.
Joe, can you use you modgod powers to split off the past couple posts into some new thread somewhere, and then you or I should poke reverant (the greek guy) and get him to comment.
The idle and the EBC are both (on MS-II at least) the same, they just bit mask a variable to a pin (1 or 0) to get a PWM output on a GPIO pin.
I do like the idea of using the open loop boost control. I can get an open loop idle out based on temperature (IMO the very best idle control there is. :-).... Reverant mentioned the valve works at 300 hz. I'm sure even 150 would work.
There's one catch to all this - everything I've seen on this says it's dependent on oil pressure as well. That's why a closed-loop, single axis table of phase-angle vs rpm would work the best.
Or, I talk Rev. into giving me his code and showing me how to make the board, but I HATE having seperate computers for every little thing.
Joe, can you use you modgod powers to split off the past couple posts into some new thread somewhere, and then you or I should poke reverant (the greek guy) and get him to comment.
#4
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Good idea- new thread.
I'm speaking of the cam sensor teeth. Are they the same number and orientation of pulses as the '99-'00?
I brought up EBC since, by default, it comes nice a nice open-loop target map on both MS1 and MS2 that allow you to plug duty cycle numbers in directly. That way no hacking of the software would be required for implementation.
As to oil pressure, I can see how it would be an issue. I wish I had a complete wiring diagram for an '01+ car, but from the ECU-only diagrams I have, I can't see anywhere that there's an oil pressure sensor hitting the ECU- only the OCV solenoid. There are several lines that go to the instrument cluster which I can't trace as I don't have that portion of the schematic. I know the NBs still had a bogus gauge, but did they get a proper sender?
(As an aside, looking at these diagrams made me realize that VICS did continue on the '01+ models, for some reason I thought it went away when VVT came in. Learn something every day...)
I'm speaking of the cam sensor teeth. Are they the same number and orientation of pulses as the '99-'00?
I brought up EBC since, by default, it comes nice a nice open-loop target map on both MS1 and MS2 that allow you to plug duty cycle numbers in directly. That way no hacking of the software would be required for implementation.
As to oil pressure, I can see how it would be an issue. I wish I had a complete wiring diagram for an '01+ car, but from the ECU-only diagrams I have, I can't see anywhere that there's an oil pressure sensor hitting the ECU- only the OCV solenoid. There are several lines that go to the instrument cluster which I can't trace as I don't have that portion of the schematic. I know the NBs still had a bogus gauge, but did they get a proper sender?
(As an aside, looking at these diagrams made me realize that VICS did continue on the '01+ models, for some reason I thought it went away when VVT came in. Learn something every day...)
#5
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
broken record: not VICS, VTCS. like individual throttle plates in the (only) path of the runners. they're unused except for cold start.
also: 2001 has a dummy oil pressure sender for the gauge and that's it.
also also: closed loop doesn't need to know pressure to know the cam phase has changed.
I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.
you can thank me for this later:
http://www.y8spec.com/miata_tech/man/
also: 2001 has a dummy oil pressure sender for the gauge and that's it.
also also: closed loop doesn't need to know pressure to know the cam phase has changed.
I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.
you can thank me for this later:
http://www.y8spec.com/miata_tech/man/
#6
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Wow, that was worth it for the coolant temp sensor itself. :-)
Anyway, interestingly, while it doesn't talk about phasing (that I saw) it does look like the second cam pulse is shorter than the first within the doublette. Doubt it's useful, but it's interesting.
There is ONE more question I have: So, if... the cams are set up for VVT, how much do they suck if you don't VVT them? Would fixed timing on those cams be bad? Somehow I imagine so.
Anyway, it looks like there are plenty of timer channels on the MS-II if you can cut enough traced on the daughter card to get them loose. I'm a little worried about getting in over my head.
I'm thinking... If I DID use the EBC out, I'd still have closed loop verses RPM, and:
1) Use a electronic pot based on oil temp/pressure to lower cam advance
2) Just deal with when my engine is cold I'd have more advance (or is it retard?)
To get up and running (and save like $500 on a head) I think I might just do #2 for starters. I can pick an advance that helps for when the motor is warmed up (set this with a scope or maybe fixed timing and a timing light), and when I change oil brands/viscosity/temperature/way-the-wind-blows I just live with it - figuring at least pressure as a function of RPM should be relatively constant at a given temperature.
Anyway, interestingly, while it doesn't talk about phasing (that I saw) it does look like the second cam pulse is shorter than the first within the doublette. Doubt it's useful, but it's interesting.
There is ONE more question I have: So, if... the cams are set up for VVT, how much do they suck if you don't VVT them? Would fixed timing on those cams be bad? Somehow I imagine so.
Anyway, it looks like there are plenty of timer channels on the MS-II if you can cut enough traced on the daughter card to get them loose. I'm a little worried about getting in over my head.
I'm thinking... If I DID use the EBC out, I'd still have closed loop verses RPM, and:
1) Use a electronic pot based on oil temp/pressure to lower cam advance
2) Just deal with when my engine is cold I'd have more advance (or is it retard?)
To get up and running (and save like $500 on a head) I think I might just do #2 for starters. I can pick an advance that helps for when the motor is warmed up (set this with a scope or maybe fixed timing and a timing light), and when I change oil brands/viscosity/temperature/way-the-wind-blows I just live with it - figuring at least pressure as a function of RPM should be relatively constant at a given temperature.
#7
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
I've only got speculation on the cams. But I think they are pretty similar to the stock 99-00 cams. I remember emilio700 posting a LITTLE more detail than that somewhere around here. searchim I guess. Or send me a degree wheel and I'll measure my spare head.
actually, hold that thought.
http://savetheledges.org/test/AVS/im...egreeWheel.png
and
http://www.fastmustangs.com/images/Degree_Wheel.jpg
actually hold that thought too. neither works so well with the engine in two pieces. but if I had it together, I have the ATI damper which has the degree marks on it too.
actually, hold that thought.
http://savetheledges.org/test/AVS/im...egreeWheel.png
and
http://www.fastmustangs.com/images/Degree_Wheel.jpg
actually hold that thought too. neither works so well with the engine in two pieces. but if I had it together, I have the ATI damper which has the degree marks on it too.
#9
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
I've seen it referred to in both terms in various places in various manuals. Is it safe for me to say that all NBs, except for the MSM, have this same system which consists of four little butterfly plates in the intake manifold?
In the later ('01) documentation, the test for VICS drive at the ECU hinges upon operating temp- that it should be on when below 3,250RPM and below 140° or 149°, depending upon which section of the manual you look at. Same for '99?
Ok, even still, this is an easy one. Activate a relay driver when both conditions are met.
On to VVT...
also also: closed loop doesn't need to know pressure to know the cam phase has changed.
I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.
I think the cam teeth are similar to the 99, but the sensor is now at the back of the intake cam.
In that example, the signal has a period of ~3.5ms, yielding a frequency of 285Hz. That's 3.6x the max EBC frequency of MS2, and 7.3x the max of MS1.
#11
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
There is confusion here. On my part.
I've seen it referred to in both terms in various places in various manuals. Is it safe for me to say that all NBs, except for the MSM, have this same system which consists of four little butterfly plates in the intake manifold?
In the later ('01) documentation, the test for VICS drive at the ECU hinges upon operating temp- that it should be on when below 3,250RPM and below 140° or 149°, depending upon which section of the manual you look at. Same for '99?
Ok, even still, this is an easy one. Activate a relay driver when both conditions are met.
I've seen it referred to in both terms in various places in various manuals. Is it safe for me to say that all NBs, except for the MSM, have this same system which consists of four little butterfly plates in the intake manifold?
In the later ('01) documentation, the test for VICS drive at the ECU hinges upon operating temp- that it should be on when below 3,250RPM and below 140° or 149°, depending upon which section of the manual you look at. Same for '99?
Ok, even still, this is an easy one. Activate a relay driver when both conditions are met.
VICS (Variable Intake Control System):
Butterfly valves, yes. But these open to a second set of intake runners. They dont block the direct path of the air, they just offer a shortcut. It's like having a long intake and a short intake.
VTCS (Variable Tumble Control System):
This has a set of butterflies that almost completely block the intake runners. They close during cold start to increase flow velocity and help improve tumble and air-fuel mixing.
The difference is that VICS has an effect on performance and VTCS does not. VICS gives you two intakes tuned for different rpm ranges.
VTCS should be open ALWAYS once the car is warmed up.
Back to VVT!
#12
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Is intake cam timing relative to both load and RPM, or RPM alone? If it's just RPM, then you can figure it out by simply revving the engine from idle to redline, in neutral, while observing the CMP relative to the CKP on an oscilloscope. If load is a factor, then it's the same process but on rollers.
Baselining the data, to me, is the easy part. The hard part is building a software control within the constraints of the current MS2 design to calculate cam timing and then do closed-loop control of it. It's going to be a lot of work for a relatively small payoff.
VTCS (Variable Tumble Control System):
This has a set of butterflies that almost completely block the intake runners. They close during cold start to increase flow velocity and help improve tumble and air-fuel mixing.
This has a set of butterflies that almost completely block the intake runners. They close during cold start to increase flow velocity and help improve tumble and air-fuel mixing.
Back to VVT!
Honda is pretty much The Man when it comes to extracting power from tiny engines. And their VTEC system is, of course, a whole different animal. Not just timing, but lift and duration are changed. Thing is however that they feel it adequate to perform this transition in one quick bang, rather than varying it gradually.
I wonder- if it proves impossible to completely replicate the function of the VVT controller, is there a happy middle ground? What's the total range of adjustment on the cam? Seriously, anybody know? Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.
Trying to seed some thinking here...
#13
Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.
Trying to seed some thinking here...
Trying to seed some thinking here...
If the middle ground needs controlling (it's there so lets climb it ) you probably doesn't have to make it closed loop, open loop in stages between max retard and max advance could maybe be sufficient (unless you run into danger zones with the rest of the tune when the cam phase isn't what you guess).
You just woke up a lurker who have loose thoughts about MSII with E85 on a -03 (but parallel install give me no excuses to not do it, yeasterday...).
#14
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
You can rework the MS-II daughter card to get this functionality back, recover the ridiculous swarms of outputs used for things like stepper motor idle...
But running the valve at half frequency wouldn't bother me. Running it at 1/3.. Perhaps with a small, inline resistor? Something about 1/2 the resistance of the coil?
Hey! VICS! :-)
I wonder why they only do it when cold? I would guess the cam has a different profile, one that doesn't work well for low speed, and so they add that to get velocity/tumble up. I don't think it's a "bad thing" but I do agree that it probably doesn't buy you a lot.
To the manifold, the VICS would look just as it did before, the phasing won't matter, so I would still switch VICS at ~5250 or so, even with VVT.
Is intake cam timing relative to both load and RPM, or RPM alone? If it's just RPM, then you can figure it out by simply revving the engine from idle to redline, in neutral, while observing the CMP relative to the CKP on an oscilloscope. If load is a factor, then it's the same process but on rollers.
Baselining the data, to me, is the easy part. The hard part is building a software control within the constraints of the current MS2 design to calculate cam timing and then do closed-loop control of it. It's going to be a lot of work for a relatively small payoff.
The MS-II guys are adding "VANOS logging" meaning just recording what the very similar BMW VVT system is doing. But if they are fluent in "phase" then it should be easy to extend it by just dumping this "phase" variable as the input to a control loop.
Honda is pretty much The Man when it comes to extracting power from tiny engines. And their VTEC system is, of course, a whole different animal. Not just timing, but lift and duration are changed. Thing is however that they feel it adequate to perform this transition in one quick bang, rather than varying it gradually.
I wonder- if it proves impossible to completely replicate the function of the VVT controller, is there a happy middle ground? What's the total range of adjustment on the cam? Seriously, anybody know? Is it sufficiently small that we could simply bi-state the thing? At low RPM, we leave it in one position (solenoid fully off, or fully on, whichever way it is) and then at a certain RPM, we throw the switch and let the cam go to the other end of the range.
Trying to seed some thinking here...
Trying to seed some thinking here...
This all stops being theory really quick if I buy a VVT head, which I very well might here in the next day or two.
#15
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
I believe the total range is 25 cam degrees (50 crank). and one guy already is using an RPM switch to go from full advance to full retard. incidentally, varying the cam with respect to load/boost doesn't seem to have a significant effect. varying it with RPM had a HUGE effect. You *could* do a simple 2D map for it based on RPM alone. Plus at WOT you're only following a more-or-less single line of load points anyway. and at non-wot, who cares what max power is?
and joe, dont make me repost my VVT/no-VVT dyno graph.
so...
you have CKP and CMP as inputs.
you have a "zero" value for their offset.
you have a "target" map to set the advance or retard you want.
you have a calculated error in the feedback loop.
seems you could pretty easily translate that into boost control as long as you can trade out the MAP reading for the delta-cam angle value (cam_offset - cam_actual = cam_advance).
and joe, dont make me repost my VVT/no-VVT dyno graph.
so...
you have CKP and CMP as inputs.
you have a "zero" value for their offset.
you have a "target" map to set the advance or retard you want.
you have a calculated error in the feedback loop.
seems you could pretty easily translate that into boost control as long as you can trade out the MAP reading for the delta-cam angle value (cam_offset - cam_actual = cam_advance).
#17
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
No need to repost the charts, I've seen them.
Now here's a thought: What if we back down for a moment from closed-loop and conceptualize this system as a tri-state control?
Here's my thinking- we know that oil pressure and viscosity (as a function of temperature) are variables. Let us assume for the moment that viscosity as a factor of oil grade is a constant. Because of these variables, it is impossible, in an open-loop system, to say that "duty cycle X will produce cam timing Y."
However, I think we can assume that if the oil valve is fully closed, cam timing will be fully retarded, and if the valve is fully open then timing will be fully advanced, regardless of oil pressure and temperature. And in between these two extremes, we have some vaguely defined middle state, that we know is not going to be a constant.
So what if we compromise? We come up with some intermediate duty cycles that, under "optimal" conditions (warm engine) produce a smooth transition from retarded to advanced, and plug them into the table? It might look something like this:
Granted, I'm just throwing numbers on the screen here to provoke conversation. These may be way out of line, for all I know they could be backwards- I don't know whether energizing the solenoid causes the valve to open or close. But I'm thinking that until a Final Solution is reached, this might just be good enough to get Abe's new head up and running- what better man to experiment with it? He might even trim his valve cover, ricer-style, so that he can observe the intake cam gear with a timing light- lock your ignition timing to exactly TDC and watch the gear as you rev it up and experiment with different numbers.
Who cares whether 50% DC equals halfway advanced, 1/4 advanced, or 3/4 advanced? We'll play with it until it's where we like it when hot, and live with it being slightly sub-optimal when cold.
I don't know about everybody else, but I tend to drive pretty conservatively when my engine is cold. I pretty much never get into boost or the higher RPM range until oil temp is up to normal spec, which in my car is about 180°-200°. The thought of that little turbine shaft spinning at 150,000 RPM through cold oil keeps me pretty conservative. So when the engine is cold, I'm not terribly concerned about maximum performance.
My only concern is what effect this will have on VE- namely the fact that the cam timing in the midrange is going to vary with RPM may potentially throw the VE table off a bit during the transition from cold to warm. Can we rely sufficiently upon EGO to correct for this, understanding that it will likely be an issue only at moderate RPM and moderate load, a zone in the table where mixture is not as critical as at high load / high RPM? We're already bending over backwards to go super-lean in this area, so maybe we just compromise a tad?
Now here's a thought: What if we back down for a moment from closed-loop and conceptualize this system as a tri-state control?
Here's my thinking- we know that oil pressure and viscosity (as a function of temperature) are variables. Let us assume for the moment that viscosity as a factor of oil grade is a constant. Because of these variables, it is impossible, in an open-loop system, to say that "duty cycle X will produce cam timing Y."
However, I think we can assume that if the oil valve is fully closed, cam timing will be fully retarded, and if the valve is fully open then timing will be fully advanced, regardless of oil pressure and temperature. And in between these two extremes, we have some vaguely defined middle state, that we know is not going to be a constant.
So what if we compromise? We come up with some intermediate duty cycles that, under "optimal" conditions (warm engine) produce a smooth transition from retarded to advanced, and plug them into the table? It might look something like this:
Granted, I'm just throwing numbers on the screen here to provoke conversation. These may be way out of line, for all I know they could be backwards- I don't know whether energizing the solenoid causes the valve to open or close. But I'm thinking that until a Final Solution is reached, this might just be good enough to get Abe's new head up and running- what better man to experiment with it? He might even trim his valve cover, ricer-style, so that he can observe the intake cam gear with a timing light- lock your ignition timing to exactly TDC and watch the gear as you rev it up and experiment with different numbers.
Who cares whether 50% DC equals halfway advanced, 1/4 advanced, or 3/4 advanced? We'll play with it until it's where we like it when hot, and live with it being slightly sub-optimal when cold.
I don't know about everybody else, but I tend to drive pretty conservatively when my engine is cold. I pretty much never get into boost or the higher RPM range until oil temp is up to normal spec, which in my car is about 180°-200°. The thought of that little turbine shaft spinning at 150,000 RPM through cold oil keeps me pretty conservative. So when the engine is cold, I'm not terribly concerned about maximum performance.
My only concern is what effect this will have on VE- namely the fact that the cam timing in the midrange is going to vary with RPM may potentially throw the VE table off a bit during the transition from cold to warm. Can we rely sufficiently upon EGO to correct for this, understanding that it will likely be an issue only at moderate RPM and moderate load, a zone in the table where mixture is not as critical as at high load / high RPM? We're already bending over backwards to go super-lean in this area, so maybe we just compromise a tad?
#18
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Joe, you're on the right track but simplify simplify simplify and you'll have a "passable" setup for Abe to use for the time being.
1. retard the cam (0% duty) below, say, 1500 rpm
2. advance the cam (100%) between 1500 and 5000
3. retard the cam (0%) above 5000.
you'll lose a little bit at switchover but that can be dealt with when you've got the feedback loop settled.
1. retard the cam (0% duty) below, say, 1500 rpm
2. advance the cam (100%) between 1500 and 5000
3. retard the cam (0%) above 5000.
you'll lose a little bit at switchover but that can be dealt with when you've got the feedback loop settled.
#19
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,019
Total Cats: 6,587
Hmmm. Didn't realize it needed to come back out of advance at the higher RPMs... Ok, a nice simple starting point- we'll assume the MS does its best to perform a nice, smooth interpolation between columns:
It can be fine-tuned from there.
It can be fine-tuned from there.