VVT on MS-II, PID and otherwise

Discuss MegaSquirt, VEMS and other non-free hardware and software here.
Post Reply
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

VVT on MS-II, PID and otherwise

Post by AbeFM »

So, what do you think the odds are of making the MS-IIe control a VVT system?

An idea a friend on MT.net gave me was to try the boost control soleniod, there's a RPM/TPS map, which I could use. If I could swap TPS for oil pressure, I'd be done.


Of course, I'd like to have a table of target phase values for the cam, and PID it against RPM.

Does anyone have any idea if this is reasonable? The problem with a simple RPM based PWM setting is oil pressure, your cams would end up far advanced (retarded?) when the motor is cold.

I thought about using a transistor or variable pot or something to cut the signal down based on oil temps. But really, that's lame. :-)
shameem
LQFP112 - Up with the play
Posts: 135
Joined: Thu May 01, 2008 6:30 pm
Location: Ann Arbor, MI
Contact:

Re: VVT on MS-II, PID and otherwise

Post by shameem »

Couldnt you just use TIP120 with a table in MS based on either RPM or TPS (or both). Does the stock ECU even bother with VVT when engine is cold?
Still you can set a coolant temperature threshold for VVT activation in MS and leave VVT to default during warmup.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: VVT on MS-II, PID and otherwise

Post by AbeFM »

Well, it's going to be wrong if it's uncontrolled.

Can I use a generic, two-variable table on MS-II? A PWM vs two axis?

If I can, ok, I'm done. Use my oil pressure sensor voltage if I can find a space ADC, use RPM, and be done with it. All bases covered. Otherwise, a scale factor (PWM_target * (1 - actual_oil_pressure/nominal_oil_pressure) ).

Water temp and oil temp are... loosely related.
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: VVT on MS-II, PID and otherwise

Post by davebmw »

For my 3 wire PWM IACV and VANOS control I used the MS2 stepper chip.
1 channel drives the 3 wire IACV directly using the signal normally used for PWM out, a wire add takes it from the DIP 40 to a lifted leg on the stepper chip.
the VANOS is a straight solenoid valve on/off so i use IAC2 and set the output normally off, 2100 rpm on to 4000rpm off.
the 2nd stepper channel drives the gate of a IRFZ34 in the position normally used by the horrible VB921 for IGN output. this mosfet is used low-side to control the VANOS valve.
I haven't tried it on the car yet due to pants weather (this weekend looks good) but if i need a second condition eg coolant temp etc i can assign the IAC1 port (remember i freed this up with the lifting of the leg) to do the job in some discrete logic in the proto area.

Works perfectly on the bench on the road will probably require some tweaking, thats half the fun! ;)
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: VVT on MS-II, PID and otherwise

Post by AbeFM »

So there's a solenoid on/off *and* a PWM valve to vary degree?
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: VVT on MS-II, PID and otherwise

Post by davebmw »

8InchesFlacid wrote:So there's a solenoid on/off *and* a PWM valve to vary degree?
No sorry for the confusion :?

I had to find a way to drive my 3 wire PWM IACV and saw the MS2 stepper chip that was not being used.

i used channel 1 to control the 3 wire idle valve in PWM mode.

and

Used the spare channel to drive a mosfet which actuates the on/off VANOS valve, VANOS only actuates at 2 point during the rev range off until 2100 rpm then on until 4000 where it goes off again.

VVT is a much more complicated affair if it requires a 2D table to control it, you have to wonder does it need to be?
Assuming that you really shouldn't rag the engine when cold, set the enable point at operating temp and have the other channel dependant on rpm the tuning of which should be easy. make sure its warm, drive, alter drive some more until the grin on your face gets to just the right width!

BTW what engine is it?
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
shameem
LQFP112 - Up with the play
Posts: 135
Joined: Thu May 01, 2008 6:30 pm
Location: Ann Arbor, MI
Contact:

Re: VVT on MS-II, PID and otherwise

Post by shameem »

8InchesFlacid wrote:Well, it's going to be wrong if it's uncontrolled.
Most auto systems should be fail-safe which (in an ideal world) means that no control signal means a safe "default" configuration. I was reading about VVT control in old alfas and they go by TPS - in other words their table is TPS vs PW. I guess if you wanted to go fancy you can "datalog" parameters like maf/map, temperature, TPS, RPM and VVT duty cycle from the stock ECU and use those readings to either form a table or create a formula.........
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: VVT on MS-II, PID and otherwise

Post by AbeFM »

The motor is a 2001+ miata, which uses continuously variable valve timing.

The "fail safe" would be hard to design to go to some center value, only to an extreme.

The extremes are more or less outside of where you want them to be, so while you could switch it digitally, you'd be better off if you could control it, even only a little.

So far, the best/easy solution is PW vs RPM, and the first level of improvement would be PW vs RPM * water_temp_correction_factor.

The next best would be PW vs RPM * oil PRESSURE correction factor (just use a GPIO ADC).

And the best would be a P/PI/PID controller matching Phase_Angle vs RPM
Post Reply