P0340 on 2009-2019 Toyota Corolla: Camshaft Sensor Causes and Fixes
On a 2009-2019 Corolla, P0340 is most often a failing intake camshaft position sensor or a weak battery. Always test the battery first, as a Toyota TSB confirms low voltage during cranking can trigger this code. If the battery is good, inspect the wiring connector for oil contamination. A new Denso sensor (p/n 196-9003) costs about $70-$110 and is a very easy 15-minute DIY fix.
- Before buying any parts for a P0340 code, you MUST test the vehicle's battery under load. A weak battery is a very common cause for this specific code on this Corolla.
- If the sensor needs replacement, use an OEM brand like Denso (p/n 196-9003). Aftermarket sensors are known to be unreliable for this application and may fail quickly.
- The correct part is the INTAKE camshaft sensor (Sensor 'A'), which is located toward the front of the engine on the driver's side of the valve cover.
- Always inspect the sensor's electrical connector for oil contamination from a potential valve cover leak before replacing the sensor itself.
What's Unique About the 2009-2019 Toyota Corolla
For this specific Corolla range and its platform mates (Matrix, Vibe), the P0340 code has a major platform-specific quirk documented in a Toyota Technical Service Bulletin (T-TT-0010-10 Rev). A weak or dying battery can cause an inconsistent engine cranking speed, which the computer misinterprets as a camshaft sensor fault, triggering the code. Because of this, many owners needlessly replace the sensor when the actual problem is the battery. Another common issue is oil from a leaking valve cover gasket seeping into the sensor's electrical connector and disrupting the signal. Always testing the battery health 🎬 Watch: A breakdown of common causes and fixes for P0340 and inspecting the connector are the crucial first diagnostic steps for this vehicle before buying any parts.
Generation note: This range covers the 10th generation (2009-2013) and 11th generation (2014-2019) Corolla. Both generations use the 1.8L 2ZR-FE engine with two camshaft position sensors. The causes, diagnosis, and repair process for code P0340 are identical across both generations. The issue is also common on the mechanically identical Toyota Matrix and Pontiac Vibe of the same era.
Symptoms You May Notice
- Check Engine Light is on
- VSC and/or Traction Control lights may also illuminate
- Engine is hard to start or cranks but won't start
- Engine stalls, especially at idle or while driving
- Rough running, unstable idle, and engine sputtering
- Noticeable loss of power and poor acceleration
- Reduced fuel economy
- Replacing the camshaft position sensor without first testing the battery. Due to the known TSB, a weak battery is a very common cause and checking it first can save time and money.
- Replacing the sensor when the connector is simply saturated with oil from a valve cover leak. Cleaning the connector with electrical cleaner may resolve the issue.
Most Likely Causes
- Failing Intake Camshaft Position Sensor 🔴 High Probability → Shop Engine Camshaft Position Sensor This is the most common component to fail in the circuit due to normal wear and tear from heat cycles over time. Denso, the OEM supplier, notes their design is highly sensitive and resistant to oil and fuel byproducts.
How to confirm: After confirming the battery and wiring are good, replacing the sensor is the most direct way to confirm. You can also test the sensor circuit for a 5V reference signal at the connector with the key on.
Typical fix: Replace the intake camshaft position sensor ('A'). It is highly recommended to use an OEM (Denso) part for reliability, as aftermarket sensors are widely reported to fail. 🎬 See how a bad sensor behaves and how to swap it
Est. part cost: $70-$110 - Low Battery Voltage / Weak Battery 🔴 High Probability → Shop Vehicle Battery A Toyota Technical Service Bulletin (T-TT-0010-10 Rev) confirms that low voltage during cranking can cause the ECM to incorrectly set code P0340. This is a well-documented issue across many Toyota models, including this Corolla.
How to confirm: Test the battery with a multimeter; a healthy battery should read at least 12.6 volts with the engine off. Have it load-tested at an auto parts store to confirm its health under load, as a battery can show good voltage but fail under the strain of cranking.
Typical fix: Charge or replace the vehicle's 12V battery.
Est. part cost: $150-$250 - Damaged Wiring or Connector 🟡 Medium Probability The sensor connector is located on top of the valve cover and can be contaminated by oil from a leaking valve cover gasket, a common issue. Engine heat can also make the wiring harness brittle over time, leading to cracks or breaks in the wires.
How to confirm: Visually inspect the sensor's electrical connector for oil, corrosion, or loose pins. Wiggle the connector with the engine running to see if it causes a stall or stumble. Check for 5V reference power at the connector; if absent, check for a blown fuse.
Typical fix: Clean the connector and sensor with electrical contact cleaner. If the connector or wiring is damaged, the pigtail may need to be replaced. One owner of a platform-mate (Pontiac Vibe) fixed their P0340 by replacing the connector for $12.
Est. part cost: $15-$40
Rare But Worth Checking
- Stretched Timing Chain: → Shop Engine Timing Chain While the 2ZR-FE's timing chain is durable, on very high-mileage engines (150,000+ miles), stretching can occur. This causes a correlation issue between the cam and crank sensors that may manifest as P0340. This is usually accompanied by a distinct rattling noise on cold starts before oil pressure builds up.
- Faulty Engine Control Module (ECM): → Shop Engine Control Module (ECM) ECM failure is very rare on Toyotas but is a possibility if all other causes have been ruled out. This should be the last item to consider after thorough circuit testing.
Diagnosis Steps
- Read the code with an OBD-II scanner to confirm P0340 is present.
- CRITICAL: Test the battery. Use a multimeter to ensure it has at least 12.6 volts with the engine off. Have the battery load-tested at an auto parts store to confirm its health. If the battery is weak, charge or replace it, clear the code, and drive to see if P0340 returns.
- Inspect the intake camshaft position sensor's wiring and connector. The sensor is on the driver's side of the valve cover, toward the front, held by a 10mm bolt. Unplug it and check for oil saturation, corrosion, or damaged pins.
- Test the circuit. With the key on, engine off, use a multimeter to check for a 5-volt reference signal at the connector plug. If there is no voltage, check for a blown fuse in the engine bay fuse box before suspecting a wiring break.
- If the battery, connector, and wiring are good, replace the intake camshaft position sensor. This is a simple repair held by a single 10mm bolt. 🎬 Watch this walkthrough for replacing the intake or exhaust sensors
- Clear the trouble code using the scanner and start the engine. If the Check Engine Light stays off, the problem is resolved.
- If the code returns, listen for a rattling noise from the engine on cold starts, which could indicate a stretched timing chain. At this point, advanced diagnosis with an oscilloscope to check the sensor's waveform or professional help may be needed.
Parts You'll Likely Need
- Engine Camshaft Position Sensor (Intake)
(OEM #90919-T5005)— This is the most common part to fail for this code after ruling out a weak battery. The 'A' in P0340 refers to this intake sensor.
Trusted brands: Denso (OEM supplier, p/n 196-9003), Hitachi, Delphi
OEM price range: $70-$110
Aftermarket price range: $25-$60 - Camshaft Position Sensor Connector Pigtail
(OEM #90980-12353 (connector housing))— Needed if the original connector is damaged, corroded, or oil-saturated beyond cleaning. A bad connection is a common cause of a P0340 code.
Trusted brands: Dorman, Standard Motor Products, Various aftermarket
OEM price range: $20-$40
Aftermarket price range: $10-$25
Related Codes That Often Appear With This One
- P0341-P0344 — These are all related codes for the Camshaft Position Sensor 'A' circuit, indicating range/performance, low input, high input, or intermittent issues.
- P0335 — This is the code for the Crankshaft Position Sensor. Since the two sensors work together, a fault in one can sometimes cause the computer to flag an issue with the other. The TSB for low voltage also applies to P0335.
- P0011, P0012, P0016 — These codes indicate camshaft timing is over-advanced, over-retarded, or there's a correlation error with the crankshaft. Seeing these alongside P0340 strongly suggests a mechanical timing issue, such as a stretched timing chain, rather than just a sensor failure.
Technical Service Bulletins (TSBs) & Recalls
- T-TT-0010-10 Rev: States that low battery voltage can cause inconsistent engine rotational speed during cranking, which may be misinterpreted by the ECM as a sensor fault and trigger P0340 and/or P0335.
Platform-Specific Known Issues
- A Toyota Technical Service Bulletin (TSB T-TT-0010-10 Rev) specifically notes that low battery voltage can cause this code, making a battery test the essential first step.
- Owners and mechanics strongly recommend using an OEM (Denso) sensor, as cheaper aftermarket sensors are widely reported to fail prematurely or not work at all on this platform.
- Oil from a leaking valve cover gasket frequently contaminates the sensor connector, causing a bad signal. Always inspect the connector for oil before replacing the sensor.
Mechanic-Grade Diagnostic Values
- Intake Camshaft Position Sensor Resistance — expected: 835 to 1,400 Ω when cold.. Failure: A reading outside this range, or an open/infinite reading, indicates a faulty sensor.
- Sensor Connector Voltage (Reference) — expected: Approximately 5V DC between the reference wire and ground with Key On, Engine Off.. Failure: No voltage or significantly lower voltage points to a wiring issue or a problem with the ECM's 5V supply circuit. Check for a blown fuse first.
- Sensor Connector Voltage (Ground Circuit) — expected: Approximately 12.6V (battery voltage) when testing between the ground pin on the connector and the positive battery terminal.. Failure: No voltage indicates a break in the ground wire.
- Sensor Signal Wire (Live Data/Oscilloscope) — expected: A square wave signal that switches between ~0V and ~5V as the engine is cranked. With a multimeter, this may show as an average voltage between 0.5V and 1.5V.. Failure: A flat line at 0V or 5V, or no signal, indicates a faulty sensor or a break in the signal wire.
- Oscilloscope Settings for Waveform Analysis — expected: Set to 5V/DIV (Volts per division) and 20 msec./DIV (milliseconds per division).. Failure: The captured waveform should be a clean square wave. Any distortion, missing pulses, or noise indicates a problem with the sensor or reluctor wheel.
Hidden / Shadow Codes Worth Checking
- P0340 Internal Logic - Condition 1: The ECM detects no camshaft position sensor signal while the engine is cranking. This is a 2-trip detection logic, meaning the fault must be detected on two consecutive drive cycles to set the code. (see via This is an internal ECM condition, not a separate code. It can be inferred from freeze frame data on an advanced scan tool like Toyota Techstream.)
- P0340 Internal Logic - Condition 2: The ECM detects no camshaft position sensor signal when the engine speed is 600 RPM or higher, or a misalignment between cam and crank is detected. This is a 1-trip detection logic and can point towards a mechanical timing issue. (see via This is an internal ECM condition. The presence of code P0016 alongside P0340 would strongly suggest this condition.)
Scan Tool Commands That Help
- Toyota Techstream: Live Data Monitoring (Data List) — Use during cranking and at idle to monitor 'Camshaft Position Sensor Signal' and 'Crankshaft Position Sensor Signal (NE)' simultaneously. This allows you to verify if a signal is being generated at all and if it is consistent, without having to back-probe wires.
- Advanced OBD-II Scanners / Techstream: Cam/Crank Relearn Procedure — Some vehicles may require a relearn procedure after replacing a cam or crank sensor to re-synchronize the signals with the ECM. While not always required on this specific model, if the code returns immediately after replacing the sensor with a known-good part, checking for a relearn utility is a valid next step.
Wiring & Ground Locations
- ECM Pins (Intake Cam Sensor 'A') — At the main Engine Control Module (ECM) connector.. The intake camshaft position sensor wires (G2+ and G2-) terminate at specific pins on the ECM. For the 2ZR-FE, these are often pins B31-119 (G2+) and B31-120 (G2-). Checking for continuity and voltage at these pins can confirm if the wiring harness is intact from the sensor to the ECM.
- Ground Point 'BA' — On the driver's side of the engine compartment, near the fuse block and strut tower.. This is a primary grounding point for the engine harness. A loose or corroded connection at this point can cause intermittent and difficult-to-diagnose electrical issues, including sensor circuit malfunctions like P0340.
- Engine Block to Chassis Ground — A thick ground strap connecting the engine block (often near the transmission bellhousing or on the back of the block) to the vehicle's chassis/firewall.. This is the main ground path for the entire engine. High resistance here due to corrosion or a loose bolt can cause a voltage differential between the engine and chassis, leading to erratic sensor readings and spurious codes.
When the Usual Fixes Don't Work
- In cases where a new battery and a new OEM sensor do not resolve the P0340 code, the root cause may be external to the sensor circuit. One documented possibility is excessive AC ripple voltage from a failing alternator. The electrical noise can interfere with the sensitive Hall effect sensor's signal, causing the ECM to flag a fault even though the sensor and its wiring are perfectly fine. A technician can miss this by focusing only on the components of the P0340 circuit itself.
OEM Part Supersession History
90919-A5003→90919-T5005— Part was updated and superseded by Toyota for improved performance or manufacturing changes.
Heads up: While 90919-T5005 is the correct current part, using the older -A5003 part if found as new-old-stock is generally acceptable, but the latest revision is always recommended.
Diagnostic Flowchart
Real Owner Stories
Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.
2012 Toyota Corolla LE
Symptoms: Codes p0016, p0017, and p0340. Extremely slow acceleration from a stop, sluggish startup, weak brakes, and eventually a crank-no-start condition.
What fixed it: Unresolved at the time of posting; the owner noted that changing the battery and cleaning the terminals did not fix the issue.
Source hint: Reddit r/MechanicAdvice - Codes p0016 p0017 and p0340, bad timing chain or just a bad sensor? (2012 Corolla LE)
2009-2010 Pontiac Vibe 1.8L
Symptoms: Persistent P0340 code that was not solved by installing a new camshaft position sensor.
What fixed it: Replaced the sensor's wiring connector pigtail.
Cost: $12
Source hint: GenVibe.com Forums
Related OBD-II Codes
Frequently Asked Questions
Does Toyota TSB T-TT-0010-10 Rev apply to my 2009-2019 Corolla for code P0340?
Should I buy a cheaper aftermarket camshaft position sensor for my 2ZR-FE engine?
Why is there oil on my Corolla's camshaft position sensor connector?
Can a weak battery really cause a P0340 code on my Corolla even if it still starts?
I replaced the sensor and battery on my Corolla, but P0340 came back. What else could it be?
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:
- 🧭 Diagnostic Flowchart
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2009-2019 Toyota Corolla
- 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
- Hidden / Shadow Codes Worth Checking
- Scan Tool Commands That Help
- Wiring & Ground Locations
- When the Usual Fixes Don't Work
- OEM Part Supersession History
- Real Owner Stories
- 2012 Toyota Corolla LE
- 2009-2010 Pontiac Vibe 1.8L
- Related OBD-II Codes
- Frequently Asked Questions
- 🎟️ Get 5% Off