MembersPage/BasilDaham/CordobaSX

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:


Sensors


Standard actuators

Extra actuators


Wiring

Proposed wiring for ABF to VEMS plug and play loom:

DescriptionABF ECU pinoutVEMS Econoseal pinoutVEMS channel
Main groundsT68/1EC36-5,21,32,22
Sensor groundsT68/33EC36-26
Air temp sensorT68/36EC36-2
Coolant sensorT68/14EC36-14
TPS signalT68/40EC36-1
Crank sensor powerT68/68EC36-28 (for 5V) or T68/38-EC36-25 (for 12V)
Crank sensor signalT68/67EC36-27
Camshaft sensor powerT68/46EC36-28 (for 5V) or T68/38-EC36-25 (for 12V)
Camshaft sensor signalT68/44EC36-13
Switched 12v powerT68/38EC36-25
TPS reference voltageT68/41EC36-29
Ignition coil output 1T68/8EC36-35I259_0
Ignition coil output 2External wiringEC36-33I259_1
Idle control valveT68/27EC36-18INJFET_7
Injector 1T68/24EC36-7INJFET_0
Injector 2T68/25EC36-19INJFET_1
Injector 3T68/26EC36-8INJFET_2
Injector 4T68/2EC36-20INJFET_3
Injector 12V commonExternal wiringEC36-23
Fuel pump relayT68/6EC36-15P259_5
Tachometer signal to clusterT68/22EC36-10I259_7
Knock sensor 1 signalT68/34EC18-3
Knock sensor 1 groundT68/32,10EC18-2
Knock sensor 2 signalT68/57EC18-3
Knock sensor 2 groundT68/55,56EC18-2
Boost controlT68/31 (Charcoal canister)EC36-6INJFET_6
Shift light 1External wiring (350mA)EC36-4P259_0
Shift light 2External wiring (350mA)EC36-16P259_1
Coolant fanExternal wiring (350mA)EC36-31P259_6
ALS kicker solenoidExternal wiring (Needs external flyback diode)EC18-12SPECFET_0
Water injection HSV solenoid (PWM)External wiringEC36-24I259_6
Intecooler water spray solenoid (on-off)External wiring (350mA + 5 pole relay for override)EC36-30P259_7

Unused outputs:


Input trigger

Proposed Primary trigger settings:

Proposed secondary trigger settings (not very well documented in the manual, but I might not end up using this trigger):


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

Most common reasons:


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

on how to wire up a switch to turn this function on, along with launch control.

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.


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):

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.


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 ?

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:

You do NOT need to recompile to make my own firmware.

  • 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)


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

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 ?

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.

Does the EGT work (also on mcp3208) ?

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)

Where the last 4 do not matter, the first four mean the ignch that are wired (maybe 02 01 02 01 are good, depending on missing tooth position relative to 1,4 and 2,3 TDC)

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?