Chasing the dreaded P0171
A little over a month ago the CEL came on. I had just filled up the fuel tank so I thought perhaps the gas cap wasn't tight. Got to work, tightened cap, disconnected battery to reset code. All is good.
4 days later, the CEL returns. OK, I dragged out the code reader and checked the code. P0171. Lean Bank 1.
Truck was running good. No driveability issues. OK, purchased a can of CRC MAF cleaner, removed MAF and cleaned. Reset code, all is well.
4 days later CEL returns. P0171. OK, time to look at fuel trims and stored data. Long term trims were just over and just under 20 when CEL was set, so it isn't just a Bank 1 issue. Both sides are lean. Long term trims are bouncing between 5 and 19 when driving down the road.
I spent a Saturday testing for vacuum leaks. None were found. Propane applied to every hose, fitting, intake manifold joint and hose I could find did not change idle or fuel trim.
On a hunch, I pulled out the air cleaner when the engine was idling. Long term trims on both sides dropped to -12 and the truck stumbled, then recovered. Hmmmmm...that got me thinking about what I did before this started.
I changed the air filter.
I always ran a K&N filter on this engine. 5 weeks ago so pulled it out to clean it. I found that my intake had been infested with Asian Beetles. Hundreds and hundreds of mummified beetles were stuck to my air filter. It smelled terrible! Rather than attempt to clean it, I tossed the filter. I still had the original factory filter that came with the truck, so I threw that in and didn't give it a second thought.
Now, how the air cleaner created a P0171 error escapes me. Maybe someone can explain, but I took out the Motorcraft filter that has been on my shelf for about a decade and replaced it with a new Wix filter. My trim levels now run -5 to +5 most of the time.
How is that possible?
Caveat: I do not have the necessaries for the 5.4L, I am basing this on DTC Theory of Operations published by Ford in 2015 (onehelluva big book- 1 1/2 thick with tiny print) and my own deductive/engineering analysis and reasoning. Your mileage may vary.P0171 Lean Bank 1
Primary Cause: Adaptive Fuel Table reaches Rich Calibration Level
Causal: Freeze frame data to determine operating conditions when DTC was Set.
LONGFT1 and LONGFT2 PIDs apply.
Primary: Adaptive Airflow outside limits of strategy:
Causal: Electronic Throttle Control (ETC) employ adaptive airflow strategy the allows the PCM to correct for changes in airflow. During idle, the PCM monitors the throttle angle and airflow. If airflow is determined to be less than expected, the PCM adjust the throttle angle to compensate. The PCM only learns the AAS when the vehicle is at idle at normal operating temp and the airflow is less than the calibrated limit. Battery disconnect KAM (keep alive memory) will reset and PCM will learn new values based on the adaptive airflow strategy and not default values.
Primary: Fuel Trim
Causal: When engine is running at normal operating temps the oxygen sensors are warmed and the PCM determines engine can operate near the 14.7 to 1 gasoline stoichiometric air to fuel ratio, the PCM enters closed loop fuel control mode. O2 sensors can only indicate a rich or lean. As such, the fuel control strategy adjust desired air:fuel ratio causing O2 sensor to switch between the stoichiometric point. If time between rich and lean states are the same the system is operating at stoichiometric.
Air:Fuel control parameter is defined as Short Term Fuel Trim 1 & 2 (SHRTFT1 and 2) where stoichiometric is represented by 0%. Rich is identified by a positive number and lean by a negative number.Normal range is -25% and +25% Some events have time between switches and short term fuel trim excursions that are no equal. These excursions run the stoichiometric slightly lean or rich. The system has now entered a bias event. i.e. The fuel system can be biased slightly rich during closed loop fuel to help reduce NOx levels.
Primary: Long Term Fuel Trim
Causal: When engine is operating in closed loop fuel control, short term fuel trim corrections are learned by the PCM as long term fuel trim (LONGFT1 and 2). These values are stored in the KAM fuel trim tables. These tables are based oin engine speed, load and by bank with 2 heated oxygen sensors forward of the catalyst. Long term fuel trim is represented as a percentage, similar to short term fuel trim, but it is not a single parameter. A separate LONGFT value is used for each RPM and load point of engine operation. These corrections change depending on the operating conditions (RPM/Load), ambient air temperature, and fuel quality (% of Alcohol, Oxygenates). LONGFT1 and 2 PIDs display the fuel trim currently being used at the RPM and load point. Changes in LONGFT1 and 2 data will extrapolate to 4 primary out of scope events:
a) Contaminated MAF results in matching LONGFT1 and 2 correction values that are negative at idle (reducing fuel), but positive (adding fuel) at higher RPM and loads.
b) LONGFT1 values differing greatly from LONGFT2 values rule out issues common for both banks. (Fuel pressure, MAF)
c) Vacuum leaks result in large rich corrections (positive LONGFT1 and 2) at idle, but little ot no correction at higher RPMs and load.
Primary: Resetting LONGFT data
Causal: LONGFT corrections are reset by resetting KAM.
Primary: DTC P0171 and 174
Causal: Engine runs rich OR lean of stoichiometry (14.7:1 A:F ratio) if the PCM is not able to compensate enough to correct the condition. Ex: MAF measurement is inaccurate due to fouled connector. A contaminated MAF typically results in a rich system at low airflows where the PCM reduces fuel to a lean system at high airflows where the PCM increases fuel.
Primary: Intake Air System
Causal: A restriction within any of the intake system components may be significant enough to affect the ability of the PCMs adaptive fuel control.
Primary: Rich or Lean System DTCs.
Subject: Visual Inspection
Causal: Ignition OFF Check the air filter element and housing for blockage. Inspect the entire air intake system from the mass airflow (MAF) sensor to the intake manifold for leaks such as: hoses connecting to the MAF sensor assembly cracked or punctured intake air tube
loose connections on the intake air tube at the air cleaner housing or throttle body hoses connecting to the throttle body obstructions, restrictions, or damage Check the throttle plate for obstructions or sludge. Inspect the entire length of all the vacuum hoses for: correct connections
damage or cracks damaged or cracked vacuum tees Inspect the intake manifold or gasket for leaks. Inspect the exhaust gas recirculation (EGR) system for leaks such as: EGR valve gasket leak to intake manifold EGR valve diaphragm or control solenoid Verify the integrity of the positive crankcase ventilation (PCV) system. Verify the proper PCV valve part number. Inspect the exhaust system for leaks at flanges and gaskets. Visually inspect the HO2S for: pinched, shorted, and corroded wiring and pins oil or water contamination
crossed sensor wires Inspect for an incorrectly seated engine oil dipstick, dipstick tube, or oil fill cap.
Any of the above faults/failures will cause the fuel air ratio methodologies to compete with established default fuel:air ratios and cause a DTC/MIL condition. The common denominator in all fuel:air, lean:rich systems is the air intake. Be it a GE F-404 turbofan or a V-8 gasser...
The fact that your "air intake" was jammed up with beetles, causing a restricted air flow and a over rich table, was enough to force the PCM into a over lean at higher RPMs/load and ultimately throw the DTC.
Hope this helps...
Since the MAF measures air flow and in theory any air leak past the MAF would cause the lean conditions, it surprised me when pulling the filter at idle made the truck go super rich and almost die.
Obviously the air filter I threw in the truck was bad. I would have thought a bad air filter would cause a rich condition.
Lesson for me, always go back to the last thing you did.
As you mentioned, a bad air filter should cause a rich condition. But the PCM employs a adaptive airflow strategy-and along side the electronic throttle control to adjust throttle angle on the fly. So it was leaning it till it couldn't lean anymore, then you pulled the air filter and the system tried, but not fast enough, to compensate...The PCM had a hard time processing. It was expecting X amount of inHg and was setting the tables as such. Then the bubble hit and it couldn't compensate fast enough and went into a over lean condition. I just checked your ASL and it is less that 900 feet. Unless when you did this when you had a atmospheric pressure of around 25 inHg-which would have meant Stevensville is no long on the map-that should have no bearing on it.
Unless the PCM does not have a complete/continuous ground...
We had a navigation systems gremlin in a H-53 on cruise once...troubleshooters, a-techs, even a Sikorsky tech rep was flown out to the ship...turned out to be a nicked, and I mean pin ***** size, piece of insulation in one of the grounding cables to the avionics rack. First glance check was solid ground continuity, but individual cable check proved the chassis ground point to have about 160 ohms on it. Replaced the cable and all was well. Engineering inspection showed a length of approximately 3 inches above and below said nick was corroded. That bit of corrosion proved enough to slow the computers down to a crawl-especially when it came to nav calculations. Oh, it worked-eventually...but it was like comparing an 8088 1st Gen home PC where it would take 3 seconds to add 2+2 to what we use today.
With all the trons and computers flowing through our vehicles today, a solid ground continuity is more important than ever. It is on my maintenance cards to check all the ground points-chassis, engine, etc. for corrosion and if found pull a end to end continuity on that and replace/repair.
Yes, I treat all my vehicles like aircraft. Service life, time limited components, etc...there is a reason aircraft built in the 40's are still flying today and why some of the aircraft I flew were older than me








