One of the most common causes of Ford P0171 and P0174 lean codes is a dirty mass airflow (MAF) sensor. The MAF sensor is located in the air inlet tube
just ahead of the throttle body. The MAF sensor should be protected from outside dust and debris by the air filter, but sometimes the air filter doesn't fit real tight inside the housing and allows unfiltered air into the engine. Dirt can stick to the MAF sensor wire and form a coating that slows the response of the sensor to changes in airflow. The MAF sensor can also be contaminated by fuel vapors that back up through the intake manifold and throttle body when the engine is shut off. The vapors can leave a waxy coating on the sensor wire. This causes the MAF sensor to under report airflow, which in turn misleads the powertrain control module (PCM) so it doesn't add enough fuel to maintain a properly balanced air/fuel ratio. As a result, the engine runs lean and sets a P0171 and/or P0174 code (see Ford TSB 98-23-10 for details).
If the MAF is dirty, the fix is easy enough: just clean or replace the MAF sensor. In many instances, the MAF sensor can be successfully cleaned by spraying the sensor element with electronics cleaner. Do not use any other type of cleaner as this may damage the sensor.
Disconnect the air inlet tube just ahead of the sensor, and then spray the electronics cleaner through the screen at the wire element in the center of the little MAF sensor. Let the cleaner soak in for several minutes, then give it another shot of cleaner. Let it sit another five minutes, then reconnect the air inlet tubing and start the engine.
If the lean codes keep coming back, the MAF sensor may have to be replaced if the engine does not have a vacuum leak or fuel delivery problem.
Another common cause of Ford P0171 and P0174 ean codes is an engine vacuum leak. Ford TSB 04-17-4 details procedures for checking fuel trim and looking for vacuum leaks.
On 3.8L Fords with a split-plenum intake manifold, the port gaskets and isolator bolt assemblies for the upper plenum can deteriorate over time and leak air, often as a result of oil being sucked into the intake manifold through the PCV system. Also the vacuum hose that connects the fuel pressure regulator to the intake manifold can swell and leak vacuum where the hose connects to the manifold. Ford TSB 03-16-1 says the fix involves several steps: remove the upper manifold plenum and replace the original gaskets and bolts with revised ones, replace the front valve cover with a revised valve cover that reduces the amount of oil vapor sucked into the PCV system, inspect and replace the fuel pressure regulator hose, and finally, reflash the PCM so it is less sensitive to lean fuel conditions.
BAD DPFE SENSOR
Ford p0171 AND p0174 lean codes can also be set by a bad EGR differential pressure sensor. These sensors have a very high failure rate once a vehicle has more than about 60,000 miles on the odometer or is more than five or six years old.
The DPFE sensor is mounted on the engine, and is attached with two rubber hoses to the tube that routes exhaust gas to the EGR valve. The original equipment sensor has an rectangular aluminum housing about three inches long. Corrosion inside the sensor reduces its sensitivity to EGR flow, causing it to under-report EGR flow. The PCM responds by increasing EGR flow, which may keep the EGR valve open longer than usual creating a lean condition in the engine. Thus, a bad sensor may set a P0401 code (insufficient EGR flow), or it may not set an EGR code but a P0171 and/or P0174 lean code instead.
The cause of the P0401 code in most cases turns out to be a bad DPFE sensor, not an EGR valve problem or an EGR valve that is plugged up with carbon (though this can also set a P0401 code). An aftermarket replacement DPFE sensor costs less than $50 and usually gets rid of not only the P0401 code, but also the P0171 and P0174 codes, too.