P0138 on 2012-2016 Mazda CX-5: O2 Sensor High Voltage Causes and Fixes
On a 2012-2016 Mazda CX-5, code P0138 almost always points to a failed downstream oxygen sensor (Bank 1, Sensor 2). Replacing this sensor, located in the exhaust pipe after the catalytic converter, is the most common fix. Expect to pay ~$70-$120 for an aftermarket sensor or ~$180-$240 for an OEM part. The OEM part number is PE02-18-86Z, which has been superseded by PE02-18-86ZA.
- P0138 on your CX-5 means the downstream O2 sensor (after the catalytic converter) is sending a high voltage signal.
- The most likely cause by far is that the O2 sensor itself has failed and needs to be replaced.
- Other potential causes are damaged wiring to the sensor or, very rarely, a PCM issue.
- This is a DIY-friendly repair for most home mechanics with basic tools and a new sensor. A 22mm O2 sensor socket is highly recommended.
- Do not ignore this code, as it will cause poor fuel economy and an automatic failure of any emissions test.
What's Unique About the 2012-2016 Mazda CX-5
The 2012-2016 Mazda CX-5 (KE generation) with the SkyActiv-G engine has a straightforward four-cylinder exhaust setup with one upstream and one downstream oxygen sensor. 🎬 Watch: Locate the upstream and downstream sensors on your CX-5. Unlike V6 or V8 engines, there's no confusion about which 'bank' is which. The P0138 code is a very common and well-documented issue where the downstream sensor simply fails from age and exposure. There are no widespread, unique platform-specific defects that cause this code; it's typically a standard wear-and-tear component failure. The repair is accessible, as shown in multiple DIY videos.
Symptoms You May Notice
- Check Engine Light is on.
- Reduced fuel economy.
- Rough idling or engine hesitation.
- Failure to pass an emissions inspection.
- Strong exhaust odor due to a rich fuel mixture.
- Replacing the upstream O2 sensor (Sensor 1). This code is specific to Sensor 2, which is located after the catalytic converter. Replacing the wrong sensor will not fix the issue.
- Assuming the sensor is bad without checking the wiring. A short in the wiring can mimic the symptoms of a failed sensor, leading to unnecessary replacement.
Most Likely Causes
- Failed Downstream O2 Sensor (Bank 1, Sensor 2) 🔴 High Probability → Shop Oxygen Sensor O2 sensors are wear items that are exposed to extreme heat and exhaust gases. They have a finite lifespan, typically around 100,000 miles, after which internal failure becomes common. Forum discussions for Mazda vehicles confirm this is the most frequent fix for P0138.
How to confirm: Use an OBD-II scanner to monitor live data for the 'O2S B1S2' voltage. If the voltage is stuck high (e.g., >0.9V) and does not fluctuate, the sensor has likely failed. 🎬 See how to diagnose and fix a P0138 circuit high code. A healthy downstream sensor should show a relatively stable, lazy voltage, typically around 0.5-0.8V, when the engine is warm and at a steady RPM, while the upstream sensor fluctuates rapidly. You can also test the sensor's internal heater circuit resistance; a reading between 5-15 Ohms is expected, while an open loop ('OL') indicates failure.
Typical fix: Replace the downstream oxygen sensor. This involves raising the vehicle, locating the sensor in the exhaust pipe after the catalytic converter, disconnecting the electrical connector, and unscrewing the old sensor using a 22mm or 7/8" wrench, often an O2 sensor socket. 🎬 Watch this step-by-step downstream sensor replacement walkthrough. Applying anti-seize compound to the new sensor's threads is recommended.
Est. part cost: $70 - $240 - Damaged Wiring or Connector 🟡 Medium Probability The wiring for the downstream O2 sensor runs underneath the vehicle, making it susceptible to damage from road debris, heat from the exhaust, or corrosion in areas with harsh winters. Wires can melt, fray, or suffer from poor connections at the harness connector.
How to confirm: Visually inspect the entire wiring harness from the O2 sensor to its connection point. Look for any frayed, melted, or broken wires. Check the connector for corrosion, moisture, or bent pins. A multimeter can be used to check for a short-to-voltage in the signal wire, which would cause a constant high reading.
Typical fix: Repair the damaged section of the wiring harness or clean/replace the connector. If the damage is severe, a new harness pigtail may be required.
Est. part cost: $10 - $50
Rare But Worth Checking
- Rich Running Condition: While less common, a system-wide rich fuel condition (too much fuel, not enough air) can cause the downstream O2 sensor to report a legitimately high voltage. This could be due to issues like leaking fuel injectors or a faulty fuel pressure regulator. This would typically be accompanied by other codes and more severe performance symptoms.
- Exhaust Leak: An exhaust leak upstream of the sensor can sometimes cause erratic readings, though it's less likely to cause a persistent high voltage code compared to a failed sensor. It's worth a quick visual and auditory check.
- Powertrain Control Module (PCM) Fault: This is extremely rare. The PCM itself could be faulty, misinterpreting the sensor's signal. This should only be considered after all other possibilities have been definitively ruled out.
Diagnosis Steps
- Confirm the code P0138 is present using an OBD-II scanner.
- Observe the live data stream for the Bank 1 Sensor 2 (B1S2) O2 sensor voltage. The reading should not be stuck at a high voltage (e.g., 0.9V - 1.2V).
- Safely raise and support the vehicle on jack stands.
- Locate the downstream O2 sensor, which is installed in the exhaust pipe after the catalytic converter.
- Thoroughly inspect the sensor's wiring harness and connector for any signs of melting, chafing, corrosion, or physical damage.
- If the wiring appears intact, test the sensor's heater circuit resistance with a multimeter. A reading between 5-15 Ohms is good; an open circuit ('OL') confirms a failed sensor.
- If the sensor and wiring appear good, the most probable cause remains a faulty O2 sensor.
- Disconnect the electrical connector. You may need to lower a small heat shield held by 10mm bolts to gain access.
- Using a 22mm (or 7/8") O2 sensor socket or wrench, remove the old sensor from the exhaust pipe.
- Install the new sensor, making sure to apply anti-seize to the threads if not pre-applied.
- Reconnect the electrical connector and re-secure any shields or brackets.
- After replacement, clear the trouble code with the scanner and perform a drive cycle to ensure the code does not return.
Parts You'll Likely Need
- Downstream Oxygen Sensor (Bank 1, Sensor 2)
(OEM #PE02-18-86ZA)— This is the component that the P0138 code directly identifies as having a circuit high voltage fault. It is a common wear-and-tear item and the most frequent cause of this code. The original part number was PE02-18-86Z, which has been superseded by PE02-18-86ZA.
Trusted brands: Denso (OEM supplier), NGK/NTK (OEM supplier), Bosch
OEM price range: $180-$240
Aftermarket price range: $70-$120
Mechanic-Grade Diagnostic Values
- Downstream O2 Sensor (B1S2) Voltage (Live Data) — expected: Relatively stable voltage between 0.5V and 0.8V on a healthy, warm engine at steady RPM.. Failure: Voltage is stuck high (consistently >0.9V).
- PCM Trigger Condition for P0138 — expected: The PCM expects a fluctuating voltage signal within a specific range.. Failure: The code is set if the PCM detects an input voltage from the rear HO2S greater than 1.2 V for 0.8 seconds.
- Downstream O2 Sensor Heater Circuit Resistance — expected: 5-15 Ohms at room temperature, measured between the two same-colored wires on the sensor connector.. Failure: An open loop ('OL' or infinite resistance) on a multimeter indicates a failed heater element inside the sensor.
Scan Tool Commands That Help
- FORScan: Live Data Graphing (Oscilloscope Mode) — FORScan is a powerful diagnostic software for Ford and Mazda vehicles that provides dealer-level access. Use its live data graphing feature to monitor the B1S2 voltage in real-time. A flat line at high voltage confirms a failed sensor or circuit, whereas a healthy sensor will show a lazy, stable voltage.
Wiring & Ground Locations
- Downstream HO2S Connector — Under the vehicle, above a small heat shield near the center of the car. The wiring runs up into the cabin area. Access may require lowering the heat shield held by 10mm bolts.. This is the primary connection point for the sensor. It is exposed to the elements and is a common location for corrosion, damage, or loose pins that can cause the high voltage reading.
- PCM Connector — The Powertrain Control Module (PCM) is located in the engine bay. A wiring diagram is required to identify the specific pins for the downstream O2 sensor.. In rare cases of persistent issues after sensor replacement, a continuity test from the HO2S connector to the corresponding pins at the PCM can rule out a break or short in the main wiring harness.
Real Owner Repair Stories
- Mazdas247 Forum User (Mazda (model not CX-5, but same code and engine family)) — P0138 Check Engine Light
✅ What actually fixed it Replaced the downstream oxygen sensor with an NTK part (NTK 24447). The user noted the need for a 10mm ratchet for a wire bracket and a 22mm open-ended wrench for the sensor itself.
OEM Part Supersession History
PE02-18-86Z→PE02-18-86ZA— Standard part revision. No specific reason is publicly documented, but it usually indicates minor improvements in materials, manufacturing process, or supplier change.
Heads up: The parts are interchangeable; PE02-18-86ZA is the correct current replacement for PE02-18-86Z.
Model Year Variations Within This Range
- 2016.5: Mazda introduced a mid-cycle refresh for the 2016 model year (often called 2016.5). Changes included a revised grille (horizontal bars vs. honeycomb), an electronic parking brake, and an updated infotainment system. However, these changes did not affect the powertrain, exhaust system, or the diagnosis for code P0138. The engine and sensor part numbers remained the same.
Diagnostic Flowchart
Other Known Issues on This Vehicle
Issues unrelated to this code that are worth knowing about as an owner of this generation:
- Leaking Drive Belt Tensioner 🟠 Medium — Common across many model years. Oil can leak from the hydraulic tensioner, causing rattling noises and potentially contaminating the serpentine belt. (Ref: TSB 01-019/19 (also referenced as 01-008-23) describes the issue and the fix, which involves a revised tensioner part.)
- LED Daytime Running Light (DRL) Failure 🟡 Low — Primarily affects 2016 models. The DRLs can flicker or fail completely due to corrosion caused by a faulty sealing gasket on the wiring connector. (Ref: Recall 4320A (NHTSA Campaign 20V063000).)
- Easily Cracked Windshields 🟠 Medium — Widely reported by owners across the first generation. The windshield seems prone to cracking or chipping from minor impacts that wouldn't damage other vehicles. (Ref: TSB 09-025/14 addresses a cracking noise from the windshield in cold temperatures due to positioning pins, but not the glass fragility itself.)
- Worn/Peeling Steering Wheel Leather 🟡 Low — A cosmetic issue reported on several model years where the leather surface wears prematurely. (Ref: TSB 06-001-23a addresses this concern.)
- Broken Rear Coil Springs 🟠 Medium — Can occur on higher-mileage vehicles, causing a knocking noise from the rear or a lower vehicle ride height. (Ref: TSB 02-015-18-3499a describes this issue.)
Used vs. New Parts: Buying Guide for This Vehicle
When a used part is the smart pick: For this repair, a used part is almost never a smart choice. Oxygen sensors are wear-and-tear items with a finite lifespan. Installing a used sensor from a junkyard is risky as you don't know its remaining life, and it could fail shortly after installation, forcing you to do the job twice.
Donor-vehicle mileage cap: roughly under 20000 miles for the part to have meaningful remaining life.
What to inspect on the donor part:
- If forced to consider used, only select a sensor from a very low-mileage vehicle (<20,000 miles).
- Inspect the sensor tip for heavy white or black deposits, which indicate contamination or a poorly running engine in the donor car.
- Ensure the wiring and connector are completely intact with no signs of melting, fraying, or corrosion.
Aftermarket brands forum-validated for this vehicle:
- Denso (often the OEM supplier)
- NGK / NTK
- Bosch
Brands owners have reported issues with on this vehicle:
- Unknown or unbranded 'no-name' parts from online marketplaces. While cheaper, they have a high rate of being dead-on-arrival or failing prematurely, often causing the same P0138 code to return.
Real Owner Stories
Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.
Mazda CX-5 — ~100000 miles
Symptoms: Check Engine Light on with code P0138; the user needed to clarify the location of Bank 1 Sensor 1 vs Sensor 2.
What fixed it: Replacement of the downstream O2 sensor.
Source hint: Mazdas247.com: A user in the thread "CEL P0138 - Rear O2 Sensor"
Mazda CX-5
Symptoms: Check Engine Light (CEL) illuminated with code P0138.
What fixed it: DIY replacement of the downstream sensor using an NTK 24447 sensor and a 22mm O2 sensor socket.
Source hint: Mazdas247.com: In a thread titled "O2 Sensor (P0138) CEL Code?"
2012-2018 Mazda 3 (SkyActiv-G)
Symptoms: Check Engine Light on; driving with the issue for too long was noted to potentially harm fuel economy.
What fixed it: Replacing the downstream O2 sensor.
Source hint: Reddit (r/MechanicAdvice): A thread titled "OBD code P0138 (Mazda 3)"
Mazda 3
Symptoms: A complex diagnostic situation where the code persisted even after a new sensor was installed.
What fixed it: The shop initially suspected a PCM failure, highlighting a rare scenario where a simple sensor swap might not immediately clear the issue.
Source hint: Mazda3Club.com: A user in the thread "O2 Sensor (P0138)"
Related OBD-II Codes
Frequently Asked Questions
Which specific replacement oxygen sensor is recommended for the Mazda CX-5 to fix P0138?
My 2016 CX-5 has a P0138 code and the daytime running lights are flickering. Are these related?
Is there a TSB for the P0138 code on my Mazda CX-5?
Where is the Bank 1 Sensor 2 located on the CX-5?
Can I use a used O2 sensor from a salvage yard to save money?
Helpful Videos
The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.
- Mazda CX-5:
- 🧭 Diagnostic Flowchart
- 🎬 Helpful Videos
- What's Unique About the 2012-2016 Mazda CX-5
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Mechanic-Grade Diagnostic Values
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- OEM Part Supersession History
- Model Year Variations Within This Range
- Other Known Issues on This Vehicle
- Used vs. New Parts: Buying Guide for This Vehicle
- Real Owner Stories
- Mazda CX-5 — ~100000 miles
- Mazda CX-5
- 2012-2018 Mazda 3 (SkyActiv-G)
- Mazda 3
- Related OBD-II Codes
- Frequently Asked Questions
- 🎟️ Get 5% Off