The crankshaft position sensor is one of those parts nobody thinks about until the engine suddenly dies at a stoplight. It is a small sensor, usually cheap, but the engine cannot run without it, because it tells the computer exactly where the pistons are so the spark and fuel arrive at the right instant. Its cousin, the camshaft position sensor, does the same job for the valves. When either one starts to fail, you get intermittent stalling, hard starts, and a check engine light that shows up and disappears. This guide explains what the crankshaft and camshaft position sensors do, the symptoms of failure, what replacement costs in the US, and how to figure out whether a sensor is actually the problem.
What these sensors do
Both are position sensors that report rotation to the engine control unit (ECU). Many use the Hall effect, a magnetic sensing principle, though some crank sensors are the older magnetic pickup type. The idea is the same: a toothed wheel spins past the sensor, and each tooth generates a pulse the computer counts.
The crankshaft position sensor tracks the crankshaft, so the ECU knows engine speed (RPM) and the exact position of the pistons. Without this signal, the computer does not know when to fire the spark or inject fuel, and the engine will not start or will stall. It is the single most critical timing input the engine has.
The camshaft position sensor tracks the camshaft, telling the ECU which cylinder is on its firing stroke. This matters for sequential fuel injection and for coil-on-plug ignition. On engines with variable valve timing, the cam sensor also feeds the system that adjusts cam timing, so its failure can trip codes tied to variable valve timing.
Symptoms of a failing crankshaft or camshaft sensor
The classic sign is intermittent trouble that comes and goes with heat. A crank sensor often fails as it warms up, so the car runs fine cold, then stalls once the engine is hot, and restarts after it cools. Watch for:
- Engine stalling while driving or at idle, sometimes restarting minutes later.
- Hard starting or a no-start condition, especially when the engine is hot.
- The tachometer dropping to zero or jumping erratically while cranking or running.
- A check engine light with codes in the P0335 to P0349 range for crank and cam sensors.
- Rough idle, hesitation, or misfires as timing information gets jumbled.
- Reduced power or a stumble under acceleration.
Because these symptoms overlap with fuel and ignition problems, a stalling car needs a real diagnosis rather than a guess. If your car simply refuses to start, the broader car won’t start diagnosis guide walks through the other suspects.
How it is diagnosed
The fastest first step is to scan the codes. An OBD2 scanner will usually store a crank or cam sensor code even if the light has gone out, since these often log as pending or intermittent faults. A P0335 points at the crankshaft sensor circuit, while P0340 points at the camshaft sensor circuit.
A code is a starting point, not a verdict. The sensor code can be triggered by a bad sensor, a damaged reluctor wheel, wiring problems, or a weak connector. A good shop will check the sensor’s signal with a scope or meter, inspect the wiring, and confirm the reference voltage before condemning the part. It is worth doing, because replacing a sensor that was never bad is a common and avoidable expense.
Replacement cost in the US
Position sensors are usually inexpensive parts, and the cost mostly depends on how buried the sensor is.
- Camshaft position sensor: the part is often $20 to $100, and total replacement with labor commonly runs $120 to $300.
- Crankshaft position sensor: the part is similar, but the sensor is often harder to reach, tucked low on the block or behind the engine, so labor pushes total cost to roughly $150 to $400.
If a mechanic has to remove other components to get at the crank sensor, the bill climbs. These are still among the cheaper engine repairs, which is part of why they are worth ruling in or out quickly before chasing more expensive parts.
What it means when buying a used car
A car with a dying crank or cam sensor may drive perfectly during a short cold test drive, then strand the new owner a week later. That is why intermittent stalling is such a nasty used-car trap. Ask the seller directly whether the car has ever stalled or been hard to start when hot.
Scan for stored and pending codes before you buy, not just active ones. A pending P0335 or P0340 that has not yet lit the dash tells you a sensor is on its way out. Try to include a hot restart in your test drive checklist: drive long enough to get the engine to operating temperature, shut it off, and see if it fires back up cleanly.
This is where a phone-based pre-purchase inspection earns its keep. The MotoPPI app pulls stored and pending trouble codes during the check, so a hidden sensor fault shows up on your report instead of on the shoulder of the highway three days after you hand over cash.
The bottom line
The crankshaft and camshaft position sensors are small, cheap parts that the engine cannot live without. When they fail, they usually do it intermittently, stalling a hot engine, refusing to start, and dropping the tach to zero, which makes them maddening to catch. The good news is that the codes are specific and the parts are affordable. Scan first, verify the sensor rather than just swapping it, and when buying used, treat any history of hot-stalling as a signal to read the stored codes carefully before you commit.