AutoLogicTools

OBD-II trouble code

P0040: O2 Sensor Signals Swapped Bank 1 Sensor 1 / Bank 2 Sensor 1

SAE J2012: the bank 1 sensor 1 and bank 2 sensor 1 oxygen-sensor signals are swapped. A Ford chart says the fuel-shift response showed up on the wrong bank. The repair aid is to connect each upstream connector to the correct bank, not to replace both sensors.

High severityPowertrainOxygen SensorDrivable short-term

Quick facts

System
Powertrain
Category
Oxygen Sensor
Severity
High severity
Drivable
Usually safe to drive short-term
Repair cost range
$300 – $580 (oxygen sensor replacement, parts and labor)
DIY difficulty
Intermediate DIY

Browse every code in P0001–P0099, or start from the full code library.

What does P0040 mean?

SAE J2012 APR2002 names P0040 O2 Sensor Signals Swapped Bank 1 Sensor 1 / Bank 2 Sensor 1. Section 3.5: bank 1 contains cylinder number 1, bank 2 is the opposite bank, and an engine with one bank uses bank 1 codes. Section 3.6: sensor 1 is first in airflow order. This code needs two sensor 1 signals. An inline engine does not have a bank 2 sensor 1 to swap.

A Ford DTC chart reproduced for a set of vehicles — the hosting page warns that it does not describe the 2007 Escape Hybrid it was opened from, and names the 2005 Mercury Sable, Mountaineer, Monterey, Montego, and Mariner among 32 vehicles — titles it P0040 upstream oxygen sensors swapped from bank to bank (HO2S-11-21). The description says the heater oxygen-sensor monitor checks whether the signal response for a fuel shift corresponds to the correct engine bank. The test fails when a response from the sensor being tested is not indicated. Possible causes on that chart: crossed upstream harness connectors, crossed wiring at the harness connectors, and crossed wiring at the PCM connectors. The diagnostic aid is: connect the HO2S connector to the correct bank. Key-on engine-running goes to fuel-control pinpoint step H60.

That is three crossing points, not one. Swapping the two connectors as a guess can fix a pair that was crossed at the sensors, and it can create a cross that was actually at the PCM. Ford's own aid is to put each connector on the bank the diagram assigns.

A heater fault is a different code. Nothing in that Ford chart says a failed heater reverses the signal. Ford also uses P1128, on a separate enhanced list, worded "Upstream heated O2 sensors swapped." P1128 is not this generic code. Do not copy a P1128 pinpoint onto P0040 unless the chart says they are the same test.

Common causes

  • Upstream connectors crossed between bank 1 sensor 1 and bank 2 sensor 1
  • Upstream wires crossed at the harness connectors, which the Ford chart lists separately from the connectors themselves
  • Wires crossed at the PCM connector, the third cause on that Ford chart
  • A fuel-shift response that appears on the sensor the test was not commanding
  • Both upstream sensors replaced while the wires stay crossed
  • An inline engine diagnosed for a bank 2 sensor it does not have

Symptoms

  • Check engine light with P0040
  • Fuel trims on the two banks moving opposite ways when one bank is disturbed
  • The code showing up after exhaust or sensor work, which is a reason to check the connectors, not proof they were swapped
  • No heater code required by the Ford chart
  • A KOER fuel-control test, step H60 on that Ford chart, as the confirmation
  • The engine still running, because the trims are wrong rather than absent

Diagnostic steps

  1. 1.Confirm the engine has two banks. Mark cylinder 1. Bank 1 is that bank. Bank 2 is the other. Sensor 1 is the first oxygen sensor in the exhaust flow on each bank. If there is no bank 2 sensor 1, this code is not the one the standard assigns.
  2. 2.Look at the connectors without unplugging them hot if the chart says ignition off. Compare each connector to the diagram. The Ford aid is to connect the HO2S connector to the correct bank. Do not swap the two plugs and hope.
  3. 3.If the connectors match the diagram, the Ford chart's remaining causes are crossed wires at the harness connectors and crossed wires at the PCM. Check continuity from each sensor pin to the PCM pin the diagram names, ignition off, PCM disconnected, so you are not ohming through the module.
  4. 4.The Ford description of the monitor is a fuel shift that must show up on the bank being tested. Run that test the way step H60 prints it on the applications that chart covers. A passenger reads the tool on a drive, or you record it. Do not invent a propane test the chart does not contain.
  5. 5.A heater-circuit code is diagnosed on its own page. It is not evidence the signals are swapped.
  6. 6.Clear P0040 after the connectors and the pins match the diagram, and repeat the fuel-shift test. Replace a sensor only when that test shows the sensor, not the wiring, is the fault.

Repair cost

$300 – $580 (oxygen sensor replacement, parts and labor)

The Ford diagnostic aid for the applications in that chart is to connect the upstream connector to the correct bank. That reconnect is not a RepairPal line. The printed pair is an oxygen-sensor replacement if the fuel-shift test and the pin check show a sensor has actually failed. RepairPal, updated 3 September 2026: national average $440–$523, labor $93–$136, parts $347–$387. Named examples from a Chevrolet Silverado 1500 at $306–$407 to a Honda CR-V at $501–$578. Replacing both sensors because the code says swapped is not what the Ford aid says, and buying two sensors is twice the pair, not a different job.

Estimate your repair

Run the numbers for your vehicle

Open the Repair Cost Estimator with oxygen sensor replacement preselected. Adjust labor rate and vehicle category to fit your situation.

DIY vs shop

This is an intermediate DIY job. It usually involves diagnostic steps, specialty parts, and some careful work in tight spaces. If you have the tools and a service manual or trustworthy video for your specific vehicle, it is achievable in a weekend. Otherwise, a competent independent shop will be faster.

Related codes

Frequently asked questions

Should I just swap the two upstream connectors?

The Ford chart lists three places the signals can be crossed: the harness connectors, the wiring at those connectors, and the wiring at the PCM. Its aid is to connect each HO2S connector to the correct bank. Swapping the plugs without the diagram fixes one of those three and can create a fault if the cross was at the PCM.

Does this happen on a four-cylinder?

SAE J2012 says an engine with one bank uses bank 1 codes, and bank 2 is the opposite bank. P0040 names sensor 1 on both banks. A single-bank engine has no second sensor 1 to swap.

Is Ford P1128 the same code?

P1128 is a Ford enhanced code whose published wording is upstream heated O2 sensors swapped. P0040 is the generic SAE code. Use the chart that this PCM stored. Do not mix the pinouts.

How much does P0040 cost to fix?

Oxygen sensor replacement is $300 – $580 (oxygen sensor replacement, parts and labor). That is RepairPal's sensor job, $306–$407 on a Silverado 1500 example through $501–$578 on a CR-V, average $440–$523, updated 3 September 2026. The Ford aid, connecting the connector to the correct bank, is not that job. Buy the sensor after the fuel-shift test says the sensor failed.

Editorial context

About This Diagnostic Information

AutoLogicTools diagnostic guides explain OBD-II trouble codes using recognized code definitions, standard automotive diagnostic principles, and practical automotive context. A trouble code records a condition detected by a control module. It does not automatically identify a failed part, and the right diagnostic procedure can vary by vehicle.

Manufacturer service information, technical service bulletins, wiring diagrams, and vehicle-specific procedures should take precedence when available.

AutoLogicTools was founded by Vincent Fisk, an automotive locksmith and shop owner in San Diego with hands-on experience in vehicle keys, immobilizer systems, electrical issues, modules, programming, and diagnostics.