Wiring Wideband O2 Sensors

Rauq

Goblin Guru
This has been a popular topic recently, so I'll attempt to write something up that can be referenced rather than adding information piecemeal in response to various questions.

What is an O2 (oxygen) sensor?
Spark ignition engines must inject a precise amount of fuel based on how much air enters the cylinder. Too little fuel (lean) can cause the engine to run hot or to knock, and too much fuel can reduce power and foul spark plugs. O2 sensors are necessary to provide feedback to the computer as to whether more or less fuel is needed for a given airflow.

O2 sensors measure the amount of unburnt oxygen in the exhaust stream and output a calculation that indicates the ratio of air to fuel. Under steady state, the engine tries to minimize over- or under-fueling, where excess fuel or air would pass through the cylinder unincorporated into the combustion process. For pure gasoline, the ratio is about 14.7 parts fuel to 1 part air, also written as 14.7:1 AFR. For E85, it's about 9.8:1, and for methanol around 6.5:1. To obviate the need to specify fuels and their corresponding AFRs, it can be easier to refer to O2 sensors as measuring lambda (λ), or the ratio of the actual AFR to the stochiometric AFR (a ratio of a ratio, yes, but it does simplify things). When trying to make power, especially with forced induction, a richer fuel mixture is needed to keep things cool and allow for more timing- something like 11.5-12.5 AFR on gasoline, 7-8 AFR on E85, or, more simply, 0.8 λ.

What's the difference between a narrowband and wideband?
There are two types of O2 sensors: narrowband and wideband. A narrowband sensor can really only quantify between 0.99-1.01 λ, or like 14.6-14.8 gasoline AFR. With a 0-1v output, steady state stochiometric is seen by the ECM as a rapidly and evenly alternating lean-rich cycle. Too rich would tend to show more measurement time at the low end of the output range, and vice versa. Because this sensor can't tell the difference between anything richer than 0.99 λ, it cannot be used effectively to tune for power, which is where the wideband sensor comes in.

The wideband sensor can accurately quantify a wider range of λ, thus its name. The common Bosch LSU4.9 sensor can read down to 0.65λ, or about 9.6 gasoline AFR or 6.8 E85 AFR. With a 0-5v output, the ECM and/or tuning computer can measure rich lambda and more accurately track the fueling required to maintain the target air-fuel ratio.

So what?
The 2008-2010 Cobalt SS/TC with LNF engine is the only Cobalt that came from the factory with a wideband O2 sensor. While I don't have an LNF, I have read and been told that it's not the most accurate or reliable. All stock Cobalts, turbo or not, have a stock narrowband O2 sensor after the catalytic converter (also referred to as HO2S2, heated O2 sensor 2), whose sole purpose is to measure catalytic converter efficiency. All non-LNF Cobalts have a stock narrowband O2 sensor pre-cat (HO2S1).

Whether you have an LNF and want to add an aftermarket wideband O2 sensor/gauge or have any other motor and want to do some tuning, this leads to the topic that led to the creation of this post:

How to add an aftermarket Wideband O2 sensor

0. Purchasing
You will need to purchase, at minimum, a sensor, a controller, and a wiring harness. AEM and Innovate are two brands I can name off the top of my head. Most kits include a Bosch sensor. For most kits with a gauge, the gauge is also the controller. Kits with controllers but without gauges do exist. Many kits will include weld-in bungs if your exhaust needs somewhere for the sensor to install. OBD2-interfacing gauges exist and will be clarified below.

1. Physical Install
The sensor will need to be screwed into a bung in the exhaust. If you have a free bung, great. If you have to add one, see your wideband's manual for advice regarding placement. Options do exist to replace a narrowband with a wideband and send a simulated output, and will be clarified below. You will also need a mounting solution for the controller/gauge. Shameless plug, I designed and 3d printed a gauge pod for the stock Cobalt boost gauge, an Innovate MTX wideband, and the Cobalt ambient light sensor. Info here.

2. Electrical Install
You will need to get 12v power and ground to the controller, at a minimum. Wherever you're grabbing power from, whether via relay from the battery or other source, it should be a key-on power source. Leaving it powered all the time will kill your battery, and forgetting to power it on with the car will kill the sensor as it has a heater that needs to be powered so it doesn't get coated with crud. Most gauges will also have an additional signal wire that, when tapped into a circuit that's powered with the headlights, will dim the gauge with the headlights on (aka when it's dark).

I honestly don't remember where I pulled my switched power source from. I think it was from the circuit in the front I had planned for my heat exchanger power source as I ended up installing that in the back of the car. I just used a T-tap on a headlight wire planning to come back to it... you can guess how that worked out.

3. Bringing in Output Data
So you've got your sensor in the exhaust, your gauge/controller powered and mounted, and you're looking at some numbers. Now what? You're probably going to want to use this data when tuning in HP Tuners. There are 4 ways to get it there (off the top of my head):
  1. Connect your gauge/controller straight to your logging/tuning computer. I've done this once before, it was a pain. It involved a serial -> USB adapter, and I spent more time trying to get that set up and running than it did to create a base tune in HP Tuners.
  2. Purchase an HP Tuners Pro interface module with 0-5v inputs on the side. Wire your 0-5v output from the gauge/controller into the interface module. The HP Tuners channel will simply be the MPVI or MPVI2 Pro input.
  3. My favorite option, wire the 0-5v output into the AC pressure sensor signal wire. On my setup, the yellow wire coming off the gauge is the 0-5v analog output. When thinning the engine harness, I removed everything for the AC compressor clutch relay, and the 5 volt and low reference for the AC refrigerant pressure sensor. I kept the red/black wire on the engine side of the engine harness and connected the two together. If you don't have an '06 LSJ (like a loser) then your wire color may vary. Then, I take my butt over to HP Tuners, add the AC Pressure Sensor channel and Commanded AFR to my logs, set up Math Parameters for Wideband AFR and AFR error (and gripe about LSJ's in HP Tuners wanting to do AFR in gasoline numbers instead of Lambda).
  4. (really 3.1) new edit: LSJ's without EVAP can also use the fuel tank pressure signal wire, which is pin 24 on the C1 connector, a dark green wire. Again, if you don't have an '06 LSJ (like a loser), then your wire color may vary. See Post #13 in this thread for a little more information. Unsure if this works with any other motor, folks are welcome to chime in.
    1. Innovate MTX-L wiring
      31606
    2. Aem UEGO 30-4110 wiring
      41871
      31607
      31608
  5. OBD2 Wideband... although this only works with a CAN PCM, which I think includes the LNF and LAP, does not include LSJ or early L61, and which may or may not include LE5 and late L61? Piece of cake, plug it into the OBD2 port, plug your HP Tuners interface into the OBD2 port, configure it I don't know how because I don't have it, done.
  6. Write down your AFR under WOT and then compare it to your commanded AFR in HP Tuners and then adjust your tune. Spare motors suggested for this method.
Final thoughts: as I've mentioned elsewhere before, in my worthless opinion, the only downside to my favorite method of getting data into HP Tuners via the AC pressure signal wire is the effort it takes to hook up the first time. Wiring into the HP Tuners interface is certainly easier, but then you have to either leave it in the car or disconnect the signal wire and tape it up to protect it from shorting.


TL;DR If you want or need to add a wideband O2 sensor, buy an OBD2 wideband if you have an LNF or LAP, HP Tuners Pro interface if you want to spend 5 minutes hooking it up, or go through the AC if you want a clean, reliable, permanent solution.
 

Attachments

Last edited:

jirwin

Goblin Guru
To add to 3.4., all you have to do in HPTuners is repoll parameters and add the wideband. See here:

Just did it for my 2.2 LAP and it couldn't have been easier.
 

Rauq

Goblin Guru
To add to 3.4., all you have to do in HPTuners is repoll parameters and add the wideband. See here:

Just did it for my 2.2 LAP and it couldn't have been easier.
Nice. I was pretty sure this worked for an LNF but wasn't sure about an LAP. Still not sure if it works on any or all LE5 or L61. I am confident this doesn't work on an LSJ though. Will add those comments into the original writeup.
 

Dsteinhorst

Well-Known Member
This is super helpful and I'm right in the middle of my wideband install now. Does anybody have the connection diagram to the ECM for an LAP motor? 09-10 2.2. I thinned the wires out of my harness.
 

Dsteinhorst

Well-Known Member
I just completed option 3 today on my LAP. Couple notes.

My radiator fan turned on right away. Have to change ac pressure vs fan map in the calibration. Set all to zero so the wideband won't turn the fan on.

I'm using the Autometer wideband where 0 volts is 10.0 and 4 volts is 17.0 AFR. Calculation is ([7101.10]*1.75)+10

Otherwise, this worked great and is super cool. This post was perfect timing.
 

jirwin

Goblin Guru
Yeah I had no problems with it. I'm running my gauge right where the cobalt gauge cluster should be
 

Rauq

Goblin Guru
Update: For LSJs, at least, you can also bring your wideband O2 sensor data into the PCM through the Fuel Tank Pressure signal wire on the C1 PCM connector. As my wideband O2 sensor is already connected to the AC Refrigerant Pressure signal wire, I have instead rerouted my Supercharger Inlet Pressure sensor to this input, which is probably only relevant on twincharged setups, so...

I don't think this will work if you are stilll running EVAP, and I don't know if this will work for any other motor, but if you have a need to pull another data point into the computer (oil pressure, fuel pressure, etc.) then here's another possible input point.

41867

41868
 
Last edited:

Rauq

Goblin Guru
Doublepost time!

My Innovate wideband died. It acted like it needed to be recalibrated, so I did that, and it'd work for about 10 minutes before it started getting really laggy again. I put a new sensor in it, and it did the same thing. I read something about its preheating routine zapping sensors and that there was an updated firmware that addressed that, and it did the same thing with with both of the sensors I had on-hand at that point.

I picked up an AEM UEGO 30-4110 and it works a charm with the original sensor, the one that came with the Innovate controller. So now I have a working wideband gauge with two spare sensors...

Anyway, the white wire from this unit is now attached to the AC Refrigerant Pressure Signal input wire on the PCM. Quick update on the maths parameters in HP Tuners, and we're back off to the races... or HDPEs, I should say.

41870
 

mike_sno

Goblin Guru
A few beginner questions:
1. Would it not be necessary for every goblin build to recalibrate the MAF Sensor due to the changes in the inlet design? How would you do that if you only have a narrow band O2 sensor available?

2. Is the stock narrow band O2 Sensor used for a closed loop control of the AFR?

3. Can you tell the ECU after installing the wideband sensor to use the input of the AC compressor pressure to adjust the amount of fuel being injected?

With my current understanding, I think the ECU acts like a PID controller. The AFR comes from the different fields. The O2 sensor measures the AFR result, the MAF measures the amount of air (given and can‘t be controlled) and the ECU matched the amount of fuel added to the engined to achieve the desired AFR. How in the world would that work with a narrow band sensor??
 

Ross

Goblin Guru
1. No, and why do that? I tuned my stock LSJ for the goblin's shorter intake and exhaust. It was only out 15% at the most, and the PCM(or ECU, same thing, different name) can compensate for that little bit of difference. So no, it is not necessary if you are stock... just drive your goblin and it will correct the tune. Only takes an hour or so of driving. Tuning with a narrow band is like driving with reader glasses - you can't see where you're going very well. The PCM can tune some data tables with the narrow band, but it is slow. I tune with a wideband, and get accurate results quickly.

2. Yes, the stock O2 sensor is used, in closed loop, to adjust the STFT (Short term fuel trim) table, and the LTFT, which affects the AFR.

3. No, not with HP Tuners you can't. If you can reprogram the machine language in the PCM, then you could, but that would be more work than it is worth. But if you can, HP Tuners will probably hire you to hack the GM code.

Yes, the ECU(or PCM) is a big PID controller. It (the PCM) calculates the amount of fuel to give the engine based on 2 methods (MAF method, and Volumetric Efficiency method) then blends those 2 calculations to come up with a final number to send to the injectors and spark plug timing. The PCM is checking the narrow band O2 sensor and adjusting the fuel mixture. Normally the engine runs slightly rich for a second, then slightly lean for a second, constantly going back and forth, as the narrow band O2 sensor is only used to check if it is lean or rich mixture.
 
Last edited:

mike_sno

Goblin Guru
Very interesting. My understanding of closed loop and open loop (and many more things) is not correct.

I just don't get it how the ecu would adjust anything outside of the lamda 1 reading with a narrow band sensor. Let's say you want an AFR of 12.5, the ecu has no way of finding out what it really is, or?

I belive with some tricks and adjustment you can tune your ecu, but the parameters in the ecu have to be tuned at least once with an wideband. After that trust that no external factors go to wide off.

Isn't it like my ofen in the kitchen: I want 85F but I can only measure of I have below or above 100F. If the environment doesn't change, I can get it somewhere close, but this is in my opinion not a real closed loop regulation.
 

Rauq

Goblin Guru
Quick important distinction, the LNF ECU does have a wideband sensor and can tell if it's commanding 12.5 AFR and getting it.

On all other Cobalt PCMs (which are also all port injected engines), they only have closed loop when commanding 14.7 AFR. If everything were spot on, you'd see STFT's bouncing between slight additions and subtractions and AFRs bouncing between very slightly high and very slightly low. This is closed loop- the more time your engine is richer than stoich, the more negative the STFT, and the more negative your STFT is, the more negative the LTFT becomes, and all vice versa as well. Probably reading into this snippet a little too much, but you can see below that LTFTs (yellow) started positive, about 5%, and STFTs stayed negative, so LTFTs gradually reduced to about 2%. You can also see the AFRs from the wideband oscillating as well. I could pull a little bit of fuel out of the VE and/or MAF maps at this point in the tune, but in my opinion 2% fuel trims are perfectly acceptable. Theoretically you can tune for most of your VE map and most of your MAF range by looking at fuel trims, but what's important is that you cannot tune for power enrichment/WOT/AFRs significantly lower than 14.7 with a narrowband- you're just guessing.

The wideband lets you get actual feedback when the engine is in open loop. You're adjusting the maps so that when the ECM doesn't have feedback of its performance, that it's already been dialed in.

42026


To go back to your oven analogy, if your oven only knew if it was hotter or colder than 350°, it could still maintain that temp by adding heat if it's below that temp and cutting it off if it's above that temp. With a better sensor, you could teach it that to maintain 400° it needs to run about 14% more, or whatever that number is, and then you'd verify that when you want 400° that it's actually right at or around that temp, and from then on you could generally trust that when you want 400° it's probably going to be accurate.

And to expand on the oven analogy just a little bit more, if you had a dish that absolutely had to cook at or above 400°, you would probably set it up to run just a little hotter than that. I could probably make a little more power running a little bit leaner at WOT than 11.5 AFR, but if it's going to be off by a little bit, I'd rather sacrifice a little bit of power for the health and longevity of the motor.
 

mike_sno

Goblin Guru
Ok, that makes sense now. With a narrow band you don't have always closes loop. Closed loop only when you are in the 14.7 range.

Is my understanding correct that while you are in closes loop, the STFT and LTFT are updated. Once the engine gets into a range where close loop does not work anymore, STFT and LTFT are frozen and that will allow the engine to operate according to the programmed AFR?

I will add the Wide band sensor information to my engine table.

Would it be possible to use the LNF ECU with the LAP engine?
 

Gtstorey

Goblin Guru
Ok, that makes sense now. With a narrow band you don't have always closes loop. Closed loop only when you are in the 14.7 range.

Is my understanding correct that while you are in closes loop, the STFT and LTFT are updated. Once the engine gets into a range where close loop does not work anymore, STFT and LTFT are frozen and that will allow the engine to operate according to the programmed AFR?

I will add the Wide band sensor information to my engine table.

Would it be possible to use the LNF ECU with the LAP engine?
No using the LNF ecm on anything that isn't a direct injection engine. I don't follow the Ecotec designations enough to remember which engine is the LAP.

I will add also, that the LNF will drive like crap if the MAF isn't tuned in pretty close. If it's trying to pull or add 15% you will feel it. This may be the very simple long term trim routine it has that just applies one number to all engine conditions.
 
Top