P0340 on 2005-2012 Toyota Corolla: Cam Sensor Circuit Causes and Fixes
On a 2005-2012 Toyota Corolla, P0340 most often points to a failing camshaft position sensor. Before replacing it, check for a weak battery, as low voltage is a known cause per a Toyota TSB. Also, inspect the sensor connector for oil contamination. A new OEM (Denso) sensor costs $70-$120, and replacement is an easy 15-minute DIY job. Using cheaper aftermarket sensors is not recommended as they are known to fail prematurely.
- Always test the battery first. A weak battery is a known cause of P0340 on these Corollas and is a simple, inexpensive fix.
- If the battery is good, the camshaft position sensor is the next most likely cause. It's a cheap part and very easy to replace yourself with a 10mm socket.
- The 2005-2008 models have one sensor, while 2009-2012 models have two. P0340 points to the intake sensor.
- If a new sensor and good battery don't fix the code, check the wiring for damage before suspecting more complex issues like a stretched timing chain.
What's Unique About the 2005-2012 Toyota COROLLA

This year range covers two Corolla generations with different engines. The 9th Gen (2005-2008) uses a 1.8L 1ZZ-FE engine with a single camshaft sensor. The 10th Gen (2009-2012) uses a 1.8L 2ZR-FE engine with two sensors (intake and exhaust). P0340 refers to the 'A' sensor, which is the intake cam sensor. A key issue, documented in a Toyota Technical Service Bulletin, is that low battery voltage can trigger this code, making a battery test the essential first step before replacing any parts. Another common issue is oil leaking from the valve cover gasket and fouling the sensor's electrical connector.
Diagnostic Flowchart

Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.
Generation note: This guide covers the 9th generation (2005-2008, E130) and the 10th generation (2009-2012, E140) Corolla. The 9th gen has one camshaft position sensor (1.8L 1ZZ-FE engine). The 10th gen has two (1.8L 2ZR-FE & 2.4L 2AZ-FE engines); P0340 refers to the intake sensor, which is located closer to the front of the vehicle.
Symptoms You May Notice
- Check Engine Light is on
- Engine is hard to start or cranks but won't start
- Engine stalls unexpectedly, especially at low speeds
- Rough or unstable idle
- Noticeable lack of acceleration and power
- Reduced fuel economy
- Engine hesitates or sputters
- Replacing the camshaft sensor without first checking the battery. The TSB clearly indicates low voltage is a primary cause to investigate.
- Using a cheap aftermarket sensor that is faulty out of the box or fails quickly, leading to the belief that the sensor was not the problem.
- Replacing the wrong sensor on 10th generation models (2009-2012), which have separate intake ('A') and exhaust ('B') sensors.
Most Likely Causes

- Low Battery Voltage or Weak Battery 🔴 High Probability A Toyota Technical Service Bulletin (T-TT-0010-10 Rev) explicitly states that low battery voltage can cause inconsistent engine rotational speed during cranking, triggering P0340. This should always be the first check.
How to confirm: Test the battery voltage with a multimeter. A healthy, fully charged battery should read at least 12.6 volts with the engine off. Have the battery and charging system load-tested at an auto parts store to confirm it can hold a charge under load.
Typical fix: Charge or replace the vehicle's battery.
Est. part cost: $100-$250 - Faulty Camshaft Position Sensor 🔴 High Probability This is the most common component to fail within the circuit due to heat cycles and age. There is a strong consensus in owner forums to use the OEM Denso part, as cheaper aftermarket sensors have a high rate of failure, sometimes causing the code to return immediately or within a few months.
How to confirm: After confirming the battery is good and the connector is clean, replacing the sensor is the next logical step. You can also test the old sensor's resistance with a multimeter (cold: 1630-2740 ohms for 9th gen). For 10th gen, test for 5V reference and signal voltage. 🎬 Watch: A helpful guide on testing and replacing the sensor. Replacement is often faster.
Typical fix: Replace the camshaft position sensor. On 10th gen models, this is the intake sensor. 🎬 Watch: How to replace the intake or exhaust sensor on 10th Gen models. Always use a Denso/OEM part for reliability.
Est. part cost: $25-$120 - Damaged Wiring or Connector 🟡 Medium Probability The wiring harness can become brittle from engine heat, or the connector can get contaminated with oil from a leaking valve cover gasket, which is a common issue. This oil saturation can disrupt the signal.
How to confirm: Visually inspect the wiring harness leading to the camshaft position sensor for cracks or fraying. Unplug the connector and check for oil inside. If wiggling the connector while the engine is running causes it to sputter or stall, the connector is faulty.
Typical fix: If oily, clean the connector and sensor with electrical contact cleaner. If the connector itself is damaged, replace the connector pigtail. One Pontiac Vibe owner reported fixing their P0340 code for $12 by simply replacing the connector.
Est. part cost: $10-$30 - Stretched Timing Chain or Faulty Tensioner ⚪ Low Probability More common on higher-mileage models. While the chain is designed to last the engine's life, wear can cause slack. This desynchronizes the cam and crank signals, which the ECM can interpret as a sensor circuit fault, triggering P0340 alongside correlation codes like P0016.
How to confirm: Listen for a distinct rattling noise from the front of the engine, especially on a cold start for a few seconds. This is a strong indicator of a timing chain or tensioner issue. Confirming requires significant disassembly.
Typical fix: Replace the timing chain, tensioners, and guides. This is a complex and expensive job.
Est. part cost: $150-$400 for a full kit
Rare But Worth Checking
- Faulty Crankshaft Position Sensor: The ECM compares signals from both the cam and crank sensors. A failing crankshaft sensor can sometimes confuse the computer, leading it to incorrectly flag the camshaft sensor circuit. One owner of a 2006 Corolla fixed a P0340 that persisted after a cam sensor replacement by installing a new crankshaft sensor.
- Faulty Alternator: A failing alternator can produce insufficient voltage to keep the battery properly charged, leading to the same low-voltage condition described in the TSB.
- Faulty Engine Control Module (ECM): This is very rare. The ECM is the last thing to suspect after all other possibilities (sensor, wiring, battery, timing) have been thoroughly ruled out.
Diagnosis Steps

- Check Battery Health: Using a multimeter, verify the battery has at least 12.6V with the engine off. Have the battery and charging system load-tested to ensure it's not failing. This is the first step per Toyota TSB T-TT-0010-10 Rev.
- Inspect the Sensor and Wiring: Locate the camshaft position sensor on the top of the cylinder head. On the 1.8L engines, it's on the driver's side, held by a single 10mm bolt. 🎬 See this quick walkthrough on replacing the sensor yourself. Unplug the connector and inspect for oil saturation, corrosion, or damage. Check the harness for cracks.
- Clean and Re-test: If the connector is oily or dirty, clean both the connector and the sensor tip with electrical contact cleaner and a soft cloth. Clear the code and drive to see if it returns.
- Replace the Camshaft Position Sensor: If the battery and wiring are good, the sensor itself is the most likely culprit. Replace it with a new OEM/Denso part. This is an inexpensive and easy part to replace.
- Check for Timing Chain Noise: If the code persists after replacing the sensor, listen carefully for a rattling sound from the engine during cold starts. This could indicate a stretched chain.
- Advanced Diagnostics: If all else fails, a professional may need to use an oscilloscope to check the signal pattern from the sensor to the ECM or diagnose a potential ECM fault.
Parts You'll Likely Need

- Camshaft Position Sensor (9th Gen, 2005-2008)
(OEM #90080-19014)— This is the sensor for the 1.8L 1ZZ-FE engine. It is the most common part to fail for this code on these model years. This part number supersedes part number 90919-05026.
Trusted brands: Denso (OEM), NGK/NTK
OEM price range: $70-$85
Aftermarket price range: $25-$50 - Camshaft Position Sensor (10th Gen, 2009-2012)
(OEM #90919-T5005)— This is the sensor for the 1.8L 2ZR-FE and 2.4L 2AZ-FE engines. P0340 refers to the intake sensor ('A'). This part is the most common failure for this code on these model years. Owners strongly recommend OEM/Denso to avoid issues.
Trusted brands: Denso (OEM), Delphi
OEM price range: $100-$120
Aftermarket price range: $30-$60
Related Codes That Often Appear With This One
- P0335 — This code is for the Crankshaft Position Sensor. Since the cam and crank sensors work together for timing, a fault in one system can sometimes trigger a code for the other. The low voltage TSB also applies to P0335.
- P0011 / P0012 — These codes relate to camshaft position timing (over-advanced or over-retarded). They can appear alongside P0340 if there is a mechanical timing issue, like a stretched chain or a problem with the VVT system.
- P0016 — This code indicates a Crankshaft/Camshaft Position Correlation error. It's a strong indicator that the P0340 is caused by a mechanical timing issue (like a stretched chain) rather than a faulty sensor.
Technical Service Bulletins (TSBs) & Recalls
- T-TT-0010-10 Rev: Notes that low battery voltage can contribute to a MIL ON condition for P0335 and/or P0340.
Platform-Specific Known Issues
- A known issue documented by Toyota TSB T-TT-0010-10 Rev is that low battery voltage can cause this code. Always check the battery first.
- Oil from a leaking valve cover gasket can seep into the camshaft position sensor connector, disrupting the signal and triggering P0340. Cleaning the connector or replacing the pigtail may be required.
- Owner forums for the Corolla and its platform-mates (Matrix, Vibe) are filled with reports of cheap aftermarket camshaft sensors failing quickly. It is highly recommended to spend more on a genuine Denso sensor to ensure a lasting repair.
Mechanic-Grade Diagnostic Values
- Camshaft Position Sensor Resistance (9th Gen, 1ZZ-FE) — expected: Cold: 1,630 to 2,740 Ω. Hot: 2,065 to 3,225 Ω.. Failure: A reading outside of this range indicates a faulty sensor.
- Camshaft Position Sensor Power Supply (10th Gen, 2ZR-FE) — expected: Approximately 5V DC at the power wire with key on, engine off.. Failure: No voltage or significantly lower voltage suggests a wiring or ECM issue.
- Camshaft Position Sensor Ground Check (10th Gen, 2ZR-FE) — expected: Approximately 12.6V when measuring between the battery positive terminal and the sensor's ground pin.. Failure: A reading of 0V or low voltage indicates a bad ground connection.
- Camshaft Position Sensor Signal Voltage (10th Gen, 2ZR-FE) — expected: Approximately 5V DC on the signal wire, which drops to 0V when a metal object is placed in front of the sensor tip.. Failure: Voltage that does not change or is stuck at 0V indicates a failed sensor.
Wiring & Ground Locations
- Engine to Body Ground — On the 10th gen (2009-2012), a primary engine-to-body ground strap is located on the fender, under the coolant reservoir.. A loose or corroded main ground can cause erratic behavior in various sensors, including the camshaft position sensor, leading to false codes.
- ECM Connector Pins (1ZZ-FE) — At the main Engine Control Module (ECM). The specific pins for the camshaft sensor are typically labeled G2+ and NE- in wiring diagrams.. Allows for end-to-end continuity testing of the sensor wiring. A technician can check for an open or short in the harness between the sensor connector and the ECM itself.
- Ground Point A1 — Located in the left front of the engine compartment on 2009 models.. This is a chassis ground point for several engine components. Corrosion or looseness here can cause intermittent signal issues.
Real Owner Repair Stories
- Car Talk Community user 'MSC-B14' (2006 Toyota Corolla LE, 173,000 miles) — Car sputtered and stalled. Initially threw P0340. Would start but run very rough, then wouldn't start at all.
❌ Tried (didn't work) Replacing the camshaft position sensor.
✅ What actually fixed it After replacing the cam sensor, the code changed to P0335 (Crankshaft Position Sensor). Replacing the crankshaft position sensor solved the problem and the car started and ran perfectly.
When the Usual Fixes Don't Work
- In one documented case, a 2006 Corolla with a P0340 code and no-start condition was not fixed by replacing the camshaft position sensor. The problem persisted, and a new code, P0335, appeared. The actual root cause was a failed crankshaft position sensor. This highlights that the ECM can misinterpret a crank signal loss as a cam circuit fault.
OEM Part Supersession History
90919-05026→90080-19014— Part update/consolidation by Toyota.
Heads up: This part number is for the 9th Gen (2005-2008) 1ZZ-FE engine. Some parts catalogs may ambiguously list 90919-05026 as both a cam and crank sensor for various models, so verifying application is critical.90919-05060, 90919-T5002→90919-T5005— Part update/consolidation by Toyota.
Heads up: This part number is for the 10th Gen (2009-2012) 2ZR-FE and 2AZ-FE engines.
Model Year Variations Within This Range
- 2005-2008 vs 2009-2012: The diagnostic procedure for the sensor itself changes with the engine. The 9th gen (1ZZ-FE) uses a 2-wire variable reluctance sensor that is tested by measuring resistance (Ohms). The 10th gen (2ZR-FE) uses a 3-wire Hall-effect sensor that is tested by measuring voltage (V DC).
Helpful Videos
We Have This Part in Stock
The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.
- Toyota COROLLA:
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2005-2012 Toyota COROLLA
- Diagnostic Flowchart
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Technical Service Bulletins (TSBs) & Recalls
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Wiring & Ground Locations
- Real Owner Repair Stories
- When the Usual Fixes Don't Work
- OEM Part Supersession History
- Model Year Variations Within This Range
- 🎟️ Get 5% Off