DTC P0340 Camshaft Position Sensor Circuit Malfunction Diagnosis

Updated on January 24, 2019
Rhino Guerrero profile image

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:

  1. Engine hard to start or won’t start at all
  2. Engine lacks power
  3. Misfiring or rough engine operation

3. Diagnosis

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:

  1. Check if the Camshaft-Position-Sensor connector is fully inserted into the sensor.
  2. Check the wiring harness for possible damage (broken or shorted wires).
  3. 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:

  1. Make sure the ignition switch is off.

  2. Locate the Signal and Ground wires. In Kia Rio, these wires are as shown in Fig. 5.

  3. 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.

  4. Turn on the ignition switch. Most of the time the DVM reading should be around 12-volts.

  5. 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.

  1. Make sure the ignition is turned off.
  2. 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.
  3. Turn on the ignition switch.
  4. 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.
  5. 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.

  1. Make sure the ignition is off

  2. Disconnect the negative terminal of the battery

  3. Disconnect the connector at the ECU

  4. Pull out main relay

  5. 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.

  6. 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.

4. Summary

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

  • How do you test for continuous ground on cam and crankshaft wire?

    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.

  • 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?

    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.

  • Which color are power and signal wires within the camshaft sensor circuit?

    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.


    0 of 8192 characters used
    Post Comment
    • profile image


      3 weeks ago

      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.

    • profile image

      Opoku Agyemang Gideon 

      5 months ago from Ghana

      My engine cranks but won't start.

      Renault Megane. Diesel

    • Rhino Guerrero profile imageAUTHOR

      Victor Mangubat 

      23 months ago from Philippines

      Hi Matt,

      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.

    • Rhino Guerrero profile imageAUTHOR

      Victor Mangubat 

      23 months ago from Philippines

      Hi Matt,

      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.


    • profile image


      23 months ago

      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?

    • profile image

      Wil lattimer 

      2 years ago

      04 honda civic won't run with cam sensor plugged in but will run being disconted is this a bad cam sensor

    • profile image


      3 years ago

      Can you tell just by looking at a camshaft sensor if its bad or not ? Thank you


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, axleaddict.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://maven.io/company/pages/privacy

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)