Victor is a businessman, engineer, and teacher. He is interested in car repair and maintenance.
1. Overview of a Computerized Engine Management System
For a computerized engine to operate efficiently, the ECU (Engine Control Unit) must be able to tell which cylinder is in the Compression Stroke and ignite a spark at the right time to such cylinder in order to produce maximum combustion. The ECU must also be able to tell which cylinder is in the Intake Stroke so as to be able inject fuel to such cylinder at the right time (and with the aid of other sensors, the right amount of fuel).
This is made possible through the combination of the Crankshaft Position Sensor (CKPS) and the Camshaft Position Sensor (CMPS).
The CKPS monitors the angular position of the crankshaft and sends signal to the ECU which enable it to determine the position of the piston in each cylinder. The CMPS, on the other hand, monitors the position of the camshaft (or in effect, the position of the valves) and sends this information to the ECU.
Through these two signals the ECU is able to tell which cylinder is in the compression stroke and which one is in the intake stroke. This is, of course, under the presumption that the timing marks of the crankshaft and that of the camshaft are properly set.
Fig. 1 shows typical waveforms from a magnetic CKPS and a hall CMPS on an engine with properly set timing marks. Note that the trigger signal from the CMPS occurs at a specific angle (around 48 degrees) before TDC. If the CMPS timing mark (or valve timing) is erroneously set too early or too late, DTC P0340 will be generated.
Another instance DTC P0340 is generated is when there is a problem in the CMPS electronic circuit itself. The CMPS electronic circuit consists of the Camshaft Position Sensor, wiring harness, and the ECU. The problem could be a defective CMPS, open or shorted wire, or defective ECU.
2. Symptoms of DTC P0340
The symptoms of DTC P0340 can include the following:
- Engine hard to start or won’t start at all
- Engine lacks power
- Misfiring or rough engine operation
For ease of understanding, I categorize that part of the engine management system that monitors a particular subsystem of the engine as the Electronic Circuit, and that subsystem that is being monitored by the Electronic Circuit as the Mechanical Circuit.
The Camshaft Position Circuit is an electronic circuit consisting of the Camshaft Position Sensor, wiring harness, and the ECU (Engine Control Unit) or PCM (Power Control Module). It monitors a mechanical circuit (red zone in Fig.2) consisting of the camshaft, timing chain and/or belt. Problems with the mechanical circuit and/or the electronic circuit can cause a DTC P0340. A related trouble code DTC P0341 (Camshaft Position Circuit Range/Performance) may also be reported. Two other related trouble codes may also be reported, but they are usually caused by problems in the electronic circuit only. These are DTC P0341 (Camshaft Position Circuit Low) and DTC P0342 (Camshaft Positon Circuit High).
3.1 The Electronic Circuit (Camshaft Position Sensor Circuit)
The Camshaft Position Sensor used in Kia Rio 2010 is the hall-effect type. It is mounted at the end of the Intake Camshaft (See Fig. 2). When the Camshaft Timing pin comes close to the sensor head, the voltage at the signal wire drops to zero. It rises back to 12 volts when the pin leaves the sensor head. The Camshaft Position Sensor sends this signal to the PCM via the signal wire in the wiring harness (See Fig. 3).
Using the signals of the Crankshaft Position Sensor and that of the Camshaft Position Sensor the ECU can tell which piston is in the Power Stroke and which one is in the Intake Stroke. In conjunction with the signals from other sensors like the MAP Sensor, Throttle Position Sensor, Engine Coolant Temperature Sensor it knows exactly when to ignite a spark and when to inject the right amount of fuel to the right cylinders.
3.2 The Mechanical Circuit
The Cam Mechanical Circuit spans from the Intake Camshaft, to the Camshaft Timing Chain, to the Exhaust Camshaft, to the Camshaft Sprocket. This is inside the red zone in Fig. 2. The Crank Mechanical Circuit (blue zone) spans from the Crankshaft Position Sensor, to the Crankshaft, the Timing Belt, and to the Camshaft Sprocket.
3.3 Diagnosis Chart
Fig. 4 shows a Diagnosis Chart you can use to resolve DTC P0340 problem. Inside each box is a diagnostic procedure which is described in the following paragraphs under the same title. Just follow the flow of the chart, performing the procedures that need to be done.
3.3.1 Visual Inspection
Things to remember when conducting a visual inspection:
- Check if the Camshaft-Position-Sensor connector is fully inserted into the sensor.
- Check the wiring harness for possible damage (broken or shorted wires).
- The wiring harness should be routed away from the high-tension cable to prevent interference.
3.3.2 Functionality Test
This procedure will determine if the Camshaft Position Sensor is able to send signal to the ECU. This is done by measuring the voltage across the signal and ground wires of the sensor. Follow these steps in sequence:
- Make sure the ignition switch is off.
- Locate the Signal and Ground wires. In Kia Rio, these wires are as shown in Fig. 5.
- Set your DVM (digital voltmeter) to 'DC voltage measurement' function and connect the positive probe to the Signal wire and the negative prove to the Ground wire.
- Turn on the ignition switch. Most of the time the DVM reading should be around 12-volts.
Manually turn the Crankshaft clockwise and observe the DVM reading. Every other time that the Crankshaft approaches the TDC mark (top dead center), the DVM reading should drop from 12-volts to 0-volt. This is the time when the Camshaft Timing Pin is opposite the Camshaft Position Sensor head. As you continue to rotate the Crankshaft, the DVM reading should rise back to 12-volts as the Timing Pin moves past the Sensor head (See Fig. 3). Turn the ignition switch off.
If the DVM readings are as described above, the Camshaft Electronic Circuit is functioning.
3.3.3 Mechanical Circuit Inspection
Check the ignition timing and the valve timing. Make sure that the timing marks are properly aligned. In my Kia Rio the timing marks are as shown in Fig. 6
3.3.4 Voltage Test
The purpose of this test is to check the condition of the wire harness.
In this case it could be possible that the power supply to the Camshaft Position Sensor is out, maybe because of a broken wire. Follow the following steps.
- Make sure the ignition is turned off.
- Pull out the sensor connector. WARNING! – Always hold the connector shroud when pulling the connector out, do not grab the wire harness. You may break the wires.
- Turn on the ignition switch.
- Measure the voltage at the terminals to ground. The voltages should be as follows: Power terminal = 12-volts; Signal terminal = 12-volts; Ground terminal = 0-volt. WARNING! - Never short the Power terminal to ground, this could damage your ECU.
- Turn off the ignition switch.
If the voltages are as specified, replace the Camshaft Position Sensor with a known good sensor and test. Otherwise, check the condition of the wire harness.
3.3.5 Continuity and Short Test
The purpose of this test is to check the condition of the wires connected to the sensor. Refer to Fig. 7 and do the following procedure.
- Make sure the ignition is off
- Disconnect the negative terminal of the battery
- Disconnect the connector at the ECU
- Pull out main relay
- Check the continuity of the wires connecting points 1 and 4, 2 and 41, 3 and 48. See Fig. 7. If there is a broken wire, fix it.
- Check also the resistance between terminals 1 and 2, 2 and 3, and 1 and 3. The resistances should be infinity, if not, the wires are shorted.
Replacing the ECU
Always disconnect the negative terminal of the battery when replacing the ECU. Power glitch could damage the ECU. Furthermore, never touch the pins of the ECU connector. ESD (electrostatic discharge) could flow from your fingers to the pins, down to the internal circuitry of the ECU. This can cause serious damage to the ECU.
By following the procedures in the Diagnosis Chart (Fig. 4), hopefully you should be able to solve problems related to DTC P0340. Just remember that problems could lie in the monitoring system (in this case the Camshaft Position Sensor Circuit) or in the system being monitored (the Camshaft Mechanical Circuit).
This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.
Questions & Answers
Question: I have a Hyundai Getz 2005 with a 1.6 engine. But it's having a Camshaft sensor issue: DTC P0340. The sensor is OK when I test it with an Actron CP9090 tester. The voltages at the connector terminal are exactly as mentioned here ( 0 12 12), but here is the magic the engine turns normally with connector disconnected. What could be wrong with my camshaft sensor?
Answer: The Camshaft Position Sensor (CMPS) and the Crankshaft Position Sensor (CKPS) are used by the ECU to determine the correct timing of firing the ignition to produce an optimum engine performance. (Other sensors may cause the ECU to alter the ignition timing for safety reasons). Disconnecting the CMPS may not create a noticeable effect on the engine, but it surely affects engine performance and fuel consumption.
Question: How do you test for continuous ground on cam and crankshaft wire?
Answer: What I usually do is to use an oscilloscope and probe on each wire to see what type of voltage it has. If the voltage waveform is varying, it is the signal wire. If the voltage waveform is fixed at 5V or 12V, it is the power wire. If the waveform if is fixed at zero, it is the ground wire.
Question: Which color are power and signal wires within the camshaft sensor circuit?
Answer: I'm not sure if different cars use the same color coding on their wires. What I usually do is to use an oscilloscope and probe on each wire to see what type of voltage it has. If the voltage waveform is varying, it is the signal wire. If the voltage waveform is fixed at 5V or 12V, it is the power wire. If the waveform if is fixed at zero, it is the ground wire.
Marco on July 17, 2020:
My Nissan sunny fb15 starts running after many attempts of cranking. What could be the problem
Walter on June 07, 2020:
I have a 2000 Ford F-150 I changed the camshaft sensor and synchronizer I drove 53 miles and my truck started acting like it was going to cut off it drop my speed from 70 to 55 I disconnected the main wires from the harness it’s like it reset it self but after driving for about 10 minutes it started doing the same thing again what could that be.
Opoku Agyemang Gideon from Ghana on January 31, 2020:
My engine cranks but won't start.
Renault Megane. Diesel
Victor Mangubat (author) from Philippines on July 21, 2018:
I think I missed the point you are trying to drive at. But here's how it is. Yes, in the Voltage Test the voltmeter reading between ground and signal terminals is 12 volts, not zero. This is because the signal input terminal inside the ECU is connected to a pull-up resistor, the other side of which is connected to 12 volts. And since the signal terminal is floating when the connector is unplugged, practically no current flows through the pull-up resistor. No current, no voltage drop, and therefore whatever voltage at the supply terminal will appear at the signal terminal. In this case 12 volts.
A pull-up resistor at the input terminal of the ECU is required, because the Camshaft Position Sensor has an open-collector output.
Victor Mangubat (author) from Philippines on July 19, 2018:
Thanks for reading my article.
In the '3.3.4. Voltage Test' section, we intend to find out if there is a supply voltage to the sensor. So with the connector unplugged and the ignition switch on, we probe on the connector terminals connected to the wires that lead back to the ECU.
If the wires from the connector to ECU and the ECU itself are ok, then we should be able to obtain readings as mentioned above. If not, there could be something wrong with the terminals lugs, the wires, or the ECU.
If you want to measure the signal voltage, try '3.3.2 Funtionality Test' section. Just be sure the connector is plugged into the sensor before turning the ignition ON.
Matt on July 14, 2018:
On the voltage test, I believe you made an error. Shouldn't the signal wire be showing 0 if you unplugged the sensor wires from the camshaft?
Wil lattimer on September 09, 2017:
04 honda civic won't run with cam sensor plugged in but will run being disconted is this a bad cam sensor
Donna on May 08, 2017:
Can you tell just by looking at a camshaft sensor if its bad or not ? Thank you