Welcome to the North American Subaru Impreza Owners Club Friday June 20, 2025
Home Forums Images WikiNASIOC Products Store Modifications Upgrade Garage
NASIOC
Go Back   NASIOC > NASIOC Technical > Engine Management & Tuning

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.







* As an Amazon Associate I earn from qualifying purchases. 
* Registered users of the site do not see these ads. 
Reply
 
Thread Tools Display Modes
Old 08-04-2015, 02:08 AM   #26
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

Those graphs are great!!! Especially the last one. That's what I was looking for when I first started to contemplate this idea, but I couldn't find it myself!

I suspect there will need to be a feedback loop to control the PWM signal, based on the difference between the desired cam angle and the measured cam angle. The gains for the feedback loops might need to be varied, too. It would probably be ideal to base them on oil pressure and temperature, but RPM would probably be close enough, especially after the oil is warmed up.

Are you familiar with PID loops?

Edit: you're probably right about the LH intake signal being inverted in that chart. One of those is not like the others.
* Registered users of the site do not see these ads.

Last edited by NSFW; 08-04-2015 at 02:13 AM.
NSFW is offline   Reply With Quote
Sponsored Links
* Registered users of the site do not see these ads.
Old 08-05-2015, 11:40 AM   #27
86Dreams
Scooby Specialist
 
Member#: 385256
Join Date: Mar 2014
Chapter/Region: NESIC
Vehicle:
'18 Giulia QV
'21 Giulia Q4

Default

Quote:
Originally Posted by NSFW View Post
Those graphs are great!!! Especially the last one. That's what I was looking for when I first started to contemplate this idea, but I couldn't find it myself!

I suspect there will need to be a feedback loop to control the PWM signal, based on the difference between the desired cam angle and the measured cam angle. The gains for the feedback loops might need to be varied, too. It would probably be ideal to base them on oil pressure and temperature, but RPM would probably be close enough, especially after the oil is warmed up.

Are you familiar with PID loops?

Edit: you're probably right about the LH intake signal being inverted in that chart. One of those is not like the others.
So you're suggesting a PID algorithm to minimize the error between the commanded oil pressure signal and the actual oil pressure signal?
86Dreams is offline   Reply With Quote
Old 08-05-2015, 01:25 PM   #28
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

No - to minimize the error between the commanded cam angle and the actual cam angle.

I expect that the PWM DC needed to maintain a particular angle will depend on temperature and pressure of the oil. But I also think that a PID loop would probably compensate for that well enough that it wouldn't be necessary to measure those, or create (and tune) compensation tables.

I also suspect that even with constant temperature and pressure, we wouldn't be able to just use a table that translates from target cam angle to duty cycle. Rather, the needed DC is probably going to be close to some fixed percentage almost all of the time, only varying based on the difference between the actual cam angle and the desired cam angle.
NSFW is offline   Reply With Quote
Old 08-05-2015, 01:48 PM   #29
86Dreams
Scooby Specialist
 
Member#: 385256
Join Date: Mar 2014
Chapter/Region: NESIC
Vehicle:
'18 Giulia QV
'21 Giulia Q4

Default

Quote:
Originally Posted by NSFW View Post
No - to minimize the error between the commanded cam angle and the actual cam angle.

I expect that the PWM DC needed to maintain a particular angle will depend on temperature and pressure of the oil. But I also think that a PID loop would probably compensate for that well enough that it wouldn't be necessary to measure those, or create (and tune) compensation tables.

I also suspect that even with constant temperature and pressure, we wouldn't be able to just use a table that translates from target cam angle to duty cycle. Rather, the needed DC is probably going to be close to some fixed percentage almost all of the time, only varying based on the difference between the actual cam angle and the desired cam angle.
I see. By cam angle do you mean cam phase-angle or cam actual-angle? Would it be easier to calculate cam phase and control that instead? You could probably use a table to look up cam phase at RPM then use that as an abstracted reference signal.

Physically, arent you actually controlling oil pressure? And then cam phasing is a byproduct?

http://drive2.subaru.com/Win05_WhatsInside.htm
86Dreams is offline   Reply With Quote
Old 08-07-2015, 12:49 AM   #30
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

I was referring to the phase of the cam relative to the crank.

Regarding those last two questions, the big picture is sort of complicated... The software will control the duty cycle of a PWM signal, which controls an oil valve, which controls the flow of oil to the AVCS actuator in the cam pulley, which controls the angle between the pulley and the camshaft, which controls the timing of both the valves and the signal from the exhaust AVCS sensor.

But the variable we control is the duty cycle, and the variable we measure is the timing of the AVCS sensor signal (relative to the crank position sensor signal), so the rest is just details. The translation between the sensor signal and the cam angle is trivial enough that I'd think of them as essentially the same thing.

The user interface would ideally be a table with RPM on one axis, load (g/rev) on the other axis (to be consistent with the tables in the ECU), and cam phase angle in the table cells. But it would be far simpler to use manifold pressure instead of load.

The first big milestone for the software would probably just hold a fixed cam angle, to prove that the sensor and actuator stuff works properly.

In other news, on Wednesday I called the shop that I want to build my new motor, and they still haven't returned my call. One of my first questions will be to ask how they feel about building a dual-AVCS motor for a single-AVCS car, with exhaust control only coming much later, like after break-in.
NSFW is offline   Reply With Quote
Old 08-07-2015, 09:28 AM   #31
NITROS
Scooby Specialist
 
Member#: 41561
Join Date: Aug 2003
Chapter/Region: MWSOC
Location: Chicago
Vehicle:
04 GT3076 2.1
Stroker = Broken 3rd

Default

Quote:
Originally Posted by NSFW View Post
I was referring to the phase of the cam relative to the crank.

Regarding those last two questions, the big picture is sort of complicated... The software will control the duty cycle of a PWM signal, which controls an oil valve, which controls the flow of oil to the AVCS actuator in the cam pulley, which controls the angle between the pulley and the camshaft, which controls the timing of both the valves and the signal from the exhaust AVCS sensor.

But the variable we control is the duty cycle, and the variable we measure is the timing of the AVCS sensor signal (relative to the crank position sensor signal), so the rest is just details. The translation between the sensor signal and the cam angle is trivial enough that I'd think of them as essentially the same thing.

The user interface would ideally be a table with RPM on one axis, load (g/rev) on the other axis (to be consistent with the tables in the ECU), and cam phase angle in the table cells. But it would be far simpler to use manifold pressure instead of load.

The first big milestone for the software would probably just hold a fixed cam angle, to prove that the sensor and actuator stuff works properly.

In other news, on Wednesday I called the shop that I want to build my new motor, and they still haven't returned my call. One of my first questions will be to ask how they feel about building a dual-AVCS motor for a single-AVCS car, with exhaust control only coming much later, like after break-in.
I was going to create a simple circuit that just controlled a PWM single based on a rotory encoder or potentiometer. It would be simple and prove it worked controlling the avcs.

For your build its important to at least set to angle of the cam into the stock sti location.
NITROS is offline   Reply With Quote
Old 09-25-2015, 04:52 AM   #32
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

The shop that I wanted to build my motor isn't willing build a dual-avcs for a single-avcs car, so it looks like I'm not going to be taking part in this. I was looking forward to it, so I'm a little bummed.

Unfortunately there aren't many shops in my area that can do a build+install+tune, and I really want it all done at one shop so there's no finger-pointing if something goes wrong right after startup.
NSFW is offline   Reply With Quote
Old 01-11-2016, 01:27 AM   #33
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

...so I found a different shop, and I'm getting a dual-AVCS motor after all. I'm dropping the car off tomorrow. No AVCS controller to start with, though.

Nitros, have you found a way to interface the cam sensors to the microcontroller? I find myself in a hurry all of a sudden so I'm going to need all the help I can get.
NSFW is offline   Reply With Quote
Old 01-19-2016, 09:01 PM   #34
NITROS
Scooby Specialist
 
Member#: 41561
Join Date: Aug 2003
Chapter/Region: MWSOC
Location: Chicago
Vehicle:
04 GT3076 2.1
Stroker = Broken 3rd

Default

I did find a interface for the cam sensors. i purchased this to help with the integration.

http://jbperf.com/dual_VR/v2_1.html
NITROS is offline   Reply With Quote
Old 01-21-2016, 02:17 AM   #35
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

I have a pair of those coming too. I'm guessing that the cam sensors are hall-effect though, and that will only be needed for the crank sensor. But like I said, I bought two... just in case. Also bought a dual-trace USB oscilloscope to get a close look at the signals.

Been thinking of putting an optical sensor on a cam gear (the belt side, not the cam side) instead of tapping into the crank sensor, just to make absolutely certain I don't accidentally **** up the ECU somehow.

Also thinking about using the +5V line on the TGV sensor plugs as a signal to turn the AVCS controller on and off. And then run a DAC output from the controller into the TGV input (via optoisolator) so that I can log the exhaust AVCS cam position. Integrated logging, and no wires through the firewall.

(I deleted my TGVs a long time ago, and also verified that you can hook a variable resistor up to the TGV sensor input and log 0-5V that way.)

Also bought a Netduino, then found out the company is collapsing. The main guy there disappeared, possibly related to a failed kickstarter thing. Not really sure what's up with that. It wouldn't be so bad, but I bought a Netduino 3 and then found out that's the only version that they haven't published the firmware source code for. And I'd need custom firmware because the managed-code API doesn't have good enough resolution from the timers.

So I'm looking into an Arduino now. Actually the 'mega' version, as the original version only has two 16-bit timers and this will be simpler with 3.

Kinda regretting not doing more homework on this project before I committed to a dual-AVCS engine, but I'm sure it will all work out.
NSFW is offline   Reply With Quote
Old 01-21-2016, 07:03 AM   #36
86Dreams
Scooby Specialist
 
Member#: 385256
Join Date: Mar 2014
Chapter/Region: NESIC
Vehicle:
'18 Giulia QV
'21 Giulia Q4

Default

Quote:
Originally Posted by NSFW View Post
I have a pair of those coming too. I'm guessing that the cam sensors are hall-effect though, and that will only be needed for the crank sensor. But like I said, I bought two... just in case. Also bought a dual-trace USB oscilloscope to get a close look at the signals.

Been thinking of putting an optical sensor on a cam gear (the belt side, not the cam side) instead of tapping into the crank sensor, just to make absolutely certain I don't accidentally **** up the ECU somehow.

Also thinking about using the +5V line on the TGV sensor plugs as a signal to turn the AVCS controller on and off. And then run a DAC output from the controller into the TGV input (via optoisolator) so that I can log the exhaust AVCS cam position. Integrated logging, and no wires through the firewall.

(I deleted my TGVs a long time ago, and also verified that you can hook a variable resistor up to the TGV sensor input and log 0-5V that way.)

Also bought a Netduino, then found out the company is collapsing. The main guy there disappeared, possibly related to a failed kickstarter thing. Not really sure what's up with that. It wouldn't be so bad, but I bought a Netduino 3 and then found out that's the only version that they haven't published the firmware source code for. And I'd need custom firmware because the managed-code API doesn't have good enough resolution from the timers.

So I'm looking into an Arduino now. Actually the 'mega' version, as the original version only has two 16-bit timers and this will be simpler with 3.

Kinda regretting not doing more homework on this project before I committed to a dual-AVCS engine, but I'm sure it will all work out.
http://www.udoo.org/ there's these also as an alternative. I don't know to much about them but I think they are more powerful than arduino, it might be worth checking out
86Dreams is offline   Reply With Quote
Old 01-23-2016, 08:41 PM   #37
NITROS
Scooby Specialist
 
Member#: 41561
Join Date: Aug 2003
Chapter/Region: MWSOC
Location: Chicago
Vehicle:
04 GT3076 2.1
Stroker = Broken 3rd

Default

The signal is a VR for the exhaust cam gears. also check out my previous post that gives you some insight into implementation, specifically checkout chippernut. he's built a shiftlight using the arduino picking up the crank position sensor, it should help.

http://forums.nasioc.com/forums/show...9&postcount=10
NITROS is offline   Reply With Quote
Old 01-23-2016, 09:26 PM   #38
Bad Noodle
Scooby Specialist
 
Member#: 174442
Join Date: Mar 2008
Chapter/Region: Tri-State
Location: NNJ
Vehicle:
2007 SuperWagon
I don't spell well

Default

Quote:
Originally Posted by NITROS View Post
You can mechanically advance the cams a bit by adjusting the cams by two teeth ccw, I think. There is a thread here on nasioc. This would put the exhaust cam in roughly the position of a single access head. Do a search.
FYI myself and tomacGTI have done this. Cars run fine and make good power, only issues we're sorting out are random misfires at idle.

If you made a controller that even puts the davcs cams back to savcs positions, that would be awesome.
Bad Noodle is offline   Reply With Quote
Old 01-24-2016, 01:34 AM   #39
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

If I understand chippernut correctly, it uses an RPM signal on the OBD connector, is that right? If so, I don't think it will be enough as it would not provide crankshaft position.

I think we'll have to calculate cam position based on the delay between cam sensor pulses and the two-long-pulses part of the crank sensor signal. At least, that's how I read the signal illustrations that you posted.

So I have been planning to tap into the VR signal from the factory crank position sensor. I've been thinking just in the last couple days that it might be simpler to add a new sensor to a cam gear instead, but I haven't actually looked into how to do that.

If we can get cam position info from the cam sensors alone that will be a lot simpler.
NSFW is offline   Reply With Quote
Old 01-24-2016, 03:58 PM   #40
86Dreams
Scooby Specialist
 
Member#: 385256
Join Date: Mar 2014
Chapter/Region: NESIC
Vehicle:
'18 Giulia QV
'21 Giulia Q4

Default

Quote:
Originally Posted by NSFW View Post
If we can get cam position info from the cam sensors alone that will be a lot simpler.
Could you do something as simple as something like a vampire tap on the cam sensor? Then run it to like an arduino or something as an analog input, since it's relatively slow you could filter it and calculate frequency of cam rotation and have frequency be an index of a control vector/table for oil pressure system pulse width. ?
86Dreams is offline   Reply With Quote
Old 01-24-2016, 11:54 PM   #41
NSFW
Scooby Guru
 
Member#: 140444
Join Date: Feb 2007
Chapter/Region: NWIC
Location: Near Seattle, WA
Vehicle:
05 Stage Free LGT
ATP 3076, 6MT, AVO FMIC

Default

It will be simpler if the cam sensor alone is all we need, so I'm hoping that's the case. But, as I understand it, all of the pulses from the cam sensor come from the camshaft side of the cam pulley. So they'll always come at a rate that varies by RPM, regardless of the cam angle.

To know the cam angle, we'll need to compare that signal to something that comes from the belt side of the cam pulley, or from the crankshaft.

We'll see.
NSFW is offline   Reply With Quote
Old 01-31-2016, 11:22 PM   #42
Chipmonk
Scooby Newbie
 
Member#: 439410
Join Date: Jan 2016
Default

Hey guys - I just put an ej207 in my kit car that is already running an aftermarket ECU. I have done some work with arduinos and rasberry pis and would love to keep up with this project. Let me know if there are ways I Can help out - I'll start ordering parts.
Chipmonk is offline   Reply With Quote
Old 02-17-2016, 12:37 AM   #43
NITROS
Scooby Specialist
 
Member#: 41561
Join Date: Aug 2003
Chapter/Region: MWSOC
Location: Chicago
Vehicle:
04 GT3076 2.1
Stroker = Broken 3rd

Default

I'm currently looking into the free online MIT electronic engineering classes to get an better idea on circuit design. It'll be a while. :rollseyes:
NITROS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -4. The time now is 03:35 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2025 Axivo Inc.
Copyright ©1999 - 2019, North American Subaru Impreza Owners Club, Inc.

As an Amazon Associate I earn from qualifying purchases.

When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission
Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.