P0340 Camshaft Position Sensor A Malfunction

In OBD2 Trouble Codes by Magnus Sellén1 Comment

flashing check engine lightThe P0340 error code relates to the camshaft sensor.

Internal combustion engines require the right timing of the air/fuel mixture during ignition. If the timing is wrong then you are going to experience misfires.

Modern cars use the onboard computer to determine the right timing. Camshaft sensors are used to relay information to the PCM for this.

If the sensors are faulty then the PCM receives wrong signals. A car experiencing wrong timing will experience loss of power and can be hard starting. In addition, you will have the check engine light coming on.

The camshaft positioning sensor will also record the spinning rate of the camshaft and send this information to the PCM. The PCM/ECM will utilize this information to regulate the amount of fuel and the timing of the ignition. This leads to fuel efficiency. The sensors can also tell the positioning of the combustion pistons. A gap between the camshaft passes a magnetic field that affects the sensors. This, in turn, affects the sensors’ voltage.

Causes of Error P0340

  • Faulty wiring from the camshaft to the PCM
  • Faulty Camshaft position sensors
  • PCM programming errors
  • Faulty reluctor camshaft wheel
  • Weak battery
  • Short or open camshaft position sensor harness
  • Problems with system circuit

Common symptoms of P0340

  • Engine misfiring
  • Loss of engine power
  • Car stalling
  • Hard start or the car failing to start
  • Check engine light turns on

How to fix it

Check wires: The camshaft sensor connects to the PCM through a set of wires. If these are loose or damaged then there will be problems in information transmission. First, check the wiring on your battery and ensure that all the terminals are tightly in place.  Also, check the ground cable between the engine and body.

SEE NEXT:  OBD1 Codes - Reading & Code List

Check the wires from the sensor/s to the engine control unit to look for any visible damages.

Camshaft sensors: The most common problem related to the P0340 code is actually broken Camshaft sensors.

Sensors on the camshaft collect information and relay this to the PCM. This then influences the timing of air and fuel into the combustion chamber. Just like any electronic device, the camshaft sensors get dirty or becomes the default and no longer can relay the right information.

Camshaft reluctor: Check for any visible damages to the reluctor wheel on the camshaft, which the camshaft is reading the information from. This is not a common problem but if you have already replaced the sensors and made sure that the wires are okay – you have to check this.

Engine control unit: If the wires, sensor and the camshaft is good – there might be a problem with the hardware or software of your engine control unit. You should really let an experienced diagnostic technician take a look at your engine control unit. You can read the signal from the camshaft sensor with an oscilloscope, but this requires a lot of knowledge.

Can drive with an error P0340?

Error P0340 is associated with a malfunctioning camshaft position sensor. The sensor plays a vital role in detecting the rotational speed of the camshaft and relaying this information to the PCM.

The PCM then determines the opening and closing of the intake valves. It will also determine the right timing for ignition. When you have an error P0340 problem, your engine will misfire or the car can stall while driving. Depending on the car, you might have problems driving or starting your car and it’s recommended to fix the problem as fast as possible.

Diagnosing error P0340

If you want to retrieve the error codes stored in the PCM you will need to use an OBD2 scanner. Most of the problems with error P0340 are related to the camshaft wiring and sensors. Firstly, inspect the wiring from the camshaft sensor to the PCM and check for corrosion or lose wires.

SEE NEXT:  P0174 Trouble Code – System Too Lean

Next, check the camshaft position sensor for any damage. Sensors start malfunctioning when they are corroded with dirt. You can clean these with a special sensor cleaning spray. Spray the sensors and then leave them to dry before reinstalling them.

It is also good to check that the sensors are receiving the right voltage. This requires a scan tool or an oscilloscope to read this. If the readings are above what is recommended you will need to replace the sensors. If all is well or replaced but you still have an error P0340 then the problem could be with the PCM itself. Like most computer elements, the PCM has been programmed to carry out its tasks. But, with time the system develops error codes that can only be sorted by reprogramming the device.

Not addressing the issue the moment it occurs may lead to further engine trouble. When the camshaft position sensor is malfunctioning you may experience stalling of the car while driving. 


Error P0340 is there to notify the car owner that their car has problems with the camshaft positioning sensors. The sensors are installed to communicate to the PCM on the rotational speed of the camshaft. This information is used by the PCM to determine the fuel injection and ignition timing.

The wrong timing leads to misfires and fuel inefficiencies. If you have a faulty sensor then expect the fuel injector and ignition sparks to be off. The check engine light often accompanies error P0340. To fix the problem, ensure that the camshaft position sensors are working and receiving the right voltage. You can clean dirty sensors while replacing worn out wires. It is important that you fix error P0340 the moment it arises as it will lead to further engine problems.

  1. Great information. I enjoy what you have shared. I am presently working on an Audi A4 Quattro that has a camshafts position sensor error code pop up. I have checked the electrical going to the sensor, and it reads 4.9v as against 5v. Do you think this can cause the problem? Or do I have to check the timing and see if it has skepped a tooth? The car starts easily once it has run for a while, but always takes a long time to start if parked for a long time. Then it also lacks power when driving and stalls on occasion.

  2. Due to a very high demand and high ammount of comments, you have to wait for some time for your car questions to get answered. If you want to get fast answers from a certified master technician you can ask your questions here:
    Ask A Mechanic

Leave a Comment