MembersPage/DanaScott/ConFig

Config.txt\n

# config update 11/16/04 Dana Scott
# 1986 Mustang SVO 4 cyl  2.3L  turbo
# use PIP from distributor as trigger

# Priming pulse at -40 F [100 usec] eg. 0x40 * 100uS = 6400uS
# seems you are aware of the lack of PWMing for priming pulse. In any case, 2msec should be safe.
primep=00
# Priming pulse scaling at 170 F (0x80=half, 0xFF=same as cold) 0xA0 = ~63% primep_temp_scaling=A0

# typically cwh = 0.2 * cwl
# Cranking pulsewidth [x100 usec] at -40F (-40C) eg. 0xE0 * 100uS = 22400uS
cwl=C8
# Cranking pulsewidth [x100 usec] at 170F ( 76.6C) eg. 0x40 * 100uS = 6400uS
cwh=28

# Cranking threshold [x100 rpm] eg. 0x04 * 100rpm = 400rpm
cranking_thres=04

# 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

# 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)
warmup_clt[0]=8D # enrichment @-40.0C
warmup_clt[1]=8D
warmup_clt[2]=8D
warmup_clt[3]=8A
warmup_clt[4]=87
warmup_clt[5]=73
warmup_clt[6]=6F
warmup_clt[7]=6C
warmup_clt[8]=66
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 4 x 368cc * 39psi
# 35lb/hr = 368  42 lb/hr = 440   <-- I have 35's in car, 42's on a shelf
# engine 2300 cc == 140 cid
# req fuel == 10.5 ms change to 100us units -> 105
req_fuel=69

# squirt/spark once per cycle
divider=01

# but different channel every time (cyl-1)
alternate=03

injopen=3E # 0x3E * 16 = 1000 uS [16usec] based

battfac=28 #  0x28 * 16 = 640 uS / Volt [16usec] based

# reviewed injectoropening wiki page, this is my best guess.
# I should make a test rig to measure this. 
injocfuel=1D

# This turns on PWM. Start with 30% (appr. 3..4V)
injpwm=1E
injpwmt=09
injpwm6=1C

# 4 Cylinder, good
rpmk[0]=0B
rpmk[1]=B8

# 0: TPSDOT, 1: MAPDOT acceleration enrichment , mapdot is good for turbo
tpsdot_kpadot_conf=01

# Accel TPSDOT threshold (throttle sensitivity), this specifies the 
# minimum rate of change to enable any acceleration enrichment
tps_thresh=08 # 

# 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=14 

# 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]=14
tpsaq[1]=28
tpsaq[2]=50
tpsaq[3]=6E

# 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. 0x24 * 100 = 3600rpm
decel_fuelcut_thres=24

# Overrun fuelcut: injectors disabled above this [x100 rpm] 
# 32 (0x20) x 100 = 3200rpm when engine.tps <= config.iac_tps_thres (TPS fully released)
overrun_fuelcut=20

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

# Rev limit (hard) [x100 rpm] eg. 0x44 * 100rpm = 6800rpm
rev_limit=44

# 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=60 

# 4 cylinder; mpx4250ap
# bits4,5: nCyl-1 = 3
# bit0: 0=mpx4115ap;1=mpx4250ap
config11=31

config12=30
config13=00

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=BB

# 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 # 

# max adc-count
tps_high=E6 # 

# 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 

# IAC configuration ###########################################################
#
iac_step_seq=d8 # 
# iac conf, precise idle PWM (no stepper)
iac_conf=08 
# 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 
# 0x82 = 1300 rpm
iac_cold_rpm=82 
# 0x64 = 1000 rpm
iac_warm_rpm=64
# for starting 75% (max value) will do -> tune these later
iac_cold_start_pos=BF
# for starting 75% (max value) will do -> tune these later
iac_warm_start_pos=BF
# 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=25 # increased to 25 from 20
iac_ki=17 
iac_kd=A0 
iac_integral_speed=40 
iac_integral_limit_dec=10 
iac_integral_limit_inc=20 
iac_integral_deadband=14 
iac_deadband=0A
# enable assymetric PID behaviour 
iac_pid_conf=01 
iac_overclose_interval=0A 
# data extra (thanks Dave!) - / 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=80

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

# 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

# o2 percentage of 'normal' air: 20.947%, calibrated to 20.95
wbo2_calibration=D0 

wbo2_pump_pw_zero=65

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

wbo2_ri_confidence_scale=80

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

# engine with bore 96mm and stroke 79mm
# f_knock = 900 / (pi*r) = 900 / (pi * 0.5 * 0.096) = 5.968 kHz 
# from datasheet tpic8101.pdf page 10 table#1
# bandpass frequency selection 5.9 kHz is closest to 5.968 kHz
# filter setting = 25 hex (37 dec)

knock1_frequency=25
knock1_gain=FF
knock1_integrator=FF
knock2_frequency=25
knock2_gain=FF
knock2_integrator=FF
knock_conf=FF
knock_sampling_window=FF
knock_default_retard=FF
knock_max_retard=FF
knock_maxrpm=FF
knock_minrpm=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_twidth1=FF
tooth_wheel_twidth2=FF 

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

# 4.5mS dwell
# There are 2 types of Ford TFI modules, early type handles dwell with no ECU help (gray),
#   later type TFI has dwell handled by ECU(black).  I have early type.
# falling output edge (coil fire)

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

# trigger again 12 teeth after the first trigger. This allows the one missing tooth to act like 2.
#another_trigger_tooth=0C

# trigger2, bit0 0:falling/1:rising, bit1 0:toothwheel/1:coil, bit2 0:no filtering/1:filtering
# Binary: 010011 (falling, enabled, no filtering, coil, camsync, single edge)
secondary_trigger=FF

# tooth wheel, active trigger tooth (00:missing tooth),
trigger_tooth=0B

#tooth_wheel=23  # 36-1 .. 35 teeth, 1 space
crank_minper=50  #(1.28 mSec) for std. coil tach signal

# The Ford TFI hall sensor gives an edge at 10 degrees BTDC. 
# TFI auto-fires at 10BTDC if signal from ecu is missing.(makes starting easy)
# Looks like max delay is 255*0.5 (127.5 degrees) , I need 190 degrees
# I will put in the max for now. Will do scope check before real engine run.
# Might have to do a code change to allow the units to be 1 degree instead of 0.5 degree
# We discussed this on irc one day, damned if I can remember the details now!    
ign_tdcdelay=FF 

# TFI module handles dwell , these are leftover values from Dave's config
# Fix this later to use proper dwell values. That way either type of Ford
# TFI module can be used.
# 0x46(70 dec) * 64 usec = 4480 usec when VBatt >= 14V
ign_dwell14=46

# dwell6 = (dwell14 * 1.2 * 64) / 27
# add 199 * 27 usec = 5373 usec to dwell14 when VBatt = 6V. Why 0?
ign_dwell6=0

# crank advance = 10 degrees * 0.25 = 40 = 0x28
ign_crank_advance=28

# Dummy ignition
ign_out=70     # EDIS:0x0? dummy:0x7? disable:0xff  bit0: invertout
# Number of cylinders - 1
ignchmax=03

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=P259_0	# 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
  
########################################


tables.txt\n

# I haven't touched the J/L/N/K/R tables yet
# These are Dave's I believe
# I normally run about 1.2 bar of boost. ( 18PSI )
j[0]=3C 3D 3E 3F 40 41 42 43
j[1]=10 12 13 13 14 15 16 17
j[2]=69 67 7D 7C 82 80 89 93
j[3]=71 72 81 81 8A 84 92 99
j[4]=7A 7D 86 85 90 8A 97 A0
j[5]=81 88 92 98 9A 97 A4 A9
j[6]=84 90 9B A2 A4 A7 B2 B4
j[7]=86 97 A1 A7 AE B4 B8 BD
l[0]=45 38 38 38 38 38 38 38
l[1]=38 38 38 38 38 38 38 38
l[2]=38 38 41 47 4F 4F 4F 4F
l[3]=45 45 4F 59 59 59 59 59
l[4]=6A 6A 6A 6A 6A 6A 6A 6A
l[5]=77 77 77 77 77 77 77 77
l[6]=85 85 85 85 85 85 85 85
l[7]=94 94 94 94 94 94 94 94
numberformat=real
n[0]=05 00 02 07 12 12 12 12
n[1]=05 02 07 17 32 40 38 38
n[2]=09 09 14 22 33 38 38 38
n[3]=13 15 17 24 32 34 34 34
n[4]=13 15 17 23 30 31 31 31
n[5]=13 15 17 22 27 27 27 27
n[6]=09 11 13 16 19 19 19 19
n[7]=02 02 02 02 03 03 03 03
numberformat=10
k[0]=20 50 80 90 100 120 180 250
r[0]=05 10 15 20 25 35 45 99
numberformat=16
# I'm using the 4 injector drivers in the same row as the wbo2 FETs.
h[0]=80 40 20 01 00 00 00 00
# The drive_01 IGBT
h[2]=01 01 01 01 01 01 01 01