### ## ## ## ## ####
#### ## ## ###### ## ## ####
_____ | ____| | _| | |___ |_____|
#### ## ##### ## ## #####
## ## ## ## ## ## ##### ## ####
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '''Page for the 135-tooth, 3-signal trigger system found on many 5cyl audi engines''' Note that for GenBoard/VerThree v3.3 the trigger HW was modified so it can directly use the 3 input signals from the Audi wheels: * VR 135 crankteeth * VR crankhome 1 tooth * and cam-HALL (1 per every cam rotation). The first successful install with this trigger-setup was done by Miska Peippo in Finland, see MembersPage/MiskaPeippo/AudiSSix. Congratulations. For [http://www.theswansonfamily.us/modules/gallery2/v/marc/work_0/efiexpress/vems/crank_triggers/5cyl_flywheels/IMG_1167.JPG.html Audi 7A flywheel] that has strange notches that disturb the crankhome-VR signal, an inverter is needed to neglect the big window around 134deg BTDC cyl5 (and keep the small window around 62 BTDC cyl1). The '''inverter can be an NPN transistor''' such as TIP31 * emitter (gnd) connected to ground (EC36pin26) * collector (output) connected to EC36pin13 * 2k7 .. max 10k pullup resistor between +5V (EC36pin28 or pin29) and NPN base * HALL sensor output connected to NPN base. If you have an Audi 7A flywheel, be sure to mention it to your dealer when ordering. ---- '''HW modifications''' '''For v3.0 .. v3.2:''' * easy: connect the pullup of secondary LM1815 output to cam-HALL signal instead of direct 5V. Ask for help if this is not clear. '''For v3.3 shipped in 2005:''' * GenBoard/Manual/InputTriggerHardWare/ReplaceC is effected, removing the 220nF from C103 is necessary (or or replacing with 1nF new value) * added 1uF cap in parallel with C40 (eg. piggyback on top, or replace) for longer peak hold time (might be essential depending on crankhome-VR noise, and does not hurt) * 12..15k pullup to +5V for crankhome VR signal (a good place to mount a 1206 size resistor is between board-pad and 5V at primary LM1815 pin8) ** alternatively 10k pulldown to -8V ** or 1k pulldown to GND (0V) and adaptive hysteresis disabled, that is LM1815 pin5=+5V '''For v3.3 shipped after 2006:''' - done at assembly if requested in shop order note * added 1uF cap in parallel with C40 (eg. piggyback on top, or replace) for longer peak hold time (might be essential depending on crankhome-VR noise, and does not hurt) * 12..15k pullup to +5V for crankhome VR signal (a good place to mount a 1206 size resistor is between board-pad and 5V at primary LM1815 pin8) ---- '''multitooth Audi crankwheels''' The old Five cylinder engines with electronically controlled ignition have 2 VR sensors and a HALL sender. * One VR sensors sense the starter gear (135teeth for 5cyl) * another VR sensor sense ONE pin in the flywheel located at 62deg before #1 TDC ** with 12453 firing order,this is the same as 134 BTDC cyl5 * The HALL sender is in the distributor, and the HALL trigger wheel has ONE slot acting as CAM reference. CAM ref and the Crank pin must overlap each other for the engine to start in the stock application. These engines use a homebrew ignition module with a visible TO-3 transistor in the ignition coil console. (at least the ones I have seen) Igniton computer is made by Hitachi (MAC-xx). The small spacing between the teeth (together with cambelt sloppyness) makes it impossible (at least without very advanced, long-term filtering) to sync the engine without the pin in the flywheel. Signal timing graph from 5-cylinder MC-engine: http://www.vems.hu/files/misc/audi_mc_trigger.gif The same type of triggersystem is used on many older Audis, even the Audi V8 had it until it was replaced with the A8. The engines with an even number of cylinders has an 136teeth flywheel to make everything add up. '''Solution:''' We use AND( HALLsignal, crankhome_pulse) logic operation (implemented in HW) and pass this to the AVR secondary-trigger input. The camsync masks out the 62deg BTDC cyl1 crankhome pulse, but leaves the 134deg BTDC cyl5 pulse alone, to reach the processor. This way '''the secondary trigger the AVR sees is timed from crank, but only 1 pulse for each cam-rotation''' (suitable for 5cyl ign). Effectively a 'cam ref signal' with no slop at all. 135 interrupts per crank-rotation still needed, but the interrupt code is much shorter than for 60-2 wheels, allowing > 20000 RPM: We thought that 135teeth takes up too much CPU time. After thinking about it, we found that the multitooth processing code can be bypassed altogether, so the CPU load would be smaller than for 60-2 wheel. * There are rumors that there is some problem (trigger error) at appr 6000 RPM. ** there are rumors that this is caused by the cam-hall pulse being too narrow (or positioned a bit badly) to safely "include" the crank-home VR pulse (zero-crossing falling edge): This tolerance could be verified with dual-channel scope (or 1 channel and mixing the 2 channels) ** rumors say Emil Malmstem '''widened camhall''' (probably with file, or angle-grinder) and auditrigger problem went away immediately ** Today we were able to run engine up to over 7000rpm by making some small experimental mods to firmware. It seems that firmware sees "cramhome" signal a bit too early, according to logs one or two tooth compared to lower rpms. Also, once 6k limit was hit, timing kind of slipped by one tooth and after that every primary trigger occurred one tooth too early (in firmaware, camsync path in primary trigger code) ''Q:What is (theoretically) the MAX RPM that this kind of'' ''trigger can handle?We just build an engine thet will rev'' ''9000RPM without problems.//pnanassy'' ---- '''How to connect the 3 trigger signals''' * EC36pin27 - Primary trigger 135 cranktooth VR. Usually no problem * EC36pin13 Sec.trig cam-HALL 1 window camtooth. ** don't forget to apply supply voltage for your HALL sensor * EC18pin12 - crankhome VR (1 tooth per crank) * added 1uF cap in parallel with C40 (eg. piggyback on top, or replace) for longer peak hold time (might be essential depending on crankhome-VR noise, and does not hurt) * 20..43k pullup to 5V for crankhome VR signal (a good place to mount a 1206 size resistor is between board-pad and 5V at primary LM1815 pin8) ** Original successful trigger setup only used a 10k towards 5V. Higher (than 10k) pullup resistor might be better if the signal amplitude is low (although Miska's was high enough even at very low RPM during Finland-Sweden-cold-winter cranking ). ** '''Important''' It is necessary to reverse crankhome polarity at the crankhome connection on the firewall (engine bay side), using 3 pieces of wire, 3pin JPT Male and Female connector is needed to make this properly. A good signal looks like [http://linkopingsmotorsport.se/1029/g4_pin1.gif this] at EC18 Pin 12 Don't forget to use shielded cables, separate for all 3 signals. The shield only connected at the ECM end. "return" is to GND (sensor ground), not GND5. See MembersPage/PhatBob/UserGuide. See InputTrigger/AudiTrigger/TestLM to see how the first installs got sorted out. * Note the Manmdd0c TerminalProgram command. After this command: * capture output (start log; crank for 5 seconds, but don't cut ECM supply as you'll have to issue Manmdd0c again) * Upload the mdd0c_trigger.log file (see file-aree on DocsPage bottom) * and publish the link on your MembersPage, so it can be analized (looking for trigger malfunction) if ---- '''Possible elmination of RPM trigger shadow from the crankhome-VR signal''' (also called magnetic shadow, or magnetic ghost) Marcells idea to connect both the crankhome-VR and crank135-VR signal via appr 33k (best resistor value needs some experimentation and tuning with scope) to a +-700mV clamped point (fast diodes towards GND, eg with a BAV99 or 2 1n4148). The crank135-VR '''might''' need to be reversed for this to work (in the elimination direction, not to amplify the unwanted ghost signal). The crankhome-VR polarity is fixed, of course (because LM1815 senses negative going edge). Jorgen's SwCAD simulations: two 1n4148 switch diodes connected antiparallel to each other and in series with the incomming VR signal from the TDC sensor. I have no Audi here to test it on but logic, some scope plots I have taken earlier and the CAD software say that it will totally eliminate all signals smaller then 0.5-0.6v or so while also dampening the TDC pulse with 0.5-0.6v. The TDC signal should be over 0.7v at all cranking rpms and the RPM shadow should be lower then 0.5v at most critical rpms. At higher rpm the RPM signal should be eliminated properly by the arm level logic in the LM1815. -Jörgen Karlsson ---- '''Some changes needed when compared to standard VEMS ECU:''' The Audi trigger is very different compared to most other triggers and they require a few modifications. -Jörgen *'''Secondary trigger''' ** First of all we have the secondary trigger that has a very slow update rate when cranking. This force us to change the time constant for the adaptive threshold for the secondary trigger: Normal C40=220n, we add a 1u on top of that to end up with 1.22uF. -Jörgen ** The signal qualiy of the secondary trigger signal is very low. A 1k resistor to ground between the sensor input wire and ground improves the signal quality greatly and dampen the high frequency electrical noise and the low frequency magnetic noise from the 135 tooth trigger. -Jörgen ** We also configure the minimum adaptive threshold for the secondary VR, there is a jumper at pin5 of the secondary VR that let you connect pin5 to VCC. After this is done the typical min threshold for arming the chip is 200mV instead of 30mV. That means that the chip will always ignore signals under these thresholds in each respective mode. With a stronger signal both modes are adaptive. -Jörgen ** In some ecu's a resistor is populated in the R182 position, it must be shorted with a 0ohm resistor (as in recent ECU's) or with a solder bridge. -Jörgen ** The diode circuit I mentioned in the section above is not needed to get a reliable trigger signal. -Jörgen *'''Primary trigger''' ** With the primary trigger we have a different problem. At high rpm the trigger frequency get extremely high. The LM1815 VR interface chip has a RC configurable output pulse. A standard ECU has R57=75k resistor and C31=1n. For Auditrigger you should use R57=33k and C31=1n which give us a pulse of around 30uS. As an example we only have 1/9000rpm*135teeth/60s=49uS between each trigger event at 9000rpm. The pulse with R57=75k would be around 70uS. -Jörgen ** R56 and C30 create a low pass filter with a theoretical -3dB frequency of 8841Hz. In real life it's common that the capacitors are of a bit higher capacitance then specified. 8841Hz correspond to 3930rpm. This may cause concern at first but when considering that the signal amplitude on the input increase with rpm and that we clamp the input below 2v it should not be a problem. -Jörgen ** There is no real signal quality problem with the primary trigger, but as the signal is very strong so we want to load it a bit to protect the input filter for the LM1815 and the input clamp in the LM1815, a 1k resistor should be suitable for this as well but note that it may need a higher power rating. We need to measure the signal amplitude at high rpm to know. -Jörgen ---- '''Signal Sloppyness''' The sloppiness seems small, see [http://www.sjmautotechnik.com/trouble_shooting/AANengine.htm image1] and [http://www.sjmautotechnik.com/trouble_shooting/wave/RPMTDCId.jpg image2]. Our implementation accepts if the "cramhome" (== crank-cam hybrid) pulse comes normally, or one tooth too early (which should be rare, but possible if the VR sensor is not aligned properly). '''If the crank-home is sloppy, not always between 2 given crankteeth, the code will finally sync as if the crank-home always came after the tooth coming later.''' '''Example''' Here we name 3 given teeth A,B,C. If '''crankhome is seen''' * '''always after B:''' this is the normal setup, this should theoretically be the only possibility if the VR sensor mechanical install is fine. trigger_tooth=00 means timing from B. * '''mostly after B, but sometimes after A:''' this (though it should be unlikely) is tolerated, timing from B * '''mostly after A, but sometimes after B:''' timing from B, but initially (while crankhome is coming after A) timing from A might happen !! * '''sometimes A, sometimes B, sometimes C:''' forget it. In fact this (>2.67 degrees sloppyness and unfortunate position) should really never happen (unless you hold the VR sensor in your hand while running the engine ;-) : remember that crankhome is timed from crank * no more possibilities ---- '''Configuration for 1.0.x''' (for 1.1.22+ that will be the official branch for auditrigger very soon, see below) * the 5cyl InputTrigger/AudiTrigger engine will need 1.0.29 firmware (see GenBoard/UnderDevelopment/FirmwareChanges), which is '''currently under testing''' ** MegaTune r027 or later will be needed (r028 should work too) We must start from a coiltype + camsync setup (maybe like MembersPage/MichaelRichards/Projects/NicksGTX or [http://www.vems.hu/files/Fero/config.txt Fero] * secondary_trigger=1D is standard (rising edge, camsync with filtering) Michael Richards and Fero use this ** secondary_trigger=19 (rising edge, camsync without filtering) could work too (or even better ?). But secondary_trigger=09 cannot work. * don't forget the reset_engphase_after and tooth_twidth.. variables!) * primary_trigger=FB # rising edge, coiltype (yes!), trigger filter disabled (bit2=0) ** very important, that '''coiltype chosen, and primary trigger filter MUST be disabled''' * tooth_wheel=87 # decimal 135 ** '''recommended trigger_tooth=1B is actually appr. 27.8 toothtimes after secondary trigger''' (assuming first crankpulse comes 0.8 toothtime after "cramhome") pulse * ignchmax=04 # 5 cyl * alternate=14 # or 04 if no simultaneous injection is needed at startup * ign_tdcdelay=78 # = decimal 120 = 60 degrees ** together with our trigger_tooth setting, cramhome is assumed to be 60 + 27.8 * 360/135 = 134 crandegree before cyl5 TDC (standard setup) * h[0]=08 02 01 04 10 00 00 00 ** assuming 53124 fire order, ** and direct mapping injchannels A,B,C,D,E (hexadecimal 01,02,04,08,10) **remember that hexadecimal 10 (last active element) == decimal 16 (if using MegaTune) * another_trigger_tooth=36 # decimal 54 * trigger_tooth=1B # tooth "27". For auditrigger in 1.0.x, tooth_cnt counts from (another_trigger_tooth-1) '''down''' to 0. So beware that lower trigger_tooth value uses a later tooth as the "trigger tooth" * h[2]=40 10 00 20 60 00 00 00 ** assuming 53124 fire order. ** Remember to change h[2] if you use a different output mapping for ignition channels (like the not standard 00..04 mapped to cyl 1..5) '''Auditrigger 135 tooth config for 1.1.22+ :''' http://vems.hu/download/v3/firmware/v3_firmware_1.1.22.zip <code> # rpmk=2400 (12000 / 5 cyl) rpmk[0]=09 rpmk[1]=60 divider=01 # alternate=14 if you like batch firing during cranking alternate=04 # coil type, NO filtering, bit6=1 auditrigger=enabled # 1.1.23 requires bit6=1 (while 1.1.22 does not care, can work with primary_trigger=03 or primary_trigger=43) primary_trigger=43 secondary_trigger=19 # yes, not 87(decimal 135) but decimal 90 !!! tooth_wheel=5A # 54/3=18 another_trigger_tooth=12 crank_minper=33 # with divide-by-3, we have 135/3=45 per crankrot that is 8 degrees, 32 * 0.25 degrees tooth_wheel_twidth1=20 tooth_wheel_twidth2=00 cam_sync_r_edge_phase=00 cam_sync_f_edge_phase=00 reset_engphase_after=40 # PLEASE ADJUST _YOUR_ BASE TIMING! # trigger_tooth: must be min 00, max 11 (decimal 0 to 17), somewhere in the middle should be fine, that is 08 or 09 # sync from the edge at 134 BTDC cyl5, with 1.1.22 trigger_tooth=08 and ign_tdcdelay=84 seems better (than 09, 0x78) trigger_tooth=08 ign_tdcdelay=84 ign_out=70 ignchmax=04 </code> * Reftooth array (decimal 0, 18, 36, 54, 72 but traversed backwards). You can rotate reftooth array, if you rotate h[2] ign-out sequence, the only effect is initial syncup freq. Starting with 00 gives the fastest startup. ** h[1]=00 48 36 24 12 00 00 00 * for cyl order 5,3,1,2,4 (ignchannels 4,2,0,1,3 in Miska's wiring, this is NOT the recommended way) ** h[2]=40 30 10 00 20 00 00 00 * with the recommended wiring, outputs are fired in sequence (either up or down: this looks good on LEDs and more importantly damn easy to verify the order correctness in MegaTune without thinking, after, say a rotation attempt), in this case ignch6, ignch2, ignch1, igch0, ignch7 (and coils are wired appropriately to cyl1,2,4,5,3) * h[2]=60 70 00 10 20 30 40 50 Find full config and trigger-extract at: http://vems.hu/files/MembersPage/MarcellGal/Audi/etc/ Note that engine is NOT tuned! Some more regression testing ahead, better advice on base timing, but it looks very promising ---- '''Other Audi triggers:''' There is also an other audi trigger arrangement on the older audis that don't have a knock sensing ignition. They only have a 5 slot trigger wheel in the distributor and no crank trigger and a hall sender controlling a auto dwell ignition module. If a few degrees of ignition inaccuracy is acceptable one of these distributors can replace the entire ignition system on the computer controlled cars. The later models have a standard Motronic triggerwheel and a CAM synk sensor. ---- '''Other 'Audi' triggers, part 2:''' 1.1.23 was only ment for 135 tooth. In 1.1.24, since when bit6=1 (primary_trigger=43) is used for auditrigger, auditrigger should work with tooth_wheel other than 5A (decimal 90, that is 135*2 /3 , using divby3). These numbers come from the number of teeth, and divider (divby2 or divby3). Examples: For '''264+1 trigger''': 4cyl 132 tooth and divby3, similar to the 5cyl 135 tooth, just different values (264/3 is 88 tooth and another_trigger_tooth is decimal 22): * primary_trigger=43 * tooth_wheel=58 * trigger_tooth=00 * another_trigger_tooth=16 * h[1]=00 42 2C 16 .. .. .. .. If there is no cam-hall masking (HALL is left high), than it becomes '''132+1''' trigger: * primary_trigger=43 * tooth_wheel=2C * trigger_tooth=00 * another_trigger_tooth=16 * h[1]=00 16 00 16 .. .. .. .. '''''Please see this http://www.vems.hu/wiki/index.php?page=MembersPage%2FPeteKrgr if I got my settings right with 1.1.24 / 132+1 / div_by_2 ?? Also if I change to div_by_3, is then bit7=0 ?? Thanks! ''''' '''volvo 142''' tooth no cam-HALL masking '''divby2 (bit7=1)''' * was supported in 1.0.36 (with different config) but in 1.0.36 RPM ceiling might be 7600 or lower (if teeth are uneven) * primary_trigger=C3 * tooth_wheel=47 * trigger_tooth=00 * another_trigger_tooth=24 ** OUCH: 142 after divby2 is 71, not dividable by 2 ! So Ignadv will be different +-1.2 degrees for cyl1,4 and cyl2,3 (still much better than cam-timing, but not optimal) * h[1]=00 24 00 24 .. .. .. .. Set the ign_tdcdelay to the angle from crankhome pulse to TDC. Than use strobelight * Porsche 944 has the 'crank home' tooth around 58.5 degrees before TDC * turbo's crank home is 66.8 deg BTDC = 24.5 teeth '''Porsche 130 tooth normally aspirated''' (turbo has 132+1 flywheel ) No cam-HALL masking, so 130+1 (not 260+1) Config hing (untested) <code> # rpmk=3000 (12000 / 4 cyl) rpmk[0]=0B rpmk[1]=B8 divider=01 # alternate=14 if you like batch firing during cranking alternate=04 # coil type, NO filtering, bit6=1 auditrigger=enabled # 1.1.23 requires bit6=1. And divby2 is bit7=1 primary_trigger=C3 secondary_trigger=19 # after divby2, 130/2=65 teeth: tooth_wheel=41 # trigger from every 33 teeth: another_trigger_tooth=21 crank_minper=00 # with divide-by-2, we see 130/2=65 per crankrot that is 5.61 degrees. So 365/(130/2) / 0.25=0x16 (decimal 22) tooth_wheel_twidth1=16 tooth_wheel_twidth2=00 cam_sync_r_edge_phase=00 cam_sync_f_edge_phase=00 reset_engphase_after=40 # PLEASE ADJUST _YOUR_ BASE TIMING! CHECK both ignition-pairs: 1,4 and 2,3 trigger_tooth=00 ign_tdcdelay=80 ign_out=70 ignchmax=03 h[1]=00 21 00 21 .. .. .. .. </code> Jaguar V12: '''162+1''' trigger (54 teeth after divby3) * primary_trigger=43 * tooth_wheel=36 * trigger_tooth=00 * another_trigger_tooth=1B * h[1]=00 1B 00 1B .. .. .. .. Who knows how much tooth was old BMW Motronic? GintsK * 116 teeth on most BMW according to [page http://frwilk.com/944dme/math.htm this page] ** 116? Not dividable by 3: But primary_trigger=C3 is divby2. ---- '''Header for easy switch between primary_trig=HALL and 3 signal audi-trigger''' For an assembled controller, one wants to avoid too many clamping/unclamping. (assemble/disassemble) The alubos endplate is very easy to remove, unclamping is not needed. The trigger section can be reached for soldering or measuring with just the alubos endplate removed. However the onboard mounted MAP sensor makes it impossible to reach the connections. * audi_header_pin1: primary_trigger connection (same as EC36pin27) * audi_header_pin2: 5V * audi_header_pin3: rail-point (for protecti * audi_header_pin4: AVR primary-trigger input * audi_header_pin5: trig1 LM1815 output Choices: * for simple HALL setup: ** 2.7k .. 10k (pullup) resistor (easy to solder 0805 SMD) between pin1 and pin2. Not needed (but does not hurt) if the HALL sensor has internal pullup (most HALL sensors don't have this, they can only pull towards GND) ** close pin4 to pin3 * for Audi-trigger setup: ** remove any resistor between pin1 and pin2 ** close pin4 to pin5 I had to apply relatively much hotmelt to prevent the header from shorting on anything (it might take 4..5 minutes of scratching to clean the header when one wants to change it: but at least only the endplate must be removed for it). 3 DIP switches would work for the same too. Are DIP switches acceptable in a car? '''I would say that they are, I have never heard of problems with the engine management systems that have it. we could make a backup solution with proper smd jumpers too.''' ---- '''See also:''' * InputTrigger * http://www.lanzo.se/auto/audi.html an interesting story about mechanical issues * MembersPage/KristsMezgals * InputTrigger/AudiTrigger/OldCircuit the old circuit that was eliminated by firmware code * InputTrigger/AudiTrigger/TestLM1815 - some guys got problems with VR input for secondary, here is instructions how to test it and write report Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.