Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0340 on 2004-2009 Toyota Prius: Camshaft Sensor Fault or Just a Weak Battery?

On a 2004-2009 Prius, P0340 is most often caused by a weak 12V auxiliary battery, not the camshaft sensor. Before buying any parts, test the 12V battery. A low voltage condition (below 11V during startup) causes the engine to crank at an inconsistent speed, which the ECU misinterprets as a sensor fault. If the battery is good, the camshaft position sensor is the next likely culprit, costing around $40-$90 for the part.

17 minutes to read 2004-2009 Toyota Prius
Most Likely Cause
Weak or Failing 12V Auxiliary Battery
Difficulty
2/5
Est. Time
1.5 hrs
DIY Doable?
✅ Yes
Shop Labor
$100 – $550
Parts Price
$40 – $250
🚫 Do not drive — Driving is not recommended because the fault can cause the engine to stall suddenly and without warning, which is a significant safety risk. The vehicle may also fail to restart, leaving you stranded. Many owners on forums report the engine cutting out while driving.
Key Takeaways
  • Always test the 12V auxiliary battery before replacing any parts for a P0340 code on a 2004-2009 Prius. Check freeze frame data for voltage below 11V.
  • Do not drive the vehicle, as the engine could stall at any time, creating a safety hazard.
  • If the battery is good, the camshaft position sensor (part #90919-05024) is the next most likely failure point, but be aware its replacement can be labor-intensive.
  • This code is often accompanied by P0335 (Crankshaft Position Sensor), which further points towards the 12V battery as the root cause.
The trouble code P0340 stands for "Camshaft Position Sensor 'A' Circuit Malfunction". This means the Engine Control Module (ECM) has detected an irregular, intermittent, or completely missing signal from the camshaft position sensor. This sensor's job is to tell the ECM the exact rotational position of the engine's camshaft, which is critical for synchronizing fuel injection and ignition spark timing. Without this signal, the ECM cannot properly command the engine to start or run, leading to stalling or a no-start condition.

What's Unique About the 2004-2009 Toyota Prius

For the 2004-2009 (Gen 2) Prius, the number one cause of a P0340 code is a weak or failing 12V auxiliary battery. Unlike a conventional car that just cranks slowly, a Prius with low 12V battery voltage can fail to spin the engine at a consistent speed during startup. The ECM, seeing an erratic signal that doesn't match the crankshaft sensor's data, misinterprets this inconsistent speed data as a fault in the camshaft sensor's signal. A Toyota Technical Service Bulletin (TSB #T-TT-0010-10 Rev) confirms that low battery voltage (specifically below 11V during startup) can trigger this code, making battery testing the mandatory first step in diagnosis. This bulletin notes that low battery voltage contributes to a MIL "ON" condition due to the inconsistent rotational speed of the engine's crankshaft.

Symptoms You May Notice

  • Check Engine Light is on
  • Engine is difficult to start or will not start at all
  • Engine stalls, sometimes while driving or even when idling with the A/C on
  • Rough or unstable idle
  • Noticeable loss of power
  • Hybrid system may fail to enter 'Ready' mode
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the camshaft position sensor before testing the 12V auxiliary battery. On this specific vehicle, the battery is the most frequent culprit. Many forum posts detail owners who replaced the sensor first, only to find the battery was the real problem.

Most Likely Causes

  1. Weak or Failing 12V Auxiliary Battery 🔴 High Probability → Shop Vehicle Battery The hybrid system's startup sequence is sensitive to low voltage from the 12V battery. Inconsistent cranking speed caused by low voltage is misinterpreted by the ECM as a sensor signal fault, a well-documented issue for this platform confirmed by Toyota TSB T-TT-0010-10 Rev.
    How to confirm: Use a multimeter to test the 12V auxiliary battery (located in the trunk). A healthy AGM battery should read approximately 12.6V or higher with the car off. A reading below 12.2V indicates a need for charging and re-testing. The most definitive check is to view OBD-II freeze frame data, as the TSB specifically notes to check if voltage dropped below 11V when the code was set. Many auto parts stores will test batteries for free.
    Typical fix: Replace the 12V auxiliary battery with a new, correct-spec AGM battery. 🎬 Watch: Step-by-step 12V battery replacement for Gen 2 Prius
    Est. part cost: $180-$250
  2. Failed Camshaft Position Sensor 🟡 Medium Probability → Shop Engine Camshaft Position Sensor This is the second most common cause after the battery has been ruled out. The sensor is an electronic component that can fail with age and heat cycles. Some owners on PriusChat report the issue only appears on hot days, suggesting heat-related failure.
    How to confirm: After confirming the battery and wiring are good, the sensor is the next logical point of failure. 🎬 See how to diagnose and fix the P0340 code It can be tested with a multimeter for resistance. Per the service manual, it should be 1,630-2,740 Ω when cold or 2,065-3,225 Ω when hot. However, replacement is often the most straightforward diagnostic step due to the part's relatively low cost.
    Typical fix: Replace the camshaft position sensor. On the Gen 2 Prius, it is located on the passenger side end of the cylinder head, and access can be difficult, sometimes requiring removal of the inverter.
    Est. part cost: $40-$90
  3. Damaged Wiring or Connector ⚪ Low Probability The wiring harness to the sensor can become brittle, or the connector pins can corrode over time, leading to a poor connection. Rodent damage to wiring in the engine bay is also a possibility.
    How to confirm: Visually inspect the wiring harness leading to the camshaft position sensor for any signs of cracking, fraying, or heat damage. Unplug the connector and check for corrosion or bent pins. Use a multimeter to check for continuity and proper voltage at the connector.
    Typical fix: Repair the damaged section of wire or replace the connector pigtail.
    Est. part cost: $10-$30

Rare But Worth Checking

  • Stretched Timing Chain: → Shop Engine Timing Chain If the timing chain has stretched, the camshaft and crankshaft will no longer be perfectly synchronized. The ECM will detect this discrepancy between the two sensor signals and may set a P0340 code. This is a more serious mechanical issue that typically occurs at higher mileage and may be accompanied by rattling noises.
  • Faulty Engine Control Module (ECM): → Shop Engine Control Module (ECM) This is extremely rare. The ECM itself can fail, but all other possibilities, especially the battery, sensor, and wiring, must be exhaustively ruled out before considering the ECM as the cause. One PriusChat user considered this after replacing sensors and checking wiring failed to resolve the code.

Diagnosis Steps

  1. Read the code with an OBD-II scanner to confirm P0340 is present. Check freeze frame data for the battery voltage at the time the code was set.
  2. CRITICAL: Test the 12V auxiliary battery first. Use a multimeter to check its voltage. It should be ~12.6V at rest. If the freeze frame data shows voltage dropped below 11V, the battery is almost certainly the cause. If low, charge and re-test it. If it doesn't hold a charge, replace it before proceeding.
  3. Clear the codes and attempt to start the vehicle. If the code does not return, the battery was the issue.
  4. If the code returns, locate the camshaft position sensor on the passenger side of the cylinder head. Inspect the wiring and connector for any visible damage, corrosion, or loose connections.
  5. If the wiring appears intact, test the sensor's resistance. It should be between 1,630-2,740 Ω (cold). If it's out of spec or if you can't test it, the next step is to replace the camshaft position sensor. It is a common point of failure after the battery.
  6. If replacing the sensor does not fix the issue, a more advanced diagnosis is needed to check for signal continuity between the sensor connector and the ECM.
  7. In rare cases, if all else fails, the issue could be mechanical (e.g., stretched timing chain) or a faulty ECM, which may require professional diagnosis.

Parts You'll Likely Need

  • 12V Auxiliary Battery (OEM #28800-21181 (or similar)) — This is the most common cause of P0340 on a Gen 2 Prius, due to the hybrid system's sensitivity to low voltage during startup.
    Trusted brands: Toyota TrueStart, Optima YellowTop, Bosch AGM
    OEM price range: $220-$280
    Aftermarket price range: $180-$250
  • Camshaft Position Sensor (OEM #90919-05024) — If the 12V battery is healthy, the sensor itself is the next most likely part to have failed.
    Trusted brands: Denso (OEM manufacturer), NTK, Hitachi
    OEM price range: $70-$118
    Aftermarket price range: $40-$90

Related Codes That Often Appear With This One

  • P0335 — P0335 is for the Crankshaft Position Sensor. A weak 12V battery can cause inconsistent cranking that leads the ECM to flag faults with both the camshaft and crankshaft sensor signals simultaneously. Toyota's TSB T-TT-0010-10 Rev explicitly mentions these two codes appearing together due to low voltage.
  • 🎬 Watch: How to replace the crankshaft sensor on this model
  • P0A0F — This 'Engine Failed to Start' code is a direct result of the condition causing P0340. The ECM, lacking a valid camshaft signal, cannot properly start the engine and logs this secondary code.

Technical Service Bulletins (TSBs) & Recalls

  • T-TT-0010-10 Rev: A Toyota Tech Tip bulletin, dated May 2014, that advises technicians that low battery voltage (below 11V) can cause DTCs P0335 and/or P0340 to be stored. It instructs to check freeze frame data for battery voltage before replacing parts. The bulletin explicitly notes that low battery voltage can cause inconsistent rotational speed of the engine's crankshaft, leading to these codes.

Platform-Specific Known Issues

  • A Toyota Technical Service Bulletin (TSB #T-TT-0010-10 Rev) specifically notes that low 12V auxiliary battery voltage (below 11V) can cause the ECM to incorrectly set P0340 and/or P0335.
  • The location of the camshaft position sensor on the 1NZ-FXE engine is on the passenger-side end of the cylinder head, in a difficult-to-access area that may require moving the inverter to reach.

Mechanic-Grade Diagnostic Values

  • Camshaft Position Sensor Power Source Voltage — expected: 4.5 to 5.0 V. Failure: Voltage outside of this range indicates an issue with the ECM or wiring.
  • Continuity between Sensor Connector and ECM Connector — expected: Below 1 Ω. Failure: Resistance above 1 Ω indicates an open circuit in the harness.
  • Continuity between Sensor Connector and Body Ground — expected: 10 kΩ or higher. Failure: Resistance below 10 kΩ indicates a short to ground in the harness.

Hidden / Shadow Codes Worth Checking

  • P0340-886 (or INF 886): An information code indicating the Hybrid Vehicle Control ECU detected a malfunction in the pulse signal from the camshaft position sensor when comparing it to other engine speed data. (see via Toyota Techstream software. Navigate to: Powertrain / Hybrid Control / Trouble Codes.)

Scan Tool Commands That Help

  • Techstream: Utility / All Readiness — After a repair, use this function and input DTC P0340 to check the judgment result (NORMAL/ABNORMAL) to confirm if the fix was successful without extensive driving.
  • Oscilloscope: Waveform Analysis (Cam vs. Crank) — This is the definitive professional test. By comparing the camshaft sensor's square wave (G2 signal) to the crankshaft sensor's signal (NE signal), a technician can visually confirm if the cam sensor signal is present, correctly formed, and properly synchronized with the crankshaft.

Wiring & Ground Locations

  • D18 — The 3-pin electrical connector at the Camshaft Position Sensor itself, on the passenger side of the cylinder head.. This is the starting point for all sensor and circuit testing. Check for 4.5-5.0V power supply here.
  • D28 — The connector at the Engine Control Module (ECM).. Specific pins (76 and 122) on this connector are the destination for the camshaft sensor signal. Testing for continuity between connector D18 and D28 is required to rule out a wiring harness break.
  • EA / EB — Main engine ground points located on the engine block.. A poor engine ground can cause a variety of erratic sensor readings and codes. While not specific to P0340, ensuring these are clean and tight is a fundamental step in any electrical diagnosis.

Real Owner Repair Stories

  • PriusChat user '2007 Prius' via Go-Parts analysis (2007 Toyota Prius) — Car would not go into READY mode, throwing codes P0340 and P0335.
    ❌ Tried (didn't work) Replaced the 12V auxiliary battery, Replaced the camshaft position sensor, Replaced the crankshaft position sensor
    ✅ What actually fixed it The problem was a faulty hybrid inverter assembly. After replacing the inverter, the car started immediately and the codes did not return.
  • NHTSA ODI #10648201 — An owner reported receiving a P0340 code for a Camshaft Position Sensor 'A' Circuit Malfunction and was warned that the condition could cause a crash.

When the Usual Fixes Don't Work

  • In at least one documented case, a persistent P0340 code that was not resolved by replacing the 12V battery or the camshaft sensor was ultimately caused by a failed hybrid inverter. This is a rare but critical exception to the common diagnostic path.

OEM Part Supersession History

  • 19300-BZ02090919-05024 — Standard part number update/revision by Toyota.

Diagnostic Flowchart

Other Known Issues on This Vehicle

Issues unrelated to this code that are worth knowing about as an owner of this generation:

  • Combination Meter Failure 🔴 High — Common on high-mileage vehicles. The dashboard display goes blank intermittently or completely, and can cause issues like the car not powering off. (Ref: T-SB-0172-09 Rev2 acknowledges the issue and provides a part number for an updated meter, but repair is typically outside of the basic warranty period.)
  • Inverter Coolant Pump Failure 🔴 High — A very common failure point. Leads to overheating of the hybrid components and triggers code P0A93 and the master warning light. (Ref: Subject of a Limited Service Campaign (LSC-A0N) and later a recall to replace the pump.)
  • High-Voltage (HV) Hybrid Battery Degradation 🔴 High → Shop Vehicle Battery — Inevitable with age and mileage (typically over 100k-150k miles). Symptoms include poor fuel economy and the P0A80 trouble code.
  • Excessive Oil Consumption 🟠 Medium — Many 1NZ-FXE engines begin to consume significant amounts of oil after 100,000-150,000 miles, often attributed to piston ring design.
  • HID Headlight Failure 🟡 Low — On models equipped with HID headlights, the ballasts or bulbs can fail, causing flickering or complete loss of the headlight. Can be expensive to fix with OEM parts.
  • ABS Actuator/Pump Failure 🔴 High — The ABS pump can fail, leading to a loud, frequent pump running noise, warning lights, and a loss of hydraulic braking power.

Used vs. New Parts: Buying Guide for This Vehicle

When a used part is the smart pick: For the primary P0340 fixes, a used part is NOT recommended for the camshaft sensor itself. It is a low-cost electronic wear item and the labor involved justifies a new part. However, if the rare 'faulty inverter' diagnosis is confirmed, a tested, low-mileage used inverter from a reputable salvage yard is a very sensible and cost-effective repair compared to a new unit.

Donor-vehicle mileage cap: roughly under 80000 miles for the part to have meaningful remaining life.

What to inspect on the donor part:

  • For a sensor: Do not buy used.
  • For a used inverter: Ensure it comes from a vehicle that was not in a flood or major collision. Ask for the donor vehicle's mileage. Visually inspect for any signs of physical damage, corrosion, or leaking.
  • Verify the part number exactly matches your original unit.

OEM-only on this vehicle (don't cheap out):

  • Camshaft Position Sensor

Aftermarket brands forum-validated for this vehicle:

  • Denso (this is the OEM supplier and the most recommended choice)
  • NTK (also a high-quality Japanese OEM supplier, generally considered reliable)

Brands owners have reported issues with on this vehicle:

  • Unbranded, 'white-box' sensors from online marketplaces.
  • While a quality brand, some forum users avoid Bosch sensors for Japanese applications in favor of Denso or NTK.

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2005 Toyota Prius 1NZ-FXE

Symptoms: The P0340 code appeared specifically during hot weather conditions.

What fixed it: Replacement of the camshaft position sensor.

Source hint: PriusChat.com thread titled '2005-prius-code-p0340-during-hot-weather.241697/'

2004-2009 Toyota Prius 1NZ-FXE

Symptoms: Engine stalls while driving or when idling with the A/C on; Check Engine Light is on.

What fixed it: Replacing the camshaft position sensor (90919-05024).

Source hint: PriusChat.com thread titled 'p0340-p0a0f-codes-camshaft-sensor-issue.245000/'

2004-2009 Toyota Prius 1NZ-FXE

Symptoms: The engine stalls once it has reached operating temperature (warmed up).

What fixed it: Replacement of the camshaft position sensor.

Source hint: ToyotaNation.com thread titled 'code-p0340-stalls-when-engine-is-warmed-up.1751337/'

2004-2009 Toyota Prius 1NZ-FXE

Symptoms: An owner reported a Camshaft Position Sensor 'A' Circuit Malfunction and was warned that this "could cause a crash."

What fixed it: Diagnosis of the P0340 code as reported in NHTSA ODI #10648201.

Source hint: NHTSA ODI #10648201

Frequently Asked Questions

I heard a Toyota Tech Tip mentions the 12V battery causing P0340. Which one is it?
The relevant document is TSB #T-TT-0010-10 Rev. It confirms that if the 12V auxiliary battery voltage drops below 11V, the ECM may incorrectly store code P0340.
Where is the camshaft position sensor located on my Gen 2 Prius?
On the 1NZ-FXE engine, the sensor is located on the passenger-side end of the cylinder head. Note that access can be difficult and may require moving the inverter.
What should the resistance be for a healthy camshaft sensor on a 2004-2009 Prius?
According to the service manual, the resistance should be 1,630-2,740 Ω when cold or 2,065-3,225 Ω when hot.
Can a weak 12V battery really cause a camshaft sensor code even if the car starts?
Yes. The hybrid system's startup sequence is sensitive to voltage. Inconsistent cranking speeds caused by a weak battery (below 12.2V at rest) are often misinterpreted by the ECM as a sensor signal fault.
My Prius won't enter 'Ready' mode and shows P0340. Is this common?
Yes, a failure to enter 'Ready' mode is a specific symptom for the Prius when P0340 is present, often linked to either the sensor itself or a failing 12V auxiliary battery.
2nd Gen Prius 12V Battery Installation Step by Step Tutorial
2nd Gen Prius 12V Battery Installation Step by Step Tutorial
2004-2009 Toyota Prius 12v Car Battery Replacement How To DIY
2004-2009 Toyota Prius 12v Car Battery Replacement How To DIY
Replace 12V Battery - 2005 Toyota Prius (2004-2009, 2nd Gen)
Replace 12V Battery - 2005 Toyota Prius (2004-2009, 2nd Gen)
How to FIX P0340 Camshaft Position Sensor Code!
How to FIX P0340 Camshaft Position Sensor Code!
How to Replace Camshaft Position Sensor 10-13 Toyota Prius
How to Replace Camshaft Position Sensor 10-13 Toyota Prius
How to Replace Crank Sensor 2004-2009 Toyota Prius
How to Replace Crank Sensor 2004-2009 Toyota Prius
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 30, 2026

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.

Year Coverage
This article covers the OBD-II Code P0340 (Deep Dive) for:
  • Toyota Prius: 200420052006200720082009
In this article
🧭 Diagnostic Flowchart
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part