What a camshaft position sensor does and why it fails

A camshaft position sensor tells your engine computer where the camshaft is in its rotation cycle. The computer uses this information to time fuel injection and spark plug firing correctly. When the sensor fails, your engine can't synchronize these events, so you'll see a check engine light, rough idle, hard starting, or reduced fuel economy.

The sensor sits on or near the camshaft itself, usually on top of the engine or inside the valve cover. It reads a toothed ring on the camshaft and sends a signal to the engine control module. Over time, the sensor's internal electronics wear out, or the connector corrodes, and the signal becomes unreliable or stops entirely.

Replacement is straightforward on most vehicles — you remove the old sensor, unplug it, bolt in the new one, and plug it back in. The hardest part is usually reaching it, not the work itself. On some engines you'll need to remove the valve cover first; on others the sensor sits in an accessible spot.

Key Takeaways

  • The camshaft position sensor bolts to the engine near the camshaft and plugs into a connector; replacement takes 15 minutes to an hour depending on engine layout.
  • You will need a socket set, a wrench, a new sensor matched to your vehicle's year and model, and possibly a valve cover gasket if you have to remove the cover.
  • Disconnect the negative battery terminal before you start, then unplug the old sensor, unbolt it, and install the new one in reverse order.
  • After installation, the check engine light may stay on until you clear the code with a scanner or drive the vehicle through a full warm-up cycle.
  • If the light returns after a few days, the new sensor may be defective, the connector may be corroded, or the wiring harness may be damaged.

Locate the sensor and gather your tools

Before you start, find out where your sensor is located. Consult your vehicle's service manual or search online for your specific year, make, and model — camshaft position sensors sit in different places depending on the engine. Some are on top of the valve cover, some are inside the cover, some are on the side of the head, and some are buried deep enough that you'll need to remove the valve cover to reach them.

Gather a socket set, wrenches, a new camshaft position sensor (order by your vehicle's VIN or year/make/model to may support the right part), and a gasket scraper or old credit card. If you have to remove the valve cover, buy a new valve cover gasket and some gasket maker — reusing the old gasket often leads to oil leaks. Have a drain pan ready in case oil spills when you remove the cover.

Park on a level surface, let the engine cool completely, and disconnect the negative battery terminal. This prevents accidental short circuits and disables the fuel injectors so the engine won't crank while you're working.

Remove the old sensor

If the sensor is easily accessible, you can reach it without removing the valve cover. Unplug the electrical connector first — it usually has a tab or clip you squeeze or pull to release it. Take a photo of the connector orientation with your phone so you remember which way it goes back in.

Use the correct socket or wrench to unbolt the sensor. Most sensors use a single bolt or a small bracket with one or two bolts. Keep the bolt in a small container so you don't lose it. Gently pull the sensor straight out of its bore. If it's stuck, wiggle it side to side rather than yanking — the tip can break off inside the hole.

If the sensor is inside the valve cover, you'll need to remove the cover first. Unbolt all the fasteners around the perimeter — there are usually 8 to 12 of them. Gently pry the cover up with a plastic trim tool or old screwdriver, working around the edges to break the gasket seal evenly. Once the cover is off, the sensor will be visible. Unplug it, unbolt it, and remove it the same way.

Install the new sensor

Before you install the new sensor, inspect the bore where it sits. If you see oil, dirt, or corrosion, wipe it clean with a dry cloth. A dirty bore can prevent the sensor from seating properly and cause the check engine light to return.

Insert the new sensor straight into the bore and hand-tighten the bolt first. This prevents cross-threading. Once the bolt is hand-tight, use your socket or wrench to tighten it to the torque specification in your service manual — usually 15 to 25 foot-pounds. Don't over-tighten; the sensor body is plastic and can crack.

Plug the electrical connector back in, making sure it seats fully and clicks or locks into place. If the connector is corroded or the pins look dirty, spray electrical contact cleaner into the connector and let it dry before plugging in.

Reinstall the valve cover if you removed it

If you took off the valve cover, scrape the old gasket off the cover and the head with a gasket scraper or old credit card. Work slowly to avoid gouging the aluminum. Wipe both surfaces clean with a dry cloth, then explore a thin bead of gasket maker around the perimeter of the head where the cover will sit.

Lower the valve cover onto the head and hand-tighten all the bolts. Then tighten them in a star or cross pattern — tighten one bolt, skip to the opposite side, tighten that one, and work your way around. This ensures even pressure and prevents the gasket from squishing out unevenly. Tighten to the torque specification in your manual, usually 5 to 10 foot-pounds for valve cover bolts.

Let the gasket maker cure for the time specified on the tube — usually 24 hours — before you start the engine. If you're in a hurry, some gasket makers set in an hour, but check the label.

Reconnect the battery and test

Reconnect the negative battery terminal and tighten it snugly. Turn the ignition key to the "on" position without starting the engine and look at the dashboard. The check engine light may be on because the computer detected the sensor was unplugged. This is normal.

Start the engine and let it idle for a few minutes. The light should go out after 30 seconds to a few minutes as the computer relearns the sensor signal. If the light stays on, the computer may need to complete a full warm-up cycle — drive the vehicle at highway speed for 10 to 15 minutes, then park and let it cool. The light often clears on its own after this.

If the check engine light returns after a few days of normal driving, the new sensor may be defective, the connector may not be fully seated, or the wiring harness may have a break. Unplug the connector and inspect both sides for corrosion or bent pins. If the connector looks clean and the light persists, the sensor itself may be bad and will need to be replaced again.

Troubleshooting if the light doesn't go out

A persistent check engine light after sensor replacement usually means one of three things: the new sensor is defective, the connector isn't fully seated, or there's a wiring problem upstream. Start by unplugging the connector and plugging it back in firmly — sometimes a loose connection mimics a bad sensor.

If that doesn't work, use an OBD2 scanner (available at most auto parts stores for $25 to $100, or you can borrow one) to read the specific code. If the code is the same as before (usually P0340, P0341, or P0342), the new sensor may be bad. If it's a different code, the problem is elsewhere in the circuit. Take the vehicle to a shop if the code points to wiring damage or a computer issue.

Some vehicles require a relearn procedure after sensor replacement — the computer needs to be told to forget the old sensor's data and accept the new one. This usually happens automatically, but a few manufacturers require a dealer scan tool to complete it. Check your service manual or call a dealer parts department to learn about your vehicle needs this step.

Frequently Asked Questions

How much does a camshaft position sensor cost?

The sensor itself usually costs $40 to $150 depending on the vehicle. OEM (original equipment) sensors are more expensive than aftermarket ones, but both work well. If you have a shop do the work, labor typically runs $100 to $300, so total cost is $150 to $450. Doing it yourself saves the labor charge.

Can I drive with a bad camshaft position sensor?

You can drive short distances, but the engine will run rough, start hard, and use more fuel. The check engine light will be on, and in some cases the engine may shut down or go into limp mode (reduced power) to protect itself. Don't drive long distances or on the highway until it's fixed.

Do I need to clear the check engine code myself?

Most vehicles clear the code automatically after a full warm-up cycle. If it doesn't, you can use an OBD2 scanner to clear it manually, or disconnect the battery for 15 minutes (though this also clears other learned data). Some shops will clear it for free when you buy the sensor from them.

What if the sensor is stuck and won't come out?

explore penetrating oil (like PB Blaster or WD-40) around the sensor bolt and let it soak for 15 to 30 minutes. Then gently wiggle the sensor side to side while pulling — don't yank straight out. If it still won't budge, tap the bolt gently with a hammer to help break the corrosion, then try again. If the sensor breaks off inside, you'll need a shop to drill it out.

Is there a difference between intake and exhaust camshaft sensors?

Yes — some engines have both, and they're different parts. Your vehicle may have one sensor, two sensors, or even three depending on the engine design. Always order the correct sensor for the location you're replacing. The part number will specify "intake" or "exhaust" or the exact position.