P0340 Fault in 1999 Mercury Villager: Cam Sensor Issue and Hot-Engine Symptoms
I own a 1999 Mercury Villager with 171,000 miles and has been well maintained. The vehicle is throwing fault code P0340, indicating a camshaft position sensor malfunction. The issue only occurs when the engine is hot—typically after prolonged idling or frequent city driving cycles—and does not appear on cool days or during rain. I've already replaced the crankshaft position sensor (which was initially suspected as a secondary cause), at a cost of $28, and all wiring connections appear intact. The 1999 Mercury Villager uses an optical camshaft sensor that is integrated into the distributor assembly—this sensor relies on a precisely aligned plate with 360 small openings to detect cam position. The sensor is screwed in place and can be removed, but it's not listed separately in most parts inventories; only full distributor assemblies are available from dealerships or aftermarket suppliers (even from Ford). My concern: Is the issue truly due to a failing camshaft sensor, or could other factors—such as worn distributor shafts, misalignment of the sensor plate, or degraded electrical connections—be responsible? I've read that cleaning the distributor, sensor plate, and internal components may help, but I'm unsure whether dirt or debris would only cause problems under high engine temperatures. Before replacing the entire distributor assembly (which costs around $330), I'd like to confirm if there are any other diagnostic steps or overlooked causes. The code persists specifically when the engine is hot, which aligns with known behavior of both crank and cam sensors in older GM-style systems. Given that the crank sensor has been replaced and no other symptoms exist, I'm leaning toward a failing cam sensor—but I want to be certain before proceeding.
You're planning to replace the distributor assembly next—does that mean you've ruled out other causes like sensor misalignment or dirty components?