My daily driver, Audi S6 avant -95, 2.3L inline 5, 20 valve turbocharged engine (AAN).
Installed VEMS as direct replacement of original ECU (see PlugAndPlayMotronic) using factory wiring. Extra wires are needed only for WBO2. There are some modifications with the trigger wires as well (swap secondary VR signal wires in 3pin JPT connector on firewall).
(Update 13-Jun-2007): Running now with 1.1.24 firmware, configs will follow soon.
old mcd.txt and mct.txt for 1.0.53 (09-Oct-06):
The engine is now running well, some tuning is still ahead.
Problems with trigger signals with early 55pin motronic box
In InputTrigger/AudiTrigger setup primary trigger has 135 tooth wheel and secondary trigger has single pin on flywheel. Both are detected by VR-sensors. In addition hall sensor in cam is used to synchronize engine phase.
When engine was cranking without injectors or coils connected, trigger log and scoped sensor signal looked perfect. However when either of the previous was connected, car didn't start. It was emitting a few sparks, lost trigger, few sparks etc.
After some measurements it was found out that DC level of secondary trigger signal did drop from 300mV close to 0V when ignition coils were charging or injectors firing. This is probably due the GND wiring. A small ghost signal from primary trigger wheel was enough to trigger false pulses, since LM1815 chip triggers from negative going zero crossings of the signal.
Used secondary trigger setup and measurement results are:
- 18k pullup to 5V, no pulldown to GND
- LM1815 in adaptive mode (mode selection pin with 3 solder pads in PCB left open)
- measured 300mV DC level (eventually did drop near 0V)
- measured 500mVpp ghost signal from primary trigger (135 tooth wheel)
- measured 7Vpp signal from sensor
Primary trigger also had 22k pullup to 5V, but it's effect is very minor because of continuous and strong signal from sensor.
Some changes were applied to the trigger, recommended by MembersPage/JorgenKarlsson:
- pullup was removed, installed 10k pulldown to GND instead
- LM1815 mode select pin was tied to 5V, resulting a fixed arming threshold
- signal level needs to rise above 200mV before chip is armed
- ghost signal did get significantly lower, less than 100mVpp (1V/div in scope, signal was almost flat
- This [scopeshot] was taken with 1k pulldown, using 2V/div setting in scope, from firewall connector showing ~200mVpp noise. However after 12ms after spark there is a larger noise peak, probably due the bolt near sensor in firewall or firing injector.
- signals may have extra noise, since GND was not connected to a proper location. A common GND point in firewall was used for measuring VR and logiclevel ignition control signals.
With the applied changes trigger was clean and car started immediately.
Made also some measurements with ignition advance. Ignition was forced to have constant 16deg advance (with mda40 command):
- crankrot = ~68ms -> ~890rpm
- spark = 8.5ms / 68ms * 360deg -> ~45 deg after pin
- crankrot = ~23ms -> ~2600rpm
- spark = 3ms / 23ms * 360deg -> ~47 deg after pin
- crankrot = ~19.5ms -> ~3080rpm
- spark = 2.5ms / 19.5ms * 360deg -> ~46 deg after pin
Since TDC pin is set 62 deg before TDC, advace is 62-46 = 16 deg like mde40 suggests
Going to test overlapping dwell with 135-tooth, please review configuration
# reftooth array (mod 135), traversed backwards (0, 54, 108, 162, 216) h=00 51 1B 6C 36 00 00 00 # for cyl order 5,3,1,2,4 (ignchannels 4,2,0,1,3 in Miska's wiring) h=04 03 01 00 02 00 00 00 # tooth width in quarterdegrees, 360/135 = 2.667 # 0x0B = 2.75 degrees -> the correct 2.6667 deg will be used. Important to use 0B because 0A is reserved for the volvo 142-tooth. tooth_wheel_twidth1=0B tooth_wheel_twidth2=00 # with camsync, 270*11 = 2970 mod 256 = 154 reset_engphase_after=9A another_trigger_tooth=87 # 135 tooth (NOT 0x36=54) # 60deg # rpmk=12000/10cyl rpmk=04 rpmk=B0 trigger_tooth=1B ign_tdcdelay=78 # 60 degrees
The h and trigger_tooth, ign_tdcdelay need more thoughts.
- the tooth (1..2 degrees) after the cramhome is numbered tooth0.
- review carefully:
- 132 degrees after tooth0 (134 degrees after cramhome) comes cyl5 (ignch4 in h) that can be written as
- 27 (0x1B) tooth + 60 degrees
27 tooth == trigger_tooth (0x1B) + 0 (h is 0 in the same /"first"/ position where h has ignch4)
Tried to crank with LEDs connected to coil outputs, looks promising; all 5 leds are blinking like expected.
New auditrigger log format - this has nice information and good for upto appr. 5000 RPM (with only 9600 baud)
- primary: (etime.tooth_cnt << 3) | tooth_wheel_trigger);
- cramsync: 0xFF
- [trigger4 log with comments] (config in same dir)
- Evaluation by /svn/firmware/utilities/testing/signalgenerator/toothcount < miskatrig4.txt :
- [AUDImde40.zip] more logs taken on the bench, including RPM-sweep and disabled coil-protect condition. More benching needed before risking engine at highRPM (I know it idles, that hopefully should not hurt).
- number is tooth_cnt (mod 135)
- T happens at TW_TRIG (every 27th tooth, that is 10 times per camrot => this explains the strange rpmk value we had to use), and every dwell and sparktooth (5+5 times)
- D is dwelltooth
- S(n,d) is sparktooth S(54,4) looks best which means 54 tooth since last spark and 4 tooth since dwell started (only 4 tooth is reasonable at 300 RPM and low VBATT:60000/ 300 / 135 * 4 = 5.9 msec dwell)
- OUCH is when D follows D or S follow S
- this can be OK at high-RPM when overlapping dwell is in effect
- though spark is released by vems.c mainloop (to prevent fried coil), better timing is achieved if S is not missing. So OUCH is at least suspicious
- the dwelltooth of one cyl can be the same as the sparktooth of previous cyl, or some dwell- or sparktooth can be at the time of TW_TRIG (this is much more likely at low-RPM), the number of printed numbers can be less than 20: most likely 15..21 P-s between camsync.
- at an extreme case downto 10 is possible at very low RPM if dwell is so low that all sparktooth==dwelltooth coincide with the TW_TRIG-teeth
Some help needed for NTC curvefitting. I'm using pre-generated clt 2063_256.hex table from ntc_properthem.zip and it is a pretty close match already. However there is a minor mismatch between the temperatures:
|real temp||MT display||Fahrenheit||temp_internal||adc||temp_internal_wanted|
|+4C||+9C||48||88 = 0x58||157 or 158||79 = 0x4F|
|+84C||+79C||174||214 = 0xD6||decimal 23||223=0xDF|
- I can provide a few more measured points if needed. Board AREF=256
- instead of more points, real NTC resistance would be nice, at same points (and voltage if easy to capture)
- I think this is impossible with AREF=256 (because the error signature is different at the two ends). Something like 1900 Ohm, aref=265 would be close.
- since this suggest non-standard AREF, grep -e Using -e adc=158 -e adc=23, propertherm_ntc.out |less will not get any curve that is extremely close
- Are you sure aboute the +79C point ?
perl propertherm.pl </svn/firmware/firmware/branches/stable1_0/inc/matfactor.inc >ntc_propertherm.out 2>ntc_propertherm.err iterate ended: 2849.40993369509 216.175797314667 SimulatedAnnealing calc_weight() started 23 => 83.1467687787838 (should be 83.8888888888889 so error=-0.742120110105063) 158 => 4.41775074921436 (should be 3.88888888888889 so error=0.528861860325467) errsqr=0.830437125129265 adc=23, old=232, new=222, diff=-10 adc=157, old=104, new=81, diff=-23 adc=158, old=103, new=80, diff=-23 (the old is not your old, but old standard curve) result: # automatically generated by propertherm, type=clt # modelparam = 2849.40993369509 Ohm 216.175797314667 aref # 2252 Ohm in modelparam means that the actually used thermistor exactly matches the reference CURVE, 2297 means that the real thing is +2% higher resistance (at given temp) than the reference CURVE :10030000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF904 :10031000F5F1EDEAE7E3E0DEDBD9D6D4D1CFCDCB02 :10032000C9C7C5C4C2C0BEBDBBB9B8B7B5B4B2B108 :10033000B0AEADACAAA9A8A7A6A5A4A3A1A09F9E54 :100340009D9C9B9A99989796959493929291908F51 :100350008E8D8C8B8A8A8988878685858483828125 :1003600081807F7E7D7D7C7B7A79797877767675E2 :100370007473737271706F6F6E6D6D6C6B6A696997 :1003800068676665656463626261605F5F5E5D5C4D :100390005C5B5A5A59585756555453535251504F03 :1003A0004E4D4D4C4B4A49484847454443424140D5 :1003B0003F3E3D3C3B3A39383735343331302E2DD2 :1003C0002B2A2827252422201E1C191715120F0C52 :1003D0000804010000000000000000000000000010 :1003E000000000000000000000000000000000000D :1003F00000000000000000000000000000000000FD
As you see 2849.4 Ohm, AREF=216.175 was found by the simulated annealing iteration (after some tries, for first run the error-square was slightly higher. Commited to SVN so you can play with it yourself (if you measure again).
216/256 * 5= 4.22V : It seems you pullup NTC-s to less than 5V (or aref is higher than 5V). Or there is a measurement error.
Some old things below:
Some open issues to solve
- Tachometer is not always showing proper rpm value, sometimes it falls down to near zero for a very short periods of time. Needs still verification of original tachometer signal with scope.
Note about the time-saving effect of wiki-written documentation
It's notable that this install was carried out before other competing installs (despite that it was done in the cold, while competing installs had a warm garage host), because documentation discipline was appr 60%.
Competing installs have 10 and 40% documentation discipline so they lost, and might struggle for a few more days or weeks.
Even for this install, 3..5 days could have been saved with 90..100% documentation discipline, the firing order alone could have saved 1..2 days.
Airtemp sensor data:
Some values to make verification easier: Note that pullup is 470 Ohm not 2700 Ohm
- -40,395 temp_internalformat=0, adc_read=117 (256/ (470+395) * 395)
- 100,620 temp_internalformat=254, adc_read=146 (256/ (470+620) * 620)
Note that the tables are quite steep. The MAT goes from min to max from position 0x75 .. 0x92.
For the prepared tables, look for "PTC" on EasyTherm
Flying wire adaptor for basic functionality from genboard (v3.3) towards motronic connector (pins Mxx)
- 5x high-Z injectors (INJA..E to M36,M17,M34,M35,M16, INJA = cyl #1 and so on)
- 5x ignition coils (with power output stages) (IGN00..04 to M01, M02, M23, M20, M21, IGN00 = cyl#1 and so on)
- so h=03 01 00 02 04 ... required to match 53124 fire order as requested on InputTrigger/AudiTrigger !!!
- BoostControl solenoid aka WGFV (INJG to M33)
- Idle air controller (INJH to M04)
- Fuelpump relay (P259/5 to M03)
- Trigger signals
- 2x VR (M47 home signal, M49 rpm, M48 GND), home signal has inteverted polarity!
- 1x Hall for camsync (M08), InputTrigger/AudiTrigger setup
- GND and Supply voltages
- 12V supply
- M18 has 12V, M27 switched, to additional relay
- to board itself (EC18/25), from additional relay
- supply for injectors, relays (M37), from additional relay
- 5V to hall, TPS etc (EC36/28 to M12)
- 3x GND5 wires (M21, M24, M32)
- GND wire (M10, connected to engine), connect back to M30, GND for sensors
- 12V supply
- TPS sensor signal (M53)
- CLT (M45), IAT (M44) sensors, for IAT
- Tachometer (I259/7 to M40), 5V signal, divider=01
- Knock sensor (EC18/03 to M11 #1, M29 #2 unconnected)
- WBO2 sensor
- 5x extra wires needed
- original MAF connector is not used with VEMS. There are only 3 signal wires + gnd + supply, so MAF wiring is not usable for WBo2. Anyway, MAF uses 6-pin JPT connector, VAG part 022906233A for housing + 022906102B boot
Hardware changes made to V3.3 board (inside ECM)
- Trigger related
- R182 shorted (instead of 100k in primary trigger, to charge peak capacitor from single pulse) this improves noise immunity
- added 1uF cap in parallel with C40 (longer peak hold time)
- 10k pullup to 5V for crankhome VR signal (~40k seems not to be enough in all cases)
- crankhome VR inverted, not as in original motronic (inverted works with motronic too). Easiest to do this on black 3-pin connector located to firewall, one pin is shielding, 2 for signals.
- C103 replaced by 1nF (instead of original 220nF on board).
- All ign channels changed to logic level (2+6 setup is ok as well)
- MAT pullup (R10) changed to 1k+1k in parallel (500 ohm) in order to work better with stock MAT sensor
- AREF shorted to AVCC (AREF=256)
- Resistor for primary trigger reference pulse 75k -> 33k
now your car is running well? How is the start-up, idle and warm up? How does your car behave in Part and WOT?
Do you managed to get the Knock sensors to Work?
What ignition system are you using? The same as ABY and ADU? Your cylinder head seems like the 3B one.
Can you please post your latest MT file?
see MembersPage/Billman/PlugNPlay page for some comments
i heard that you made a very successfull Boost Control upgrade.
Can you please make a wikipage for it ,like Gabor Racz did it with hi ALS page?
We would like to really see it in a new upcoming release,and to know what variable is for what.
Question for Miska:
See this page: MembersPage/MattiasSandgren/OskarAudiSFour