Overview
Trying to get VEMS to run in a plug and play fashion on a 1997 Seat Cordoba SX, with a 2.0-16V engine (engine code ABF). The current engine hardware:
- 60 trim T3 Garrett with 0.63 AR turbine
- Audi external wastegate
- Stacked headgaskets
- 440cc/min highZ injectors, with 750cc/min lowZ planned for later
- Just over 1 bar boost
- Mapped water injection with aquamist HSV solenoid
Sensors
- Hall-effect type crank sensor on a 60-2 trigger wheel, see MembersPage/BasilDaham/CordobaSX/TriggerSetup
- Bosch coolant temperature sensor
- GM open element air intake temperature sensor
- Two stock Bosch 3-wire knock sensors
Standard actuators
- Single Bosch coil triggered by Bosch ignition module located just under the coil. Original ECU controlled the dwell. Now swapping to waste-spark using VAG coil from 2000 Golf 2.0-8V
- 2-wire 4-ohm Bosch idle control valve, operating at around 140Hz
- Currently 440cc highZ injectors, but hopefully the VEMS will be able to idle the new lowZ 750cc injectors without problems
- RPM signal from ECU to instrument cluster to drive tachometer
Extra actuators
- High current PWM driver for aquamist water injection high speed valve (HSV)
- 2 stage shiftlight using 2 large LED's
- Intake air temperature based output to drive intercooler spray solenoid
- Boost control using Cosworth or Saab boost solenoid
- one EGT using k-type thermocouple in exhaust manifold
- Noritake VFD 4x20 LCD-pin-compatible display to replace the blue LCD ordered from webshop
- One wideband bosch LSU4 sensor
Wiring
Proposed wiring for ABF to VEMS plug and play loom:
Description | ABF ECU pinout | VEMS Econoseal pinout | VEMS channel |
Main grounds | T68/1 | EC36-5,21,32,22 | |
Sensor grounds | T68/33 | EC36-26 | |
Air temp sensor | T68/36 | EC36-2 | |
Coolant sensor | T68/14 | EC36-14 | |
TPS signal | T68/40 | EC36-1 | |
Crank sensor power | T68/68 | EC36-28 (for 5V) or T68/38-EC36-25 (for 12V) | |
Crank sensor signal | T68/67 | EC36-27 | |
Camshaft sensor power | T68/46 | EC36-28 (for 5V) or T68/38-EC36-25 (for 12V) | |
Camshaft sensor signal | T68/44 | EC36-13 | |
Switched 12v power | T68/38 | EC36-25 | |
TPS reference voltage | T68/41 | EC36-29 | |
Ignition coil output 1 | T68/8 | EC36-35 | I259_0 |
Ignition coil output 2 | External wiring | EC36-33 | I259_1 |
Idle control valve | T68/27 | EC36-18 | INJFET_7 |
Injector 1 | T68/24 | EC36-7 | INJFET_0 |
Injector 2 | T68/25 | EC36-19 | INJFET_1 |
Injector 3 | T68/26 | EC36-8 | INJFET_2 |
Injector 4 | T68/2 | EC36-20 | INJFET_3 |
Injector 12V common | External wiring | EC36-23 | |
Fuel pump relay | T68/6 | EC36-15 | P259_5 |
Tachometer signal to cluster | T68/22 | EC36-10 | I259_7 |
Knock sensor 1 signal | T68/34 | EC18-3 | |
Knock sensor 1 ground | T68/32,10 | EC18-2 | |
Knock sensor 2 signal | T68/57 | EC18-3 | |
Knock sensor 2 ground | T68/55,56 | EC18-2 | |
Boost control | T68/31 (Charcoal canister) | EC36-6 | INJFET_6 |
Shift light 1 | External wiring (350mA) | EC36-4 | P259_0 |
Shift light 2 | External wiring (350mA) | EC36-16 | P259_1 |
Coolant fan | External wiring (350mA) | EC36-31 | P259_6 |
ALS kicker solenoid | External wiring (Needs external flyback diode) | EC18-12 | SPECFET_0 |
Water injection HSV solenoid (PWM) | External wiring | EC36-24 | I259_6 |
Intecooler water spray solenoid (on-off) | External wiring (350mA + 5 pole relay for override) | EC36-30 | P259_7 |
Unused outputs:
- SPECFET_1
- WOT actuator
- RPM actuator
- WB heater#2
- INJFET_4
- INJFET_5
- I259_2
- I259_3
- I259_4
- I259_5
- Stepper S259_3, S259_4, S259_5, S259_6
- Idle solenoid P259_4
Input trigger
Proposed Primary trigger settings:
- Edge: Rising
- Type: Multitooth
- Filtering: Disabled
- Advanced filtering: Disabled (NOT SURE WHAT THE FUNCTION OF THIS FILTER IS YET; waiting for EricN's page to update?)
- Special N-1: Disabled
- Fiat Stilo: Disabled
- TDC after trigger: 60
- Number of teeth on wheel: 58
- Trigger tooth: 3
- Next trigger tooth: 30
- Crank min period: 3750 usec
- Angular width of tooth: 2
- Tooth relation Normal: 122 (irrelevant with multitooth advanced filter disabled)
- Tooth relation Missing: 181 (irrelevant with multitooth advanced filter disabled)
- Angular width of missing teeth: 6
- Engine phase: 240
Proposed secondary trigger settings (not very well documented in the manual, but I might not end up using this trigger):
- Active: Enabled?
- Edge: Rising?
- Edge while cranking: single?
- Filtering: disabled?
- Type: coil type?
- Use: Alien advance?
- Rising edge phase: ?
- Falling edge phase: ?
Fueling
Req fuel = 6.49 * (D / N / I) = 6.49 * (1998/4/506) = 6.4ms (42lb injectors)
Req fuel = 6.49 * (D / N / I) = 6.49 * (1998/4/862) = 3.8ms (72lb injectors)
It's recommended to halve this req-fuel, so the max VE entries will be (instead of 100) around 200 (or even up to 255) for better precision. Thanks for this suggestion, hence new req_fuel will be 3.2ms and 1.9ms for the two injector sizes respectively.
Ignition
For single coil setup (coil=>00):
ignchmax=00
h[2]=00 00 00 00 00 00 00 00
For wastespark setup (1+4=>00 and 2+3=>01 paired up):
ignchmax=01
h[2]=01 00 01 00 01 00 01 00
If COP used, then wire up coils to IGBT's as follows (assuming 1-3-4-2 firing order): 1=>00 4=>01 3=>02 2=>03
For COP running in normal COP mode:
ignchmax=03
h[2]=03 01 02 00 03 01 02 00
For COP running in wastespark mode (1+4=>00 and 2+3=>01 paired up):
IGN_DUALOUT=Enabled
ignchmax=01
h[2]=01 00 01 00 01 00 01 00
Problems setting up wideband
- this is an assembled VEMS, it came with wbo2_pump_pw_zero=0x68 and wbo2_nernstdc_target=0x85.
- In order to get the calibration factor i followed MembersPage/PhatBob/UserGuide
- After turning on the heater, it takes more than 2minutes for the LCD to start displaying a reading for O2 that is not ??.??
- The big problem is that the reading fluctuates between O2=6% and O2=16%, and it does it randomly. Increasing the factor (??) from A8 through to AF doesnt change anything and the fluctuation remains the same.
Most common reasons:
- poor ground and power connection
- checked: so I connected them directly to the battery but it made no difference. Can you be more specific about the ECU 1+4 ground connections ? where they meet, etc...
- bad heater or pump PID values;
- http://www.daham.org/bin/ suggests they are OK
- bad wiring ?
- worn or damaged sensor ?
- bad controller ?
- verify
- pump- vs ground
- pump+ in function of pump_pw_zero values (use the 100 ohm resistor between pump+ and nernst, and also 100 Ohm between nernst and pump-)
- leave the 2x100 Ohm resistors on, and check if nernstdc target is correct (mde02, and measure DC voltage between nernst vs pump-)
- measure that the LSU4 heater actually gets powered
- verify
- other: unlikely
Idle valve settings
After finally sorting out the fuel and ignition, I delved into the PID's of idle. I scoped the OEM VW ISV at 139Hz, but ended up using 163HZ on the VEMS (iac_speed=2) instead of iac_speed=3 since the valve sounded better to me at 163Hz.
The VW ISV is a 2-wire one which is slightly open when no power is applied to it. In order for it to close, it must see around 25% duty cycle. The problem is, I don't know how to get VEMS to give 25% to close the ISV, and if i don't do this then there is a constant boost leak from the valve at non-idle conditions. The first value in my reference PWM table is 55% at 71C. Is there a way to close (i.e. apply 25% DC) the VW ISV when it's not needed.
Boost control
Boost control settings...
ALS
- check MembersPage/GaborRacz/NewAlsLaunchAndOthers
- AND [v3.x shop item] for analog inputs available with your product options
Mapped water injection
Looking for the best hardware solution to (PWM) drive the water injection solenoid according to a 3D map, or at least in scaled proportion to the fuel injectors' pulsewidth (i.e. VE map).
The staging code should work for this.
Installation problems
I made two mistakes in the rush to install the VEMS on the vehicle:
First I connected the coil to channel0 as I was following Phatbob's writeup. I got no spark. Turns out channel0 is configured as a logic output. I transferred the coil to channel1, and now i have spark. I'm just wondering if I damaged the channel0 output, and whether I will be able to use it for other purposes in the future.
After getting no fuel out the injectors, I tested them with an LED on the connector. Nothing. CHecked the software settings. They seemed fine. Turns out I made the big error. The bigger problem was forgetting to connect pin 23 to injector +12V common. I know it's a silly mistake. I know it's mentioned 100000 times in the manual. I know. Too late now. I guess this is one of the problems of plug-and-play looms. No excuses though. I connected pin23, tested injectors again and they're still not being actuated so I guess I damaged something.
- What do I need to change now on the Genboard?
- Shipping it back is not the best option. I have access to people who can solder SMD => FETs are not SMD, but TO220 throughole.
- note that first you want to know if anything was damaged at all. If injector PWMing was on (not 100% and 25.5msec), than damage is likely. If injector PWMing was off (100% or 25.5msec) than there is some hope.
- even if you damaged 4, there are 4 spares so it is possible to get it running
- normally these spare are used to drive fuelpump relay, iac solenoid, etc... If no free left, and you use P259 outputs to drive (say fuelpump relay or solenoid or other inductive load), please install a diode (which acts as flyback, to provide extra protection for P259 instead of the weaker protection inside the chip; when you use it for essential functions, reduce risks, especially if spare FETs are blown earlier) across the inductive load
- the stripe-marked cathode connected to the +pin of the inductive load
- anode connected to switched point (-pin of the inductive load).
Testing Injector outputs
5..60W 12V lightbulb is best for testing. Connect as if it was an injector.
See TerminalProgram
http://www.vems.hu/wiki/index.php?page=GenBoard%2FManual%2FDigitalOut
Note that it is essential that h[0] is set up for injector outputs to be actuated (even if used for other outputs)
The standard injgroup h[0] table is:
h[0]=01 02 04 08 10 20 40 80
(that is 1,2,4,8,16,32,64,128 in MegaTune)
With this injgroup (h[0] table):
- mdh80 will turn on channel 0 (A)
- mdh90 turns on channel 1 (B)
- mdha0 turns on channel 2 (C)
- mdhb0 turns on channel 3 (D)
- ...
- mdhf0 turns on channel 7 (H)
When output is turned on (activated), output is pulled towards ground (GND5 to be precise, but you have all GND5 connected to GND anyway).
Measure across the lightbulb, that is between +12V and the tested output. Document what you measure.
- dump config and tables via (Man) mcd, mct
- publish the results via FileArea
- look for ..._channel=.0 because those might trick you to think a given injector output is bad, when in fact only turned off by some misconfigured function (like coolant, or RPM, or TPS based, or iac, or boost or whatever output).
Salvaging the Genboard!
After the initial panic, I did the above tests. Turns out I only damaged INJFET_0 and INJFET_1 (which were hooked up when I forgot pin23 flyback). I have 6 more INJFET's to play with. I hooked them up and the car starts. Good stuff. I dismantled the Genboard to replace the damaged FET's, but it seemed like more trouble than it's worth with all that silicon around the flyback board. R.I.P. INJFET_0 and INJFET_1.
Tachometer
The current rating of I259_0, I259_3, I259_5, and I259_7 (logic outputs inthe 4+4 configuration I ordered) is 10mA. 0/5.5V, with an internal 510 Ohm protecting resistor. Driving a modern tachometer with a 1k pullup should work, but the P259 is best for that anyway.
I tried using P259_0 to drive the tachometer. I initially used a 2.2k pullup to 12V, but there was a noticeable lag between the actual revs and those displayed on the tacho. I then tried a 1k pullup but there was no improvement. Is this a problem with the P259 response?
The P259 response is extremely fast (much faster than needed for the tacho gauge input). Otherwise you would have pin rest at 0 or pin jumping wildly.
The lag is most likely caused by the slow gauge. Maybe some kind of signal preprocessing (without feedback) would be needed, like out=RPM + const*dRPM to kick the pin when it needs to move. Normally this is implemented inside the gauge since the time constant depends on the mechanical properties. Do you have some idea about the delay ?
- Video-record your gauge and MegaTune gauge so both can be seen at the same time.
- Try to find out the delay time constant
- eg tau=400msec if exp(-t/tau) is used
- note if you use log2 or natural ("e-based") ln
- eg tau=400msec if exp(-t/tau) is used
Basil: Previously, the megasquirt would drive the tachometer just fine (using a PN2222A transistor), so it's not likely to be a tachometer issue. I will worry about this later after I get a chance to measure the time delay. But more then likely I will have to live with it as it sounds too complicated.
ALS button input
[webshop text] explains which mcp3208 input you have (of EC18pin6, EC18pin12 and EC18pin16).
Use a 1k .. 22k pullup resistor to 5V (which you don't need if the signal already measures 5V due to internal pullup if you asked your controller that way).
And let the ALS or launch switch / button pull to EC36pin26 GND.
Basil: I checked the webshop page and it seems that EC18pin6 is channel 6 of the ADC-input, EC18pin12 is channel 7, and EC18pin16 is channel 5. Using megatune, there is no way to configure these ADC inputs. When I go to 'Extras' pulldown menu and choose 'EGT/analog input settings', the only thing in the dialogue box is the EGT calibration. So I tried grounding all three EC18 pins to see if they activate the little LED in megatune, but I got nothing. Using a DMM I verified that none of the pins have 5V either. I tried using the shift-cut dialogue box in megatune to test the pins as follows: I chose shift-cut input channel to be 5,6 and 7 in turn, while looking at the shift-cut LED in megatune and here are the results:
channel 5 --> shift-cut LED comes on, and when EC18pin16 is grounded the LED turns off
channel 6 and 7 --> shift-cut LED comes on, but it stays on even when EC18pin6 or EC18pin12 is grounded
I'm guessing channel 5 has internal pullup, but not the others (since they are SPECFET's?)? Shall I hook up ALS to channel 5 and launch control to channel 6? But then how do i configure the software?
Short answer to above problem: Download latest Megatune! It's all there.
OEM idle control valve instead of a throttle kicker for the ALS?
I was tempted to trick the genboard by using the idle valve output instead of the throttle kicker solenoid output in the megatune menu. But I thought I'd check first because it sounds like an output conflict since the same valve would be used for idle control AND as ALS 'throttle kicker'.
Right: don't set both channels to same output, that is a conflict and will not get what you want.
Idle valve is usually a bit small to be useful for this. But it is considered strongly to be default behavior (bump iac.position to maximum when throttle kicker is/would be activated).
Water injection valve
(aquamist HSV), but I can't figure out if I need a free INJFET or something else?
What is the current requirement (resistance) ? The safest bet:
- use a diode (like 1n4007 from rescuekit) across the solenoid (marked cathode connected to the +power; anode connected to solenoid- that is the ECU output)
- use INJFET (injector output)
- don't forget to configure h[0] ("injgroup" or injector sequence) else just setting the output channel will not work. With the h[0] you can also switch more than 1 FETs simultaneously if you need more than 10A (unlikely).
You do NOT need to recompile to make my own firmware.
- just pick the best you like from GenBoard/UnderDevelopment/FirmwareChanges
- and perhaps hexpatch with a chosen alternative temperature table (see EasyTherm) if CLT or MAT is far off.
What rule would you use for water injector ? Simply on/off ?
Don't call water injector as "secondary injector" because that associates with staging.
Do you plan boostcontrol ?
BoostControl has a provision for RPM/TPS based PWM direct output without feedback. Currently implemented with feedback, but sometimes (valve-timing actuation or water injection comes to mind) useful without feedback (which is much simpler).
Staging settings - not applied here
Staging is not suitable for water injector, only for fuel (either gas or alternative fuel like alchohol or LPG)
- req FUEL ratio can be set for the relative size of the staging injector
- output: always the last element of h[0] is used (that can be any injector (FET) output: usually 1 or 2 outputs used, but anything from 0 to 8 injector outputs is possible )
h[2] change in recent firmware !!!'
In the hope of getting better ALS, I tried upgrading to 1.1.18 firmware from my previous 1.0.53 (I lost spark in the migration process) => on GenBoard/UnderDevelopment/FirmwareChanges READ EVERYTHING BETWEEN OLD AND NEW REVISION
- "1.1.x overlapping dwell" section
- tooth_wheel_twidth1=18
- tooth_wheel_twidth2=48
- reset_engphase_after=A0
- at "1.0.69" you see h[2] semantic change for "i259 outputs":
- change to h[2]=10 20 10 20 .. .. .. ..
- this will be automatic with v3gui.exe, in the meantime, do manually
- h[1]= 1E 00 1E 00 since i am using a 60-2 wheel w/o camsync and with wastespark coils
Other than those, it should work.
configs and tables on http://www.daham.org/bin/
ADC input problems
According to the webshop page, since I have no external MAP sensor and no auditrigger configuration, then I should be able to utilise channels 5,6 and 7 of the ADC.
When did you purchase? orderid ?
- order number 955 purchase last November
I tried using them with a 3.3k pullup to 5V. Only channel 5 responded positively (i.e. activates/deactivates ALS). Channel 6 and 7 caused the ALS to stay on permanently, even when the signal was pulled up to 5V through the 3.3k.
Write details, eg which EC18 pins you try, how you measure. Firmware version, and example-config for which you think should work, but it's not.
- I pulled EC18-12 to 5V via a 3.3k pullup and the ALS light on megatune stayed on
- I did the same thing for EC18-6 and got the same result
- I uplled EC18-16 to 5V via a 3.3k pullup and the ALS light turned off. When I grounded EC18-16, the light came back on. Just the way I'd expect things to work.
- I'm using the 1.0.53 complete megatune/firmwire package downloaded last week from the wiki
Does the EGT work (also on mcp3208) ?
- I don't know since I haven't got that far yet! Still working out bugs (see below)
Channel 6 and 7 are NOT SPECFET outputs on your configuration.
No internal modification should be needed to use them as ADC inputs.
Beware that these extra-ADC inputs are very sensitive. don't apply >5V, and avoid electrostatic discharge.
Wastespark coil problems
I had a single coil running off EC36-34 (ignch2) and the car ran fine. Then I switched to wastedpark, adding an additional wire from EC36-33 (ignch1) to the second coilpack.
This is INCONSISTENT with your wiring table (above). How is ignition wired ? Is the firing sequence (cyl) 1,3,4,2 ?
The car now runs on 3 cylinders! Cylinder#4 is not firing at all.
When I swap over to the megasquirt, the car runs perfectly fine, so I know it's not a bad coilpack. I also tried using different pins on the VEMS to drive the coilpacks, but I kept getting the same result (cylinder #4 not firing). I have uploaded my mct and mcd to here: http://www.daham.org/bin/
The only potential issue I saw was the h[2], so I changed that from h[2]=04 02 02 03 04 05 06 07 to h[2]=04 02 00 00 00 00 00 00 but it made no differnce at all (cylinder 4 still not firing).
Both these h[2] are bad. use ignchmax=03 and (assuming ignch1 and ignch2 are used)
- h[2]=01 02 01 02 07 07 07 07
If in doubt with camsync config, for wasted spark you can just disable secondary trigger and run with the 60-2 crankwheel primary trigger only.
2 wire Bosch Idle Stability Valve
The Bosch ISV on the ABF (and many other VW's) tends to be open when no voltage is applied (so that the car is driveable on the OEM ECU if the idle driver fails). This causes problems for tuning and boost leakage when the VEMS assumes that 0%DC is closed. I need to give the valve 25% duty cycle in order to close it. How do I explain to the genboard that the closed ISV position is 25%DC?
- It is a good idea to route the valve's air source from a boosted line. However I'd also need firmware support for such a valve which is probably the same as the ones in BMWs after ~1993.