Code P0040 means the ECM detects that the upstream O2 sensor signals for Bank 1 and Bank 2 are swapped. On the 3.6L Pentastar, this usually happens after a cylinder head repair when the harness connectors are crossed. Fix involves swapping the physical connections. Cost: $0.
My Experience with P0040
"I ran into this on a Grand Cherokee that just had a left-side head gasket replaced. The tech had zip-tied the Bank 1 and Bank 2 upstream connectors together near the firewall and crossed them upon reassembly. My knuckles were shredded against the heat shields trying to reach the locking tabs. If your short-term fuel trims are pinned at +32% on one bank and -25% on the other, you've definitely got the sensors swapped. I found the Bank 1 connector (passenger side) was pushed into the Bank 2 (driver side) slot, causing the computer to fight itself until it hit the limit."
🧰 Tools Required
- ■22mm Oxygen Sensor Socket
- ■10mm Socket and Ratchet
- ■OBD2 Scan Tool with Live Data
- ■Long Needle Nose Pliers
- ■Small Flathead Screwdriver (for tab release)
- ■Flashlight or Work Lamp
⚙️ OEM Parts
- 5149171AA (Upstream O2 Sensor)
- 68144248AA (Wiring Harness Clips)
🔧 Torque Specs
- O2 Sensors: 30 lb-ft
- Battery Negative Terminal: 45 lb-in
- Engine Cover Bolts: 10 lb-ft
The Repair Process
1.Verify the Swapped Signal via Live Data
Connect your scan tool and monitor Short Term Fuel Trim (STFT) for both banks. Introduce a vacuum leak on the intake manifold. If Bank 1 shows a lean reaction but the STFT for Bank 2 spikes, the connectors are 100 percent swapped at the harness. This confirms the ECU is receiving data from the wrong side of the engine.
2.Access the Rear Engine Harness
On the 3.6L Pentastar, the upstream O2 sensor connectors are located at the back of the cylinder heads near the firewall. Remove the plastic engine cover by pulling upward. Use a 10mm socket to move any mounting brackets for the heater hoses that might be obstructing your reach to the passenger side (Bank 1) and driver side (Bank 2) connectors.
3.Disconnect and Cross-Swap the Plugs
Depress the red locking tabs on the O2 sensor connectors. They are notoriously brittle from heat cycles, so use a small flathead if they are stuck. Disconnect both Bank 1 Sensor 1 and Bank 2 Sensor 1. Route the harness leads back to their correct respective sides. The Bank 1 harness should stay on the passenger side; Bank 2 on the driver side. Re-click them into place until you hear the snap.
4.Reset Adaptations and Test Drive
Clear the P0040 code using your scan tool. It is critical to also perform a 'Fuel Trim Reset' or 'KAM Reset' (Keep Alive Memory) because the ECU has learned 'bad' trim values. Start the engine and watch the O2 sensor voltages. They should now fluctuate between 0.1V and 0.9V independently and respond correctly to throttle snaps.