The coolant temperature sensor can cause the first two codes (P0481 and P0118). It would also be responsible for the temperature gauge issues. From your description I would start at the connector and the wiring, that is because it seems to be an intermittent connection if the gauge works then does not and the connectors and wiring would act that way more than the sensor. Looking at the wiring there is a second connector in the harness for those that could also be an issue. The attached wiring diagram shows the sensors wiring a black wire which should go ta ground inside the PCM and a yellow wire which is a 5 volt bias feed from the PCM. Testing with a volt meter should show those.
It should not cause the P0420 or the P0171. However, those could be due to a faulty O2 sensor that is reporting the lean condition. For that you would want to watch the live data from the sensors and see if they are switching voltage like they should.
Image (Click to make bigger)
SPONSORED LINKS
Thursday, September 20th, 2018 AT 2:05 PM