The Camshaft Position Sensor (CMP) is the small Hall-effect sensor that tells your diesel's ECU exactly where the camshaft is at every moment of rotation — and unlike its cousin the crankshaft position sensor, the CMP does one job the CKP can't: it tells the ECU *which* cylinder is next in the firing sequence. Without that data, the ECU can't sync injection events to specific cylinders, and even if the truck manages to start, it runs rough, wastes fuel, and eventually stalls. On heavy-duty diesels, industry data shows failed CMP sensors account for roughly 70% of P0340 codes on high-horsepower applications, and cost fleets over $1,000 in recovery fees and lost haul time when the truck goes down on the road. Cat C15 sensors commonly fail around 250K miles; Cummins ISX, Detroit DD15, and Volvo D13 sensors typically last 300–700K depending on heat exposure and vibration. The good news: proper diagnostics catch the failure well before it becomes a roadside emergency — but only if the warnings get logged. This guide walks through exactly how to identify the symptoms, decode the OBD-II and J1939 codes, distinguish CMP from CKP problems, test before you replace, and how Truck Inspection & Maintenance turns rough-idle and hard-start complaints into tracked defects before they become $1,000 tow bills.

Diesel Diagnostics · Engine Timing

Camshaft Position Sensor: Symptoms, Testing & Replacement

The sensor that tells your ECU which cylinder is next — and what happens when it stops.

P0340
Primary diagnostic code
70%
HD failures are sensor itself
300–700K
Typical HD diesel lifespan
$50–$400
Typical replacement range

What the CMP Does — And Why It's Different from the CKP

The Camshaft Position Sensor is often confused with the Crankshaft Position Sensor. They work together, but they answer different questions. Understanding which is which is the first step in accurate diagnostics — replacing the wrong one is one of the most common wasted-money mistakes in diesel repair:

CMP

Camshaft Position Sensor

Question answeredWhich cylinder is next?
Reads fromCamshaft gear/notch
Rotates at1/2 crankshaft speed
Primary useInjection sequencing
Common codeP0340, P0341, P0342, P0343
Failure modeLong crank, rough run
CKP

Crankshaft Position Sensor

Question answeredWhere is TDC right now?
Reads fromCrankshaft reluctor ring
Rotates atFull crankshaft speed
Primary useTiming reference for all
Common codeP0335, P0336, P0337
Failure modeSudden stall, no-start

The Key Interaction

Some ECUs can use the CKP signal to estimate cam position when the CMP fails — so the engine runs (barely). That's why CMP failures often present as "runs rough" rather than "won't start" — the CKP is doing double duty.

The 6 Symptoms of a Failing CMP

CMP failure symptoms are consistent across engines, though the severity varies. On modern diesels, symptoms often start subtle and escalate. Catch them early and you're looking at a straightforward sensor swap. Ignore them and you're paying tow fees:

1

Long or Extended Crank Time

Engine takes 10–20 seconds to start instead of firing immediately. ECU is struggling to determine cam timing during cranking. Most obvious on cold starts. Common early symptom on OTR diesels.

2

Check Engine Light with P0340

The classic code. ECU flags the missing or erratic CMP signal immediately. On J1939 heavy-duty trucks, this appears as SPN 723 with various FMI codes. May be paired with P0016 (correlation code).

3

Rough Idle & Stumbling

Engine shakes, RPM fluctuates at idle, occasional stumbles under load. The ECU is running injection on estimated timing from the CKP alone — close, but not perfect. Cylinders don't fire in perfect sequence.

4

Torque Loss & Power Derate

High-horsepower diesels see 20–30% torque loss on grades. ECU may enter derate or limp-home mode to protect the engine. Truck struggles to maintain highway speed under load. Costly on delivery schedules.

5

Poor Fuel Economy & Black Smoke

Incorrect injection timing means incomplete combustion. Fuel consumption up 10–15%. Visible black smoke on acceleration. Downstream DPF regens more frequently — which stresses the entire emissions system.

6

Stalling or No-Start Condition

Late-stage failure. Some ECUs cannot run without CMP signal at all — engine cranks but never fires. Others stall randomly at idle when the estimated timing drifts too far. Truck needs replacement before it moves.

OBD-II & J1939 Code Reference

CMP-related codes exist in two families — standard OBD-II (P-codes) for light and medium diesels, and J1939 SPN codes for heavy-duty trucks with electronic engine management. Both point to the same underlying failure modes:

Standard OBD-II
P0340
Circuit Malfunction — General fault, ECU not receiving valid signal
P0341
Range / Performance — Noisy or erratic signal, out of expected range
P0342
Circuit Low — Voltage stays at 0V, sensor or wiring open
P0343
Circuit High — Voltage stays at 5V/12V, sensor shorted
P0344
Intermittent — Signal drops in and out — classic connector issue
Heavy-Duty J1939
SPN 723
Cam Sensor — Standard J1939 identifier for camshaft position sensor faults
FMI 2
Data Erratic — Signal present but unreliable, common heat failure
FMI 5
Current Below Normal — Open circuit, wiring or dead sensor
FMI 8
Abnormal Frequency — Wrong pulse timing, mechanical or electrical fault
CAT 168-2
Cat C15 Specific — Sensor signal erratic, common failure around 250K

Test Before You Replace — 5-Step Diagnostic

Replacing a CMP without testing first is one of the top wasted-money mistakes in diesel repair. Wiring problems, corroded connectors, and even stretched timing chains throw the same codes as a bad sensor. Twenty minutes of testing saves hours of second-guessing:

01

Visual Wiring & Connector Inspection

Locate the sensor. Inspect wiring for chafing, exhaust burns, or oil contamination. Check connector for corrosion, bent pins, broken locking clip. TSBs specifically flag connector corrosion on many trucks.

02

Test the 5V Reference & Ground

With key on, engine off: probe connector for 5V or 12V reference (check spec). Ground under 100mV to chassis. No reference = wiring problem, not sensor. Bad ground = engine ground point corrosion.

03

Scan Live Data During Crank

Connect scan tool. Watch cam signal during cranking. Signal frequency should increase steadily with RPM. Flat signal = no output. Erratic signal = intermittent fault. Zero signal = confirmed sensor or wiring failure.

04

Oscilloscope Waveform Check

Best-in-class test. Scope shows the actual pulse pattern. Weak or noisy waveforms indicate failing sensor coil or magnetic degradation. Perfect scope patterns with codes suggests ECU or wiring, not sensor.

05

Rule Out Timing Chain Issues

If P0016 (crank/cam correlation) is present alongside P0340, the timing chain may be stretched. Replacing the sensor won't fix a mechanical timing problem. Verify chain condition before spending on parts.

Digital Records · Free Trial

Long cranks and hesitation belong on your DVIR — before they become tow bills

A driver mentions "the truck took a while to start this morning." Nobody writes it down. Two weeks later the truck is stranded on I-80 with a $1,200 recovery bill. Truck Inspection & Maintenance turns every hard-start observation, hesitation complaint, and dashboard warning into a documented DVIR item — GPS-tagged, timestamped, routed to your shop as a defect work order. Sign up free for up to 3 vehicles.

Real Repair Cost Breakdown

CMP replacement costs vary dramatically by engine and sensor location. Some sensors bolt on in 20 minutes; others require removing water pumps, timing covers, or accessories. Here's the honest cost picture across job complexity levels:

DIY / Basic
$50–$150

Easy-Access Sensor

OEM sensor $40–$90. Aftermarket $15–$50. Basic hand tools. 20–30 minutes work when the sensor bolts to an accessible location. Common on many light-duty diesels.

Complex HD
$400–$1,200+

Heavy-Duty or Difficult Access

Cummins ISX, Detroit DD15, Cat C15 sensors in tight locations. May need water pump or accessory removal. ECM reprogramming if TSB software update applies ($120–$300 flash).

Prevention & Best Practices

CMP sensors are designed to last hundreds of thousands of miles — but only if you protect them from the three things that kill them fastest: heat, vibration, and oil contamination. Six practices dramatically extend sensor life on heavy-duty diesels:

A

Fix Oil Leaks Immediately

Oil-soaked connectors are the #1 killer of CMP sensors on aging diesels. Valve cover gaskets, cam plug leaks — fix them fast. Oil at the connector = corrosion at the pins.

B

Route Wiring Away from Heat

Turbocharger heat, EGR piping, exhaust manifold — all destroy wire insulation. During any service, verify CMP harness routing hasn't drifted toward hot surfaces.

C

Use OEM or Premium Aftermarket

Cheap aftermarket CMP sensors produce weak pulses that HD ECUs reject. Spend the extra $30–$50 for genuine parts. Off-brand sensors often fail within months, costing double.

D

Check TSBs Before Replacing

Some P0340 issues are software-only. GM Duramax has PIP5335D flagging connector corrosion. Cummins and Detroit release ECM calibration updates. Check TSBs before spending on hardware.

E

Torque Sensor Correctly

Over-torque cracks the sensor housing; under-torque changes the air gap to the cam gear. Both cause weak or intermittent signals. Follow OEM spec exactly — usually 60–100 in-lbs.

F

Verify Under Load After Repair

Clear codes, test drive 20+ miles including highway and grades. Get engine fully hot. Codes returning under warm conditions point to wiring, ECU, or timing chain — not another sensor.

Frequently Asked Questions

Is it safe to drive with a bad camshaft position sensor?

Not recommended. Some engines will run on estimated timing from the CKP, but you're getting rough performance, poor fuel economy, and increased emissions — plus the risk of eventual stall or no-start once the ECU can't compensate anymore. On heavy-duty diesels, derate modes can drop torque 20–30% on grades, creating safety issues in traffic. Get it diagnosed within a few days.

How long does a camshaft position sensor last?

On light-duty diesels, expect 150,000–200,000 miles. On heavy-duty diesels (Cummins ISX, Detroit DD15, Volvo D13), 300,000–700,000 miles is normal. Cat C15 sensors commonly fail earlier — around 250,000 miles is a known pattern. Heat exposure, vibration, and oil contamination are the biggest lifespan killers. Sensors near turbo heat or oil leaks fail dramatically earlier than sensors in cleaner locations.

What's the difference between CMP and CKP codes?

P0335-series codes = crankshaft position sensor (CKP). P0340-series codes = camshaft position sensor (CMP). The crankshaft sensor tells the ECU exact position/RPM; the camshaft sensor tells which cylinder is next in the firing sequence. CKP failures typically cause sudden stalls or no-starts; CMP failures typically cause long cranks, rough running, and derate. If you see P0016 alongside either, suspect a timing chain issue.

How much does camshaft position sensor replacement cost?

Range is wide — $50–$1,200+ depending on truck and sensor location. Basic light-duty diesel with easy access: $50–$150 DIY or $150–$300 professional. Heavy-duty diesels with buried sensors (Cummins ISX, Cat C15): $400–$1,200 including diagnostics, labor, and potential ECM reflash. Always factor $120–$150 minimum for shop diagnostic time before replacement. Talk to our team about tracking early warnings.

Can I clean a camshaft position sensor instead of replacing it?

Sometimes — but rarely a lasting fix. Oil contamination on the sensor tip can be cleaned with electrical contact cleaner (never brake cleaner or solvents). If the sensor works after cleaning, address the oil leak that caused contamination — otherwise it'll fail again in weeks. Electrical failures inside the sensor cannot be cleaned. When in doubt, test first with a scan tool or scope before deciding.

How does Truck Inspection & Maintenance help catch CMP problems early?

Every long-crank observation, rough-idle complaint, power-loss report, and check engine light activation belongs on the daily DVIR — captured, timestamped, GPS-tagged, and routed to your shop as a defect work order. A single "took a while to start today" is data; three complaints in ten days is a pattern that catches a failing CMP before it strands the truck on a delivery run. Sign up free to see the workflow.

Log It Before The Tow Bill

A long crank today is a $1,200 recovery bill next week — unless it's logged and fixed.

Every hard start, rough idle, power complaint, and check engine light is a data point that either sits in a driver's memory or on a digital DVIR. Truck Inspection & Maintenance captures them GPS-tagged, timestamped, and routed to your shop as defect work orders before the intermittent CMP fault becomes an on-highway breakdown. Free for up to 3 vehicles with no hardware and no contracts. Set it up in 10 minutes.