P0331 — Knock Sensor 2 Circuit Range/Performance (Bank 2)
powertrain (engine/transmission)
Is it safe to drive?
Service promptly If P0331 is present without unusual noise or power loss, drive gently to a repair shop and avoid hard acceleration. If the engine is pinging loudly, losing substantial power, or producing repeated combustion knocks, stop driving and arrange towing if it cannot be repaired immediately.
Typical symptoms
- The check-engine light may illuminate with P0331 stored in the powertrain controller.
- The engine may ping or sound like a metallic rattle during acceleration or climbing a grade.
- Hesitation, slow response, or reduced power may occur when the engine reaches knock-sensor operating temperature.
- A rough idle or intermittent stumble can appear while the damaged connector or wiring is being moved by engine vibration.
- Some vehicles drive normally and show only the warning lamp, although the P0331 signal remains electrically out of range.
Common causes
- The bank 2 knock sensor can fail or become heat-damaged, causing the ECU to record P0331.
- Corrosion, backed-out terminals, or a loose plug at the knock sensor connector can interrupt the signal.
- Chafed or broken wiring near the exhaust heat shield, suspension components, or engine mounts can create an intermittent range error.
- A poor sensor ground or damaged connector housing may allow electrical noise that the ECU interprets as an out-of-range knock-sensor signal.
- Engine vibration can produce an intermittent open in the sensor or harness and repeatedly retest P0331.
- An exhaust leak near the sensor area can create abnormal combustion noise and misleading knock-sensor readings.
- If the wiring and sensor pass testing, an internal ECU knock-monitor or reference-circuit fault is possible but less common.
How to diagnose with an OBD scanner
- Confirm the code and operating conditions Connect an OBD2 scanner, ELM327 adapter, or AIScanAuto, read stored and pending codes, and save freeze-frame data for P0331. Note whether it was set during idle, acceleration, or a hot restart, and check for related misfire, fuel-trim, or voltage codes.
- Locate the correct bank 2 sensor Use the vehicle wiring diagram to identify knock sensor 2 on bank 2. Do not assume left or right is bank 2; locate cylinder 1 and use the manufacturer definition of the exhaust bank.
- Inspect the sensor and connector With the ignition off, inspect the sensor body, plug, terminals, and nearby harness. Look for green corrosion, bent pins, trapped moisture, heat discoloration, pinback, and chafing against brackets or the exhaust shield.
- Perform an electrical range test Follow the service-manual procedure for continuity, resistance, or waveform testing at knock sensor 2. Gently move the connector and harness while monitoring the signal; an abrupt reading change identifies an intermittent wiring or plug fault. Do not use generic pin-voltage values because connector designs vary.
- Repair and verify the fault Repair the damaged circuit or connector, or replace the bank 2 knock sensor as testing indicates. Clear P0331 with the scan tool, drive through the conditions that originally set it, and confirm that the code does not return. If the sensor tests good, check for exhaust leaks and consult the circuit diagnostic procedure before condemning the ECU.
Approximate repair cost
Typical independent-shop estimate for diagnosing P0331 and replacing the bank 2 knock sensor is USD 150-450, depending on access to the sensor and local labor rates. Repairing corroded terminals or damaged wiring may add approximately USD 75-250. These figures are estimates and vary by region.
Common questions
What does P0331 mean on bank 2?
P0331 means the ECU has detected that the knock sensor 2 circuit on bank 2 is outside its expected electrical range or is not performing consistently.
Can I drive my vehicle with P0331?
You can usually drive cautiously to a repair shop if the engine runs smoothly, but avoid sustained high load until the sensor circuit has been checked because a genuine knock condition can damage pistons or the engine.
Is P0331 always caused by a bad knock sensor?
No. A failed sensor is common, but P0331 can also result from a corroded plug, damaged wiring, poor ground, intermittent connector movement, or an exhaust leak near the bank 2 sensor.
How can I verify the P0331 wiring fault?
Use the manufacturer circuit procedure to test the sensor and harness while gently moving the connector. An unstable reading, open circuit, or excessive resistance can confirm the wiring fault that caused P0331.
Triggering code P0331 means the engine computer has identified a fault in the knock sensor circuit for bank 2. This isn't just a minor sensor glitch — it means the system responsible for protecting your engine from detonation damage isn't working correctly. The code lives in the powertrain family of OBD2 faults, which covers everything that directly affects engine operation and emissions.
The knock sensor acts as the engine's early warning system against destructive pinging. Bolted directly to the block, it listens for irregular combustion vibrations and sends voltage signals back to the control module. When everything works, the computer can detect detonation the instant it starts and yank back spark timing to save the pistons and bearings. P0331 fires when the sensor or its circuit reports readings that fall outside the factory-defined window — whether that's no signal at all, a stuck signal, or noise that doesn't match expected patterns.
The module doesn't set P0331 on a single bad reading. It watches the knock sensor circuit across multiple drive cycles and only logs the fault when consistent abnormal behavior appears. Freeze frame data captured alongside the code tells you exactly what the engine was doing — RPM, load, temperature, vehicle speed — when the problem was detected. That snapshot is gold for diagnosis because it lets you recreate the failure conditions rather than guessing.
"Bank 2" refers to the engine bank that does not contain cylinder number one. On V-configuration engines, this distinction matters. "Sensor 2" in this context simply identifies which knock sensor is affected — not that it's downstream like an O2 sensor. Confusing bank positions with O2 sensor numbering is the most common reason DIYers replace the wrong part.
Common Symptoms
- A sharp metallic pinging or rattling noise during hard acceleration
- Noticeable loss of engine power under load due to automatic timing retardation
- Check Engine Light illuminated on the dashboard
- Decreased fuel efficiency compared to normal driving patterns
- Sometimes absolutely no noticeable symptoms at all — the code may set without any driver-perceivable change
What Causes P0331?
Fuel quality sits at the top of the list. Low-octane gasoline or fuel contaminated with water or ethanol blends creates the exact conditions that trigger knock detection. Running premium-requiring engines on regular fuel is a fast path to this code.
Damaged wiring or corroded connectors in the knock sensor circuit represent the second most frequent culprit. The sensor sits low on the engine where heat, oil vapor, and road salt take a constant toll on nearby wiring and terminals.
Carbon buildup on intake valves and combustion chamber surfaces causes real detonation events that the sensor correctly identifies. In these cases, the code reflects an actual engine problem rather than a sensor failure.
A failed knock sensor — internally shorted, open, or otherwise non-functional — will obviously throw the circuit out of range and set P0331.
Improper sensor installation ranks fifth. Knock sensors need specific torque values and a clean mounting surface. Too loose or too tight, and the sensor either misses detonation entirely or picks up false signals from engine structure rather than combustion events.
How to Diagnose P0331
-
Hook up a scan tool, confirm P0331 is present in the stored codes, and capture the freeze frame data. That recorded snapshot tells you RPM, engine load, coolant temperature, and vehicle speed at the moment the fault occurred.
-
Check for any related trouble codes. Misfire codes (P0300–P0304 range) or fuel trims out of specification often point toward the root cause rather than a standalone sensor failure.
-
Look up manufacturer TSBs for your specific make, model, and year. Search by VIN on the automaker's website or through nhtsa.gov — many recurring codes have documented factory fixes or PCM updates that eliminate the problem without parts replacement.
-
Physically examine the knock sensor wiring harness and connector. Pull back protective loom, check for cracked insulation, green corrosion on terminals, and any wires that flex abnormally. Heat and vibration destroy these connections over time.
-
Verify the sensor mounting. Remove the sensor and inspect the mounting hole for debris, damaged threads, or gasket surface irregularities. Check that the replacement or existing unit is torqued to spec.
-
Clear the code, complete a thorough drive cycle that reproduces the freeze frame conditions — same load, similar RPM range — and verify P0331 does not return. If it reappears, component failure is confirmed.
Repair Options and Costs
Addressing the underlying cause rather than guessing at parts keeps repair costs reasonable:
- Wiring harness repair or connector replacement: $80–$250
- New knock sensor including labor: $150–$450
- Intake and combustion chamber decarbonization service: $150–$400
P0331 repair typically runs between $80 and $450 total. The key is accurate diagnosis upfront — throwing expensive parts at the problem without isolating the root cause inflates costs unnecessarily. Most shops start with the least expensive plausible cause and work up from there.
Can You Drive with P0331?
Use caution. Without functional knock detection, the engine loses its primary defense against detonation damage. Sustained pinging under load gradually hammers piston rings, rod bearings, and cylinder walls. Drive gently, avoid hard acceleration, and use the highest-octane fuel your engine requires. The vehicle will run, but long-term engine health depends on getting this code diagnosed and repaired promptly.