Fault Codes

P0340 Camshaft Position Sensor Circuit: Checks That Save Money

7 min read

Engine camshaft

P0340 reports that camshaft position sensor A is not giving the ECU a signal it can work with. Like all circuit codes it describes the problem at the ECU pin, not the part that caused it, so the sensor, its plug, its wiring and the trigger ring on the camshaft are all still in the frame. Unlike a crank sensor fault, this one usually leaves you with a car that still runs, which is why it gets ignored for longer than it should be.

What the code actually means

The camshaft turns at half crankshaft speed, so it is the only thing telling the ECU which half of the four-stroke cycle a cylinder is in. The crank signal alone cannot distinguish a piston coming up on compression from one coming up on exhaust. The cam sensor reads a lobe, pin or toothed ring on the camshaft and supplies that missing piece.

With a good cam signal the ECU can run sequential injection, firing each injector at the right point for its own cylinder, and synchronise ignition on the first revolution. On engines with variable valve timing the cam signal is also the feedback telling the ECU where the phaser has moved to, so the whole VVT strategy depends on it.

The sensor is usually a Hall effect type with three wires: a supply, a ground and a signal line that switches as the trigger passes. The ECU judges it purely on what arrives at its own pin, so a healthy sensor at the end of a chafed wire produces the same code as a dead one, as does a connector with spread pins or oil in it.

Oil deserves calling out. Cam sensors often sit in the cylinder head or cam cover, sealed with an O-ring. When that seal hardens, oil creeps up the sensor body into the connector, wicks along the wires and degrades the signal. Finding oil in the plug is a common, very cheap discovery.

Cam fault or crank fault?

The practical difference is what the car does. A failed crankshaft sensor usually means no start at all, or an engine that cuts out abruptly once hot, because the ECU has lost its primary timing reference. A failed camshaft sensor more often gives an engine that still starts but cranks for noticeably longer while the ECU works out cylinder position by trial and error, then runs in a reduced mode without variable valve timing and often on batch rather than sequential injection. If it starts eventually, suspect the cam side; if it will not start, look at the crank side first.

Symptoms you’ll actually notice

Symptoms vary a lot, because how gracefully a car copes without a cam signal is a manufacturer design decision.

  • Extended cranking before the engine fires, especially from cold
  • Flat throttle response and less mid-range pull, which is the loss of variable valve timing
  • Slightly worse fuel consumption, because batch injection is less precise than sequential
  • Occasional stalling, or a stumble as the engine settles after start
  • A rough idle on some engines and nothing unusual at all on others
  • Limp mode with a rev limit on cars whose strategy takes the fault more seriously

Some drivers notice nothing beyond the light, particularly on engines without variable valve timing where the ECU falls back on the crank signal. That is not a reason to leave it: the fault progresses, and a cam signal that comes and goes produces a car that refuses to start at the worst possible moment.

Likely causes, cheapest first

CauseTypical part costWhy it’s on the list
Oil in the sensor connector from a failed O-ring or leaking cam cover gasketRoughly £2 to £25 for sealsExtremely common, costs almost nothing, and cleaning the plug sometimes clears the fault outright.
Loose, corroded or backed-out connector pins£0 to roughly £20 for a terminal kitVibration and heat cycles work these plugs loose. A connector that separates without a firm click has been telling you something.
Chafed, stretched or heat-damaged wiring to the ECURoughly £5 to £30 in materialsCam sensor looms run close to the cam cover and the exhaust side. This is the cause a new sensor will not fix.
The camshaft position sensor itselfRoughly £15 to £110 depending on carThe most likely single part once wiring is ruled out, and often one bolt away from the top of the head.
Damaged, contaminated or loose trigger ring on the cam or pulleyVaries, often labour rather than partsUncommon but real, and worth suspecting after recent timing work.
Timing chain or belt out of position, or a VVT phaser problemSeveral hundred pounds upwardsLeast likely to set this code alone, but if a correlation code such as P0016 is stored too, it moves straight to the top.

The last row deserves an extra word. If P0340 sits on its own, the cheap checks at the top of the table cover the great majority of cases. If it is stored alongside a crank and cam correlation code, the shortlist changes completely and you are looking at mechanical timing rather than electrics. Read all the stored codes before deciding what this one means.

Narrowing it down with live data

Start with engine RPM while cranking. If the value is present and steady, the crank signal is healthy and you have separated this fault from the crank sensor family in seconds, which saves a lot of confusion when the car is being awkward. Keep fuel trims and calculated load on screen for context, so you know the engine is otherwise healthy.

Where your car reports variable valve timing values, watch commanded against actual cam position at idle and during a gentle rev. On a healthy engine the actual value follows the commanded one promptly and settles. If the ECU has given up on the cam signal, the actual value typically sits pinned at a default and goes nowhere whatever is asked of it, confirming the ECU is running without usable cam feedback rather than with a slow phaser.

Freeze frame tells you whether this is a hot fault, a cold fault or a random one. Note the coolant temperature, engine speed and load recorded when the code set, then recreate those conditions after any repair. A code that only sets on a fully warm engine points at heat opening up a marginal joint, a different test from one that only appears during cold cranking. Live data and freeze frame come with the Enhanced edition and above rather than the code-reading Standard licence; the pricing page shows what each includes.

Garage bill versus doing it yourself

JobTypical UK garageDIY parts only
Diagnosis, commonly about an hour of labourRoughly £50 to £120Your own lead and software
Cam sensor replaced, accessible from aboveRoughly £80 to £190Roughly £15 to £110
Cam sensor O-ring or cam cover gasketRoughly £70 to £280Roughly £2 to £45
Connector or loom repairRoughly £60 to £180Roughly £5 to £30

Diagnostic time in UK garages is typically billed as around one hour, but rates swing widely by region and by whether you use an independent or a main dealer. Parts vary as much: a cam sensor for a hatchback and one for a premium V6 are different money.

When this is a DIY job and when it isn’t

Fair game with basic tools

On plenty of engines the cam sensor is a single bolt in the top of the cylinder head or the cam cover, with one connector. Clean the area before you pull it, so nothing drops into the head. Fit a new O-ring rather than reusing the old one, since a hardened seal is what let the oil in, and smear it with clean engine oil first. Tighten to the specified torque; these are small bolts into aluminium and they strip easily.

Better as a garage job

If the sensor sits behind the timing cover, under the inlet manifold or on the back of a transverse V engine, the labour outweighs any saving. More importantly, if the code came with a correlation code or the engine sounds different at idle, hand it over. Timing chain and phaser work needs locking tools and correct torque procedures, and getting it wrong on an interference engine means valves meeting pistons.

Clearing the code the right way

Do the repair, then clear, then prove it. Clearing before you understand the fault only discards the freeze frame that would have told you when it happens. After the work, clear the code and drive through the conditions the snapshot recorded.

The ECU stores a fault as pending on first detection and promotes it to stored when it sees it again. Clear a P0340, drive, and find a pending version waiting, and the fault is still there but not yet confirmed, which is a useful signal that a repair only half worked.

Clearing wipes the readiness monitors too, so the emissions self-tests show as incomplete until the car has been through a mixture of cold starts, town driving and steady cruising. There is never a good reason to clear this one to make a light go away, and doing it before selling a car simply passes the fault on.

What it means for your MOT

The MOT checks that the engine management light comes on and then goes out, on petrol cars first used from July 2003 and diesels from July 2008. With P0340 stored and the lamp lit, the car fails on that alone. (A US emissions or smog check applies the same rule and also fails cars whose readiness monitors have not completed.) Clearing the code in the car park is a false economy: you swap a lamp failure for a monitor failure and still have the fault. Repair it, drive normally for a couple of days so the monitors set, then test it.

Read every stored code before you order a sensor

A P0340 alone and a P0340 alongside a timing correlation code call for completely different work. The tutorial videos cover connecting the adapter and reading stored, pending and freeze frame data.

Browse the video tutorials

Read it yourself

Stop guessing at the code

AutoScan reads the fault straight out of your car and tells you what it means in plain English, on your own Windows laptop. The trial reads real codes before you pay anything.