Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All →
🎬 Helpful Videos 🛍️ Shop This Part

P0138 on 2004-2009 Mazda 3 2.0L: Causes and Fixes for O2 Sensor High Voltage

This code almost always points to a failed downstream (post-catalytic converter) oxygen sensor. Replacing this sensor is the most common fix. Expect to pay between $60 and $120 for an aftermarket part and around $200 for an OEM sensor. It's a straightforward DIY job for many owners, often requiring an O2 sensor socket and penetrating oil for removal.

19 minutes to read 2004-2009 Mazda 3
Most Likely Cause
Failed Downstream Oxygen Sensor (Bank 1, Sensor 2)
Difficulty
2/5
Est. Time
0.8 hrs
DIY Doable?
✅ Yes
Shop Labor
$110 – $350
Parts Price
$60 – $220
⚠️ Drivable, but... — Yes, you can drive the car, as this code typically doesn't cause major drivability problems. However, you will fail an emissions test, may experience slightly reduced fuel economy, and prolonged driving could potentially harm the catalytic converter over the long term. It is a federal requirement to have functioning emissions equipment.
Key Takeaways
  • P0138 on a 2004-2009 Mazda 3 means the rear oxygen sensor (Sensor 2) is sending a constant high voltage signal.
  • The most likely cause, by a wide margin, is a failed rear oxygen sensor.
  • Before buying a new sensor, perform a quick visual inspection of the sensor's wiring for any obvious damage like melting or breaks.
  • You can continue to drive the car, but you will fail an emissions test and may use more fuel until it's fixed.
  • This is a DIY-friendly repair. Use penetrating oil, an O2 sensor socket, and consider a high-quality Denso or NGK/NTK replacement for best results.
The trouble code P0138 stands for "O2 Sensor Circuit High Voltage (Bank 1, Sensor 2)". On your Mazda 3's 2.3L inline-four engine, there is only one cylinder bank (Bank 1). Sensor 2 is the downstream oxygen sensor, located in the exhaust pipe after the catalytic converter. The Powertrain Control Module (PCM) has detected that this sensor's voltage signal is stuck at an abnormally high level (typically above 0.9-1.1 volts) for an extended period. This sensor's primary job is to monitor the efficiency of the catalytic converter. A persistently high voltage reading suggests a problem with the sensor itself, its wiring, a significant exhaust leak, or a rich running condition.

What's Unique About the 2004-2009 Mazda 3

For the first-generation Mazda 3 (BK), the P0138 code is a very common and straightforward issue. Unlike some vehicles where this code can be triggered by complex fuel system problems or PCM glitches, on this platform, it's overwhelmingly caused by the rear O2 sensor simply wearing out. Owners report the sensor failing anywhere from 30,000 miles to over 100,000 miles. The diagnosis is typically not complicated, and expensive misdiagnoses are rare as long as the wiring is inspected first.

Symptoms You May Notice

  • Check Engine Light is on.
  • Failure to pass an emissions test.
  • Potentially reduced fuel economy.
  • Rough idling or poor engine performance (less common for a downstream sensor issue).
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the upstream (pre-catalyst) O2 sensor. P0138 specifically refers to Sensor 2, the downstream sensor.
  • Replacing the catalytic converter. While a failing converter can trigger other codes (like P0420), it is not the direct cause of a P0138 high voltage fault.
  • Not using an OEM or high-quality direct-fit sensor. Some owners report issues with universal or cheap aftermarket sensors not resolving the code or failing quickly.

Most Likely Causes

  1. Failed Downstream Oxygen Sensor (Bank 1, Sensor 2) 🔴 High Probability Oxygen sensors are wear-and-tear items that degrade over time from heat and exhaust contaminants. After many heat cycles, they lose effectiveness and provide incorrect readings. Forum discussions for the 2004-2009 Mazda 3 show this is a very frequent failure point, with many owners resolving P0138 with a simple replacement.
    How to confirm: Use an OBD-II scanner to monitor the live data for the B1S2 O2 sensor. If the voltage is stuck high (e.g., >0.9V) and does not fluctuate even when the engine is revved or decelerated, the sensor is likely bad. 🎬 Watch: How to diagnose P0138 high voltage readings on a Mazda 3 A good downstream sensor should show a relatively stable, lower voltage (typically 0.6V-0.8V) on a warm engine at a steady RPM.
    Typical fix: Replace the downstream oxygen sensor. This sensor is located on the exhaust pipe after the catalytic converter. Using an O2 sensor socket and letting penetrating oil soak on the threads overnight is highly recommended for easier removal.
    Est. part cost: $60 - $220
  2. Damaged Wiring or Connector 🟡 Medium Probability The wiring for the downstream O2 sensor runs under the vehicle and is exposed to road debris, moisture, and heat from the exhaust. This can cause wires to melt, break, or corrode over time, potentially causing a short to power which would result in a constant high voltage signal.
    How to confirm: Visually inspect the entire wiring harness from the sensor to its connection point for any signs of melting, chafing, breaks, or corrosion in the connector pins. The connector is located inside the cabin, often under the center console or carpet, so check for any fluid intrusion there as well. A wiggle test of the harness while watching live data can reveal intermittent shorts.
    Typical fix: Repair the damaged section of the wiring harness or clean/replace the corroded connector. Ensure the repaired harness is secured away from the hot exhaust pipe.
    Est. part cost: $5 - $50
  3. Exhaust Leak ⚪ Low Probability Rust can cause leaks at exhaust flanges or gaskets, especially on older vehicles in salt-belt regions. The first-generation Mazda 3 is known to be prone to rust.
    How to confirm: Listen for hissing or ticking sounds from the exhaust system when the engine is running. Visually inspect the exhaust pipes and gaskets for black soot marks, which indicate a leak. A leak *before* the sensor can introduce oxygen and skew readings, though this more commonly causes low voltage codes, a leak *at* the sensor bung could also be a factor.
    Typical fix: Replace the leaking gasket or repair the damaged section of the exhaust pipe.
    Est. part cost: $20 - $100

Rare But Worth Checking

  • Faulty Powertrain Control Module (PCM): This is extremely rare. One user on Mazda3Club.com was told to replace their PCM after two new O2 sensors didn't fix the issue, but this is highly unusual. Before condemning the PCM, all other possibilities (sensor, wiring, exhaust leaks) must be exhaustively ruled out. Sometimes a PCM reflash for other issues is attempted before replacement.
  • Rich Running Condition: While a rich condition (e.g., from a leaking fuel injector) can cause a high voltage reading, it would typically be accompanied by other codes (like P0172) and more severe drivability symptoms. This is not a common primary cause for an isolated P0138 on this vehicle.

Diagnosis Steps

  1. Connect an OBD-II scanner and confirm that P0138 is the active code. Note any other codes.
  2. View the live data stream for the Bank 1 Sensor 2 (B1S2) O2 sensor. With the engine fully warmed up and at a steady 2500 RPM, observe the voltage.
  3. If the voltage is stuck high (e.g., 0.9V or higher) and does not change, it strongly points towards a sensor or wiring issue. A healthy downstream sensor should have a relatively stable voltage, typically between 0.6V and 0.8V.
  4. Turn the vehicle off and let the exhaust cool. Locate the downstream O2 sensor on the exhaust pipe, after the catalytic converter.
  5. Thoroughly inspect the sensor's wiring harness and connector for any visible damage, such as melting, chafing, corrosion, or loose pins. Check for a short to power.
  6. If the wiring appears intact, the most probable cause is a faulty O2 sensor.
  7. Replace the downstream O2 sensor. Applying penetrating oil to the threads beforehand can make removal easier. An O2 sensor socket (a deep socket with a cutout for the wire) is the recommended tool.
  8. After replacement, clear the trouble code with the scanner and perform a drive cycle to ensure the Check Engine Light does not return.

Parts You'll Likely Need

  • Downstream Oxygen Sensor (Bank 1, Sensor 2) (OEM #LF66-18-861B) — This is the most common failure item for code P0138. It is a wear item that eventually fails from constant exposure to hot exhaust gases. The original part number LF66-18-861A was superseded by LF66-18-861B.
    Trusted brands: Denso (often cited as OEM equivalent), NGK/NTK, Bosch
    OEM price range: $180-$220
    Aftermarket price range: $60-$120

Platform-Specific Known Issues

  • Owner Experience: Intermittent Code: A user on Reddit with a 2008 Mazda 3 with 200,000 km reported the P0138 code would appear, then disappear after an oil change, only to return permanently later. This highlights that the sensor can fail intermittently before failing completely. The fix was replacing the sensor.
  • Owner Experience: Multiple Replacements: A user on Mazda3Club.com with a 2005 model had a persistent P0138. A shop replaced the sensor, but the code returned. A Mazda dealer then diagnosed the replacement sensor as faulty. The original shop replaced it again under warranty, but the problem remained, leading to a (likely incorrect) recommendation to replace the PCM. This story underscores the importance of using a quality OEM/Denso sensor and verifying wiring integrity before suspecting the PCM.
  • DIY Tip: Use Penetrating Oil: Multiple forum users and DIY guides strongly recommend spraying the old sensor with a penetrating oil like PB Blaster the day before attempting removal. The constant heat cycles can cause the sensor to seize in the exhaust pipe, and letting it soak makes removal much easier and reduces the risk of damaging the threads.

Mechanic-Grade Diagnostic Values

  • Downstream O2 Sensor (HO2S) Heater Circuit Resistance — expected: Approximately 3 to 25 Ohms when cold. A forum post for a 2008 Mazda 3 showed a reading of 19.6 Ohms on a seemingly functional sensor.. Failure: An open circuit (infinite resistance / OL on multimeter) or a dead short (near zero resistance) indicates a failed heater element within the sensor.
  • PCM Voltage Reference at Sensor Connector — expected: Approximately 0.45V.. Failure: A value significantly higher than 0.45V at the PCM's sensor interface connector could indicate an internal PCM fault. This is a rare condition.
  • Live Data B1S2 Voltage (Fault Condition) — expected: Stuck above 0.9V, often pegged at 1.1V or 1.2V.. Failure: The voltage does not fluctuate and remains high regardless of engine RPM or load.

Hidden / Shadow Codes Worth Checking

  • Mode 6 Monitoring: Mazda's diagnostic strategy relies on Mode 6 data to monitor oxygen sensor performance rather than setting proprietary shadow codes for this fault. Technicians can use the Mazda IDS (Integrated Diagnostic System) or a capable generic scanner to view the test results and threshold values for the O2 sensor monitors. (see via Mazda IDS or an advanced OBD-II scanner with Mode 6 capabilities.)

Scan Tool Commands That Help

  • Mazda IDS (Integrated Diagnostic System): Datalogger (Live Data) — To monitor the B1S2 voltage in real-time to confirm if it is stuck high, which is the primary diagnostic step for P0138.
  • Mazda IDS (Integrated Diagnostic System): PCM Self-Test — As a final step if a PCM fault is suspected. This function can report internal errors related to sensor interface boards or voltage regulators, but it is extremely unlikely to be the cause for an isolated P0138.

Wiring & Ground Locations

  • Downstream O2 Sensor Connector (C329) — The downstream O2 sensor wire runs from the exhaust pipe up into the cabin. The connector is typically located under the center console, near the base of the shifter, requiring removal of console trim panels to access.. This connector is a key test point. A diagnostic video for a 2008 Mazda 3 identified the signal wires going to the PCM as White/Blue and Black/Orange. Back-probing these wires at the connector allows for testing the sensor's output directly and verifying wiring integrity back to the PCM.

Real Owner Repair Stories

  • YouTube channel 'K Diagnostics' (2008 Mazda 3 2.3L) — Check Engine Light on with code P0138.
    ❌ Tried (didn't work) Initial diagnosis focused on the sensor itself.
    ✅ What actually fixed it The technician scoped the sensor and confirmed the signal was stuck high. The ultimate fix was replacing the faulty downstream oxygen sensor with a new one (part number shown was 234-4329, a Denso equivalent).
  • Mazda3Club.com forum user (2005 Mazda 3 2.0L) — Persistent P0138 after multiple sensor replacements.
    ❌ Tried (didn't work) Replaced downstream O2 sensor (code returned)., Shop replaced the sensor again under warranty (code returned)., Mazda dealer reflashed PCM and checked harness (diagnosed replacement sensor as bad)., A third sensor was installed (code still returned).
    ✅ What actually fixed it The thread ends with the user suspecting a PCM issue as recommended by the garage, but the outcome is not definitively confirmed. This story is included as a cautionary tale about the diagnostic rabbit hole that can occur, even when using OEM parts, and reinforces the need to exhaustively test the wiring for a short to power or ground before condemning an expensive PCM.

OEM Part Supersession History

  • LF66-18-861ALF66-18-861B — Standard part revision by the manufacturer.
  • LF66-18-861BLF66-18-861C — Standard part revision by the manufacturer.
    Heads up: A parts vendor website shows that LF66-18-861B is superseded by LF66-18-861C, indicating this is the latest revision. All three part numbers should be interchangeable for the specified vehicle range.

Model Year Variations Within This Range

  • 2004-2009: The first generation Mazda 3 (BK) had a facelift for the 2007 model year. However, research indicates no significant changes were made to the 2.0L LF-DE engine's exhaust system, sensor placement, or wiring that would affect the diagnosis or repair of a P0138 code within this generation.

Diagnostic Flowchart

Start by confirming if P0138 is the sole code or if it's accompanied by misfire codes, as unburned fuel can skew sensor readings on the BK-platform Mazda 3.
Warm the engine to operating temperature. Monitor B1S2 (Bank 1, Sensor 2) voltage at a steady 2500 RPM. What is the reading?
Inspect the O2 sensor wiring harness under the vehicle. Is there evidence of melting, chafing, or road debris damage?
→ Repair the wiring harness and secure it away from the exhaust pipe. Ensure the connector (located inside the cabin under the carpet/console) is free of corrosion or fluid intrusion.
This platform is prone to chassis and exhaust rust. Are there audible ticking sounds or visible soot marks near the sensor bung or exhaust flanges?
→ Repair the exhaust leak or replace the rusted flange/gasket. Leaks can occasionally cause erratic high-voltage signals if they interfere with the sensor's reference air.
The most likely cause is a failed internal sensor element. Are you prepared to replace the sensor yourself?
→ Replace the Bank 1 Sensor 2 O2 sensor. Use a quality OEM or Denso sensor to avoid the 'faulty-out-of-the-box' issues reported on Mazda3Club. Pro-tip: Apply penetrating oil (like PB Blaster) 24 hours in advance to prevent stripping the threads in the rusted exhaust pipe.
→ Advise the technician to verify the wiring integrity to the PCM before replacing the sensor, as some shops may incorrectly suggest a PCM replacement for persistent P0138 codes on early Mazda 3 models.
→ The sensor is currently performing within spec. This may be an intermittent failure, common on high-mileage 2004-2009 Mazda 3s. Clear the code and perform a drive cycle; if it returns, replace the sensor.
→ Resolve misfires first. On the LF-DE engine, check spark plugs and ignition coils. Unburned fuel from misfires can cause the downstream sensor to report a false high-voltage (rich) condition.

Other Known Issues on This Vehicle

Issues unrelated to this code that are worth knowing about as an owner of this generation:

  • Passenger-Side Engine Mount Failure 🟠 Medium — Very common, often fails after 60,000-80,000 miles, causing excessive vibration in the cabin, especially at idle in 'Drive'.
  • Body Rust 🔴 High — Highly prevalent in areas that use road salt. Rear wheel arches, rocker panels, and subframes are common rust points.
  • Thermostat Stuck Open/Closed 🟠 Medium — Common failure item, can cause a P0128 code (coolant temp below regulating temp) or overheating. Often occurs around 60,000 miles.
  • Transmission Control Module (TCM) Failure (Automatic) 🔴 High — A known weak point for automatic transmission models, causing harsh shifting, AT light, and getting stuck in gear. Can occur at various mileages.
  • Suspension Clunks and Noises 🟡 Low — Worn rear sway bar links and shock mounts are common, causing rattling or clunking noises from the rear of the car.

Used vs. New Parts: Buying Guide for This Vehicle

When a used part is the smart pick: A used part is almost NEVER a smart choice for an oxygen sensor, as it is a wear-and-tear item with a finite lifespan. The only exception is sourcing a used wiring harness pigtail from a junkyard if the vehicle's original connector is physically damaged and needs to be spliced in.

Donor-vehicle mileage cap: roughly under 10000 miles for the part to have meaningful remaining life.

What to inspect on the donor part:

  • For a pigtail: ensure the connector is not cracked or brittle, the locking tab is intact, and there is at least 6-8 inches of wire to work with.
  • Visually inspect for any signs of melting, corrosion on the pins, or previous poor repair attempts.

OEM-only on this vehicle (don't cheap out):

  • While not strictly 'OEM-only', using a high-quality OEM-equivalent brand is critical. Cheap, no-name 'universal' sensors are a common cause of repeat failures or unresolved codes.

Aftermarket brands forum-validated for this vehicle:

  • Denso (widely reported as the original equipment manufacturer)
  • NGK / NTK

Brands owners have reported issues with on this vehicle:

  • Generic 'universal' sensors that require splicing wires. While they can work, they introduce another point of failure and are often not calibrated correctly for the vehicle, leading to persistent issues.

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2008 Mazda 3 — 124274 miles

Symptoms: The P0138 code would appear and then disappear after an oil change, eventually returning permanently.

What fixed it: Replacing the oxygen sensor.

Source hint: reddit.com/r/MechanicAdvice: An owner of a 2008 Mazda 3 with 200k km confirmed P0138 was a recurring issue

2005 Mazda 3

Symptoms: Persistent P0138 code that returned even after the sensor was replaced by a shop.

What fixed it: The replacement sensor was found to be faulty by a dealer; the original shop replaced it again under warranty.

Source hint: mazda3forums.com: A user with a 2005 Mazda 3 experienced a persistent P0138 even after two sensor replacements

2008 Mazda 3 — 30000 miles

Symptoms: Check Engine Light (CEL) with code P0138 at low mileage.

What fixed it: Replacement of the rear O2 sensor.

Source hint: mazdas247.com: A user with a low-mileage 2008 Mazda 3 experienced a P0138 at only 30,000 miles

Frequently Asked Questions

Where is the Bank 1 Sensor 2 oxygen sensor located on my 2004-2009 Mazda 3?
The downstream oxygen sensor is located on the exhaust pipe after the catalytic converter. The electrical connector is located inside the cabin, often under the carpet or center console.
Which brand of replacement O2 sensor is recommended for the Mazda 3 to avoid compatibility issues?
General forum discussions and 'Bob Is The Oil Guy' strongly recommend using the OEM sensor brand, which is Denso for many Japanese applications, to avoid premature failure or compatibility issues seen with other aftermarket brands like Bosch.
Can I use an ordinary socket to remove the sensor on my Mazda 3?
It is recommended to use a specialized O2 sensor socket, which is a deep socket with a cutout for the wire, to avoid damaging the harness during removal.
Why did my P0138 code disappear after an oil change and then come back later?
As reported by Mazda 3 owners, the downstream O2 sensor can fail intermittently before failing completely, which may cause the code to appear and disappear temporarily.
Is it common for the P0138 code to be misdiagnosed as a PCM failure on this vehicle?
Yes, there are documented cases where shops incorrectly suspected the PCM after replacement sensors failed to clear the code. It is critical to verify wiring integrity and use high-quality OEM/Denso sensors before considering a PCM replacement.
What should I do if the O2 sensor is seized in the exhaust pipe?
Multiple DIY guides for the Mazda 3 recommend spraying the sensor with penetrating oil like PB Blaster and letting it soak overnight before attempting removal to reduce the risk of damaging the exhaust threads.
08 Mazda 3, Code P0138 02 Sensor Circuit High Voltage / Oxygen Sensor Problems...
08 Mazda 3, Code P0138 02 Sensor Circuit High Voltage / Oxygen Sensor Problems...
How to Replace Downstream O2 Sensor 2004-2009 Mazda 3 2.3L L4
How to Replace Downstream O2 Sensor 2004-2009 Mazda 3 2.3L L4
How to Replace O2 Sensor 03-09 Mazda 3
How to Replace O2 Sensor 03-09 Mazda 3
How To Replace A Downstream Oxygen Sensor On A 2003-2009 Mazda 3?
How To Replace A Downstream Oxygen Sensor On A 2003-2009 Mazda 3?
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated Jul 21, 2026

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.

Year Coverage
This article covers the OBD-II Code P0138 (Deep Dive) for:
  • Mazda 3: 200420052006200720082009
In this article
🎬 Helpful Videos
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part