1. Attachments are working again! Check out this thread for more details and to report any other bugs.

P0171 code

Discussion in 'Gen 2 Prius Main Forum' started by PapaWill, Oct 20, 2023.

Tags:
  1. PapaWill

    PapaWill Member

    Joined:
    Jan 11, 2019
    137
    25
    0
    Location:
    Maui, Hawaii
    Vehicle:
    2010 Prius
    Model:
    II
    Greetings Prius Enthusiasts! I have an o7 that I recently bought and it had a aftermarket cat on it... I removed the exhaust system so that I could weld the joint that previously had a muffler clamp to secure it... So I replaced the muffler system and the code has been popping up all too often. That code means the engine is running too lean. OK, so the list of diagnostic areas to test out is about 15 pages long and I have it in hand... Been going through the list with zero success.
    QUESTION: this morning, I hooked up TS to see what the fuel trims look like and I found the STFT is hovering around 0 or negative percent. The LTFT, however, is sitting at 32.8 and is un-moving. It has not changed at all whether I am at idle or I crank the engine up to 2500 rpm. What controls this data point? Is it the bank 1 sensor 1 A/F sensor? If so, why is there NOT a code for this part malfunctioning? Is there anything else that is not allowing ths LTFT to change its value or ??? Anyway, I could use some advice if anyone has delt with this before. Thanks!
     
  2. PriusCamper

    PriusCamper Senior Member

    Joined:
    Mar 3, 2012
    11,062
    4,504
    0
    Location:
    Pacific Northwest, USA
    Vehicle:
    2007 Prius
    Model:
    Two
    Any indication of possible damage to the 02 sensors during the job?

    There's no smell of exhaust in the engine compartment? As in you're certain the flange gasket and mounting bolts between exhaust header and catalytic converter are functioning normally?

    Also, I always like to start addressing exhaust problems by first making sure Throttle body and MAF sensor was recently cleaned, spark plugs are ok and 12 battery is disconnected so all engine settings are reset.
     
  3. dolj

    dolj Senior Member

    Joined:
    May 14, 2012
    7,628
    3,849
    0
    Location:
    Wellington, New Zealand
    Vehicle:
    2007 Prius
    Model:
    N/A
    There is no one sensor that can cause the P0171. Several sensors are read and from this data, the ECM injects the optimum fuel into each cylinder. It can only successfully do this if the data is reliable.

    I would inspect the whole airflow system from the MAF onward looking for any leaks that could be letting unmetered air in.

    Other possible areas to look at:
    • Air induction system - The injector has a blockage
    • Mass air flow meter - The engine coolant temperature sensor
    • Fuel pressure
    • Gas leakage in the exhaust system
    • Open or short in A/F sensor (bank 1 sensor 1) circuit
    • A/F sensor (bank 1 sensor 1)
    • A/F sensor heater (bank 1 sensor 1)
    • EFI M relay (integration relay)
    • PCV valve and hose - PCV hose connection
    • ECM
    This should all be in the diagnostic list you mentioned.
     
  4. mr_guy_mann

    mr_guy_mann Senior Member

    Joined:
    Sep 3, 2020
    3,434
    1,485
    0
    Location:
    NJ-USA
    Vehicle:
    2006 Prius
    Model:
    Four
    Ok, those are some great questions. So the S1 upstream Air Fuel sensor is part of the fuel control feedback loop. It measures the A/F ratio of the exhaust gases and the ECM uses that to make adjustments.

    The S1 A/F sensor has a heater and sensing cell. The ECM circuitry maintains a 300mV difference across that cell. The mixture of exhaust gas going past the sensor changes how much current is needed to keep 300mV. Normal range (at steady throttle) is usually less than +0.1 to -0.1 milliamps. Zero mA is 14.7:1 AFR (lambda of 1.0 or stoichiometric), negative current is "rich", positive current is "lean". Goes up to 2 mA on fuel cut. It can measure AFR at least 12:1 to 18:1.

    You can read the mA values if you use a scantool with a decent generic or global OBD2 function.

    Toyota engineers decided to display that current signal as a voltage. 3.3V is stoich, under is "rich", over is "lean", fuel cut is 5.0V. Normal steady throttle closed loop operation is "around" 3.3V, fluctuating by 100-200 mV or so.

    The S2 sensor is a "narrow band" Oxygen (O2) sensor. The sensing cell produces a voltage, near 1.0V at or below AFR of 14.6:1 (rich), near 0.0V at or below AFR of 14.8:1 (lean). AFAIK, the Prius only uses the S2 O2 for monitoring catalyst function - some other cars use it to tweak fuel control.

    The ECM has two mechanisms for adjustment.

    Short Term Fuel Trim is designed to keep the S1 sensor at the programmed target value (whatever that may be for the current operating conditions). If AFR is too high (lean), then STFT makes positive correction that adds fuel to base injection ontime. If AFR is too low (rich), STFT makes a negative correction that removes fuel from base injection on time. The "%" of fuel trim is the percentage amount of whatever the injector on time in milliseconds is for that particular moment. STFT is (purely) a response to the S1 sensor signal.

    Long Term Fuel Trim is designed to keep STFT near 0. If "average" STFT goes to +10%, then over time LTFT will increase to +10%, and STFT will decrease back to 0. LTFT values are stored in ECM memory, with different "fuel trim cells" for different combinations of RPM and load. Those values are cleared if you remove 12V power from the ECM.

    You add STFT to LTFT to get "total" fuel trim. +5%ST plus +7%LT equals +12% total. +3% plus -3% equals 0% total. If total trim goes above +33%, the ECM sets a P0171. If total FT goes below -30%, the ECM sets P0172.

    So you want to start looking at ECM data for clues. Get the ICE (engine) up to operating temperature , 180°F. What does S1, S2, STFT and LTFT show at idle, high idle, cruise above 40mph? (you have some of that already).

    We want to see if S1 reads normally (around 3.3V but moving some), and if S2 also reads normally (around 0.7V -ish for a healthy cat). This can tell if the ECM has "good" fuel control and if S1 or S2 is lying. A bad sensor or (even tiny) exhaust leaks near them can cause problems.

    Next is look at LTFT under different conditions. A vacuum leak has a big affect at idle, but very little effect at 65mph. So LTFT would be high +% at idle, and closer to 0% at 65. High LTFT under all conditions points towards something affecting it all the time (think MAF, biased S1, restricted injectors. low fuel pressure is possible, but is almost always a pump problem that gets worse under heavier RPM and load).

    An "easy" way to check MAF function is to operate the car under different conditions as noted in this thread (from my "known good" 06) and compare. https://priuschat.com/index.php?posts/3395501

    Posted via the PriusChat mobile app.
     
  5. PapaWill

    PapaWill Member

    Joined:
    Jan 11, 2019
    137
    25
    0
    Location:
    Maui, Hawaii
    Vehicle:
    2010 Prius
    Model:
    II
    Thanks for responding Prius Camper! I have an inflamed tendon in my leg and have been out of commission for a couple of days... I think you have a point there because I DO smell exhaust in the cabin... And I don't have a smoke tester so I sprayed some dish soap and water on the joint while the car was in maintenence mode and I did see a bit of bubbling in the region. So I need to address that.

    The 02 sensors are fine to my knowledge. The other points you made have already been addressed. What shouldn't surprise me is that the problem areas are almost always areas where I have been working on it PREVIOUSLY and something got jolted out of place or a connector malfunctions , or or or. Always have to look backwards at the previous work!

    When I am able, I will crawl under and address the minor exhaust leak. I will post when I have done so. Wish me luck!
     
  6. PapaWill

    PapaWill Member

    Joined:
    Jan 11, 2019
    137
    25
    0
    Location:
    Maui, Hawaii
    Vehicle:
    2010 Prius
    Model:
    II
    Sorry forthe duplication! I was trying to upload a photo.
    Thank YOU mr_guy_mann... I have been using data and parts from my 05 to test out and so I have that part of the process down. When i have a bit more time, I will compare data and see where the anomoly is.... if the exhaust leak does not fix the problem. Thanks again.
     
    #5 PapaWill, Oct 26, 2023
    Last edited: Oct 26, 2023
  7. PapaWill

    PapaWill Member

    Joined:
    Jan 11, 2019
    137
    25
    0
    Location:
    Maui, Hawaii
    Vehicle:
    2010 Prius
    Model:
    II
    mr-guy-man,

    Thank you for your input! I was away for 3 plus weeks and have not been able to give the ol' beast any attention. Well, I did replace the bank 1 sensor just because, and that didn't do a thing. I had a ECM laying around and tried that but that did not change the fuel trims...I then focused on the injectors since had a set laying around from another Gen 2. So I cleaned them up and installed 2 of them and lo and behold, the LTFT dropped to about 15%. That is headed in the right direction! So I installed the other 2 and now the LTFT is between 2 and 3% and the STFT hovers around 0%. My conclusion is that the injectors were "restricted" or clogged by crap and could not provide sufficient fuel to operate the engine as designed! So thank you for your input and guiding me in the right direction. This was a bit of a journey for me as I am not a trained mechanic... I do have access to ALL data which supplied about 15 different things to try.