Repairing a car can be difficult. And there’s a lot you can do to make it worse. But with a little care you can avoid most complications.
Here’s the story of a repair done on a Toyota RAV4 (2004) to replace a bad upstream oxygen sensor. The story might be useful to you even if you don’t have a Toyota RAV4 because it will help you avoid some common problems.
Cars typically have more than one oxygen sensor. So your first questions might be — How many sensors are in the car? Are they are identical? There are only two in this vehicle (because it’s a 4-cylinder). Far from being identical, they possess entirely different designs and behavior. The more traditional sensor sits further down the exhaust stream near the catalytic converter so it can monitor the health of this converter. The other sensor is a more recent innovation and sits closer to the engine, near the end of the exhaust manifold. It measures the ratio of air and fuel entering the engine, so that the engine computer can monitor and control that ratio.
What makes us think something’s wrong?
The symptoms that got us started were warning lamps on the dashboard, lower fuel economy, and a rich smell of gasoline at idle. To get some clue as to the source of the trouble, we attached a code reader to the car’s OBD-II port. If you haven’t used a code reader before, you’re in for a treat. They give all sorts of helpful information, perhaps more than can be easily digested. This includes diagnostic codes, readiness indicators, and even live sensor readings and graphs on some readers.
Our check showed that a diagnostic code, P2238, had been triggered. This indicates a problem with the upstream oxygen sensor, the one that controls the air/fuel mixture. This was a perfect match to our symptoms. To evaluate the health of the sensor and confirm the diagnosis, we observed the sensor voltage while accelerating and decelerating.

Graph of the upstream (O2S11) and downstream (O2S12) oxygen sensors under acceleration and deceleration.
To make a judgement about the sensor, we had to compare those voltages with something else. So what do we compare it with? This car has a working downstream oxygen sensor (Bank1 Sensor2) so it, along with some data from the repair manual, helped us out.
The repair manual gives the expected output for each sensor:
A/F sensor (upstream oxygen sensor)
+25 % –> Rich output: less than 3.0 V
-12.5 % –> Lean output: more than 3.35 V
Heated oxygen sensor (downstream)
+25 % –> Rich output: more than 0.55 V
-12.5 % -> Lean output: less than 0.4 V
You may know that the downstream sensor reacts more slowly than the upstream sensor by something like twenty seconds. This makes it difficult to compare them at a given instant. But we don’t have to compare them at the same instant, we can simply figure the swing in value from each sensor and compare them. For the shift between 25% rich and 12.5% lean, the manual tells us that the downstream sensor should shift 150mV. Our downstream sensor shifted even more than this so the air/fuel ration shifted by more than 37.5% (25 plus the 12.5). The manual says that the upstream sensor should then change more than 350mV. Instead, we got a paltry 72mV. This gives us a second indication that the oxygen sensor is bad, the first was from the diagnostic code and this one from direct measurement. It’s time to replace the sensor.
Helpful tips for replacing the oxygen sensor
Memory Keeper
For many repairs, including this one, the manual recommends that you disconnect the battery. Keep in mind that some short-term settings will be lost in this process. This normally doesn’t matter but there are some cases where the car will idle poorly until the engine computer adapts. You may have to drive it around a bit so the computer can relearn the lost settings. Just being aware of this can save you some anxiety and frustration.
You can avoid the loss of any engine or radio settings, while still following the conservative safety recommendation of disconnecting the battery, by using a computer memory keeper.
Rusty Bolts
One of the keys to moving this job along was breaking through the rust that was holding the oxygen sensor in place. The heat shield covering the sensor was also rusted into place by its bolts. Rust can severely affect the fasteners of an older car. On all but the largest fasteners, it can seize the threaded portion of the bolt so thoroughly that turning the bolt merely twists the bolt head free without unscrewing it at all. The best way to avoid this problem is to use a penetrating oil. And the best one I know of is Kroil. Some tests show it reduces removal torque by more than 80%. So penetrant can save you from breaking most bolts and bring you great happiness.

Close-up of two similar wrenches, a 6-point box-end and a 12-point box-end. The 6-pt wrench mirrors the bolt shape better and can help to remove bolts with rounded heads.
Rounded Bolt Heads
So what if you’ve already rounded a bolt-head? There’s still hope. While trying to remove one of the heat shield bolts (without penetrant), I did round it. The normal 12pt box wrench slipped off of the rounded head, but a 6 point combination wrench held it well and easily removed the rounded bolt. If you want, you can see more details of the replacement in this video.
Is it really fixed?

Output from the upstream oxygen sensor (air/fuel sensor) after repair. The new sensor swings more than 570mV between acceleration and deceleration, much more than the 75mV change with the old sensor.
If you have a code reader with live-readout or graphing capability, you can verify the fix in a single trip. Simply look at magnitude of the sensor swing when you accelerate and decelerate.
Without the live-readout, you have to verify the fix by showing that the diagnostic code doesn’t return. First you have to clear out any diagnostic trouble codes. But even if the sensor is bad, the code won’t trigger after the first trip. The engine logic requires that you drive the vehicle for two trips, where it reaches full operating temperature, before it is even possible to trip the diagnostic code again. Once you’ve completed that without an error code, you can be confident that you’ve solved the problem.
Hi,
I am not mechanical at all but I really enjoy your video, you are very very good. My dilemma is deciding whether to take my 2003 Rav4 to the dealer or the local mechanic? It is has to do with trust. The local mechanic uses the hand tool like yours to get the codes, but the dealer has a diagnostic machine. Please help.
Thank you very much for the article Andy !
As you have articulated there is much confusion around all vehicle oxygen sensors. And yes there are normally only two…one high and one low as you have described and I’ve very recently learned from you.
I had read a number of conflicting articles and references, and looking at your exploded diagram, it looks just like my 2012 RAV4 V6 [LOVE this little beast!]
The best 65 bucks I ever spent was on a code reader for the RAV.
Thx again.
cheers, Todd
Spruce Grove, Alberta, Canada.
Thank you