Challenge: add Audi "trigger wheel" to code

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Challenge: add Audi "trigger wheel" to code

Post by elaw »

I know there has been some discussion of this in the past, that MS2 didn't have the power to handle this but maybe MS3 does... would you guys like to try and write a decoder for the goofy 3-signal trigger setup used on Audi 5-cylinder motors? I've heard rumors some Volvo 5-cylinders use a similar arrangement.

If so, I'm willing and able to help. I have tons of technical info (including timing diagrams), an MS3 + MS3X, and can (and will!) test.

Executive summary: the Audi setup uses 2 VR sensors on the crank, one sensing a pin once per revolution and the other sensing ring gear teeth (135 of them). The 3rd sensor is a hall that's effectively on the camshaft (actually on the cam on later motors, in the dizzy on earlier ones).

I figure the VR circuit on the V3 board could be used for one crank sensor, the VR circuit on the MS3X for the other, and the cam signal could be routed through the opto on the V3 board to JS10.
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.
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by Matt Cramer »

It's also worth noting that this same basic setup was used on several non-Audis, and the flywheel ring gear tooth count was not always the same. While they're in the same ballpark as 135 teeth, I believe some had a slightly different number. This was also used on some Porsche and BMW applications.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
jmotorsport
MS/Extra Newbie
Posts: 26
Joined: Wed Nov 03, 2010 4:25 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by jmotorsport »

Why do you have you use the crank pin, can't you use the 135 tooth wheel for crank position then the cam signal for cam phase. surely there is no need for a third it cant tell you any more than you already know?

James
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by Matt Cramer »

jmotorsport wrote:Why do you have you use the crank pin, can't you use the 135 tooth wheel for crank position then the cam signal for cam phase. surely there is no need for a third it cant tell you any more than you already know?

James
I suspect the cam wheel doesn't always trigger on the same tooth.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Challenge: add Audi "trigger wheel" to code

Post by elaw »

I think that's exactly it. The angle between teeth is only 2.7 degrees, and it would only take a little timing belt slop to make the cam trigger move that much.

I think another way of looking at it is the pin on the flywheel serves the same function as a missing crank-wheel tooth, but the system was designed before engine-management systems had the intelligence to detect a missing tooth so they came up with a different solution.
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.
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by Matt Cramer »

elaw wrote:I think that's exactly it. The angle between teeth is only 2.7 degrees, and it would only take a little timing belt slop to make the cam trigger move that much.

I think another way of looking at it is the pin on the flywheel serves the same function as a missing crank-wheel tooth, but the system was designed before engine-management systems had the intelligence to detect a missing tooth so they came up with a different solution.
I've often wondered exactly how an '80s vintage ECU handled that many teeth. My guess is that it may have picked a tooth to trigger on and which edge to use, and fired the spark when that tooth passed under the sensor, sort of like the Nissan optical CAS.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Challenge: add Audi "trigger wheel" to code

Post by elaw »

It was all done in hardware!

At least in the early Hitachi ECUs, they used a Motorola 6840 triple timer chip. I think the 1st section counted teeth, the 2nd had a fixed clock and counted off the "intertooth" time interval before firing, and I think the 3rd set the dwell time. Since those early ECUs were used with CIS mechanical injection there was no injector timing to take care of.

When the 20V motors came out they switched to Motronic with a MAF sensor and sequential injection... they must have had quite a time talking Bosch into adapting their ECU to use that trigger scheme! :?

If anyone's curious, there's a partial schematic from some patient person that reverse-engineered one of the ECUs at http://www.tiac.net/~rdh/http/Urq/mac02.gif
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.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by muythaibxr »

We would probably use the xgate to quickly divide the signal to 1/3rd the pulses and pass that along to the s12 as a 45-tooth wheel with 8 deg per "tooth."

Ken
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Challenge: add Audi "trigger wheel" to code

Post by elaw »

Yeah, I think that's roughly what Jean's divider board is doing. That, and skipping an output pulse "n" input pulses after it sees the crank pin signal to simulate a missing-tooth wheel.

I'm using his board now and have been going nuts trying to troubleshoot sync loss errors. I don't think it's his board's fault, but the fact there's another microprocessor between the sensors and the MS means I can't take full advantage of the noise-filtering features in MS that might be able to help with the problem.
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.
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by Matt Cramer »

elaw wrote:It was all done in hardware!

At least in the early Hitachi ECUs, they used a Motorola 6840 triple timer chip. I think the 1st section counted teeth, the 2nd had a fixed clock and counted off the "intertooth" time interval before firing, and I think the 3rd set the dwell time. Since those early ECUs were used with CIS mechanical injection there was no injector timing to take care of.

When the 20V motors came out they switched to Motronic with a MAF sensor and sequential injection... they must have had quite a time talking Bosch into adapting their ECU to use that trigger scheme! :?

If anyone's curious, there's a partial schematic from some patient person that reverse-engineered one of the ECUs at http://www.tiac.net/~rdh/http/Urq/mac02.gif
Interesting. This appears to be a case of somebody implementing an angle clock as a piece of separate hardware.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by muythaibxr »

Sounds to me more like our current wheel decoder implementation.

It counts teeth, and schedules timers for time after specific teeth for dwell/spark.

Ken
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by Matt Cramer »

muythaibxr wrote:Sounds to me more like our current wheel decoder implementation.

It counts teeth, and schedules timers for time after specific teeth for dwell/spark.

Ken
I didn't look at the application notes too closely, but I think the 6840 IC in that schematic is calculating crank angle from the teeth and passing the angle on to the CPU. Or it may be passing on a tooth number instead of an angle.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Challenge: add Audi "trigger wheel" to code

Post by jsmcortina »

Please post the timing diagrams - in particular at what angle is the crank ref sensor active edge.

Any details on the other reference installs so I can come up with code that tries to cover them all ?

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: Challenge: add Audi "trigger wheel" to code

Post by elaw »

Here you go! Here's how Audi explains it:

The top trace is the "speed sensor" (VR sensor) and produces 135 pulses per crank revolution. This sensor is actually picking up the ring gear teeth.

The next trace down is the "reference sensor" (also a VR sensor). It senses a pin on the back of the flywheel and thus gives 1 pulse per crank revolution. The pulse occurs 60 degrees BTDC cylinder 1.

The 3rd trace is the "hall sender" signal, this pulse occurs once per cam revolution. This pulse is about 35 crank degrees wide and is supposed to be centered at the same time the reference pulse occurs. On earlier engines the hall sensor is located in the distributor so that signal's timing can be off depending on where the dizzy is positioned. On the later motors with COP, the sensor is located under the cam sprocket so the timing should always be correct.

Edit/addition: although I have no hands-on experience, I have read that some of the Audi V8s use a setup almost identical to the above, but with 136 instead of 135 teeth on the ring gear... because 135/8 isn't an integer.
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: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Challenge: add Audi "trigger wheel" to code

Post by jsmcortina »

I have an idea on how to handle that, but it requires a fair bit of XGATE assembler.

Having details on all of the other possible variants on the starter ring-gear tooth counting schemes would be great.

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".
vlopsahl
Helpful MS/Extra'er
Posts: 136
Joined: Tue Jul 05, 2005 3:04 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by vlopsahl »

I have made some cut and paste from the Audi self study program for a V8 and v6. You have 5-cyl coverd. It is strange how they used this flywheel triggersystems.

Audi V8: main triggerwheel 136 teeth. Triggerpin 72 degrees before TDC syl 1. The hallsensor window is 40 degrees wide and is seen from 92-52 before TDC cyl 1.
Audi V8 trigger.jpg
Audi V6: main triggerwheel 135 teeth. Triggerpoint on the crankshaft 62 degrees before TDC cyl 3. The hallsensor signal is not specified in the text but it seems to be evenly spaced around TDC cyl 3. This engine is also waste spark. 1-4-3-6-2-5
v6 2-8l trigger.jpg
Vegard
Last edited by vlopsahl on Fri Nov 08, 2013 12:00 pm, edited 2 times in total.
Audi 80Q 2,0 20V Turbo 630cc AEB/ABA/ABF
MS-II V3 MT2.25 MS2 Extra 2.0.1 VAG/Bosch VR 60-2 Waste spark PWM-idle
vlopsahl
Helpful MS/Extra'er
Posts: 136
Joined: Tue Jul 05, 2005 3:04 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by vlopsahl »

And the 2.8 V6 174 hp
Audi 80Q 2,0 20V Turbo 630cc AEB/ABA/ABF
MS-II V3 MT2.25 MS2 Extra 2.0.1 VAG/Bosch VR 60-2 Waste spark PWM-idle
VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Re: Challenge: add Audi "trigger wheel" to code

Post by VolvoGuy50 »

I've been meaning to ask James to remove that Volvo rumor from the docs page, as it's 100% untrue. Volvo never used any such "custom" trigger. They used a 60-2 crank and a single-tooth cam through 2002. They switched to a 60-2 crank and twin single-tooth cams in 2003 to support DOHC VVT. /rant. :lol:

What Eric described does not seem impossible with the processing power MS3 has. My only thing would be keeping tabs on that insanely high tooth count without a pile of sync errors, especially at high RPM's.
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
vlopsahl
Helpful MS/Extra'er
Posts: 136
Joined: Tue Jul 05, 2005 3:04 pm

Re: Challenge: add Audi "trigger wheel" to code

Post by vlopsahl »

I know there are some Porche engines running similar triggersetups. Does anyone know anything ore anyone that can find information about them?

I think the Audi 5syl trigger would be the most requested one to be supported, then maybe the V8. These old V6 are more history. The newer ones have 60-2 trigger anyway.

What do you think James?:) Its fascinating how the Germans engineers invented this complicated setups in the 80’s when Bosch almost had the Motronic 60-2 system up and running.

Vegard
Audi 80Q 2,0 20V Turbo 630cc AEB/ABA/ABF
MS-II V3 MT2.25 MS2 Extra 2.0.1 VAG/Bosch VR 60-2 Waste spark PWM-idle
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Challenge: add Audi "trigger wheel" to code

Post by elaw »

Well if there's anything Audi is known for (or at least was back then) it's making things complicated.

The original system was a joint development between Audi and Hitachi, who supplied the ECU and some other parts (including the VR sensors, and even the fuel injectors on the 7A motor). I've always wondered how much of the design of that system was Audi's and how much was Hitachi.

The other thing I've always wondered is how much arm-twisting Audi had to do with Bosch to get them to adapt their already-established Motronic system to Audi's goofy trigger setup!
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