Trouble code p0140 indicates a problem with the oxygen sensor circuit
pertaining to the second oxygen sensor located on Bank 1 (this is the side
of the engine where cylinder number one is on). Trouble code P0141 indicates
a problem with the heater circuit of the same oxygen sensor. The oxygen
sensor is the main component responsible for letting the your car's
emissions computer know how much fuel is in the exhaust system at any given
moment. The Oxygen Sensor sends an electrical signal to the ECU, letting the
computer determine exactly how much fuel it should continue to deliver to
the combustion chambers. If for any reason the 02 sensor (oxygen sensor)
does not send accurate information to the computer or it is "lazy" in
sending the correct signals, the fuel delivery program can be altered. The
computer may then present either too much or not enough fuel to the
combustion chambers and therefore cause an emission failure.
These trouble codes are pretty straight forward and should not be hard to
diagnose. It sounds like a simply disconnected oxygen sensor harness, or in
the worst case scenario, a melted and defective oxygen sensor
connector/harness.
A smog check repair station should not have a hard time identifying this
failure. As far as what causes your car to fail the smog check... that's
simple. Your car is hooked up to the smog machine during the smog inspection
and the trouble codes in your car's computer are relayed to the smog
machine. Soon as the smog machine notices a trouble code it automatically
fails your car.