Ford P0340 Code: Camshaft Position Sensor Replacement
Is a fault code P0340 stored on the scanner when diagnosing your Ford? Learn how to fix the problem by replacing the camshaft position sensor and resetting the code using an OBD-II scanner. This guide shows how to replace the camshaft position sensor on a Ford Fusion 2013 to 2020.
What you will need
- Ford Fusion Camshaft Position Sensor
- OBD-II Scanner
- Mechanic Toolset
- 10mm socket
Procedure
- Unlock the vehicle and go to the driver’s seat.
- Connect the OBD-II Scanner to the OBD-II port below the dashboard but above the hood release.

- Turn the ignition switch to the accessories position I.

- Go to the diagnostic menu on the scanner.

- Select read codes and check the stored codes.

- The scanner will show the P0340 faulty code for the camshaft position sensor.

- Open the hood. Pull the hood release under the dashboard and unlock the hood latch on the vehicle’s front. Then, pull the hood up and set the hood strut to hold the hood open. If you need help with this step, follow these procedures for opening the hood.
8. Remove the engine cover by pulling it up to detach the rubber grommets holding the engine cover.
9. Locate the camshaft position sensor on the right side of the fourth ignition coil.
🔧 Find out what is actually wrong before you pay someone to guess
Dealer level diagnostics at home with the YOUCANIC UCAN-II Pro.
- ✔ Covers most makes and models, including many luxury brands. Send us your VIN and we will confirm your car before you order
- ✔ Reads every module, not just the engine, so you find the faults a basic reader says are not there
- ✔ Commands the car: test a fan or pump, bleed ABS, retract an electronic parking brake, register a battery
- ✔ No subscriptions. Free lifetime updates, so the price you pay is the whole price
- ✔ Backed by real mechanics in the USA you can email before and after you buy
Featured in The Wall Street Journal
10. Using a 10 mm socket wrench, remove the 10mm bolt on the sensor and turn it counterclockwise.
11. Disconnect the electrical connector of the camshaft position sensor by pressing the clip and pulling the connector out.
12. Remove the sensor by pulling it out from the vehicle.
13. Line up the new sensor into the installation port and push it in to set it into place.
14. Reinstall the 10mm bolt by twisting it clockwise. Then, reconnect the camshaft position sensor’s electrical connector by pushing the connector into the connection port.
15. Turn the ignition back on. Go back to the scanner’s diagnostic menu and select “erase codes.” Press the enter button to select.
16. Select YES and press the enter button on the scanner to erase the codes.

17. Start the vehicle and check if the check engine light is still on.
Check Engine Light On

If the Check Engine Light is on after replacing the Camshaft Position Sensor, you can use the YOUCANIC UCAN-II Pro to reset the Check Engine Light. This scanner can also read and clear fault codes through every control module on supported vehicles.
What P0340 Means and What to Check First
P0340 means the engine computer is not seeing a valid signal from the camshaft position sensor circuit. The engine may take longer to start, stall, or not start at all.
- Look for oil inside the sensor connector; a leaking sensor O ring can let oil wick into the plug and wiring.
- Check the harness for damage near hot or moving parts.
- Make sure the new sensor is the correct part for your engine; some Ford engines use more than one cam sensor.
- If the code returns with a new sensor and good wiring, have the cam timing and the sensor target wheel checked.
Check these troubleshooting and repair guides for more help on your Ford.








