P0040 — O2 Sensor Signals Swapped, Bank 1 and Bank 2 Sensor 1
What P0040 means
The ECM compares the upstream (pre-catalyst) oxygen sensors on each cylinder bank. When it adjusts the mixture on one bank, the response should show up on that bank's sensor. If the response comes from the other bank's sensor, the ECM sets P0040 and concludes the signals are swapped, most often because of crossed connectors or wiring.
Symptoms
- Check Engine light on
- Higher fuel consumption
- Rough or unstable idle
- Reduced power and performance
- Hesitation during acceleration
- Fuel smell from the exhaust
Possible causes
- Upstream O2 sensor connectors plugged into the wrong sides after repair or replacement
- Damaged, chafed or shorted sensor wiring harness
- Failed upstream O2 sensor on one bank
- Corroded or loose connector terminals
- ECM calibration or software error (rare)
How to diagnose
- Scan for codes and freeze frame data, and note any other fuel trim or O2 sensor codes
- Confirm which sensor is Bank 1 (the side with cylinder 1) and which is Bank 2
- Check that the sensor connectors are routed to the correct sensors and fully latched
- Inspect the harness and connectors for chafing, heat damage and corrosion
- Look for exhaust leaks near the upstream sensors
- Watch live O2 sensor readings and fuel trims for each bank
- Create a lean condition on one bank (for example, a controlled vacuum leak on that side) and confirm the correct sensor responds
- Test heater resistance and wire continuity back to the ECM
Common fixes
- Reconnect the sensor connectors to the correct banks
- Repair or replace the damaged wiring harness
- Replace a faulty oxygen sensor
- Repair any exhaust leak near the sensors
- Update or replace the ECM if a software fault is confirmed
Questions and answers
What does P0040 mean?
The ECM has detected that the upstream oxygen sensor signals for Bank 1 and Bank 2 appear to be swapped. The usual cause is crossed connectors or damaged wiring.
Can I drive with code P0040?
Short trips are generally fine, but expect worse fuel economy and possibly a rough idle. Wrong fuel trim over time can harm the catalytic converter, so fix it soon.
Can P0040 appear after replacing an O2 sensor?
Yes, this is a common scenario. If the connectors were swapped between banks during the job, the ECM receives crossed signals. Check the labeling and routing of each connector.
This is general information about the code. The meaning can differ between makes and models: a scan tool and the repair manual for your car will show the exact cause.