_ _ ( ) ( ) | |/'/' | , < | |\`\ (_) (_)
___ / _ \ / /_\ \ | _ | | | | | \_| |_/
## ## ###### ## ## ## ###
###### ## ## ## ######
_________ \__ __/ ) ( | | | | | | | | )_(
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '' '''Wideband Oxygen Sensor Configuration''' '' '''This page describes how to configure GenBoard/VerThree LSU4 WideBand controller''' - please help in cleanup'' * Check the overview at GenBoard/Manual/WBSensor and complete the necessary steps -- ''This is a CIRCULAR reference, ie. it sends you back to where you came from'' * set ''config.config13 bit1=1'' to enable WBO2 * hook up LSU4 WBO2 sensor: read GenBoard/Manual/WBSensorConnection for checking the hardware * configure and test your WBO2 controller parameters below and '''keep the big smile on your face'''. The incredible ego_controller will be used, and the l table will help you on your way to keep engine around desired lambda automatically, not just cruise, but also at high power. ---- [http://megasquirtavr.sourceforge.net/manual/Detailed.Sensor.Wide.html#Config [Manual: Detailed.Sensor.Wide.Config]] ---- '''Info on why and how:''' *A very good introduction on what it is good for: http://www.tragacs.com/Old/wbo2.html *Much more technical info can be found at: http://www.wbo2.com/ * suggested datasheet: http://www.squirrelpf.com/msavr/files/Y258K01005e_LSU4_englisch.pdf * old one: http://not2fast.wryday.com/bosch_lsu42_english.pdf ---- Some links, dealing with '''PID control''': ( should this be a separate page? ) *[http://bestune.50megs.com/ BesTune] PID controller tuning tool, also lists a lot of controller examples. *[http://www.pas.com/white_papers/pid_explained.pdf PID Controllers Explained] A document explaining various controller types, and the effect of the control parameters on the controller output *[http://focus.ti.com/lit/an/spra083/spra083.pdf Implementation of PID and Deadbeat Controllers] Ti application note describing the implemtation of PID and deadbeat controllers with the TMS320, also outlines an PID autotuning algorithm *2 new paper I just found while looking for a plug **http://delphi.com/pdf/techpapers/2001-01-0558.pdf **http://delphi.com/pdf/techpapers/2001-01-0260.pdf ---- an '''old method for testing Ri measurement part of the firmware''' This was used before one got a real sensor, or before one was confident to hook up a real sensor. Mostly '''history''' by now. Simple way of testing the Ri (acdc() output) measurement: It can be tested without a real WBO2 sensor and without an OPA amplifier: Use a voltage divider, eg.: 470 Ohm to GND, 5k to VCC. This is effectively a Ri=430 Ohm on a 450mV (or so) DC: about similar as a 71 Ohm Ri would be with OPA 6x amplification. You can use a 4k7 variable R, where the midpoint is the cheat-sensor nernst node, of course. The ultimate method is using a 2k2 NTC towards ground and a 4k7..10k towards 5V. Thermally close-wrap the NTC with a 47 Ohm 2W resistor which is connected to +12V, other end controlled (with NPN or FET) from the heater pin. This makes it possible to check the heater control as well as the Ri measurement. Make your cheat sensor on a DIN5 connector, the same which we use for real sensor in the lack of VW-connector socket. The cheat-sensor is pulsed by the 220nF and 10k from OC2 (5V, 256usec cycle, 128 low, 128 high), as a real would be. You can dump the wbo2 samples and results to RS232 via mde01 menucommand, see wbo2.c. The perl side is not written yet, but bin/prog.pl (GenBoard/Firmware/BootLoader) should help a lot for RS232 usage from perl. ----- '''Configuration''' '' '''WBO2 Heater''' '' '' Warmup ramp speed [3f=0.2V/sec] 0.2 V/sec wbo2, warmup ramp speed [1.51 mV/sec]'' {{wbo2_warmup_ramp=0xA0(160)}} '' Warmup target'' {{wbo2_warmup_target=0xFF(255)}} '' Heater absolute limit [2a=12V ff=30V] wbo2, heater absolute limit [?](DA)'' {{wbo2_abs_limit=0xE4(228)}} '' Max time spent at abs_limit [262msec] wbo2, max time spent at abs_limit [262msec] (50)'' {{wbo2_limit_maxt=0xA0(160)}} '' Fallback V after maxt [1c=10V ff=30V] wbo2, fallback V after maxt [?]'' {{wbo2_fallback=0x60(96)}} '' Retry control after [4sec] wbo2, retry control after [4sec]'' {{wbo2_retry_t=0x06(6)}} '' '''WB02 Measurement and Control.''' '' '' Edgetime correction constant C/R'' {{wbo2_edgetime_corr=0xBA(186)}} '' Smaller edgetimes are neglected [0.5usec]'' {{wbo2_edgetime_min=0x50(80)}} '' Target Ri (pulse amplitude:C3)[5V/4096] wbo2, target Ri (pulse amplitude) [5V/8192]'' {{wbo2_ri_target=0x96(150)}} '' Target nernstDC [5V/256]'' {{wbo2_nernstdc_target=0x8D(141)}} After warmup, measure nernst, we want voltage ~ 4 + 0.45V (4V on the yellow sensor-wire, and 0.45V higher, thus 4.45 on the black sensor wire.) Q: is this done only at free air or stoich on running engine, exhaling does make this go higher for a while. Note: the 20mV/step is after the OPA (on the AVR ADC input), before the OPA the resolution is about 5mV/step. '' Pump zero dutycycle (default: 66) [5V/256]'' {{wbo2_pump_pw_zero=0x66(102)}} The easiest way to measure this is to match OC3A (shotly after powerup) to the 2V reference. Let's say I measure 1.96V instead of 2V (pin14 of the OPA closest to AVR). If I measure 2.04 V on OC3A (as the result of wbo2_pump_pw_zero=0x66 setting), I know that I must decrease ''wbo2_pump_pw_zero'' by 4 (to 62) to decrease the 2.04V to the required 1.96V (by 2.04-1.96V=80mV = 4*20mV since each step is 5V/256 = 20mV ) '' Calibration Constant'' {{wbo2_calibration=0xF8(248)}} The wbo2_calibration must be configured to read good values on LCD, or to use for EGO control. Starting values can be in function of RCal in the LSU4 sensor housing: Practical starting point from Rcal Ohm measurement: * '''RCal (Ohm), wbo2 calibration starting value (and absolute minimum value)''' * 30 0 (0) * 50 62 (60) * 70 105 (102) * 90 149 (133) * 100 164 (145) * 110 179 (157) (slope in this range is appr. +1/ Ohm ) * 120 186 (167) * 130 193 (176) * 200 228 (220) * 300 255 (252) These are decimal values. These are speculation, not measurement. '''Some stats from actualy calibration''' - show that higher calibration value is needed than the above table suggests * '''Rcal=113 Ohm, wbo2_calibration=BC (188)''' Karkus Audi * wbo2_calibration=B8 (184) MembersPage/MarcellGal/EngineSwap TODO: measure RCal, IIRC 116 Ohm * '''for Rcal=129 Ohm, wbo2_calibration=BD (189)''' MembersPage/GolfGtiLpg * wbo2_calibration=CB (203) MembersPage/MarcellGal/PowerAndTraction TODO: measure RCal, IIRC 135 Ohm * ... add more measurement / calibration ! '' Free air calibration '' The calibration parameter above should be fine tuned in free air without the sensor installed. In free air the LCD(or terminal Manmde02mll)O2% should read 2095 which is 20.95%. '' After the sensor is warmed '' up you can adjust the wbo2_calibration parameter up or down to increase or decrease the reading being displayed. For a sanity check it is good to let the sensor cool down and warm back up to make sure the reading is still at 2095. '' Breath Test '' After configuring the above free air reading, you can breath on the sensor and see the 02% go down 100-200 counts(1-2%) to varify that all is working well ---- '''Detailed logging of sampling and acdc()''' This should not be needed for the average user, but interesting for the curious. MembersPage/DaveBrul fabricated some code to log the WBO2 samples from AVR to PC and print some simple statistics. <code> perl bin/wbo2log.pl :COM5 mde02 </code> command tells GenBoard/VerThree (that has WBO2 enabled in firmware and completed WBO2 hardware) to turn on the WBO2 even if the engine is not running, and print out some samples and WBO2 internal variables. * ''config.edgetime_corr=0xBA'' ------ '''earlier notes before the values were tuned''': Ip measured 3.4 mA (and it lowered immediately when I exhaled on the sensor, it went back relatively slowly). That calculated to Rcal=147. I pulled apart the connector, and measured what Bosch applied. RCal was 149 Ohm. Fair enough. Below the PID values are very bad, some 10 lines should be applied to wbo2log.pl to write Ri,DC, the integrals and the command-values to a file, and call gnuplot to plot against time. '''WBO2 Config'''. Make the PID better, but still works: <code> wbo2_warmup_ramp=0xA0 # 0.2 V/sec wbo2, warmup ramp speed [1.51 mV/sec] wbo2_warmup_target=0xFF # variable dropped a long ago wbo2_abs_limit=0xE4 # wbo2, heater absolute limit [?] (DA) wbo2_limit_maxt=0xA0 # wbo2, max time spent at abs_limit [262msec] (50) wbo2_fallback=0xB0 # wbo2, fallback V after maxt (0xC0 will heat it better than 0x60, especially when 350C exhaust gas cools the 750C sensor element at idle) wbo2_retry_t=0x06 # wbo2, retry control after [4sec] wbo2_edgetime_corr=0xBA # variable dropped in most recent firmwares wbo2_edgetime_min=0x50 # variable dropped in most recent firmwares wbo2_ri_target=0x96 #wbo2, target Ri (pulse amplitude) [5V/8192] wbo2_nernstdc_target=0x89 # controller specific (controller not sensitive to very precise setting), usually 0x89 gives most precise 0.45V between nernst and pump- wbo2_pump_pw_zero=0x65 ## controller specific. Look up webshop mail (or calibrate for your controller for minimum pump current absolute value: pump+ closest to pump- at startup) wbo2_calibration=0xD0 ## Calibrate yourself for sensor! wbo2_heater_pid_kp=0x46 wbo2_heater_pid_ki=0x10 wbo2_heater_pid_kd=0x1A wbo2_heater_pid_ilimit=0x80 wbo2_pump_pid_kp=15 wbo2_pump_pid_ki=4E wbo2_pump_pid_kd=00 wbo2_pump_pid_ilimit=0x84 wbo2_ri_confidence_scale=0x80 </code> ---- The closest to a standard vout we can get is the ETAS ouput format, where you have the lambda value in volts. Lambda1=1v, lambda0.65=0.65v. According to http://www.emd.horiba.com/engmeas/ld700/ the output is lambda0=0v, lambda5=5v, but measures 0.7 to 1.5. Assume linear? Obviously ETAS and Horriba have the same output voltage function. I guess that can be considered the standard. Autronic controllers have 0v output at AFR=10:1 and 1volt at AFR=30:1. Most popular curve (also used in AFreshTiny): 0.68 => 0V , 1.0 => 2.5V , 1.32 => 5V ---- Does the GenBoard support 2 wbo2 sensors ? Yes, the board HW supports it. I don't know anyone who actually used 2 sensors on 1 engine. What it will do if it get different signals from them ? What do you want it to do ? it will be on a twin turbo V8 engine so either I put a WBO2 in each downpipe or I will use a Y-pipe and mount only one sensor after the Y I think that if I use 2 sensors( 1 sensor for each bank ) I will be able to detect problems easly ---- See also: *GenBoard/AutoTune *WideBand/UnderDevelopment *WideBand/Calc ---- Back to GenBoard/Manual Back to GenBoard/Manual/Config Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.