p0331 Code: Diagnose Bank 2 Knock Sensor Problems and Fix Them
20 min read · by Nicole Bennett · Last updated: November 26, 2026
The p0331 code means the powertrain control module (PCM) has detected a range or performance problem with Knock Sensor 2 on Bank 2. The knock sensor monitors engine vibrations caused by combustion. When its signal falls outside the expected operating range, the computer may store this diagnostic trouble code and turn on the check engine light.
A faulty knock sensor is one possible cause, but replacing it immediately is not always the right solution. Damaged wiring, loose connectors, abnormal engine noise, excessive combustion knock, and control-module problems can also trigger this fault. The correct diagnosis depends on the vehicle’s engine design and manufacturer-specific testing procedures.
This guide explains the meaning of P0331, common symptoms, likely causes, scanner diagnosis, repair options, and driving risks. It also explains how to distinguish a failed sensor from an electrical problem before spending money on unnecessary parts.
What Does the P0331 Code Mean?
P0331 is a generic OBD-II powertrain code meaning Knock Sensor 2 Circuit Range/Performance (Bank 2). It indicates that the PCM has detected an abnormal signal or performance condition from the second knock sensor monitoring circuit on Bank 2. The code does not automatically mean the sensor has stopped working.
The knock sensor is designed to detect vibrations associated with abnormal combustion. Most conventional knock sensors use a piezoelectric element. This element produces an electrical signal when it experiences vibration. The PCM evaluates that signal alongside engine operating information to determine whether combustion knock may be occurring.
If the signal is outside the manufacturer’s calibrated range, the computer may interpret it as excessive knock, abnormal background vibration, a flat signal, or another performance problem. General Motors diagnostic documentation identifies excessive knock, abnormal engine noise, and flat signal behavior as possible monitoring conditions for P0331. The exact detection strategy differs between manufacturers and engines.
Understanding the P0331 code breakdown
The five-character code contains information about the system and the type of diagnostic fault. Each character helps narrow down the affected component.
| Character | Meaning | Explanation |
|---|---|---|
| P | Powertrain | The fault involves the engine, transmission, or related powertrain controls. |
| 0 | Generic code | The code belongs to the standardized SAE diagnostic code family. |
| 3 | Ignition system category | Identifies the relevant ignition and combustion monitoring category. |
| 3 | Specific fault grouping | Helps identify the particular diagnostic condition. |
| 1 | Individual fault identifier | Identifies the Bank 2 knock sensor performance problem. |
What are Bank 2 and Knock Sensor 2?
Bank 2 refers to the side of an engine that does not contain cylinder number 1. On a V6 or V8 engine, the two cylinder banks are generally arranged on opposite sides of the engine. The location of cylinder number 1 determines which side is Bank 1 and which is Bank 2.
Knock Sensor 2 identifies the sensor or monitored channel associated with the second knock sensor designation. It does not necessarily mean the sensor is the second component from the front of the engine. Some engines have multiple sensors, and their locations depend on the manufacturer’s design.
A four-cylinder engine may not have the same Bank 2 arrangement as a V6 or V8. Some manufacturers also use different sensor-monitoring strategies. Therefore, always check the vehicle’s service information before identifying the sensor or ordering a replacement.
Common Symptoms of a P0331 Fault
A P0331 fault can produce different symptoms depending on whether the sensor is giving an incorrect signal, the engine is experiencing actual knock, or the electrical circuit has a problem. Some vehicles show only a check engine light, while others experience noticeable changes in engine performance.

1. Check engine light illumination
The most common indication is an illuminated check engine light. The PCM stores P0331 after its diagnostic monitor detects a fault under the required operating conditions. Some manufacturers use a two-trip strategy, meaning the monitor must fail on two qualifying driving cycles before the warning light illuminates.
The code may initially appear as pending. A pending code means the computer has detected a problem but has not yet confirmed it according to its monitoring requirements. A stored or confirmed code provides stronger evidence that the fault has met the necessary criteria.
2. Reduced engine performance
Some vehicles reduce ignition advance or use protective engine-control strategies when knock-related information is unreliable. This can make acceleration feel slower, especially when climbing hills or applying heavy throttle.
The driver may notice weaker acceleration, less responsive throttle behavior, or a general loss of engine power. These symptoms are not exclusive to P0331. Fuel delivery problems, ignition faults, and other engine issues can produce similar behavior.
3. Engine knocking or pinging sounds
A metallic rattling or pinging sound during acceleration can indicate actual combustion knock. The sound may become more noticeable under heavy engine load, during uphill driving, or when accelerating at low engine speeds in a high gear.
However, not every metallic engine noise is detonation. Loose exhaust components, worn engine accessories, damaged mounts, and internal mechanical wear can produce similar sounds. A mechanic should identify the source before assuming the engine is experiencing combustion knock.
4. Poor fuel economy
Fuel economy may decrease if the PCM adjusts ignition timing or other operating parameters to protect the engine. Retarded ignition timing can reduce combustion efficiency, particularly when the engine operates under load.
The change is not always dramatic. A small reduction in fuel economy may be difficult to notice during normal commuting. Compare recent fuel consumption with previous driving patterns rather than assuming that every increase in fuel use is caused by the knock sensor.
5. Rough running or hesitation
Some drivers report hesitation, inconsistent acceleration, or rough engine operation. These symptoms may occur alongside other faults that affect ignition timing or combustion quality.
If the engine also misfires, scan for additional powertrain codes. A flashing check engine light indicates an active misfire that can damage the catalytic converter. Reduce engine load and arrange prompt diagnosis rather than continuing to drive normally.
6. No noticeable driving symptoms
It is possible to have P0331 without obvious performance problems. The PCM may detect a signal abnormality before the driver notices a change in engine operation.
A vehicle that starts normally and drives smoothly should still receive attention. An unreliable knock sensor signal can interfere with the computer’s ability to monitor combustion conditions correctly. If you also pulled P0330 Code, that guide walks through it step by step.
What Causes the P0331 Code?
P0331 can result from an electrical problem, a defective knock sensor, or unusual engine vibration. The PCM monitors a signal rather than directly measuring whether a sensor is physically damaged, so several different conditions can produce the same diagnostic code.

1. Faulty knock sensor
A damaged knock sensor is a common possibility. Internal damage, aging, heat exposure, and contamination can affect its ability to produce an accurate signal.
Because many knock sensors use piezoelectric elements, physical damage can affect their vibration response. The sensor may produce an inconsistent signal, respond incorrectly to engine vibration, or provide a signal that does not match the expected operating range.
Before replacing the sensor, confirm that its connector, mounting arrangement, and wiring are correct. A sensor installed incorrectly or with an unsuitable mounting condition may not provide the expected signal.
2. Damaged or corroded wiring
The wiring between Knock Sensor 2 and the PCM carries the electrical signal used for engine monitoring. Broken conductors, damaged insulation, corrosion, and loose terminals can interfere with that signal.
Heat and vibration can gradually damage wiring near the engine. Harnesses routed close to hot exhaust components may become brittle, while previous repair work can leave wires stretched, pinched, or incorrectly connected.
An intermittent electrical problem may cause P0331 to appear only under certain driving conditions. This is why inspecting the entire accessible harness is important instead of checking only the sensor itself.
3. Loose or contaminated electrical connector
A connector that does not lock properly can interrupt the knock sensor signal. Moisture, oil, dirt, and corrosion can also affect the electrical contact between the sensor and its harness.
Inspect the connector for damaged locking tabs, bent pins, moisture, and signs of overheating. A terminal that appears connected may still have poor electrical contact because of corrosion or reduced terminal tension.
4. Abnormal engine noise or excessive combustion knock
A knock sensor responds to vibration, not just electrical faults. Abnormal engine noise can therefore affect the signal that the PCM evaluates.
Possible contributing conditions include incorrect fuel octane, overheating, carbon deposits, ignition problems, and mechanical engine noise. These conditions should be investigated when the sensor and its electrical circuit appear to operate correctly.
General Motors diagnostic information specifically describes excessive knock and abnormal background engine noise as possible reasons for detecting P0331. This shows why replacing the sensor without investigating engine noise can lead to an incomplete repair.
5. Incorrect sensor installation
A knock sensor must be installed according to the manufacturer’s procedure. Incorrect mounting, contamination between the sensor and its mounting surface, or improper tightening can affect vibration transmission.
The specified mounting torque is particularly important. Too much or too little tightening can change how the sensor responds to engine vibration. Always use the vehicle-specific torque specification instead of a general value.
6. PCM or engine control system problem
A PCM fault is possible but should be considered only after the sensor, wiring, connectors, power supplies, grounds, and related mechanical conditions have been checked.
Internal electronic damage, connector problems at the control module, or an incorrect calibration can interfere with signal interpretation. A qualified technician may need manufacturer-level diagnostic equipment to verify this possibility.
| Possible cause | What may happen | Recommended inspection |
|---|---|---|
| Failed knock sensor | Incorrect or inconsistent vibration signal | Sensor operation and manufacturer specifications |
| Open wiring | Signal interruption or missing data | Harness continuity and connector terminals |
| Short to ground or power | Signal voltage outside the expected range | Circuit isolation and wiring condition |
| Abnormal engine noise | Unexpected vibration detected by the sensor | Combustion and mechanical noise sources |
| Poor connector contact | Intermittent or unstable signal | Corrosion, pin fit, and locking mechanism |
| PCM problem | Incorrect signal processing or monitoring | Module connections and manufacturer diagnostic tests |
How to Diagnose P0331 With an OBD2 Scanner
A systematic diagnosis helps identify whether the fault comes from the knock sensor, electrical circuit, or engine condition. An OBD2 scanner is a useful starting point, but some vehicles require enhanced manufacturer-specific data and electrical testing to confirm the problem.
Step 1: Read and record all diagnostic trouble codes
Connect an OBD2 scanner to the vehicle’s 16-pin diagnostic connector, usually located under the dashboard on the driver side. Turn the ignition on and select the engine or powertrain control module.
Read stored, pending, and permanent codes. Do not immediately clear them. Other diagnostic trouble codes may provide important information about engine operation, sensor circuits, misfires, or electrical problems.
Pay attention to related knock sensor codes, particularly P0330, P0332, and P0333. These codes identify different Bank 2 knock sensor circuit conditions and can help narrow the investigation.
Step 2: Review freeze-frame information
Freeze-frame data records engine operating conditions when a fault is detected. It may include engine speed, calculated load, coolant temperature, vehicle speed, intake air temperature, and other available parameters.
Use this information to understand when the fault occurred. For example, a code recorded during high engine load deserves a different investigation from one recorded shortly after a cold start.
Compare the recorded conditions with the symptoms reported by the driver. If the vehicle makes a metallic noise during acceleration and the freeze-frame shows high engine load, actual combustion knock or abnormal mechanical vibration deserves attention.
Step 3: Inspect the knock sensor and wiring
Use the manufacturer’s service information to identify Knock Sensor 2 and its electrical connections. Inspect accessible wiring for cuts, melted insulation, loose routing clips, corrosion, and signs of previous repairs.
Check the connector for bent pins, damaged seals, moisture, and poor terminal fit. Pay particular attention to areas where the harness passes close to hot engine components or moving parts.
Do not assume that Bank 2 always corresponds to the same physical position across different vehicles. Engine configuration and sensor placement determine the correct inspection location.
Step 4: Monitor live knock sensor data
If the scanner supports enhanced live data, look for parameters such as Knock Sensor 2 voltage, knock retard, knock intensity, or manufacturer-specific sensor signal values. Not every scanner or vehicle exposes these parameters through the generic OBD-II menu.
Observe the signal under the operating conditions specified by the manufacturer. A signal that remains fixed when the diagnostic strategy expects changing vibration information may indicate a sensor, wiring, or signal-processing problem.
Do not use a universal voltage range to condemn every knock sensor. Sensor designs and PCM strategies vary. For example, Ford service information identifies a reading above 0.5 volts with ignition on and the engine off as a hard-fault indication in its specified diagnostic application. That threshold must not be applied automatically to other vehicles.
Step 5: Check electrical circuits
If visual inspection does not reveal a problem, use the vehicle-specific wiring diagram to identify the correct signal and return circuits. A digital multimeter may help check continuity, resistance, and unwanted shorts when the manufacturer procedure calls for those tests.
The correct test method depends on the sensor design. Some systems use different wiring arrangements and signal characteristics. Never apply an assumed voltage or resistance specification without confirming it in the applicable service documentation.
Electrical testing should also account for PCM connector condition and proper circuit isolation. Incorrect probing or applying external voltage to a sensitive control circuit can damage electronic components.
Step 6: Investigate engine noise and combustion conditions
If the electrical system appears normal, investigate abnormal engine vibration and combustion conditions. Check for overheating, incorrect fuel grade, ignition problems, carbon buildup, and mechanical noises that could affect knock sensor readings.
Monitor engine coolant temperature and compare it with the manufacturer’s operating specifications. Excessive engine temperature can contribute to abnormal combustion and should not be ignored.
Fuel trims can provide additional context when another mixture-related problem is suspected. Combined short-term and long-term fuel trims beyond roughly plus or minus 10 percent can indicate a mixture problem. However, fuel trim readings do not directly prove that a knock sensor is defective.
Mode $06 test results may also be available on supported vehicles. These results can show manufacturer-specific monitor information, but the correct test identifier and pass/fail limits must come from the applicable service documentation. Generic Mode $06 data should not be treated as a universal knock sensor test.
Step 7: Confirm the repair
After correcting the identified fault, clear codes when appropriate and perform the manufacturer’s verification procedure. Some diagnostic monitors require particular engine temperatures, speeds, loads, and driving conditions before they can run.
Recheck stored and pending codes after the required drive cycle. Confirm that the relevant monitor completes and that P0331 does not return. Permanent diagnostic codes may remain visible until the vehicle fixes the fault and the appropriate monitor passes without assistance from a manual code-clear command. If your scanner also lists P0332 Code, that guide covers it.
Tip: Save the original diagnostic codes and freeze-frame data before disconnecting the battery or clearing anything. These records can help identify intermittent faults. Never unplug sensors, probe PCM circuits, or perform electrical resistance tests on powered circuits without following the vehicle-specific service procedure. If you need equipment for this job, see Best Bidirectional Scan Tools for Minivans.
For additional diagnostic details, consult the Ford OBD-II diagnostic trouble code information. It explains the knock sensor monitoring strategy and illustrates why manufacturer-specific electrical thresholds matter.
How to Fix the P0331 Code
The correct repair depends on the confirmed cause. A sensor replacement will not fix damaged wiring or abnormal engine noise, so diagnosis should come before parts replacement. Once the underlying fault is identified, use the manufacturer’s repair procedure.
Replace a confirmed faulty knock sensor
If testing confirms that Knock Sensor 2 is defective, replacement may be necessary. The repair procedure depends on engine design. Some sensors are accessible externally, while others require substantial component removal to reach the mounting location.
Use the correct replacement specification and follow the manufacturer’s installation procedure. The mounting surface should meet the specified cleanliness requirements, and the sensor must be tightened to the correct torque.
Some engine designs place sensors beneath intake components or in other difficult-to-access areas. Additional labor may therefore be required even when the sensor itself is relatively straightforward to replace.
Repair damaged wiring
If the diagnostic results identify an open circuit, short circuit, or damaged harness, repair the affected wiring according to the manufacturer’s instructions.
The repair should restore the correct electrical connection and protect the harness from heat, moisture, vibration, and abrasion. Improvised connections or poorly insulated repairs can create another intermittent fault.
If the wiring damage extends into a larger harness, a professional may recommend replacing a section or the complete harness assembly, depending on the extent of the damage.
Clean or replace damaged connectors
A connector problem may be corrected by replacing damaged terminals, restoring proper terminal tension, or replacing the connector housing. Corrosion should be addressed using an approved repair method.
Simply spraying electrical cleaner into a severely corroded connector is not a reliable permanent repair. Damaged pins, seals, and locking components may need replacement to restore a dependable connection.
Correct engine operating problems
If actual combustion knock is responsible for the abnormal sensor signal, the engine condition must be corrected. Depending on the findings, this may involve addressing overheating, ignition timing, fuel quality, deposits, or an underlying mechanical issue.
Use the fuel grade recommended by the vehicle manufacturer. Do not assume that premium fuel will repair a damaged sensor or defective electrical circuit. It may help with certain combustion-related conditions, but it cannot correct an open wire or failed connector.
Consider PCM diagnosis only when necessary
A PCM replacement or reprogramming procedure should be considered only after the relevant sensor circuits and mechanical conditions have been verified. Control-module replacement can involve programming, immobilizer procedures, and vehicle-specific configuration requirements.
A qualified technician should confirm that the module itself is faulty before recommending replacement. This prevents unnecessary expense and avoids replacing a computer that was only reporting a problem elsewhere in the system.
What affects repair cost?
The cost of repairing P0331 depends on the failed component, vehicle design, labor requirements, and diagnostic time. There is no reliable universal repair price because sensor accessibility varies considerably between engines.
- Sensor cost: The design, quality, and vehicle application affect the replacement component cost.
- Labor hours: An easily accessible sensor requires less labor than one buried beneath intake components.
- Wiring repairs: Extensive harness damage may require additional diagnostic time and replacement materials.
- Connector repairs: Corroded terminals or damaged connector housings can add parts and labor requirements.
- Additional engine repairs: Overheating, abnormal combustion, or mechanical noise may require separate investigation and repairs.
- Shop versus DIY: Professional diagnostic equipment and labor add expense, while DIY repairs require suitable tools, service information, and technical ability.
A DIY repair may be practical when the sensor is accessible and the diagnosis is clear. However, jobs involving difficult access, extensive intake removal, specialized testing, or sensitive engine electronics are better handled by an experienced technician.
For more detailed examples of manufacturer monitoring strategies, see the General Motors engine diagnostic documentation. It demonstrates how knock sensor performance monitoring can evaluate excessive knock, abnormal noise, and signal behavior.
Is It Safe to Drive With a P0331 Code?
Driving with P0331 is not automatically an emergency, but ignoring the problem is not recommended. The main concern is that the PCM may not receive reliable information about engine knock. This can affect the engine’s ability to respond correctly to abnormal combustion.
The level of risk depends on the underlying cause. A minor connector issue may produce a warning without noticeable driving problems, while actual detonation or a serious mechanical engine noise condition can create a greater risk of damage.
When limited driving may be possible
If the check engine light is steady, the engine runs smoothly, temperatures remain normal, and there are no unusual noises, a short and gentle trip to a repair facility may be reasonable.
Avoid heavy acceleration, towing, high engine loads, and aggressive driving until the fault is diagnosed. These conditions can increase combustion pressure and temperature, potentially making an existing knock problem worse.
When to stop driving
Stop driving and arrange professional assistance if the engine produces persistent metallic knocking, overheats, loses substantial power, or develops severe running problems.
A flashing check engine light requires particular attention. It usually indicates an active misfire severe enough to risk catalytic converter damage. Reduce engine load immediately and arrange prompt inspection. If the engine runs badly or continues making abnormal noises, do not continue driving.
Why ignoring P0331 can be risky
The knock sensor is part of the engine’s combustion monitoring system. If its signal is unreliable, the PCM may not respond to abnormal combustion as intended.
Persistent detonation can create excessive pressure and temperature inside the combustion chamber. Severe knock can damage pistons, bearings, and other internal engine components. The risk depends on the actual engine condition rather than the code alone.
A fault that appears minor today may also become more difficult to diagnose if an intermittent wiring problem develops into a complete circuit failure. Prompt inspection helps prevent additional complications.
Safety: Never work around a running engine’s moving belts, fans, or hot exhaust components. Allow the engine to cool before inspecting accessible wiring. Do not perform electrical testing or sensor removal without the correct service procedure. If severe knocking, overheating, or a flashing check engine light occurs, stop using the vehicle and seek professional assistance. When P0329 Code appears in the same scan, check that guide before replacing parts.
Frequently Asked Questions
Can a P0331 code cause a vehicle to fail an emissions test?
Yes. An illuminated check engine light and an active emissions-related diagnostic fault can prevent a vehicle from passing an OBD-II emissions inspection in many US testing programs. Requirements vary by state, and permanent codes or incomplete readiness monitors may also affect inspection results.
Can a weak battery cause P0331?
Low system voltage can contribute to electrical and control-module problems, although it is not a primary confirmed cause of P0331 by itself. A healthy fully charged battery typically measures approximately 12.6 volts at rest. Charging voltage with the engine running is generally around 13.5 to 14.7 volts.
Does P0331 always turn on the check engine light immediately?
No. Some manufacturers use a two-trip diagnostic strategy. A fault may first appear as pending and only illuminate the malfunction indicator lamp after the required monitoring conditions and failure counts are satisfied.
Can P0331 appear together with P0330?
Yes. P0330 identifies a Bank 2 knock sensor circuit malfunction, while P0331 identifies a Bank 2 knock sensor range or performance problem. When both appear, the shared sensor wiring, connector, and circuit conditions deserve particular attention.
Will P0331 disappear automatically after a repair?
The malfunction indicator light may turn off after the required successful driving cycles, but the permanent diagnostic trouble code can remain in memory. The vehicle must complete the relevant self-monitoring procedure and verify that the fault has been corrected before the permanent code clears automatically.
The P0331 code indicates a Bank 2 knock sensor performance problem, but the sensor itself is not always responsible. Check the wiring, connectors, engine vibration, and live scanner data before replacing parts. A proper diagnosis and timely repair help restore reliable engine monitoring and reduce the risk of combustion-related damage.
-
Nicole Bennett, Technical Content Editor at BestOBD2Picks Nicole turns OBD-II standards, service bulletins, and repair data into step-by-step diagnostic guides anyone can follow. Technical Content Editor
Related guides
LearnP1195 Code: Meaning by Make, Symptoms, Causes, and Diagnostic Steps
LearnP0521 Jeep: Causes, Symptoms, Diagnosis, and Fixes
LearnP2176 Mercedes: Diagnose Throttle Position Learning Problems
LearnP0456 Toyota 4Runner: Find and Fix Small EVAP Leaks
LearnP0218 Chevy: Diagnose Transmission Overheating and Prevent Damage
LearnP207F Isuzu Code: DEF Fluid Quality Performance