DIY_EFI Digest Friday, 14 June 1996 Volume 01 : Number 166 In this issue: Sensor Linearization Re: EFI algorithms Re: Fuel prizes Re: Sensor Linearization Design Info From BOSCH Re: Sensor Linearization Re: GM ECM: Vats Re: EFI algorithms RPM/input capture Re: Design Info From BOSCH Re: Sensor Linearization Re: Sensor Linearization page unavailable? Re: EFI algorithms Re: EFI algorithms Poly Sensor Linearization MAF algorithm fuel pressure gage Re[2]: GM ECM: Vats Re: Sensor Linearization Re: EFI Algorithms Re: Sensor Linearization RE: GM vats Re: Sensor Linearization Re: Sensor Linearization Re: Sensor Linearization Re: Sensor Linearization Linear Sensors See the end of the digest for information on subscribing to the DIY_EFI or DIY_EFI-Digest mailing lists. ---------------------------------------------------------------------- From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 01:07:56 -0700 Subject: Sensor Linearization Hi Folks: Tnx to all lending me a hand. Been looking through the archives but yet to find a proper discussion on sensor linearization. The inclination is to accept the Map sensor data as well as the Tps as they are linear even though there is a loss in range. One problem remaining is the MAT and the Coolant Temp Sensor. Going by service manuals and using a 1.2 K pullup this gives quite a nonlinear temp vs voltage. The question I have for the good folks is how do you linearize the sensor. Or is it necessary? One tacky piece of hardware is to switch in two resistors one for each range which would tend to give some linearization. Software wise one could use a lookup table. This would require close to 255 entries. Not really but quite a few. The other way is a search through a table and pick the data closest to the value measured. And the third is to use a smaller table, say 15 values for a search or a lookup and then interpolate. What I am trying to get is linear numbers between 0 and 255 for a temp range of about -40 to 250 degrees. Tnx again everybody: peter ------------------------------ From: jsturs@xxx.nl (Jim Sturcbecher) Date: Thu, 13 Jun 1996 12:28:24 -0100 Subject: Re: EFI algorithms >What I need to do now with new software is to develop a load factor >between 0 and 255. Whats the best stragedy. A calculation using >to A D value or a lookup table or a search. Once you have the >load factor between 0 and 255 a divide by 16(four shifts right)gives >you the index for your lookup table. > >Tnx everybody: peter > I would suggest a lookup table for the conversion. This is the simplest to code and allows you to easily adjust the values for non-linearities. Remeber, you do not need every entry in the table, you only need enough to define the transfer function and then use interpolation to derive the intermediate values. This is how GM does it. There are 2 interpolation routines in the 730 code you have, one for a single dimension table (simple list), and one for a 2D table (load vs rpm = VE_value for example). Later, Jim Sturcbecher jsturs@xxx.nl ------------------------------ From: brewer@xxx.com (John Brewer) Date: Thu, 13 Jun 1996 06:52:16 -0500 Subject: Re: Fuel prizes In Huntsville, AL we pay 1.16/gal for regular unleaded John Brewer "Any man who would trade liberty for security deserves neither." - Ben Franklin ------------------------------ From: Frank Parker Date: Thu, 13 Jun 1996 08:04:17 -0600 (EDT) Subject: Re: Sensor Linearization > Subject: Sensor Linearization > The inclination is to accept the Map sensor data as well as the Tps > as they are linear even though there is a loss in range. > One problem remaining is the MAT and the Coolant Temp Sensor. > Going by service manuals and using a 1.2 K pullup this gives quite > a nonlinear temp vs voltage. > The question I have for the good folks is how do you linearize the > sensor. Or is it necessary? > or a lookup and then interpolate. > What I am trying to get is linear numbers between 0 and 255 for > a temp range of about -40 to 250 degrees. > Tnx again everybody: peter > I believe it takes less space and more accurate to generate the polynomial equation that fits the temp vs volt curve. There a a # of proggrams out there to do that and should be simple 2-3 term polynomial since curve is simple. with a math function, you do not need any lookup table and no loss of resolution. frank parker> > ------------------------------ From: dfh@xxx.com (David Hoerl) Date: Thu, 13 Jun 96 12:31:53 EDT Subject: Design Info From BOSCH If I was going to design a specialized FI system, and was working at a place which had "name" in the FI business, I probably could get BOSCH to give me a book or spec sheets on their Air Flow Meters, DMEs, etc. They must have provided design info to Volkwagen, BMW, et al. So, why can't I somehow find a way as a DIY person to get the same info? Does anyone know of a way to get access to the info that BOSCH must have already produced and distributed already??? David dfh@xxx.com ------------------------------ From: arthurok@xxx.com (ARTHUR OKUN ) Date: Thu, 13 Jun 1996 09:43:20 -0700 Subject: Re: Sensor Linearization i think the interpolation is "good enough" for most applications. the curve on gm temp sensors is about 20% away from linear if you want a small table from chiltons ill send it to you . ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 09:37:16 -0700 Subject: Re: GM ECM: Vats >>>have one of 15 resistance values. When five volts is >>>applied to that resistor one of fifteen voltage values results > >I beg to differ my good man. While installing the '89 350 TPI into my '58, I >had to crack the VATS enigma. What I found out was that the resistor in the >key provided a voltage to the VATS module. The VATS module would then send >about a 30hz signal to the ecm to say "a-okay". The ecm would then allow the >injectors to fire. >>>The older ones >>>used a separate VATS module which makes life easier. > >No info on the newer units. I was told they use a 40hz signal with a module. > > >Good luck, and keep us informed. > >GMD > >Hi George >Tnx for info: >I am very sure you are right for 89 90. However I will do some >investigating for newer models. My gm parts book stops listing a >module for 90 later. Of course this doesn't mean any vats module >GM might not be selling it. >Curious I am as to why you simply didn't use module and resistor. >I guess it wouldn't be very neat in a classic. The modules that >Ecklers and others sell are quite tacky. >Well I will be facing this when I help my friend install >the new LT1 in his four runner. I hope he got everything as I told >him to do. >My test setup will probably use a older tpi but I suppose >I can play with different ECMs as I am amasing quite a collection. >Will keep you informed. >Tnx again George: >:peter > ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 09:44:17 -0700 Subject: Re: EFI algorithms >to define the transfer function and then use interpolation to derive the >intermediate values. This is how GM does it. There are 2 interpolation >routines in the 730 code you have, one for a single dimension table >(simple list), and one for a 2D table (load vs rpm = VE_value for example). > >Later, > >Jim Sturcbecher >jsturs@xxx.nl > >Hi Jim >To be honest have been bending to interpolation. Using a 16 element >lookup with linear interpolation would give a pretty good aprox >to linear. A 16 element search would give a tad more resolution >but at a small price in overhead. The cycle count on the software >I have now indicates there is room but not much. >However I did develop a math algorithm for the process. Unfortunately >it needs several adda,suba, a mul, and a div which would kill you >in HC11 time. Have to do a lot of these. and there always is these >pesky interrupts happening at 6400 rpm. >Tnx >:peter > ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 09:51:10 -0700 Subject: RPM/input capture >Hello again Cliff >Been thinking about what you posted. >U r rite about resolution increasing with increased period between >captures. Also as the engine enters a lower rpm regime there is much >greater processor time between ign ref pulses. >With this in mind during the rpm calc using a break point equiv to >rpm about 2000 rpm. you could double the resolution of you calculations >at least. The increment in rpm could be as low as 5 rpm. Believe it >not this has been giving me fits in the control part of the IAC as I >have found 25 rpm increments lead to limit cycle oscillations in >idle speed. >Tnx much: >peter ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 10:02:36 -0700 Subject: Re: Design Info From BOSCH >If I was going to design a specialized FI system, and was working at a >place which had "name" in the FI business, I probably could get BOSCH >to give me a book or spec sheets on their Air Flow Meters, DMEs, etc. >They must have provided design info to Volkwagen, BMW, et al. So, why >can't I somehow find a way as a DIY person to get the same info? > >Does anyone know of a way to get access to the info that BOSCH must have >already produced and distributed already??? > >David >dfh@xxx.com > >Hi David >Am used to ur problems. >Sources for me include manuals on scanners, the little red bosch book, >service manuels although you often will have to read between the lines >and I believe a lot of info exists in SAE paper in your library for >Air meters ect. >I am sure others on this net have additional sources. >GL: peter ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 10:08:37 -0700 Subject: Re: Sensor Linearization >> Subject: Sensor Linearization >I believe it takes less space and more accurate to generate the polynomial >equation that fits the temp vs volt curve. There a a # of proggrams out >there to do that and should be simple 2-3 term polynomial since curve >is simple. with a math function, you do not need any lookup table and no >loss of resolution. > > frank parker> > > >Hi Frank: >Am interested in your suggest. Poly fit equations are unusually long >and would take forever in HC11 time. However could they be included in >a lookup table similiar to a sine or a log table. >Wondering if you have any short code to do a second or third order fit. >Tnx very much: >:peter ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 10:19:36 -0700 Subject: Re: Sensor Linearization >i think the interpolation is "good enough" for most applications. >the curve on gm temp sensors is about 20% away from linear >if you want a small table from chiltons ill send it to you . > >Hi Arthur >Ur right actually for temp lookup it is good enough. >Might need a wee bit more resolution for interp table. Also >no hard rule about using a linear lookup table. Have the sensor >data from GM manuels. >Tnx greatly:peter >Ps if you have MAF data in gms vs volts. yes yes yes ------------------------------ From: "Andrew F. Gunnesch" Date: Thu, 13 Jun 1996 14:30:24 -0400 (EDT) Subject: page unavailable? Hello there. I just joined the DIY EFI digest, and in the join message it points to two different pages of project information. The one at gatech is accessible, but the following one isn't: efi332 http://www.cim.swin.edu.au/wwwhome/aden/efi332/332_index.html anybody know what happened to it? TIA, andrew gunnesch ------------------------------ From: Pete Sterrantino Date: Thu, 13 Jun 1996 15:04:57 -0400 (EDT) Subject: Re: EFI algorithms At 10:08 AM 6/12/96 -0700, you wrote: >First off the handle Map. In the past I have used an OEM Map sensor >This gives about 4.75 volts at wot and about 1.5 volts at idle >or 18 inches of vacum. In the past this was fed into the AD and >I used the resulting conversion in the code directly. What >I need to do now with new software is to develop a load factor >between 0 and 255. Whats the best stragedy. A calculation using >to A D value or a lookup table or a search. Once you have the >load factor between 0 and 255 a divide by 16(four shifts right)gives >you the index for your lookup table. > >Second RPM. >In the past I used the input capture to give me the time value between >two ignition pulses. A division of the highest RPM about 400 rpm >increment at 6400 rpm in timer value would give me a table of >15 rpm increments plus if you use idiv a fraction is also created. >My four point interpolation would use map fraction and rpm fraction >to smooth the values in the lookup table. >What I wish to do is use a 25 rpm increment at 6400 rpm to create >a rpm table that runs in 25 rpm increments between 25 and 6375 rpm. >Since I am currently working on idle control I need the finer resolution. >Also I have decided to split the look up tables into a lower load >lower rpm table and a higher load higher rpm tables. The lookup indexs >for the low load rpm table would be finer increments. This would >make low rpm operation much better. Peter: I'm not sure what you are really trying to do but i'll make some suggestions anyway. 1. The 68HC11 A/D converter can be scaled in hardware. If you set Vrl to 1.5 V and Vrh to 4.75 the 3.25 V difference would be across the 0-255 range, i.e. 0.0127 volts/bit. 2. If a hardware change is not possible, and memory is not a problem, a lookup table is the way to go. It's much faster. 3. If memory is a problem, you may want to find a function that defines your data and calculate the answer each time. I can't see what you're trying to do in the second part. Maybe if it were a little clearer...Or I could look at the code. The idea sounds ok. Is there a problem with timer resolution? Hope this helps... Pete S. ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 12:41:09 -0700 Subject: Re: EFI algorithms >Hi Pete >First off the AD is used for several variables not all in the same range. >this makes hardware scaling academic> >2. If a hardware change is not possible, and memory is not a problem, a >lookup table is the way to go. It's much faster. > >I can't see what you're trying to do in the second part. Maybe if it were a >little clearer...Or I could look at the code. The idea sounds ok. Is there >a problem with timer resolution? > >I think with some supplied help I have that licked. Basically you find >the differences between two timing interrupts and divide by the smallest >time between desired increments. For a 25 rpm scale divide whatever >you have for a period between ignition pulses by the time in tics >between 6376 and 6400 rpm. What I will do now is modify this >routine to give me finer resolution at lower rpms. There was a >prob with eight bits rep 255 steps of 25 rpm from 0 to 6375 rpm. >Still trying to figure out how to post code. Relatively new to >netscape et al. >Hope this helps... > >Pete S. > >Tnx everyone:peter > ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 12:50:00 -0700 Subject: Poly Sensor Linearization >>> Subject: Sensor Linearization >>there to do that and should be simple 2-3 term polynomial since curve >>is simple. with a math function, you do not need any lookup table and no >>loss of resolution. >> >> frank parker> > >> Hi Frank: Well you got me to thinking. I now remember reading a paper on Ford with their EEC linearizing their MAF sensor. I believe this used an adaptive table with some type of poly fit. Only ford! This leads to an interesting algorithm: Get the CTC sensor info from the AD in a range of 0 255. Shift right four times to get an intermediate lookup of 16 values. Use this to access a table with the linearizing poly multipliers. Then mult the sensor AD value by the multiplier. You then shift the D accum right four times. What the end result is a linearizing function of 16 steps. Not perfect but pretty close. I will have to check this code but I believe it is faster than interpolation with about the same accuracy. Tnx Frank GL: peter ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 12:57:27 -0700 Subject: MAF algorithm Hi Gang: Although I probably am not going to get involved with something as tacky as an MAF I am curious as to the fueling calculation involved. Here is my understanding so far. First off synchronous fueling. With the systems I play with the injectors are still synched to the engine revolution. This appears to be unnecessary with mass air flow since an assynchronous pulse with width pro to mass flow(desired AF ratio), a coolant correct( to modify AF for temp), a PE( for power enrichment) and perhaps a voltage corr (for injector var due to bat voltage). But why synch? In order to use MAF for sychronous injection it appears you must divide the airflow by RPM to get the load. Then set the base? pulse width. I hope some of the more empowered individuals on the net can help. Tnx always: peter ------------------------------ From: Frank_Mallory@xxx.com (Frank Mallory) Date: Wed, 12 Jun 1996 22:33:17 -0400 Subject: fuel pressure gage d>I'm currently assembling a turbo TPI motor for marine application d>using the d>stock GM fuel pressure regulator. Boost will be limited to 15 psig. d>What d>range of fuel pressure gage will work best? Because of brand d>selection, d>choices are limited to 0-60 psig or 0-100 psig. Depends on the max pressure put out by your fuel pump. Some of the Bosch pumps put out 75-85 psi, so 60 would be a little low with those. ------------------------------ From: Gary W Harris Date: Thu, 13 Jun 96 14:41:00 PDT Subject: Re[2]: GM ECM: Vats Text item: >>>have one of 15 resistance values. When five volts is >>>applied to that resistor one of fifteen voltage values results > >I beg to differ my good man. While installing the '89 350 TPI into my '58, I >had to crack the VATS enigma. What I found out was that the resistor in the >key provided a voltage to the VATS module. The VATS module would then send >about a 30hz signal to the ecm to say "a-okay". The ecm would then allow the >injectors to fire. >>>The older ones >>>used a separate VATS module which makes life easier. > >No info on the newer units. I was told they use a 40hz signal with a module. > > >Good luck, and keep us informed. > >GMD > >Hi George >Tnx for info: >I am very sure you are right for 89 90. However I will do some >investigating for newer models. My gm parts book stops listing a >module for 90 later. Of course this doesn't mean any vats module >GM might not be selling it. >Curious I am as to why you simply didn't use module and resistor. >I guess it wouldn't be very neat in a classic. The modules that >Ecklers and others sell are quite tacky. >Well I will be facing this when I help my friend install >the new LT1 in his four runner. I hope he got everything as I told >him to do. >My test setup will probably use a older tpi but I suppose >I can play with different ECMs as I am amasing quite a collection. >Will keep you informed. >Tnx again George: >:peter > I just hate to see you struggle with this so... this works for 93--95 GM ECU's, no guarantees - --WW 400Bh DB 0xxh ; ; ; b7 1 = DE-LATCH ; b6 1 = MAT SENSOR ; b5 1 = 180 DEG OFFSET ; b4 1 = ASDF CRANK ; b3 1 = ACCEL ENRICH LMT OPTION ; b2 1 = SYNC FUEL AT IDLE (TBI) ; b1 1 = AIR MANAGE ; b0 1 = CPI/PFI MODE 400Ch DB 0xxh ; ; ; b7 1 = CAN PURGE ; b6 1 = CONDITIONAL INT R/S ON BLM CELL CHNAGE ; b5 1 = INT R/S ID ACELL ENRICH ; b4 1 = INT RESET IN BLM CELL CHANGE ; b3 1 = ASDF ; b2 1 = CRANK FUEL ALL INJ'S EACH DRP ; b1 1 = ERR 44/45 BLM LMT ; b0 1 = SYNC MAP SENSOR READS 400Dh DB 0xxh ; ; ; b7 1 = SINGLE PASS EGR TEST - ----->>>>>>>>>>>>>; b6 1 = VATS ; b5 1 = USE L4479 TBL FOR %EGR ; b4 1 = EGR = 0 AT IDLE ; b3 1 = OPN LP FUEL DISABLE EGR ; b2 1 = BACK PRESS EGR ; b1 1 = LINEAR EGR/ 0 = EVRV EGR ; b0 1 = USE TBL L4BA9 FOR CLS LP AFR 400Eh DB 0xxh ; ; ; b7 1 ; b6 1 ; b5 1 = LATCH ERR 45 ; b4 1 = USE L4968 WITH ASYNC FUEL DELIVERY ; b3 1 = CPI MANAFOLD TUNE ; b2 1 = SHIFT LIGHT ENABLE ; b1 1 = ???? ; b0 1 400Fh DB 0xxh ; ; ; b7 1 = MAN, (0 = TCC) ; b6 1 = TCC ; b5 1 ; b4 1 = CONV OVER HEAT PROTECTION ; b3 1 = BURST KNOCK RETARD ; b2 1 = A/C CLUTCH CNT'L, 0 = CPI TUNE ; b1 1 ; b0 1 = 1 DO RPM/MPH LMT, (GOV'R OPT) Text item: External Message Header The following mail header is for administrative use and may be ignored unless there are problems. ***IF THERE ARE PROBLEMS SAVE THESE HEADERS***. Reply-To: diy_efi@xxx.edu Precedence: bulk Sender: owner-diy_efi@xxx.edu Message-Id: <96Jun13.102145-0700pdt.268438-268+1399@xxx.ca> Subject: Re: GM ECM: Vats From: pfenske@xxx.ca (peter paul fenske) To: diy_efi@xxx.edu Date: Thu, 13 Jun 1996 09:37:16 -0700 Content-Type: text/plain; charset="us-ascii" Mime-Version: 1.0 X-Mailer: Windows Eudora Version 1.4.4 X-Sender: pfenske@xxx.ca Received: from van-as-07b09.direct.ca ([204.174.249.121]) by aphex.direct.ca wit h SMTP id <268438-268>; Thu, 13 Jun 1996 10:21:45 -0700 Received: from aphex.direct.ca by coulomb.eng.ohio-state.edu via ESMTP (940816.S GI.8.6.9/940406.SGI) for id NAA19917; Thu, 13 Jun 1996 13:2 8:27 -0400 Received: by coulomb.eng.ohio-state.edu (940816.SGI.8.6.9/940406.SGI) id RAA19922; Thu, 13 Jun 1996 17:28:31 GMT Received: from coulomb.eng.ohio-state.edu (coulomb.eng.ohio-state.edu [128.146.9 0.150]) by ormail.intel.com (8.7.4/8.7.3) with SMTP id LAA26168 for ; Thu, 13 Jun 1996 11:48:28 -0700 (PDT) Received: from ormail.intel.com (ormail.intel.com [134.134.248.3]) by relay.jf.i ntel.com (8.7.4/8.7.3) with ESMTP id LAA28704 for ; Thu, 13 Jun 1996 11:48:28 -0700 (PDT) Return-Path: owner-diy_efi-outgoing@xxx.edu ------------------------------ From: Todd Knighton Date: Thu, 13 Jun 1996 15:03:02 -0700 Subject: Re: Sensor Linearization peter paul fenske wrote: > > Hi Folks: > Tnx to all lending me a hand. > Been looking through the archives but yet to find a proper discussion > on sensor linearization. > The inclination is to accept the Map sensor data as well as the Tps > as they are linear even though there is a loss in range. > One problem remaining is the MAT and the Coolant Temp Sensor. > Going by service manuals and using a 1.2 K pullup this gives quite > a nonlinear temp vs voltage. > The question I have for the good folks is how do you linearize the > sensor. Or is it necessary? > One tacky piece of hardware is to switch in two resistors one for > each range which would tend to give some linearization. > Software wise one could use a lookup table. This would require close > to 255 entries. Not really but quite a few. The other way is a search > through a table and pick the data closest to the value measured. > And the third is to use a smaller table, say 15 values for a search > or a lookup and then interpolate. > What I am trying to get is linear numbers between 0 and 255 for > a temp range of about -40 to 250 degrees. > Tnx again everybody: peter > Peter, Bosch uses a cute little 12 position NTC sensor linearizeation table that does a real good job, I've checked it. It ends up running linearly from -30F to 275F from 0 to 255 A/D. If it helps its: (04 0C - 04 07 08 0F 1A 35 1C 1C 10 07 03 16 Position - 02 13 25 34 48 5F 89 A2 C3 E0 F3 FB Correction) Plotted out, it looks like a straightened out "S" curve. The way Bosch reads it's maps is kind of strange though, from the top down on this one. Good luck, Todd Knighton Protomotive Engineering Email: knighton@xxx.net P.S. Also working on Idle stabilization routines for Bosch stuff, what a pain, any insight on what you've tried might help. ------------------------------ From: Todd Knighton Date: Thu, 13 Jun 1996 15:08:48 -0700 Subject: Re: EFI Algorithms ducharme@xxx.com wrote: > > P.S. I did finish my EFI B&S, and at the ripe old age of 44 have my BSEE. > (If anyone is interested, I'll put my project paper out on the Web.) - ---------------Love to see it.---------------- Todd Knighton Protomotive Engineering Email: knighton@xxx.net ------------------------------ From: FIScot@xxx.com Date: Thu, 13 Jun 1996 21:20:40 -0400 Subject: Re: Sensor Linearization In a message dated 96-06-13 05:26:24 EDT, you write: >One problem remaining is the MAT and the Coolant Temp Sensor. >Going by service manuals and using a 1.2 K pullup this gives quite >a nonlinear temp vs voltage. >The question I have for the good folks is how do you linearize the >sensor. Or is it necessary? If you have lots of PROM space, one fast way (cpu cycle wise) to linearize the MAT or CTS is to have a 256 byte look up table representing the complete temp range of the sensor. Get the A/D result for the sensor, and move it to ACC B. Point the INDEX to the start of the table, add ACC B to the INDEX, and get the value at the new INDEX loc that represents the temp of the sensor. Quick and easy once you establish the table. As far a the MAP sensor, I have plotted the output of several MAPS, using a 5 volt ref, a voltmeter, and a hand held vacuum pump. These things are amazing linear! They don't go all the way to 0 volts, or all the way to +5 V, so the output only uses a portion of the available range. Just subtract a nominal minimum position from the output to get to zero, then scale what would be the max range of the sensor to be the max output that fits in '00' to 'FF'. Scot Sealander FIScot@xxx.com ------------------------------ From: john spears Date: Thu, 13 Jun 96 20:55 EST Subject: RE: GM vats All of the TPI systems that used VATS, used the 30 hz signal as was stated. On the newer LT1 engines, a 50 hz signal is used, except on Corvettes. They used a special data stream signal on the serial data line. These eproms are much more difficult to use on projects, because of this. On these, you must go into the calibration and toggle the vats/no vats option. Even the new flash memory PCMs are using the 50 hz setup. BTW, the early system was officially called PASS-KEY and the 50 hz is called PASS-KEY II. I always grab these newer ones in the junkyard for my projects that use the flash PCMs. Sometimes the key is still in the ignition and I can just measure the resistor pellet; otherwise I just take it back and try each of the possible values using a decade box, (waiting 4 minutes between tries) until that 50 hz signal pops up on the oscope! Then I solder in the correct resistor. You can build the same basic thing with a 555 chip, but I like the challenge of figureing out the correct resistor! Plus, they are quite plentiful now that more and more GM cars are using VATS. John Spears Speartech Fuel Injection Systems ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 19:10:05 -0700 Subject: Re: Sensor Linearization >If you have lots of PROM space, one fast way (cpu cycle wise) to linearize >the MAT or CTS is to have a 256 byte look up table representing the complete >temp range of the sensor. Get the A/D result for the sensor, and move it to >ACC B. Point the INDEX to the start of the table, add ACC B to the INDEX, >and get the value at the new INDEX loc that represents the temp of the >sensor. Quick and easy once you establish the table. > >As far a the MAP sensor, I have plotted the output of several MAPS, using a 5 >volt ref, a voltmeter, and a hand held vacuum pump. These things are amazing >linear! They don't go all the way to 0 volts, or all the way to +5 V, so >the output only uses a portion of the available range. Just subtract a >nominal minimum position from the output to get to zero, then scale what >would be the max range of the sensor to be the max output that fits in '00' >to 'FF'. > >Scot Sealander FIScot@xxx.com > >Hi Scot: >Yes I have thought of the bruce force method but have dismissed it >so far in dealing with the Map. Proms are cheap though. >True both TPS and MAP are linear sensors with an offset. I just >find doing all the calcs takes up a lot of cycles. Once again >the response that there is considerable head room in processing >time is correct. It is relatively simple to do the calculation. >My training is in small MPUs where everything had to be optimized. >Maybe I should relax that a bit. >Tnx Scot: peter ------------------------------ From: RABBITT_Andrew@xxx.au Date: Fri, 14 Jun 1996 10:49:52 est Subject: Re: Sensor Linearization >> They don't go all the way to 0 volts, or all the way to +5 V, so the output only uses a portion of the available range. Scot Sealander FIScot@xxx.com << This is so you can test for short or open circuit conditions (OBD style) ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 19:24:17 -0700 Subject: Re: Sensor Linearization > >Good luck, >Todd Knighton >Protomotive Engineering >Email: knighton@xxx.net > >P.S. Also working on Idle stabilization routines for Bosch stuff, >what a pain, any insight on what you've tried might help. > >Hi Todd: >I am not too sure what you have done. To begin there appear to be >two problems with idle control. Entry into the idle speed with an >over shoot and a resulting oscillation. This can be helped with >a stepper speed algorithm. The idea is to slow down the stepper >as the desired idle speed is approached. Oems take about 3 seconds >to reach the desired Idle speed from Idle reset. The second method >is to add a idle control offset to you timing control when in >idle mode. This gives you one more controller for your PID. >A variation of a few degrees will fine tune the idle but not >really affect much else. Some oems do this. I have not yet tried it. >I found trying to idle the dingy at 500 rpm makes it very unstable. >The best I could do was about 900 rpm and once in a while there would >be a dampened idle control loop oscillation. I didn't experment too >much with dead time control. The second is when the algorithm doesn't >respond fast enough. Thus there appears to be a tightrope here. >Anyways when I get back in business I will keep you posted. >TNX for all the help Todd >GL:peter ------------------------------ From: Darrell Norquay Date: Thu, 13 Jun 96 21:42 PDT Subject: Re: Sensor Linearization At 08:04 AM 6/13/96 -0600, P.P.F. wrote: >> Subject: Sensor Linearization >> The inclination is to accept the Map sensor data as well as the Tps >> as they are linear even though there is a loss in range. >> One problem remaining is the MAT and the Coolant Temp Sensor. >> Going by service manuals and using a 1.2 K pullup this gives quite >> a nonlinear temp vs voltage. >> The question I have for the good folks is how do you linearize the >> sensor. Or is it necessary? >> or a lookup and then interpolate. >> What I am trying to get is linear numbers between 0 and 255 for >> a temp range of about -40 to 250 degrees. >> Tnx again everybody: peter First question to answer is: Do you really need to linearize the CTS sensor at all? If I remember correctly, AFR requirements increase rapidly with decreasing temperature below 10 degrees C or so, and are relatively constant around full engine operating temps. This, coincidentally, is exactly the way an NTC thermistor's curve looks. It's resistance changes more rapidly the lower the temperature, and it has a dynamic range of 10^5 ohms from -50 to + 100 C or so depending on the initial resistance and thermistor material. Secondly, if some linearization were necessary, do you really need the accuracy of a 255 point lookup table? Changing the injector duty cycle every 10 degrees C would probably be good enough for calculating AFR's, especially since it is only important for cold starting and becomes moot one you reach operating temp. As far as doing polynomial calcs on an 'HC11, forget it. It's much too busy handling interrupts to be doing complex math just for temp. comp. Someone else mentioned the BOSCH linearization routine, this seems like something that you could use as a guide. Of course, unless you get their exact sensor, the numbers don't mean much, since thermistor characteristics and curves vary all over the place. MAT is another story, albeit a similar one. Since the air temp used for air density calculations is in degrees K, it probably has a much smaller effect on the overall formula than you think, as well as the fact that air temps usually don't reach more than +50 C. -40 to +50 C is really 233 to 323 K, a much smaller (percentage wise) change. You could contact companies like Fenwal Electronics or Yellow Springs Instrument about their linear thermistor networks, or for even more accuracy,use a linear temperature sensor IC like the Analog Devices AD590 (bonus: reads in degrees K) or a National LM34/35 series, but now you've got to use an opamp circuit which has it's own temperature stability problems. Just my $0.25 ($0.33 CDN) worth :) regards dn ------------------------------ From: pfenske@xxx.ca (peter paul fenske) Date: Thu, 13 Jun 1996 23:30:34 -0700 Subject: Linear Sensors Tnx everyone who helped me with this problem. In the end result? there appear to be two ways to handle nonlinear sensors like the CTS or MAT. The simplest is to use a lookup table. Algorithm is to load X reg with location of table. Get the AD value for the CTS and use ABX inst to add to X reg. Then use a indexed load to get your corrected value. Pretty neat and a lot of aftermarket ECMs do this. Carried to extremes you can linearize or create full scale for all sensors(TPS, Map, Mat, MAF). One can even use a table to create RPM values from timer compare differences. Lookups like this run extremely fast. About the only disadvantage is lots of Prom space, run out of eeprom pretty fast, with an inability to change large spaces in the operation region quickly. Although an algorithm can be programmed to do this I suppose. Now to the second method. I looked in my old digital controls book and this method is known as piecewise linear correction. Quess I was looking at something blond across the hall when the Prof was discussing this. Anyways the scheme works by breaking up the sensor data into discrete regions. Then a correction factor is added to each segiment(not sure if multiply), add is easier, to linearize the sensor data. This could be construed a poly fit. REALIZE the math is done outside. Only the results are used. With a little work a table for a generic motors CTS can be made that gives 1.8 degrees resolution with 255 values starting at - -110.2 degrees. This method seems to be the way OEMs do it. As to why we need a fractional value or more commonly 0 to 255 range. Most speed density tables are a 15 by 15 or some such thing. So one would thing a value between 0 and 15 is enough. Realize the base pulse you get is coarse in value. For homebuilt or some aftermarket ECMs this is adequate. What happens in OEMs is a four point interpolation takes place. This gives much finer control of injector pulse width. Well Tnx everyone for their generous assistance. Will keep you guys informed. Yes I am going to the dungeon to find some more material. CU:peter ------------------------------ End of DIY_EFI Digest V1 #166 ***************************** To subscribe to DIY_EFI-Digest, send the command: subscribe diy_efi-digest in the body of a message to "Majordomo@xxx. A non-digest (direct mail) version of this list is also available; to subscribe to that instead, replace "diy_efi-digest" in the command above with "diy_efi".