# config 2005.02.12. Marcell Gal # v3.1 board 79 (WARNING! nernst x1 hack => WBO2 config is deviant) # 60-2 cranktrigger # Priming pulse at -40 F [100 usec] eg. 0x80 * 100uS = 12.8 msec primep=00 # Priming pulse scaling at 170 F (0x80=half, 0xFF=same as cold) 0xA0 = ~63% primep_temp_scaling=60 # typically cwh =~ 0.2 * cwl # Cranking pulsewidth [x100 usec] at -40F (-40C) eg. 0xE0 * 100uS = 22400uS cwl=9D # Cranking pulsewidth [x100 usec] at 170F ( 76.6C) eg. 0x40 * 100uS = 6400uS cwh=23 # Cranking threshold [x100 rpm] eg. 0x03 * 100rpm = 300rpm cranking_thres=03 # Afterstart warmup enrichment (%added value) 0x50 = +80% awev=26 # +48% # Afterstart warmup scaling at 170 F (0x80=half, 0xFF=same as cold) 0xA0 = ~63% awev_temp_scaling=A3 # Afterstart number of engine cycles, NOTE: This is not ignition events anymore # 0x80 means 128 cam rotations = 256 crank rotations = appr. 16 sec awc=FF # injectors ?unknown? cc @ 3bar # engine 1598 cc # at 6000 RPM and MAP=100kPa I think 80% duty is reasonable: 8msec real pulsewidth # when j=117 (*1.17) and l=0x59 (*1.13) # so 6.1msec = 61 # HackStart: # req_fuel=2b # =01 # Normally: req_fuel=50 divider=02 # alternate injectors, and fire all at cranking alternate=11 # ==================== TRIGGER ==================== # tooth wheel, active trigger tooth # after the missing tooth (00: right after missing tooth) # so that trigger tooth is ~60 degrees BTDC # I think ours should be 10 .. 11 trigger_tooth=10 ign_tdcdelay=70 # 60 degrees # dwell used when VBatt >= 14V (64 usec). usual range for COP coils: 1.5-2.2mS. # 0x10 = 1024 usec # 0x20 = 2048 usec # 0x2c = 2816 usec # 0x32 = 3200 usec # 0x36 = 3456 usec ign_dwell14=30 # dwell enlargement [27 usec] (above dwell14) when VBatt = 6V # 0x30 = 1296 usec # 0x40 = 1728 usec # 0x60 = 2592 usec # 0x80 = 3456 usec ign_dwell6=83 # ================ EGO enable and WBO2 ============= # ==== config13 #define ODDFIRE 0 // 0:normal, 1:odd-fire #define O2_WB_SENSOR 1 // 0:narrowband, 1:diy-wb #define CONTROL_STRATEGY 2 // 0:speed-density, 1:alpha-N #define BARO_CORRECTION 3 // 0:off, 1:on config13=02 # config13=00 # Min RPM for ego enabling [100rpm] # 0x08 * 100rpm = 800rpm # 0x0C * 100rpm = 1200rpm ego_minrpm=05 #================= WARMUP ============================ # 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]=15 # -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]=B0 # * 1.44 warmup_clt[1]=A0 warmup_clt[2]=98 warmup_clt[3]=8C # * 1.36 warmup_clt[4]=7F # * 1.32 warmup_clt[5]=7D warmup_clt[6]=79 # * 1.12 warmup_clt[7]=76 warmup_clt[8]=70 warmup_clt[9]=65 # * 1.0 # 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]=74 # * 1.16 warmup_rpm[1]=72 warmup_rpm[2]=70 warmup_rpm[3]=6E warmup_rpm[4]=6A warmup_rpm[5]=67 warmup_rpm[6]=66 # * 1.00 warmup_rpm[7]=64 injopen=20 # 32*16 usec battfac=10 # +- 16 * 16usec depending on VBATT injocfuel=08 # max rampup time at VBATT=7V is 8 * 24 usec injrampup_battfac=FF # min rampup time is injocfuel*77% # 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=34 # ofs=52 and kpafac=33 showed higher than real kpa at low pressure # according to VE learning (lowkpa j decreased) kpaofs=00 # no pwm-ing please injpwm=00 injpwmt=FF injpwm6=00 # 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=05 # Acceleration duration [0.1 sec] eg. 0x0A * 0.1 = 1 second tpsasync=02 # 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=05 # 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]=0E tpsdotrate[2]=20 tpsdotrate[3]=40 # TPS acceleration amount (fn TPSDOT) [100 usec]. This is the acceleration enrichment # pulsewidth, the active bin is determined by tpsdotrate[]. tpsaq[0]=08 tpsaq[1]=12 tpsaq[2]=17 tpsaq[3]=1B # 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=FF # 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=10 # Overrun fuelresume, injectors reenabled below this [x100 rpm] # eg. 13 (0x0D) x 100 = 1300rpm. Must be lower than overrun_fuelcut. overrun_fuelresume=0F # Rev limit (hard) [x100 rpm] eg. 0x4B * 100rpm = 7500rpm rev_limit=40 # 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 #define MAP_SENSOR 0 // 0:mpx4115ap, 1:mpx4250ap #define ENGINE_STROKE 2 // 0:4-stroke, 1:2-stroke #define INJ_TYPE 3 // 0:port injection, 1:throttle body # bit 7-4 defines no of cylinders config11=30 # 4 cyl config12=30 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 # with the strangely connected TPS tps_low > tps_high tps_low=20 # max adc-count tps_high=F0 # 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 ########################################################### #(0,1),(2,3) #(A,B),(D,C) # c9=0b11001001=3,0,2,1 # 0 0 0 1 # 1 0 0 0 # 0 0 1 0 # 0 1 0 0 # d8=0b11011000=3,1,2,0 # 0 0 0 1 # 0 1 0 0 # 0 0 1 0 # 1 0 0 0 iac_step_seq=c9 #config.iac_conf bits: #bit4=1 advance_control // 0: off 1: enabled #bit3=1 precise_idle // 0: on/off 1: pwm/stepper based #bit2=1 stepper_iac // enable stepper based iac #bit1=1 low_power_halt 1 // don't move iac if batt < 8V #bit0=0 power_off_iac // power off stepper 1 step cycle after each move # 7e=0b0111 1110 iac_conf=7e iac_sol_channel=FF iac_max_steps=F0 # enable overrun fuelcut and iac below this. iac_tps_thres=05 # C = 5/9 * F - 40 = 66.1 C iac_cold_idle_temp=A0 # C = 5/9 * F - 40 = 70.6 C iac_warm_idle_temp=D0 # 0x60 = 960 rpm iac_cold_rpm=6F # 0x50 = 800 rpm iac_warm_rpm=55 iac_cold_start_pos=E2 iac_warm_start_pos=B0 # rpm added to target rpm after starting, for the duration of iac_afterstart_duration iac_afterstart_rpm=1F # iac afterstart rpm for the duration of 32 * 0.1 = 3,2 seconds iac_afterstart_duration=20 # steps per 160 rpm ?? iac_afterstart_steps=04 iac_kp=25 iac_ki=10 iac_kd=30 iac_integral_speed=C0 iac_integral_limit_dec=05 iac_integral_limit_inc=E4 iac_integral_deadband=0A iac_deadband=05 # bit0=1 enable asymetric behavior iac_pid_conf=01 iac_overclose_interval=FF iac_ign_advance_change=28 iac_ign_retard_change=20 iac_ign_advance_limit=10 # max 4 degrees iac_ign_retard_limit=18 # max 8 degrees iac_ign_threshold=08 # above 2 degrees iac_ref_pos[0]=35 # -40.0 C # 60 % iac_ref_pos[1]=34 # -28.8 C # 60 % iac_ref_pos[2]=33 # -17.7 C # 60 % iac_ref_pos[3]=32 # -6.6 C # 56 % iac_ref_pos[4]=31 # 4.4 C # 53 % iac_ref_pos[5]=30 # 15.5 C # 50 % iac_ref_pos[6]=2F # 26.6 C # 50 % iac_ref_pos[7]=2E # 37.7 C # 48 % iac_ref_pos[8]=2D # 54.4 C # 47 % iac_ref_pos[9]=2C # 71.1 C # 45 % # EGO configuration ########################################################### # config.ego_conf defines: # bit0 define PID_EGO_CONTROL 0 // only if my_make has NBO2_PID_EGO_EXPERIMENT # bit1 // #define WBO2_SENSOR 1 // see config13 # bit2 // #define INCREDIBLE_EGO_CONTROL 2 // always used for WBO2 # bit4 // #define EGO_NBO2_TARGET 4 killed, dangerous with corr.lambda used unconditionally # ego_conf, bit5:NBO2_adc7 bit0:PID ego_conf=07 # 07 variable afr # Step size (percent) [0.4%] eg. 0x02 * 0.4% = 0.8% ego_delta=01 # Time constant (engine cycles) for changing correction factor ego_lag=03 # Min coolant temperature for ego enabling[F] eg. 0xC2 = 194degF (108degC) # C = 5/9 * F - 40 # 60 degrees celcius ego_coolant=00 #C2 # Max TPS position for ego correction ego_maxtps=FF # Max percent to lean/rich afr[0.4%] # 0x10 * 0.4% = 6.4% # 0x30 * 0.4% = 19.2% # 0x80 * 0.4% = 51.2% ego_lean_limit=28 # 20 during tuning ego_rich_limit=28 # 60 during tuning # 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=01 # ego_target = 51 * O2_sensor_voltage ego_target=19 # incredible_ego speed limit: 80..c0 ego_pid_kp=2B # 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=90 wbo2_warmup_target=FF wbo2_abs_limit=E5 wbo2_limit_maxt=FF wbo2_fallback=A3 wbo2_retry_t=01 wbo2_edgetime_min=58 # (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 # ae shows 14.8% O2, let's try: wbo2_calibration=B8 # ================================= # WARNING! v3.1 board 79 has NO x3.7 amplifier for nernst, the nernst signal # goes directly to the AVR. # wbo2_ri_target and wbo2_nernstdc_target values and many others are abnormal !!! # DO NOT copy these VALUES !!! wbo2_edgetime_corr=26 # very precise for board 79 (3.98V) wbo2_pump_pw_zero=66 # wbo2, target Ri (pulse amplitude) [5V/8192] # appr 25% of normal value: wbo2_ri_target=4A # wbo2, target nernstDC [5V/256] # 4.45 / 5V * 256 = wbo2_nernstdc_target=e5 # smaller signal, higher PID values: wbo2_heater_pid_kp=AE wbo2_heater_pid_ki=45 wbo2_heater_pid_kd=28 wbo2_heater_pid_ilimit=ff wbo2_pump_pid_kp=8F wbo2_pump_pid_ki=70 wbo2_pump_pid_kd=03 wbo2_pump_pid_ilimit=ff wbo2_ri_confidence_scale=FF # ???????? # ================================= # normal board (UNCONFIRMED VALUES) # wbo2_edgetime_corr=40 #!!!!!!!!!! # very precise for board 79 (3.98V) # wbo2_pump_pw_zero=66 # 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=90 # wbo2_pump_pid_kp=50 # 2E # wbo2_pump_pid_ki=40 # 1D # wbo2_pump_pid_kd=08 # 08 # wbo2_pump_pid_ilimit=D0 # 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 # ? 7 kHz ? knock1_gain=40 # FF knock1_integrator=14 # FF knock2_frequency=29 knock2_gain=40 knock2_integrator=14 knock_conf=00 knock_sampling_window=F2 knock_default_retard=04 knock_max_retard=28 knock_maxrpm=05 knock_minrpm=FF knock_advance_delay=50 # FF knock_advance_step=FF # knock_noise_scale=d8 knock_retard_delay=FF knock_retard_step=08 # 3.2 degrees knock_threshold=FF ##### VE auto-learning ##### ve_learn_coolant=D8 # 80 degress ve_learn_max_power=ff ve_learn_rpm_scale=1E ve_learn_kpa_scale=1E ve_learn_ego_scale=43 ve_learn_speed=FF # 80 .. E0 ve_learn_limit=ff #30 ve_learn_min_weight=4D ve_learn_conf=00 # 01 = on, during tuning # lcd settings ################################################################ # no busypoll: 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=02 # 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 # crank advance = 10 degrees ign_crank_advance=2E ign_out=70 # EDIS:0x0? dummy: 0x7? disable:0xff bit0: invertout 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=10 # 4 seconds # output selection for fuelpump (digitalout) fuelpump_channel=INJFET_7 ## ouput channels ############################################################# act_wot_rpm=FF # WOT switch RPM threshold (FF=disable) # used for stimout !! C0 gives good signal, noninverted 40 is much worse act_wot_channel=C0 # WOT switch output channel selector act_rpm_rpm=FF # RPM switch RPM threshold (FF=disable) act_rpm_channel=FF # RPM switch output channel selector misc1out_channel=40 misc1out_maxmap=FF misc1out_maxrpm=1E misc1out_maxtps=FF misc1out_minmap=50 misc1out_minrpm=0A misc1out_mintps=40 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) ############################################################################################# boost_channel=FF boost_conf=00 boost_minpressure=FF # boost_channel=02 # boost_conf=61 # boost_minpressure=00 boost_pid_ilimit=ff boost_pid_kd=01 boost_pid_ki=80 boost_pid_kp=20 boost_targetoffs=00 water_pump_channel=ff water_pump_hyst=00 water_pump_temp=00 # always by MAP sensor hybrid_rpm_a=00 hybrid_rpm_m=00