# config.txt 22/10/2004 - 10:15 Raymond Peters info@dutchpowertrading.nl # this configuration uses a 60-2 teeth wheel as trigger # modified 26/12/2004 by johan eriksson for opel calibra turbo! c20xe / c20let # Priming pulse at -40 F [100 usec] eg. 0x40 * 100uS = 6400uS 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=40 # Cranking threshold [x100 rpm] eg. 0x03 * 100rpm = 300rpm cranking_thres=03 # 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]=B0 warmup_clt[1]=AE warmup_clt[2]=AC warmup_clt[3]=AA warmup_clt[4]=A0 warmup_clt[5]=96 warmup_clt[6]=8C warmup_clt[7]=82 warmup_clt[8]=73 warmup_clt[9]=64 # 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 req_fuel=5b # squirt on missing thooth and on tooth 30. divider=01 # alternate injectors please, use 3 2 1 0 alternate=03 # I measured the injector opening time with scope, by adding a 0.1 ohm current # measuring resistor in between fet and injector, then measuring the voltage # over resistor with the scope. I turned out to be ~ 1.36 mS injopen=55 # 0x55 * 16 = 1360 uS [16usec] based battfac=00 # changed to 00 from 28 -> 0x28 * 16 = 640 uS / Volt [16usec] based # not used injocfuel=00 # no pwm-ing please injpwm=66 injpwmt=FF injpwm6=FF # 4 Cylinder (12000/4) = 3000 (0x0BB8) rpmk[0]=0B rpmk[1]=B8 # 0: TPSDOT, 1: MAPDOT acceleration enrichment tpsdot_kpadot_conf=00 # Accel TPSDOT threshold (throttle sensitivity), this specifies the # minimum rate of change to enable any acceleration enrichment tps_thresh=CB # changed from 04 to CC, get it to idle first, break it later # 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]=0A tpsaq[1]=14 tpsaq[2]=28 tpsaq[3]=32 # 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=00 // 02 for wbo2 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=BC # 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=8B # max adc-count tps_high=FE # 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 # not used by my PWM controlled valve # iac conf, precise idle PWM (no stepper) iac_conf=08 # iac output on P259 IDL output (inverted, higher value = more air) iac_sol_channel=INJFET_5 # 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=55 # for starting 75% (max value) will do -> tune these later iac_cold_start_pos=D0 # for starting 75% (max value) will do -> tune these later iac_warm_start_pos=D0 # 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=20 iac_ki=20 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- / 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]=CA iac_ref_pos[1]=C9 iac_ref_pos[2]=C9 iac_ref_pos[3]=C8 iac_ref_pos[4]=C8 iac_ref_pos[5]=C7 iac_ref_pos[6]=C6 iac_ref_pos[7]=C6 iac_ref_pos[8]=C5 iac_ref_pos[9]=C5 # EGO configuration ########################################################### #ego_conf=07 # 07 variable afr - for wbo2 ego_conf=20 # 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 -94 ego_coolant=40 #C2 # Max TPS position for ego correction ego_maxtps=FF # Min RPM for ego enabling [100rpm] eg. 0x0C * 100rpm = 1200rpm ego_minrpm=04 #always correct for ego # 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=FF # Max MAP for O2 correction[kPa] ego_maxmap=FF # Warmup time [sec] eg. 0x3C (60 sec) ego_warmup=10 # 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=9A 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 86mm and stroke 86mm # f_knock = 900 / (pi*r) = 900 / (pi * 0.5 * 0.086) = 6.663 kHz # from datasheet tpic801.pdf page 10 table#1 # bandpass frequency selection 6.64 kHz is closest to 6.663 kHz # filter setting = 28 hex (40 dec) ##### Knock setup #####, modified from http://caffrey.dk/megasquirt/files/config.txt #knock1_frequency=29 #for michaelKristensen's 84.45mm bore engine. knock1_frequency=28 #My c20xe is 86 knock1_gain=14 #How to calculate these?????? knock1_integrator=11 #How to calculate these?????? knock2_frequency=00 knock2_gain=00 knock2_integrator=00 knock_conf=01 knock_sampling_window=e2 knock_threshold=50 knock_noise_scale=10 knock_max_retard=78 # max retard 30deg knock_default_retard=10 knock_retard_step=04 knock_retard_delay=04 # 4*16ms = 64ms knock_advance_step=02 knock_advance_delay=20 # 32*16ms =(approx) 500ms knock_minrpm=05 knock_maxrpm=ff # VE LEARN #################################################################### ve_learn_coolant=46 ve_learn_max_power=FF ve_learn_rpm_scale=30 ve_learn_kpa_scale=30 ve_learn_ego_scale=50 ve_learn_min_weight=0A ve_learn_speed=FF ve_learn_limit=FF ve_learn_conf=01 # 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 #tooth_wheel_width1=24 #360/60 * 4 #tooth_wheel_width2=54 #3*360/60 * 4 tooth_wheel_twidth1=06 #360/60 tooth_wheel_twidth2=12 #3*360/60 ## 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=08 # 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 ign_tdcdelay=9A # old value: 31 * 64 usec = 3136 usec when VBatt >= 14V # i want 7000uS -> 110(0x6e) * 64 usec = 7000 usec when VBatt >= 14V ign_dwell14=6e # dwell6 = (dwell14 * 1.2 * 64) / 27 # add 8B * 27 usec = 3763 usec to dwell14 when VBatt = 6V ign_dwell6=8B # crank advance = 20 degrees ign_crank_advance=50 ign_out=70 # EDIS:0x0? dummy: 0x7? disable:0xff bit0: invertout ignchmax=03 # 01 also works, but 03 would improve knock-function engine_off_delay=08 # 2 seconds # seconds [*0.262 sec] before fuelpump is turned off at poweron (without start of engine) pump_on_mintime=08 # 2 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 egt1_offs=00 fan_channel=FF kpafac=7f kpaofs=52 # BOOST not implemented on current fw boost_channel=INJFET_4 boost_conf=1 boost_minpressure=69 # 105kpa boost_pid_ilimit=7F boost_pid_kd=09 boost_pid_ki=7F boost_pid_kp=09 boost_targetoffs=00 reset_engphase_after=FF #dont know #engphase_sync=0 #dont know #engphase_twidth1=1 #dont know #engphase_twidth2=1 #dont know iac_ign_advance_change=10 iac_ign_retard_change=20 iac_ign_advance_limit=10 iac_ign_retard_limit=20 iac_ign_threshold=01 injrampup_battfac=FF #DON'T KNOW WHAT TO PUT HERE #Not used water_pump_temp=FF water_pump_hyst=FF water_pump_channel=FF