Audi 5-cylinder engines with triple trigger

General talk about successes. See older information on MSRUNS forum.
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Audi 5-cylinder engines with triple trigger

Post by elaw »

There's been a lot of discussion and confusion here about using Megasquirt with the OEM "triple trigger" arrangement found on 5-cylinder Audi engines of the 1980s and 1990s - the one that uses two VR sensors on the flywheel and a Hall sensor either in the distributor or on the cam pulley.

If nobody objects, I'd like this thread to serve as a repository for people's experiences as to what does / doesn't / might work for using Megasquirt on these engines. If you post, please tell specifically what hardware you're using on what engine, and how well it works... or if it doesn't! :?

I'll start:
I started with MS2 using basic trigger on an MC1 engine - that's the turbo engine from around 1986 used in the large-body cars. I migrated to triple-trigger by purchasing a "divider board" sold by Jean Belanger at JBPerf.com. It initially took a *lot* of screwing around and fooling with part values to make this work, but I eventually got it to the point of being 100% reliable.

Later I migrated the MS setup to an AAN engine - that's the later 20V turbo engine used in the S6 model around 1995. After that I upgraded to MS3, and later on I moved the engine + Megasquirt to a different car. In each case some tweaks were required (especially when I moved the engine to the 2nd car as the wiring picked up more noise) but the setup has proven to be reliable.

I have tried the MS3 "tri-tach" code a few times with partial success, but have always had some issues. It's not clear whether those issues are related to code or my setup, but I've reverted back to using the divider board.

My next step is to replace the VR sensors on the flywheel with custom ones I'm going to build with Allegro Hall sensors. With the Hall sensors, the LM1815 VR conditioners and all their associated circuitry that's on Jean's board should not be needed. So if the sensors work, I'm going to take just the divider chip from Jean's board and put it in the proto area on the V3 MS board, thus eliminating the need to have an additional board inside the MS case.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

Wow... nobody? I *know* there are people here running this setup! 8)

Well for anyone using this setup or thinking about it, I have some interesting news. There are two difficulties with the Audi (and similar Porsche, from what I understand) trigger setup: the fact that it uses 3 sensors, and the weird high-impedance design of the VR sensors (along with the quirkiness of VR sensors in general).

I can't offer much for the former problem, but have been working on the latter. I had a couple of aluminum housings machined up that are dimensionally similar to the Audi VR sensors. Into those housings, I epoxied Allegro Hall-effect sensors.

I finally got around to initial testing of the setup last night, and here's the result:
Dscf0006 - Copy - sm.jpg
The image shows the output directly from the sensors - with no VR-conditioning circuitry involved! In spite of what's shown on the display, the vertical scale is 2 volts/division, so those signals swing very nearly 0 to 5 volts.

I actually connected those signals, via a couple of 0.1uF caps, to the existing VR inputs on my MS3, and the engine started and ran! Obviously I'm not going to leave it that way - my plan is to feed the output from the Hall sensors to a 74HC14 to give some noise immunity, then directly to Jean's divider chip. The neat thing is that those components will fit in the proto area on the MS V3 board, so I no longer will need a separate divider board. One less thing inside the MS case connected by flying leads is always a good thing.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
julian944
Helpful MS/Extra'er
Posts: 100
Joined: Sun Jun 12, 2011 3:50 pm
Location: Germany, Stuttgart

Re: Audi 5-cylinder engines with triple trigger

Post by julian944 »

Hi Eric,
I tried it once (about one year ago) on a Porsche 944 with a single pin as a reference trigger and 130 teeth as second trigger both on the flywheel with the ms3X. I didn't had a cam signal. I didn't had any succes (I don't know why could be the missing cam signal) and because I was absolutely unexperienced I decided to go the safe way with a 36-1 trigger. This way worked perfect.
But now with more experience and a few succesful installs I will give it another try in the next weeks. This trigger mode would be a unique feature for the ms3, if its working reliable!!

Regards Julian
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Audi 5-cylinder engines with triple trigger

Post by jsmcortina »

If someone can give me, lend me or point me at a cheap engine (e.g. on UK ebay) that has all the needed parts to get this going, I'd like to test out the triple trigger mode myself.

Debugging it remotely is very difficult indeed.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

James,

I think I may have mentioned this before, so please pardon me if this is redundant (or redundant)...

If the code could somehow be modified so neither of the tri-tach flywheel signals was on tsel/IRQ-1, I would be happy to continue testing that code, and it could provide an important side benefit.

Here's how I envision the signal routing:
  • Cam signal --> MS3X cam
    Flywheel ring gear signal --> (some processor pin other than IRQ-1) and also Jean's divider board
    Flywheel pin signal --> (some processor pin other than IRQ-1) and also Jean's divider board
    Jean's divider board output --> tsel/IRQ-1
The above would enable me to switch between my current setup and tri-tach without doing any rewiring.

But some additional code work could create a powerful diagnostic tool: if the composite logger could be changed to log all 4 signals listed above, I could run the engine in regular toothed-wheel mode (using the signal from Jean's divider) while logging the two flywheel signals at the same time! Presumably that would create a pretty good picture of the timing relationship of all the signals.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Audi 5-cylinder engines with triple trigger

Post by jsmcortina »

Thanks for clarifying exactly what you'd need, I'll ponder that.
elaw wrote:But some additional code work could create a powerful diagnostic tool: if the composite logger could be changed to log all 4 signals listed above, I could run the engine in regular toothed-wheel mode (using the signal from Jean's divider) while logging the two flywheel signals at the same time! Presumably that would create a pretty good picture of the timing relationship of all the signals.
You could try the new "engine logger" (without MAP or MAF) and hook the additional signals to PT4 and PT6.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

I can do that!

I know that depending on (I don't know what), PT4 can be either an input or an output - obviously for the logging scheme to work it'll have to be an input. What settings should I make (or avoid making) to ensure PT4 is set up as an input?
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

Well just a little progress report... I installed my Hall sensors, rewired the Megasquirt to work with them and... it works! :yeah!: I've been driving the car for several days now with zero sync losses or other issues.

The image below shows the circuitry. I haven't gotten around to actually connecting the signals to PT4 and PT6 yet... that will come soon.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Audi 5-cylinder engines with triple trigger

Post by racingmini_mtl »

Nice!
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

And we have logs!

I connected the pin signal to PT6 and the ring gear signal to PT4 as shown in the schematic. Then I took a couple of logs, one with the engine cranking, the other with it idling.

The ring gear signal on the idling log doesn't look very good - I suspect it wasn't being sampled frequently enough. At idle that signal is about a 2 kHz square wave. But the pin signal looks about as you'd expect.

At cranking speed things are reversed. The ring gear signal is about 400 Hz at that speed and seems to look good in the log. But the pin signal seems to do strange things - it's my impression the logger logs in bursts and not continuously? So I suspect in many cases the pin signal is being missed as it has a very low duty cycle.

Anyhow, what the processor is seeing should exactly match the 'scope shot above. That shot was taken of the sensor outputs, and since each signal goes through two inverters on its way to the CPU, the processor should be seeing exactly the same thing.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
quattrodaveuk
Helpful MS/Extra'er
Posts: 84
Joined: Sat Apr 24, 2010 4:33 pm
Location: Hertfordshire, UK

Re: Audi 5-cylinder engines with triple trigger

Post by quattrodaveuk »

Hi Eric,

Apologies for my silence and lack of input for a few months, had a few problems at home which are pretty much sorted now. Anyhow I'm back on the Audi & MS3 :D

As I'm sure your aware I'm running Jeans divider board with great success, the only sync loss I get is at really high revs, just under 7000 but as mine is a 10v I really shouldn't be getting anywhere near that..!! I like your idea, it would certainly make the install and wiring a bit easier and tidier and hopefully a bit less prone to any failures... I remember 6 months ago I considered using hall sensors but managed to get the noise issues sorted out on the VR sensors.

As for the logger in TS when I was trying to iron out some running problems I was having issues in getting it to log correctly, after some frustration I fell back to using the o'scope to monitor everything.

James, as far as I'm aware I only live an hours drive from you, if you want to see the system/Audi sensors in action I'm more than willing to pop up...?

Many thanks

Dave
Dave.

4 Rings To Rule Them All!

1989 Audi 200 Quattro 5 Cylinder 10v Turbo - Running sequential MS3 & MS3x. Now tuning.
2011 Skoda Octavia L&K Estate 2.0 Diesel.
1998 Landrover Discovery 3.9 V8 EFi - No Mods Yet
1981 Range Rover Classic 3.9 V8 - Webber 500 Carbs - Now Sold :'(
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Audi 5-cylinder engines with triple trigger

Post by jsmcortina »

Still on my TODO is to allow Eric's existing wiring with the triple-trigger code to make it easier to debug.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
mickeymarrows
Master MS/Extra'er
Posts: 415
Joined: Fri Sep 23, 2005 6:35 am
Location: Ropley, Hampshire, UK

Re: Audi 5-cylinder engines with triple trigger

Post by mickeymarrows »

Do Audi 6 cylinders count here? :)

I have one of Jeans divider boards but never had any success, but probably because 135 can't be divided by 6, but 2 revolutions is 270, which divided by 6 is 45...

Mine is a 2.8 v6 from a 1992 Audi 80, in stock form it shares the same Hitachi mms200 ecu that some of the 5 pots used, also the TDC sensor is on the crank rather than a pin in the flywheel
'82 Golf GTI ABF 16v MS2 Extra sequential COP
'77 Scirocco G60 MS2 Extra sequential
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Audi 5-cylinder engines with triple trigger

Post by racingmini_mtl »

I thought the 6-cylinder had a different number of teeth. If that's the case then you will have problems with my board. If it does have 135 teeth then that should work because it simulates a 45-1 wheel (135/3) which would work for a 6-cylinder engine.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
mickeymarrows
Master MS/Extra'er
Posts: 415
Joined: Fri Sep 23, 2005 6:35 am
Location: Ropley, Hampshire, UK

Re: Audi 5-cylinder engines with triple trigger

Post by mickeymarrows »

Well according to this:
http://12v.org/engine/index.php?section ... p=g28#list
Its a 135 tooth just like the 20v 5 cylinder..


Ive just never got the divider board to work for me.. Hence why I like to see the BOM for other peoples working boards.. I built mine using Eric's BOM.

Could my problem be that the TDC reference is a notch in a crank counterweight? See image here: http://12v.org/engine/index.php?section ... mp=g4#list

Will the VR sensor also see the counterweight?
'82 Golf GTI ABF 16v MS2 Extra sequential COP
'77 Scirocco G60 MS2 Extra sequential
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

Hmmm... that seems quite possible. I can see the VR sensor generating one pulse at the leading edge of the counterweight, one at the notch, and a third at the trailing edge of the counterweight.

In the Hitachi MACxx ECUs (the only ones I've seen schematics for) that could work since the reference signal is logically "AND"ed with the cam signal. So the cam pulse would act as a "mask", allowing the ECU to only see the reference signal that comes from the notch. Jean's divider would not have such a masking function since both VR signals go directly to the CPU. And if the CPU is seeing 3 pulses per revolution from the reference sensor it's going to get very confused.

Do you have access to an oscilloscope? Looking at the waveform on pin 8 of U3 (the microprocessor) on Jean's board could tell a lot.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
mickeymarrows
Master MS/Extra'er
Posts: 415
Joined: Fri Sep 23, 2005 6:35 am
Location: Ropley, Hampshire, UK

Re: Audi 5-cylinder engines with triple trigger

Post by mickeymarrows »

Thanks Eric... I no longer have access to a 'scope as someone has stolen the portable one from work (it was clearly too portable!) so now no one is allowed to take equipment out of the lab.. :(

I guessed that the Hitachi ECU would use the cam signal as polling and therefore only see (or pay attention to) that reference sensor after the leading edge of the counterweight has passed..

In order to do that with Jeans board the hall input would need fed into the CPU and then need updated firmware from Jean.

I was under the impression that late 20v 5 cylinders also used a notch in a counterweight as TDC reference, I assume your AAN has both sensors on the flywheel?
'82 Golf GTI ABF 16v MS2 Extra sequential COP
'77 Scirocco G60 MS2 Extra sequential
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

mickeymarrows wrote:I guessed that the Hitachi ECU would use the cam signal as polling and therefore only see (or pay attention to) that reference sensor after the leading edge of the counterweight has passed..
Heh... you're giving the CPU too much credit!

The "MAC" ECUs were first designed in the very early 1980's and are very "dumb" compared to modern stuff. The ignition timing was mostly done in hardware, with the CPU just loading values into a timer chip to control when the spark would occur.

Basically the way it worked is they did a logical "and" between the reference sensor and the cam sensor so you got two signals coming out: one was the output of that "and" which amounted to one pulse per cycle and the other was the ring-gear signal. Or in other words, one signal with one pulse per 720 degrees of crank and the other with (135 * 2) = 270 pulses per 720 degrees.

The image below shows the circuit from a MAC02 ECU... I'm kind of using term "and" here as a figure of speech, the actual chip is a NOR gate.
Image1.png
EDIT: info in the next paragraph is wrong! See later post for why.
Since I think the cam and LM1815 signals are both active-low, what you need to "and" them is actually an OR gate. A 4001 CMOS chip would do, it's basically an OR gate that inverts its output. So if you wired the two signals to the inputs of one stage, then used another stage to invert the output of the first one back to the correct polarity, you hopefully would end up with a good signal.

As far as the 5-cylinders go, all the ones I'm familiar with including the AAN have the pin on the flywheel. I assume the newer "07K" 5-cylinders (the newer 2.5-liter motor) use a 60-2 wheel or something since VAG finally saw the light and realized what a miserable setup the triple-trigger is. :lol:

But getting back to the core issue, is there any chance you could borrow a 'scope or even a "scopemeter" from anyone? It would help tremendously to see what the actual signals are coming off the sensors, rather than speculating.
Last edited by elaw on Wed Oct 02, 2013 7:23 am, edited 1 time in total.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
mickeymarrows
Master MS/Extra'er
Posts: 415
Joined: Fri Sep 23, 2005 6:35 am
Location: Ropley, Hampshire, UK

Re: Audi 5-cylinder engines with triple trigger

Post by mickeymarrows »

Thanks Eric, I take it thats a schematic from the Hitachi with the 4001 NOR gate. That would be very easy to implement if required.

I'm searching for a 'scope... I can't believe in a office/lab full of electronic and software engineers (I'm the token mechanical engineer they keep in a cage in the corner) and no one has a scope I can borrow. Well obviously SOMEONE has the companies Fluke portable, but I doubt they're going to lend it to me :lol:

Edit: Lab manager is lending me one.. phew..
'82 Golf GTI ABF 16v MS2 Extra sequential COP
'77 Scirocco G60 MS2 Extra sequential
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Audi 5-cylinder engines with triple trigger

Post by elaw »

Yeah that schematic is from the very early MAC02 ECU. You can view the whole thing here: http://www.audiurquattro.de/ecu/mac02.gif although it's the result of someone's reverse-engineering so it's not complete.

But... actually I realized I wasn't thinking properly when I wrote the post above. ANDing the reference and cam signals will give a reference pulse only every two revolutions, which is not what Jean's chip is expecting to see, therefore it would not work. :?

I'd say before going further you really need to get a 'scope on the thing to see what's going on. The tricky part is that the VR sensor is sensitive to engine speed, so even if you don't have a "triple pulse" at cranking speed, you might once the engine reaches higher RPM.

It could be that the only viable options are the "AND" circuit plus a change in Jean's divider code, or getting James to make a special version of the "tri-tach" code that somehow implements a "window" for looking at the reference pulse.

Or of course implement some alternative to triple-trigger: a missing-tooth trigger wheel on the damper pulley or teeth machined into the flywheel. On the 5-cylinders there's also a 60-2 trigger device that can be installed that replaces the rear main seal on the engine - I don't know if that's an option for the V6.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
Post Reply