P0340 Nissan 3.5L – How To Test a Camshaft Position Sensor

This P0340 Nissan check engine code refers to the camshaft position sensor in your Nissan or Infiniti VQ35DE V6 engine, specifically the Bank 1 CPS or the passenger side. Your Nissan or Infiniti Powertrain Control Module (PCM) requires this sensor signal to help determine engine speed.

A failure from this sensor can cause poor gas mileage or fuel efficiency as well as preventing the motor from operating. Early indicators that your camshaft position sensor or crankshaft position sensor are going bad can include longer cranking times, or inconsistent misfire at cruising speeds.

I’ll be showing you how to test, remove and replace this camshaft position sensor, Nissan part number 23731-6J90B, which can also be found under 23731-6J906 or A4015-304078. Before you begin this How To tutorial, make sure your battery is fully charged and that a weak charging system is not at fault for this OBDII P0340 Nissan check engine code.


What is the Camshaft Position Sensor?

The camshaft position sensor or CPS is a hall effect sensor used to read the speed of the camshafts in your 3.5L Nissan / Infiniti VQ35 engine.



Because this item is located near the back of the block and can be difficult to reach, I’ll be showing you how to directly test the sensor using a multimeter.

Where is the Camshaft Position Sensor Located?


To access the VQ35DE CPS you will need a 10mm socket and multimeter or another voltage measuring device to determine if your sensor is still good. You may or may not want to remove the intake manifold or at the very least the upper plenum for more access. 


I’ll be showing you how to service, test and replace the camshaft position sensor in a 2006 Infiniti G35 with a VQ35DE engine. This testing procedure is the same for many Nissan and Infiniti vehicles and trucks that share the 3.5L VQ35DE powerplant, from the Altima to the Maxima and Xterra to name a few.


The camshaft position sensor is mounted by a 10mm bolt to the back of either cylinder heads, between the firewall and connected by a three pin connector.


Removal of the upper plenum is not required but it can assist you in reaching the camshaft position sensor correctly.


Remove all 10mm bolts holding the upper plenum in place to the lower portion. Because this upper plenum is so large and the throttle body can take up so much space, removing just the top half can really open some space up.


Once you have your upper intake plenum bolts loosened and removed, you can unplug your throttle position sensor and drive by wire connectors. Undo the clamp that holds the intake snorkel in place, and your upper plenum can now come off.


Because this upper plenum is modular and comes apart in two pieces, you must take extra care so nothing falls into you intake runners. Remember to keep your work area clear of debris to prevent a catastrophic accident. 



Undo the 10mm bolt that holds the camshaft position sensor in place and remove the unit. Disconnect the wiring harness from the sensor and turn your voltmeter on and set it to read resistance.

With the sensor plug facing towards you and the retaining clip on the top, the pins are 1-2-3 from left to right. You will be reading the resistance values between pins 1-3 in many different combinations to determine if you need another sensor.

Resistance Tests


You will be measure the resistance between these pins and make sure that every single combination returns a value. Meaning none of these pins can return a 0 or null value or a ∞ condition. Test the following pin combinations using your multimeter:


  • Pin 1 – 3
  • Pin 2 – 3
  • Pin 1 – 2



If you find that your VQ35DE camshaft position sensor does not respond with resistance values within these parameters, it is bad and must be replaced. This should resolve your OBDII P0340 trouble code in your Nissan or Infiniti car or light truck.

Have any questions for me? Leave them below!



  1. Richard

    Good description except how do you do the test accurately. Do i connect my multimeter to the terminals you mention and set it on resistance with the ignition on? It would help for those of us who arre novices to have the rest of the process. Also searched you tube no videos showing the exact procedure. Thanks for your help

    1. John Huh (Post author)

      Hi Richard, thanks for reading.

      You just need to measure the sensor itself, no need to have the ignition set or turned to anything. Simply unplug the sensor and measure resistance at the terminals listed. Thanks for commenting!

      1. Richard

        Thanks, helped me figure out i had a bad wire or connection at the terminal. Went to the scrap yard replaced the wire and problem solved. Yours was the easiest method to use to isolate and trouble shoot. Appreciate your help. Saved me from buying a sensor only to find that wasn’t the problem. Thanks again

        1. John Huh (Post author)

          No problem Richard, glad to be of assistance! Thank you for reading!

  2. Dusty

    You say to check sensor but the pics point to the harness connector, i got it but confusing to some. Pics should illustrate the sensor, not harness connector.

Comments are closed.

Submit Your Code