RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 5:13 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Hi, I am crazy. Project for adding exhaust AVCS to Carberry
PostPosted: Sun Jul 08, 2018 4:50 am 
Offline
RomRaider Donator

Joined: Wed Dec 21, 2011 10:44 pm
Posts: 6
So.... not even sure how to describe this so ill just blurt it out. I want exhaust AVCS on 16 bit - Carberry specifically.
Now, Im not even sure this will be entirely posisble at this stage and im vastly underqualified with ECU modding/assembler.

My plan is to gather as much information possible and perhaps hope to pick up some people with ECU modifying experience and interest.
This should be beneficial to many, I am sure we have all read many posts all over the forums people not able to run exhaust avcs, resorting to blocking off plates, swapping cams etc etc etc.

Going to be updating the lists below as any information I have changes or becomes available, it is in no way complete.

Goals
    - To utilize 16 bit ECU, hoping to be a patch on top of the last published/available Carberry ROM. This would be ultimate
    - To be open source patch built to be applied over the top of a Carberry ROM
    - For the AVCS on both inlet and exhaust to be as factory as possible, this includes DTC codes and all checks

Hardware notes
    - There is no separate camshaft sensor on the 08+ dual AVCS engines
    - The way the cam position is read is vastly different on the 2 setups
    Single AVCS
    [Get photo from friend with spare engine... or internet later]

    Dual AVCS, note intake position sensor top left and the cam itself, exhaust position sensor bottom right and the cam itself. Dont note the yet to be fixed chip out the bottom...
    Image

    - Figure out what pins can be used or re-used for the 4 AVCS cam position sensors and solenoids and how many ECU pins exactly needed for this vs standard older ECU with single AVCS and external camshaft position sensor.
    2008+ STI AVCS cam position sensors diagram, this one is off internet but shows the required wiring, will edit to show power/ground/etc/etc
    Image

    - Possibly able to utilise TGV pins of the ECU for some of this, again to be checked/confirmed if hardware is compatible
    - Investigate wiring for 2003-2005 AU/Japan/General market Dual AVCS cam position sensors as they are 2 wire instead of 3 of the 2008+ (hall sensor)
    - ECU wise, believe to have relevant Motorola ECU diagrams, will try to make some sort of ECU pinout to the controller/function - Open to hardware modding inside ECU as required

Software notes
    - Lots..
    - Cant even start the car as no original cam sensor, so would need to modify how signal is interpreted from all the 4 individual AVCS according to new ecu however that works..
    - Most likely change all of the AVCS code to match functionality of 2008+ ECU, related to above
    - Add in fault codes and etc to trigger errors
    - New def file for RR
    - Analyse if it will be easier to change the intake cam gear and add the older style cam sensor to the head, then maybe just have to deal with the exhaust AVCS and changing the interpretation of the intake AVCS cam position signals (cam physically read differently)

Resources

FAQ
    "It wont work" - Why precisely? What do you know? Contribute if you have some information
    "Get an aftermarket ECU" - Not at this stage, id rather pay for someone to do perform this work if I can't
    "Convert and use 2008+ ECU" - Not straight forward and also not changing dash cluster and dealing with CAN bus, also dont want DBW throttle
    "Just make or use a separate controller" - Prefer to not, aware of NSFW doing some work on this, I am very intrigued and think its got its purpose but its not what this project is/would be about. Also see below as well
    "Just use single AVCS by changing gear and mod to add cam sensor thats missing on new engines" - I may have to do this in the interim once the engine is assembled and let exhaust AVCS manage itself till this project is hopefully a reality
    "Youre nuts" - Damn straight, thanks!

So yes, some suitably amused people are required as well as expertise/experience with assembly language.
I have one of the above but im determined :lol:

Would appreciate your constructive comments, good/bad or otherwise.
Thanks for looking and hopefully we can achieve something. Even if its me updating progress once in a while..

Cheers!


Top
 Profile  
 
 Post subject: Re: Hi, I am crazy. Project for adding exhaust AVCS to Carbe
PostPosted: Sun Jul 08, 2018 6:14 am 
Offline
RomRaider Donator

Joined: Wed Dec 21, 2011 10:44 pm
Posts: 6
Reserving for further information and pictures if necessary...


Top
 Profile  
 
 Post subject: Re: Hi, I am crazy. Project for adding exhaust AVCS to Carbe
PostPosted: Tue Aug 21, 2018 8:14 am 
Offline
Moderator

Joined: Thu Nov 23, 2006 2:23 am
Posts: 2565
I won't say you can't do it... but it does sound a lot harder than using an Arduino. :)

One of the really nice things about using an Arduino to control the cams is that there is a ton of documentation on the internet about how to hook things up to it, and how to write software to handle incoming signals and generate outgoing signals. And in between the code that I wrote to say things like "call this function when this input pin changes state" or "set this output pin to x%" there's a layer of code written by people who understand the Arduino's CPU at a deeper level than I do.

And if you have to add a circuit to translate between signal types - for example to measure cam signal timing and generate an analog voltage to feed to the TGV inputs - then you're halfway to creating the hardware for a standalone controller.

Does the ECU have proportional control over the TGV motors? Or does it just switch them on and off for a short period to open and close the TGVs? I thought it was proportional but I heard it was really just on/off... I never really looked into it.

As I mentioned, cam position sensing is based on the timing between the crankshaft and signals from the camshaft position sensors... I was not confident enough in my electronical abilities to wire into the crank position sensor, so I painted a white mark on a cam pulley and placed an optical sensor above it... the photo below shows the signal from my optical sensor on top, and the two traces below it are the left and right cam sensors.

When the signal from the crank sensor begins, the Arduino starts two timers. When it sees the each signal from the cam sensors, it look at the elapsed time, and the RPM, and it computes the cam angle relative to the crankshaft. Each sensor is hooked up to an Arduino pin that can generate an interrupt when the signal changes. It measures the cam angles at rest (no power to the solenoids) and uses that to get a baseline, then it energizes the solenoids to retard the cams from that baseline.

To measure that timing accurately you'll want an input pin on the ECU that can be used to trigger an interrupt, or (better yet) one that is hooked up to a hardware timer (aka "capture"). You might be able to measure both cam angles with a single CPU input, since the pulses are 90 degrees apart.

The solenoids need to be controlled independently though, each with its own feedback loop that compares the current cam phase to the desired phase, and adjusts the PWM signal accordingly. The PWM signal is about 55% at neutral, and it increases to retard the cam, or decreases to advance it, then goes back to neutral when the cam is where it should be. (Control would be a lot simpler if the cam angle was proportional to the PWM duty cycle, but that's not how it works.)

I really doubt that you can use the TGV inputs to trigger interrupts... it's used for an analog signal, and timing doesn't matter for that signal... If you can find a datasheet for the CPU, it will list which pins can trigger interrupts and with that information and an opened ECU, and a wiring diagram, you might be able to figure out what those CPU pins are currently connected to. I say "might" because if the ECU circuit board has more than two layers of traces it will be hard to figure out which pins go where. But there's a good chance that 16-bit ECUs use 2-layer circuit boards - I think the odds are in your favor.

To control the solenoids, you need two outputs that can put out some kind of variable signal, either voltage or PWM (duty cycle). Again, you could look at the CPU's datasheet to see what CPU pins can do PWM (or analog out), and see what's currently connected to those CPU pins. Or you can look through a wiring diagram to see which ECU pins carry what sorts of signals. I'm not sure which will be easier, it might be necessary to try both.


You do not have the required permissions to view the files attached to this post.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG
Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl