Replace Camshaft Position Sensor 2011-2017 Hyundai Elantra

By | October 30, 2026

Replace Camshaft Position Sensor 2011-2017 Hyundai Elantra
Replacing the camshaft sensor on a 2011-2017 Hyundai Elantra is an easy task that falls into the DIY category.

There are two camshaft position sensors, A and B, both located next to each other.

Sensor A is the intake cam sensor and sensor B is the exhaust cam sensor.

The Hyundai Elantra, 1.8 Liter DOHC, has two camshafts, so it has two sensors.

The 2014-2016 Elantra Sport, the 2014 Elantra Coupe and the 2014-2017 Elantra GT use a 2.0L engine that also has two cam sensors.

The 2017 Elantra with the 2.0L engine also has two cam sensors on the right end of the valve cover.

Note: The 2017 Elantra Eco 1.4L turbo and the 2017 Elantra Sport 1.6L turbo use different sensors, so check the part number on the old sensor.

The 2011-2012 Elantra Touring wagon has the older 2.0L engine with only one cam sensor at the back of the cylinder head.

The OBDII code for a Hyundai with a bad camshaft sensor is a P0340 or P0365.
OBDII Error Codes
P0016 Crankshaft Position – Camshaft Position Correlation Bank 1 Sensor A
P0017 Crankshaft Position – Camshaft Position Correlation Bank 1 Sensor B
P0340 Camshaft Position Sensor A Circuit (Intake)
P0341 Camshaft Position Sensor A Circuit Range/Performance (Intake)
P0365 Camshaft Position Sensor B Circuit (Exhaust)
P0366 Camshaft Position Sensor B Circuit Range/Performance (Exhaust)
 
Camshaft Position Sensor Location (2011-2017 Hyundai Elantra)
The camshaft position sensors are located on the top right of the engine under the cover.
Camshaft Position Sensor Location 2011-2017 Hyundai
The cover is held on with four tabs which the cover is pulled up on, and they snap off.

Parts and Tools Needed

  • 10mm socket and ratchet.
  • New camshaft position sensor.

It is usually best to replace both sensors since they are low-cost parts.

The 2011-2016 Elantra sedan, the 2013-2014 Elantra Coupe and the 2013-2017 Elantra GT use Hyundai part 39350-23910 for both sensors.

The Standard Motor Products PC661 replaces 39350-23910 on these years Available Here on Amazon

The 2017 Elantra 2.0L uses Hyundai part 39350-2E200 for both sensors.

The Standard Motor Products PC1141 replaces 39350-2E200 on the 2017 Elantra 2.0L Available Here on Amazon

One sensor can be bought and swapped around to find the bad one if you are on a budget.

A 10mm socket and ratchet are needed to remove the bolt holding them in place.

How To Replace Camshaft Position Sensor 2011-2017 Hyundai Elantra

  1. Remove the engine cover by pulling it up (It snaps off).
  2. Note: The 2017 Elantra 2.0L engine cover also has one 10mm bolt at the front corner that has to come out first.

    How To Replace Camshaft Position Sensor 2011-2017 Hyundai Elantra Step 1

  3. Remove the electrical plug.
  4. Remove the 10mm bolt.
  5. Pull the sensor out.

  6.  

  7. Insert the new sensor.
  8. Put a little clean engine oil on the O-ring of the new sensor before it goes in.

  9. Tighten the 10mm bolt.
  10. Note: The sensor bolt only needs 7.2-8.7 ft-lb of torque.

    Too much torque can crack the plastic sensor housing.

  11. Reattach the engine cover.
  12. Clear the codes with an OBDII scanner after the new sensor is in.

Summary
Replacing a camshaft position sensor is easy to do on a Hyundai Elantra.

The OBDII error codes P0340 or P0365 will be given when there is a problem.

Keep in mind other things can cause P0016 or P0017 error codes, such as bad wiring.

A stuck CVVT oil control valve can also set a P0016 or P0017 code.

If the timing chain stretches or jumps, the timing will be thrown off and can sometimes give P0016 or P0017 codes.

Have you had to replace the camshaft position sensor on a Hyundai Elantra? Let us know your thoughts in the comment below.

Category: General Automotive Repair

About Bob Thomas

Bob Thomas is an automotive mechanic with 30 plus years experience. He is a contributor to several publications and has written many articles on automotive maintenance and repairs. He also has created many auto repair videos on YouTube.

7 thoughts on “Replace Camshaft Position Sensor 2011-2017 Hyundai Elantra”

  1. Alex Rogers

    Which one is sensor ‘A’ and which one is sensor ‘B’?

    Reply ↓
    1. Don

      Sensor A is always on the Exhaust side and Sensor B is always on the Intake side.

      Reply ↓
  2. Jeff Murphy

    I like how the website is straightforward. I will attempt to try this instead of paying someone!

    Reply ↓
  3. Dani

    I have a elantra 2017 with code p0017, i put the timing belt slips and the sensors are new un the car, i cover all, the scan allwais saya p0017

    Reply ↓
    1. TRoseC

      Did you figure it out? Im having the same issue. Same car, 2017 Elantra. Let me know please, thanks

      Reply ↓
    2. TRoseC

      Did you figure it out? I did the timing chain, vvt solenoids, crankshaft sensor, camshaft sensor, . 2017 Elantra what else could it be?

      Reply ↓
  4. Santiago suriel

    Sobre el codigo p0017 me sale , tengo un elantta 2014 1.8 cual seria banco 1 sensor b? El sensor b es el que esta parte trasera del auto cierto el a , es el de enfrente ??????

    Reply ↓

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.