Home Fault Codes P0340

P0340 Camshaft Position Sensor on Smart Fortwo 451 / 453

DIY firstSmart Fortwo 451Smart Fortwo 453

P0340 is a camshaft position sensor circuit fault. On a Smart it's usually the cheap fix — connector check, then sensor swap. Check the harness for chafe along its routing before you order parts.

Diagnose this on your car with SmartDiag-AI

Typical Symptoms

  • Check engine light with code P0340
  • Hard start, especially when cold or hot
  • Rough idle or stumble at low rpm
  • Tach behaves normally even when the code is set
  • Sometimes paired with P0335 or P0336

What it means

The camshaft position sensor (CMP) tells the ECU where the cam is in its rotation. The ECU pairs that with the crankshaft signal to know which cylinder is on its compression stroke, which is what makes sequential fuel injection and coil-on-plug ignition work properly. P0340 means the ECU isn't getting a usable cam signal — either the sensor is failing, the connector is bad, or the wiring between the two has a problem.

On a Smart this is one of the cheaper sensor codes to chase. The cam sensor itself is a small two- or three-wire part, the connector is exposed enough to check by eye, and the swap is straightforward on both the 451 and the 453.

Likely causes, cheapest first

  1. Connector loose, oily, or corroded. Free to inspect. The CMP connector lives in a spot that catches oil mist and engine heat, so over time pins back out or the connector itself gets crusty.
  2. Harness chafe. Worth a look along the sensor's route before you replace anything. A wire rubbed through against a bracket gives the same symptom as a bad sensor and a new sensor won't fix it.
  3. Sensor failed. The dominant cause once connector and harness check out. Smart cam sensors are not a known weak point but they do age out, especially on higher-mileage cars.

DIY check steps

  1. Pull the codes and check what else is stored. P0340 alone is a clean cam-sensor story. P0340 + P0335 or P0340 + P0336 starts to look like wiring or a shared ground problem rather than a single bad sensor.
  2. Find the sensor and unplug the connector. Look at the pins for corrosion, the seal for oil saturation, and the wire boots for cracking. Plug it back in firmly until it clicks.
  3. Wiggle test if the code is intermittent. With the engine running, gently flex the connector and the harness section closest to the sensor. If the engine stumbles when you move it, that's the bad spot.
  4. Replace the sensor. Usually one bolt and one plug. Fifteen to thirty minutes on the 451, longer on the 453 depending on access. Clear the code and drive a normal cycle.

When to call a shop

If a clean connector and a new sensor don't clear it, the next step is checking the wiring between the sensor and the ECU with a multimeter or a scope. That's still DIY for someone comfortable with a wiring diagram, but if you're not, a Smart-experienced shop can chase it in an hour. The actual repair — re-pinning a connector, splicing a chafed wire — is cheap once it's been found. The cost is the diagnosis time.

Related parts & typical prices

PartTypical priceSearch
Camshaft position sensor (451) $25-90 Search Google
Camshaft position sensor (453) $45-150 Search Google
Sensor connector / pigtail repair kit $10-25 Search Google

Prices are rough community-reported ranges, not quotes. Aftermarket vs. genuine Mercedes parts swing the spread; call a Smart-experienced shop for an actual quote.

Manual references

Community references

Stuck on this one?

SmartDiag-AI runs through the cheap-first checks with you, weighted to community-known patterns for your exact model. The link below pre-fills the code and model.

Diagnose P0340 on your 451

Related codes & issues