MembersPage/DerrickScirocco/ConfigTables (2005-03-23 23:51:03)

Config.txt


\n
################################################################
# Derrick's Config file and Tables file
# This configuration uses a 60-2 teeth wheel as trigger
# Trigger is set to the 11th tooth as TDC
# Car: 87 Volkswagen Scirocco 1.8 16v 
# Mods: t3/t4 turbo, 52lb low impedence injectors, 8:5.1 compression.
# Genboard V 3.2 assembled version
################################################################

# Startup Settings

# Cold Start Priming pulse at -40 F 
primep=0D  #1.3ms
#
# hot Start Priming pulse scaling at 170 F
primep_temp_scaling=A0  #63%

# Cranking Pulse
# typically cwh =~Â 0.2 * cwl
# Cranking pulsewidth at -40F
cwl=1E  #3.0ms
# Cranking pulsewidth at 170F ( 76.6C)
cwh=0A  #1.0ms
# Cranking threshold [x100 rpm] eg. 0x03 * 100rpm = 300rpm
cranking_thres=03
################################################################
#
# After start setting.  These are the setting of fuel enrichment after the car Passes inital startup ie. running on its own over 400 RPM.
# Afterstart warmup enrichment (%added value) 0x50 = 80%
awev=0A
# Afterstart warmup scaling at 170 F (0x80=half, 0xFF=same as cold) 0xA0 = ~63%
awev_temp_scaling=A0
# Afterstart number of engine cycles, NOTE: This is not ignition events anymore
awc=D2

# ==== Warm-up Setting
# warmup_clt_range defines the temperature bins used for interpolation
# the values in warmup_clt_range is degrees Fahrenheit + 40
# C = 5/9 * F - 40
# F = 9/5 * C + 72
warmup_clt_range[0]=00  # -40.0 C
warmup_clt_range[1]=14  # -28.8 C
warmup_clt_range[2]=28  # -17.7 C
warmup_clt_range[3]=3C  #  -6.6 C
warmup_clt_range[4]=50  #   4.4 C
warmup_clt_range[5]=64  #  15.5 C
warmup_clt_range[6]=78  #  26.6 C
warmup_clt_range[7]=8C  #  37.7 C
warmup_clt_range[8]=AA  #  54.4 C
warmup_clt_range[9]=C8  #  71.1 C

#  Warm up enrichment as function of temperature, biased at 100 (0x64)
# enrichment @-40.0C
warmup_clt[0]=A0
warmup_clt[1]=A0
warmup_clt[2]=A0
warmup_clt[3]=A0
warmup_clt[4]=A0
warmup_clt[5]=96
warmup_clt[6]=8C
warmup_clt[7]=87
warmup_clt[8]=7D
warmup_clt[9]=64
# no enrichment (0x64==100 which is *1.0) @71.1C and above

# warmup enrichment can be decreased as a function of rpm.
# set all to 0x64 to disable
warmup_rpm[0]=64 # 100%
warmup_rpm[1]=64
warmup_rpm[2]=64 
warmup_rpm[3]=64
warmup_rpm[4]=64
warmup_rpm[5]=64
warmup_rpm[6]=64
warmup_rpm[7]=64

################################################################
# injectors @ 3.5bar = 52lb/hr = 5.77 g/s = 545cc
# engine 1860 cc == 113.46 cid
# for every injector: 465cc breath; 0.465 L * 1.2kg/m3 = 0.558g air 
# divide by 14.7 (gasoline) : 0.558g / 14.7 = 0.038g fuel 
# divide by injector flowrate:  0.038 g / (5.77 g/s) = 6.6 msec
# doubled VE values and divided req_fuel by two to increase resolution
#
# req fuel is changed to 11.0 mS
req_fuel=6E


# squirt on missing thooth and on tooth 11.
divider=01

# alternate injectors please
alternate=01 #alternate = 01 means alternate between first and second banks

injopen=43 # Need proper description of this

battfac=24 # [16usec] based, (mutiply MS standard value by 6.25 to get [16usec])

# MAP range [2kPa] 0: use A/B lookup table
# 2.5 bar MAP sensor: 8D
# 1.15 bar MAP sensor: (hexa) 39
# 5.1 bar MAP sensor (impressive boost !!): FF (max value)
kpafac=7F
kpaofs=52

# not used
injocfuel=00

# pwm-ing my injectors.  Injectors are Low Impedence.
# setup for 1.0ms to start from will need to be adjusted when I get the car running
injpwm=4C # PWM Current Limit (duty cycle) at 14v 30%
injpwmt=0A # PWM Time Threshold 1.0ms
injpwm6=60 # PWM current limit(duty cycle) at 6v 76%

# 4 Cylinder (12000/4) = 3000 (0x0BB8)
rpmk[0]=0B
rpmk[1]=B8

################################################################
#
#  TPS Enrighment settings
# 0: TPSDOT, 1: MAPDOT acceleration enrichment
tpsdot_kpadot_conf=00

# Accel TPSDOT threshold (throttle sensitivity) 
# minimum rate of change to enable any acceleration enrichment
tps_thresh=05 

# Acceleration duration [0.1 sec] eg. 0x0A * 0.1 = 1 second
tpsasync=0A 

# Acceleration cold multiplication factor, biased at 0x64 eg. 0x64 - bias = 0
acmult=64 

# Cold acceleration added amount (at -40 F degrees) [x100 usec]. eg. 0x14 * 100uS = 2000uS
tpsacold=00 

# Rate of change bins for use with tps_thresh. If 14 =< actual delta(throttle position) 
# < 28 then tpsdotrate[1] is the active bin.
# define the tps-dot bins: d(tps)/[0.1 sec]
tpsdotrate[0]=05
tpsdotrate[1]=14
tpsdotrate[2]=28
tpsdotrate[3]=4D

# TPS acceleration amount (fn TPSDOT) [100 usec]. This is the acceleration enrichment 
# pulsewidth, the active bin is determined by tpsdotrate[].
tpsaq[0]=02
tpsaq[1]=04
tpsaq[2]=05
tpsaq[3]=0D

# Deacceleration fuel cut, 100(0x64) means no fuelcut because of sudden tps-release. 
# This can cause lean condition, misfire, kill-the-cat etc, so take care. 
# 00 would be rough behaviour, other value under 96% (0x60) is dangerous, I'd leave it at 100%:
tpsdq=64

# Decel fuelcut enabled above threshold [x100 rpm] eg. 0x0F * 100 = 1500rmp
decel_fuelcut_thres=0F

# Overrun fuelcut: injectors disabled above this [x100 rpm] 
# 16 (0x10) x 100 = 1600rpm when engine.tps <= config.iac_tps_thres (TPS fully released)
overrun_fuelcut=FF

# Overrun fuelresume, injectors reenabled below this [x100 rpm] 
# eg. 13 (0x0D) x 100 = 1300rpm. Must be lower than overrun_fuelcut.
overrun_fuelresume=FF

# Rev limit (hard) [x100 rpm] eg. 0x4B * 100rpm = 7500rpm
rev_limit=4B 

# Use to avoid enleaning of AFR when idling due to increased intake air temperature. 
# A value of 98 (decimal) will limit the leaning of AFR at idle to 98% at 25C degress.
airden_ignore=62 

config11=31
config12=30
config13=02

mt_unused=00 
# Calibration of the voltage divider (VBatt)
# the calibration is downscale only, if you use the v3.0 voltage divider 
# resitors (100k, 20k -> ADC0 = VBatt / 6 ), a good starting value would be FF, 
# if you have the new v3.1 voltage divider (75k, 22k -> ADC0 = VBatt / 4.409) 
# BB would be a good starting value (BB = FF / ( 6 / 4.409))
batt_cal=FF	
# Fast idle temperature, open solenoid valve under (fastidle - 40 Fahrenheit): 
# if you want 88F, set 88+40 = 128 = 0x80
fastidle=80

# mean barometric pressure
baro=64 

# max allowed difference in barometric pressure, else use baro=0x64 (100 kPa)
dbaro=0C 

# tps, min adc-count
tps_low=42 # 66

# max adc-count
tps_high=F6 # 246

# Temperature when fan will turn on degC eg. 0x55 = 85degC
fan_temp=55 

# fun_temp-fan_hyst=temp when fun will turn off 0x55 - 0x09 = 0x4C (76degC)
fan_hyst=09 

# coolant fan, output selection (digitalout)
fan_channel=FF	  
# IAC configuration ###########################################################

iac_step_seq=d8 # not used by my PWM controlled valve
# iac conf, precise idle PWM (no stepper)
iac_conf=18 # enabled advance control

# iac output on P259 IDL output (inverted, higher value = more air)
iac_sol_channel=INJFETi_4
# max allowed dutycycle is 75%, so max steps = BF
iac_max_steps=BF

# enable overrun fuelcut and iac below this.
# strange internal scale, this is actually (15 / 255) * 100 = 5.9% throttle
iac_tps_thres=0F

# C = 5/9 * F - 40 = 66.1 C
iac_cold_idle_temp=BF

# C = 5/9 * F - 40 = 70.6 C
iac_warm_idle_temp=C7 

# 0x64 = 1000 rpm
iac_cold_rpm=64 

# 0x55 = 850 rpm
iac_warm_rpm=5A

# for starting 75% (max value) will do -> tune these later
iac_cold_start_pos=99

# for starting 75% (max value) will do -> tune these later
iac_warm_start_pos=73

# rpm added to target rpm after starting, for the duration of iac_afterstart_duration
iac_afterstart_rpm=0A 

# iac afterstart rpm for the duration of 32 * 0.1 = 3,2 seconds
iac_afterstart_duration=30

# steps per 160 rpm ??
iac_afterstart_steps=04

iac_kp=0A 
iac_ki=05 
iac_kd=13 
iac_integral_speed=36
iac_integral_limit_dec=40 
iac_integral_limit_inc=40
iac_integral_deadband=0A 
iac_deadband=05

# enable assymetric PID behaviour 
iac_pid_conf=01 
iac_overclose_interval=0A 

iac_ign_advance_change=50
iac_ign_retard_change=50
iac_ign_advance_limit=20
iac_ign_retard_limit=20
iac_ign_threshold=08

# data extra- / interpolated from Peugeot service manual:
#
# In a cold engine, you should see about 56-58%, in a hot engine 
# without load 40-44%, this will rise to 44-50 under load. The minimum
# duty cycle is 25%, the maximum 75%. 
#
iac_ref_pos[0]=99 # -40.0 C # 60 %
iac_ref_pos[1]=99 # -28.8 C # 60 %
iac_ref_pos[2]=99 # -17.7 C # 60 %
iac_ref_pos[3]=8e #  -6.6 C # 56 %
iac_ref_pos[4]=87 #   4.4 C # 53 %
iac_ref_pos[5]=80 #  15.5 C # 50 %
iac_ref_pos[6]=80 #  26.6 C # 50 %
iac_ref_pos[7]=7A #  37.7 C # 48 %
iac_ref_pos[8]=77 #  54.4 C # 47 %
iac_ref_pos[9]=73 #  71.1 C # 45 %

# EGO configuration ###########################################################

ego_conf=07 # 07 variable afr

# Step size (percent) [0.4%] eg. 0x02 * 0.4% = 0.8%
ego_delta=02 

# Time constant (engine cycles) for changing correction factor
ego_lag=15

# Min coolant temperature for ego enabling[F] eg. 0xC2 = 194degF (108degC)
# C = 5/9 * F - 40
# 60 degrees celcius
ego_coolant=94 #C2

# Max TPS position for ego correction
ego_maxtps=FF

# Min RPM for ego enabling [100rpm] eg. 0x0C * 100rpm = 1200rpm
ego_minrpm=0C
# Max percent to lean afr[0.4%] eg. 0x30 * 0.4% = 19.2%
ego_lean_limit=30 

# Max percent to rich afr[0.4%] eg. 0x80 * 0.4% = 51.2%
ego_rich_limit=30

# Max rpm for O2 correction [100rpm] 0x32 * 100rpm = 7500rpm
ego_maxrpm=FF

# Max MAP for O2 correction[kPa] 
ego_maxmap=FF

# Warmup time [sec] eg. 0x3C (60 sec)
ego_warmup=3C

# ego_target = 51 * O2_sensor_voltage
ego_target=19

ego_pid_kp=40

# not used for the wbo2 incredible ego, only for NBO2_PID_EGO_EXPERIMENT
ego_pid_window=FF

# WBO2 ########################################################################

# wbo2 config with softpwm_act; softpmw_act_var is broken!!

wbo2_warmup_ramp=A0
wbo2_warmup_target=FF
wbo2_abs_limit=E4
wbo2_limit_maxt=A0
wbo2_fallback=60
wbo2_retry_t=06
wbo2_edgetime_corr=BA
wbo2_edgetime_min=50

# (2.55mA * 61.9 / 106.2 ) + 2.55 = 4.036299 mA
# 4.036299 * 510 Ohm = 2.058512712 V
# i measured +/- 2.06V -> Good!
# 1% is eaten by the 10k pump+ to pump- resistor
# but does the AE calibration value also match my Rcal of 106.2 ?

# o2 percentage of 'normal' air: 20.947%, calibrated to 20.95
wbo2_calibration=AE # A1 for the ETAS3 sensor with Rcal = 75.3 ohm

wbo2_pump_pw_zero=64

# wbo2, target Ri (pulse amplitude) [5V/8192]
wbo2_ri_target=96 

# OPA amplification, g = 270/75 + 1 = 4.6
# Vadc = g * (5 - Vnernst)
#
# Vnernst DC at sensor wire = 4.45V # Vnernst DC at adc = 4.6 * (5 - 4.45) = 2.53
#
# nernstdc_target = Vadc / g * 256 = 141 = 0x8D

# wbo2, target nernstDC [5V/256] 
wbo2_nernstdc_target=8D 

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 # 2E
wbo2_pump_pid_ki=2E # 1D 
wbo2_pump_pid_kd=08 # 08
wbo2_pump_pid_ilimit=84 # 84 

wbo2_ri_confidence_scale=80

# KNOCK #######################################################################

# engine with bore 83mm and stroke 86mm
# f_knock = 900 / (pi*r) = 900 / (pi * 0.5 * 0.083) = 6.903 kHz 
# from datasheet tpic801.pdf page 10 table#1
# bandpass frequency selection 6.94 kHz is closest to 6.903 kHz
# filter setting = 29 hex (41 dec)

knock1_frequency=29
knock1_gain=FF
knock1_integrator=FF
knock2_frequency=29
knock2_gain=FF
knock2_integrator=FF
knock_conf=00
knock_sampling_window=FF
knock_default_retard=00
knock_max_retard=FF
knock_maxrpm=FF
knock_minrpm=FF
knock_advance_delay=FF
knock_advance_step=FF
knock_noise_scale=FF
knock_retard_delay=FF
knock_retard_step=FF
knock_threshold=FF

# VE LEARN ####################################################################

ve_learn_coolant=FF
ve_learn_max_power=FF
ve_learn_rpm_scale=FF
ve_learn_kpa_scale=FF
ve_learn_ego_scale=FF
ve_learn_min_weight=FF
ve_learn_speed=FF
ve_learn_limit=FF
ve_learn_conf=00

# lcd settings ################################################################

lcd_c0=FE
lcd_delay=FF
lcd_backlight=FF
lcd_offs[0]=FF
lcd_offs[1]=FF
lcd_offs[2]=FF
lcd_offs[3]=FF
lcd_default_view=00

# CAMSYNC #####################################################################

cam_sync_f_edge_phase=FF
cam_sync_r_edge_phase=FF
reset_engphase_after=FF

# tooth wheel, angular width of tooth
# for a 60 tooth wheel this is 360 / 60 = 6 degrees
tooth_wheel_twidth1=6

# tooth wheel, angular width of missing tooth
# 60 - 2 wheel, 3 times tooth_wheel_twidth1 = 18 degrees
tooth_wheel_twidth2=12

## trigger and ignout setup ###################################################

# trigger1, bit0 0:falling/1:rising, bit1 0:toothwheel/1:coil, bit2 0:no filtering/1:filtering
primary_trigger=01

# trigger2, bit0 0:falling/1:rising, bit1 0:toothwheel/1:coil, bit2 0:no filtering/1:filtering
secondary_trigger=FF

# tooth wheel, active trigger tooth (00:missing tooth), switched to another tooth, thooth 8
# after the missing tooth, ign_tdcdelay = 62 now
# so that trigger tooth is ~60 degrees BTDC
trigger_tooth=01

# trigger again on tooth 30 (dec) further than trigger_tooth
another_trigger_tooth=1E

tooth_wheel=3A  # 58 teeth between the missing tooth
crank_minper=50  # for std. coil tach signal

# measured 115 degrees from first tooth after missing tooth to cyl#1 tdc
ign_tdcdelay=78 # 62 degrees = 120 (from missing tooth) - 48 (trigger tooth * 6) 

# good range for COP coils: 1.5-2.2mS.
# 31 * 64 usec = 3.5 mS usec when VBatt >= 14V
ign_dwell14=36 

# dwell6 = (dwell14 * 1.2 * 64) / 27
# add 88 * 27 usec = 2376 usec to dwell14 when VBatt = 6V 
ign_dwell6=9B
# crank advance = 20 degrees
ign_crank_advance=50

ign_out=70     # EDIS:0x0? dummy: 0x7? disable:0xff bit0: invertout
ignchmax=01

engine_off_delay=08  # 2 seconds
# seconds [*0.262 sec] before fuelpump is turned off at poweron (without start of engine)
pump_on_mintime=0F # 4 seconds

# output selection for fuelpump (digitalout)
fuelpump_channel=P259_5

## ouput channels #############################################################

act_wot_rpm=FF		# WOT switch RPM threshold (FF=disable)
act_wot_channel=FF	# WOT switch output channel selector (P259_0)
act_rpm_rpm=FF		# RPM switch RPM threshold (FF=disable)
act_rpm_channel=FF	# RPM switch output channel selector  

misc1out_channel=FF
misc1out_maxmap=FF
misc1out_maxrpm=FF
misc1out_maxtps=FF
misc1out_minmap=FF
misc1out_minrpm=FF
misc1out_mintps=FF
misc2out_channel=FF
misc2out_maxmap=FF
misc2out_maxrpm=FF
misc2out_maxtps=FF
misc2out_minmap=FF
misc2out_minrpm=FF
misc2out_mintps=FF

## EXPERIMENTAL FEATURES ##################################################################
# injector staging
inj_stage2_rate=FF
inj_stage2_start_tps=FF
inj_stage2_start_map=FF

# ALS
als_lowrpm=FF
als_maxtps=FF
als_ignretard=FF
als_rich=FF

# EGT
egt1_cal=40		# EGT calibration multiplier
egt1_offs=00	# EGT offset (signed)
  
#############################################################################################