MembersPage/DuncanThomson/Config (2006-01-23 12:25:27)

config.txt

Using MembersPage/MiskaPeippo/AudiSSix as a starting point. My engine is an Audi 2226cc n/a KV engine, Miska's should be a decent starting point, right number of cylinders if nothing else...!


  1. Last Updated 23 Jan 2006
  2. Audi 90Q, n/a 5 cylinder 2.2L (KV), coil

ignition

  1. 60-2 tooth triggerwheel + CAM sync
  2. target board v3.2
  3. HiZ injectors: INJA .. INJE
  4. Wideband Heater: WB1
  5. IGNition Drivers: DR_00..DR_04 (note: all ign

channels are logic level)

  1. PWM IAC connected to INJH
  1. ===== Priming Pulse
  2. 0.3s (0x03* 100us)
primep=03
  1. --- Hot start Priming pulse scaling at 170F

(80= half FF = same as cold)

primep_temp_scaling=50

  1. ===== Cranking Pulse Definition
  2. typically cwh =~ 0.2 * cwl
cwl=5A # Cranking pulsewidth [100 usec] at -40

F (9.0ms)

cwh=19 # Cranking pulsewidth [100 usec] at 170

F (2.5ms)

  1. Cranking threshold [100 rpm]
cranking_thres=04
  1. Initial Start and Warmup
  2. Afterstart warmup enrichment (percent, added

value)

awev=0D

  1. Afterstart warmup enrichment scaling at 170F

(80=half, FF=same as cold)

awev_temp_scaling=80

  1. Afterstart number of engine cycles
awc=96

warmup_clt_range[0]=00

warmup_clt_range[1]=14

warmup_clt_range[2]=28

warmup_clt_range[3]=3C

warmup_clt_range[4]=50

warmup_clt_range[5]=64

warmup_clt_range[6]=78

warmup_clt_range[7]=8C

warmup_clt_range[8]=AA

warmup_clt_range[9]=C8

warmup_clt[0]=FF

warmup_clt[1]=FF

warmup_clt[2]=FA

warmup_clt[3]=F5

warmup_clt[4]=F0

warmup_clt[5]=EB

warmup_clt[6]=E5

warmup_clt[7]=C3

warmup_clt[8]=82

warmup_clt[9]=64

  1. Warmup enrichment scaler at highest rpm bin:

FF=rpm independent

  1. 0x64 = 100%
warmup_rpm_scale=64
  1. Fuel constant (req_fuel) 8.0ms [100ms]
req_fuel=50
  1. ===== Divider ============================
  2. COMMENT: Better notes here required
  3. For a 4cyl you want divider * (alternate +

1) = 4

  1. divider * (alternate+1) should be 4 for a

4 cyl

  1. divider=02 and alternate=01 for 2 banks
  2. divider=01 and alternate=03 for 4 injector

banks

divider=01

  1. ===== Alternate Injector bank setup ======
  2. Alternate injector drivers Works with h[0]
  3. alternate = 00 means use only first (batch

fire or TBI)

  1. alternate = 01 means alternate between first

and second

  1. alternate = 03 to use indexes 3,2,1,0
  2. alternate = 07 to use indexes

7,6,5,4,3,2,1,0

  1. add 0x10 (bit4=1) to fire all at cranking

simultaneously at cranking

  1. so this is alternate=03, but bit4=1 enables

squirting both banks at cranking

alternate=14

  1. Injector opening time [16usec], 10*16 = 160us
injopen=0A
  1. injector opening effective rampup time [24

usec], 1B = 27*24=648us

injocfuel=1B

  1. injector rampup slope battery dependence (FF)
injrampup_battfac=FF
  1. Injector PWM duty cycle (when current

limiting is active)

injpwm=FF

  1. Injector PWM time at which to activate pwm

[100 usec]

injpwmt=FF

  1. added Injector PWM duty cycle during low

battery voltage (6V)

injpwm6=FF

  1. Battery gamma factor +- 16 [*16 usec]

depending on VBATT

battfac=22

  1. ===== Map Sensor ===========================
  2. standard MPX4250AP 250kpa sensor : 0x7F/0x80
  3. MPXH6400AP 400kpa sensor: 0xC8 / 0x80
  4. MAP range [2kPa] 0: use A/B lookup table
kpafac=C8

kpaoffs=80

  1. Constant to calculate RPM:
  2. 12000/5 = 2400 / 0x960
rpmk[0]=09

rpmk[1]=60

  1. ====== TPS information used during engine

running

  1. 0: TPSDOT, 1: MAPDOT acceleration enrichment
tpsdot_kpadot_conf=00
  1. --- TPS dot bins
  2. Rate of change bins for use with tps_thresh.
  3. If 14 =< actual delta(throttle position) < 28

then tpsdotrate[1]

  1. is the active bin.
tpsdotrate[0]=02

tpsdotrate[1]=10

tpsdotrate[2]=19

tpsdotrate[3]=23

  1. --- TPS accelerator enrichement: set to 00

for inital VE tuning

  1. TPS acceleration amount (fn TPSDOT) [100

usec]. This is the acceleration

  1. enrichment pulsewidth, the active bin is

determined by tpsdotrate[].

tpsaq[0]=01

tpsaq[1]=02

tpsaq[2]=03

tpsaq[3]=05

  1. Accel TPSDOT threshold (throttle

sensitivity), this specifies

  1. the minimum rate of change to enable any

acceleration enrichment

tps_thresh=05

  1. Acceleration duration [0.1 sec] eg. 0x0A *

0.1 = 1 second

tpsasync=01

  1. Acceleration cold multiplication factor,

biased at 0x64 eg. 0x64-bias = 0

acmult=64

  1. Cold acceleration added amount (at -40 F

degrees) [x100 usec].

  1. eg. 0x14 * 100uS = 2000uS
tpsacold=02
  1. Deacceleration fuel cut, 100(0x64) means no

fuelcut because of sudden

  1. tps-release. This can cause lean condition,

misfire, kill-the-cat etc,

  1. so take care.
  2. 00 would be rough behaviour, other value

under 96% (0x60) is dangerous,

  1. I'd leave it at 100%
tpsdq=64

decel_fuelcut_thres=0F

  1. --- Overrun fuelcut:
  2. Injectors disabled above this [x100 rpm] eg.

16(0x10) x 100 = 1600rpm

  1. when engine.tps <= config.iac_tps_thres (TPS

fully released).

  1. Care should be taken here with any automatic

transmission car. There

  1. should be at least 400RPM between

overrun_fuelcut and overrun_fuelresume

overrun_fuelcut=11

  1. --- Overrun fuelresume
  2. Injectors reenabled below this [x100 rpm] eg.

15 (0x0F) x 100 = 1500rpm.

  1. Must be lower than overrun_fuelcut.
overrun_fuelresume=10
  1. --- Rev limiter
  2. Rev limit (hard) [x100 rpm] eg. 0x46 * 100rpm

= 7000rpm

rev_limit=42

  1. Use to avoid enleaning of AFR when idling due

to increased

  1. intake air temperature. A value of 98

(decimal) will limit

  1. the leaning of AFR at idle to 98% at 25C

degress.

  1. 0==disable
airden_ignore=62
  1. These useful descriptions are left over from

Megasquirt

  1. config11
  2. bit 0 0:mpx4115ap, 1:mpx4250ap
  3. bit 2 0:4-stroke, 1:2-stroke
  4. bit 3 0:port injection, 1:throttle body
  5. bit 7-4 defines no of cylinders
config11=41
  1. config12
  2. bit 1-0 coolant sensor type
  3. bit 3-2 mat sensor type
  4. bit 7-4 number of injectors
config12=40
  1. bit 0 ODDFIRE 0:normal,

1:odd-fire

  1. bit 1 O2_WB_SENSOR 0:narrowband,

1:diy-wb

  1. bit 2 CONTROL_STRATEGY 0:speed-density,

1:alpha-N

  1. bit 3 BARO_CORRECTION 0:off, 1:on
  2. bit 7-4 unsused
config13=0A
  1. Battery Calibration for starting and dwell
  2. Calibration of the voltage divider (VBatt)
  3. the calibration is downscale only, if you use

the v3.0 voltage divider

  1. resitors (100k, 20k -> ADC0 = VBatt / 6 ), a

good starting value would be FF,

  1. if you have the new v3.1 voltage divider

(75k, 22k -> ADC0 = VBatt / 4.409)

  1. BB would be a good starting value (BB = FF /

( 6 / 4.409))

batt_cal=AA

  1. Fastidle valve off above this Temp[..F-40]
fastidle=11
  1. ===== Mean Barometric Pressure
baro=64
  1. ===== max allowed difference in barometric

pressure

  1. else use baro=0x64 (100 kPa)
dbaro=08
  1. ===== TPS low and high settings from

installation

tps_low=0C

tps_high=E6

  1. coolant fan, start temperature
fan_temp=EA
  1. hysteresis
fan_hyst=05

fan_channel=DISABLED_F

iac_step_seq=D8

iac_conf=08

iac_max_steps=EE

iac_tps_thres=02

iac_cold_idle_temp=A2

iac_warm_idle_temp=A4

iac_cold_rpm=78

iac_warm_rpm=55

iac_cold_start_pos=6B

iac_warm_start_pos=57

iac_afterstart_rpm=14

iac_afterstart_duration=50

iac_afterstart_steps=04

iac_kp=20

iac_ki=22

iac_kd=14

iac_integral_speed=DC

iac_integral_limit_dec=03

iac_integral_limit_inc=E1

iac_integral_deadband=0A

iac_deadband=05

iac_pid_conf=01

iac_overclose_interval=B8

iac_ref_pos[0]=6B

iac_ref_pos[1]=69

iac_ref_pos[2]=66

iac_ref_pos[3]=63

iac_ref_pos[4]=61

iac_ref_pos[5]=5E

iac_ref_pos[6]=5C

iac_ref_pos[7]=59

iac_ref_pos[8]=57

iac_ref_pos[9]=54

  1. Idle air controller output channel
iac_sol_channel=INJFET_7

iac_ign_advance_change=10

iac_ign_retard_change=20

iac_ign_advance_limit=00

iac_ign_retard_limit=00

iac_ign_threshold=10

ego_conf=26

ego_lag=03

ego_coolant=84

ego_maxtps=FF

ego_maxmap=FF

ego_minrpm=06

ego_maxrpm=FF

ego_warmup=01

ego_lean_limit=0F

ego_rich_limit=14

ego_pid_kp=40

mt_unused=FF

ego_delta=01

ego_target=19

ego_pid_window=01

wbo2_warmup_ramp=A0

wbo2_warmup_target=FF

wbo2_abs_limit=E0

wbo2_limit_maxt=F0

wbo2_fallback=70

wbo2_retry_t=06

wbo2_edgetime_corr=BA

wbo2_edgetime_min=50

wbo2_ri_target=A5

wbo2_nernstdc_target=86

wbo2_pump_pw_zero=66

wbo2_calibration=B2

wbo2_heater_pid_kp=46

wbo2_heater_pid_ki=10

wbo2_heater_pid_kd=1A

wbo2_heater_pid_ilimit=80

wbo2_pump_pid_kp=40

wbo2_pump_pid_ki=2C

wbo2_pump_pid_kd=08

wbo2_pump_pid_ilimit=84

wbo2_ri_confidence_scale=80

knock_conf=01

knock_sampling_window=F2

knock1_frequency=29

knock1_gain=0E

knock1_integrator=14

knock2_frequency=29

knock2_gain=00

knock2_integrator=00

knock_threshold=05

knock_noise_scale=D8

knock_max_retard=18

knock_default_retard=04

knock_retard_step=04

knock_retard_delay=30

knock_advance_step=01

knock_advance_delay=50

knock_minrpm=0A

knock_maxrpm=42

ve_learn_coolant=C9

ve_learn_max_power=FF

ve_learn_rpm_scale=28

ve_learn_kpa_scale=28

ve_learn_ego_scale=50

ve_learn_min_weight=30

ve_learn_speed=36

ve_learn_limit=FF

ve_learn_conf=00

lcd_c0=FE

lcd_delay=42

lcd_backlight=FF

lcd_offs[0]=FF

lcd_offs[1]=FF

lcd_offs[2]=FF

lcd_offs[3]=FF

lcd_default_view=00

  1. trigger1:
  2. bit0 0:falling/1:rising
  3. bit1 0:toothwheel/1:coil
  4. bit2 0:no filtering/1:filtering
  5. bit3:advanced multitooth
  6. bit4:multitooth N-1
  7. bit5:FiatStilo
  8. coil-type, rising edge, but filtering

disabled (bit2=0)

  1. very important, that coiltype chosen, and

primary trigger filter MUST be disabled

  1. for auditrigger
primary_trigger=FB
  1. trigger2
  2. bit0 0:falling/1:rising
  3. bit1 0:enable/1:disable
  4. bit2 1:filtering
  5. bit3 0:toothwheel/1:coil
  6. bit4 0:alien advance/1:cam sync
  7. bit5 1:both edge at cranking
  8. bit6:fiatstilo
  9. enable sectrig, rising edge, camsync
  10. no both-edge at cranking, coil-type sectrig
  11. 09 in emil's config
secondary_trigger=1D
  1. tooth_wheel: Used for multi-tooth wheels

(total # of teeth)

  1. 135 in dec
tooth_wheel=87
  1. Tooth that triggers event
  2. tooth "27". For auditrigger, tooth_cnt counts

from (another_trigger_tooth-1) down to 0.

trigger_tooth=1B

  1. 54 in dec
another_trigger_tooth=36
  1. Minimum period for crank triggers
crank_minper=30
  1. tooth wheel, angular width of normal and

missing tooth

  1. note that values are not in degress but

engphase between 0..255

tooth_wheel_twidth1=01

tooth_wheel_twidth2=FF

  1. rising edge, engine phase at next primary

trigger

  1. 3 in fero's config
cam_sync_r_edge_phase=03
  1. falling edge, engine phase at next primary

trigger

  1. 2 in fero's config
cam_sync_f_edge_phase=03
  1. engphase, when to reset
reset_engphase_after=05
  1. max allowed +/- missing tooth deviance [1/8]
toothrel_normal=76
  1. max allowed +/- normal tooth deviance [1/16]
toothrel_missing=00
  1. Ingition stuff
  2. IGN TDC Delay is in 0.5 crankdegree

resolution.

  1. The edge occurs at 60deg Before TDC so 60 *2

= 120 ==> 0x78

ign_tdcdelay=78

  1. Ignition dwell [64 usec]
  2. good range for COP coils: 1.5-2.2mS.
  3. Measured 4.5ms with scope
  4. 70 * 64 usec = 4.48 mS when VBatt >= 14V
ign_dwell14=46
  1. Added ignition dwell @6V
  2. 93 * 27 usec = 2.5 mS usec added when
ign_dwell6=5D
  1. ignition advance at cranking (15 deg) [0.25

crankdeg]

ign_crank_advance=20

  1. developer bit-definition of ign_out:
  2. 7:disable
  3. 6:EDIS/dummy
  4. 5:after/before
  5. 4:ref_to_trigger/ref_to_spark
  6. 3:multispark
  7. bit0: invertout
  8. EDIS bits will be 0000...?
  9. dummy-ign bits are:0111...?
  10. disable ign: 1111....
  11. EDIS:0x0? dummy: 0x7? disable:0xff
ign_out=70
  1. h[2] maxindex for ignition channel lookup
  2. 04 for 5cyl
ignchmax=04
  1. Fuel Pump Control
  2. turn off fuelpump after inactivity time

[262msec]

engine_off_delay=06

  1. minimum time to leave fuelpump on at startup

[262msec]

  1. (without start of engine)
pump_on_mintime=06
  1. fuelpump_channel
fuelpump_channel=P259_5
  1. second stage of injectors
inj_stage2_rate=FF

inj_stage2_start_tps=FF

inj_stage2_start_map=FF

  1. Anti-lag system
als_deact_egt=66

als_retard=CC

als_deact_time=AA

als_deact_rpm=24

als_rev_limit=24

  1. ============== Misc 1 output

=================

misc1out_minrpm=07

misc1out_maxrpm=FF

misc1out_mintps=00

misc1out_maxtps=FF

misc1out_minmap=70

misc1out_maxmap=9E

misc1out_channel=DISABLED_F

  1. ============== Misc 2 output

=================

misc2out_minrpm=FF

misc2out_maxrpm=FF

misc2out_mintps=FF

misc2out_maxtps=FF

misc2out_minmap=FF

misc2out_maxmap=FF

misc2out_channel=DISABLED_F

  1. WOT output
act_wot_rpm=FF

act_wot_channel=DISABLED_F

  1. RPM output
act_rpm_rpm=FF

act_rpm_channel=DISABLED_F

  1. Exhaust Gas Temperature
  2. EGT calibration multiplier
egt1_cal=4A
  1. EGT offset (signed)
egt1_offs=00
  1. Boost Controller
  2. bit7:4 PWM period [8msec]
  3. bit0 0:boosttarget,1:MAPtarget
  4. 00=disabled
boost_conf=69
  1. boostcontrol target offset applied after

b[RPM]*t[TPS]

boost_targetoffs=00

  1. actuator OFF below this pressure
boost_minpressure=41

boost_pid_kp=2D

boost_pid_ki=1B

boost_pid_kd=FA

boost_pid_ilimit=FF

  1. Boost relay connected to INJ_G
boost_channel=INJFET_6
  1. Water pump Controller
water_pump_temp=FF

water_pump_hyst=7F

water_pump_channel=DISABLED_F

  1. AlphaN - SpeedDensity hybrid settings
  2. speed density across the whole RPM range:
  3. hybrid_rpm_a=00
  4. hybrid_rpm_m=00
  5. config13, bit2=0 (MAP scaling applied)
  6. Alpha-N across the whole RPM range:
  7. hybrid_rpm_a=ff
  8. hybrid_rpm_m=ff
  9. config13, bit2=1 (without MAP scaling)
  10. Alpha-N below 3200 RPM, Speed-density above

4800 RPM and hybrid between:

  1. hybrid_rpm_a=20 (=32 for 3200 RPM)
  2. hybrid_rpm_m=30 (=48 for 4800 RPM)
  3. config13, bit2=0 (MAP scaling applied.
  4. Note: can be 1 to go without MAP scaling,

but than j table will be much more steeper)

hybrid_rpm_a=00

hybrid_rpm_m=00

  1. fuelcut below this MAP (00:disable; 10

recommended)

fuelcut_min_kpa=01

  1. cut the fuel if the engine kpa exceeds this

value 0xFF=disable

fuelcut_max_kpa=AF

  1. Tachometer output, 5V signal
tach_channel=I259_7

tach_divider=01

  1. bit4:shiftcut fuel, bit1:shiftcut spark

bit0:revcut spark

shiftcut_conf=00

  1. shiftcut mcp3208 channel, disable:FF
shiftcut_channel=DISABLED_F
  1. igncut time after inputpulse [4 msec]
shiftcut_time=7F