Oxygen Sensors (O2) measure the oxygen content in the exhaust and send that information to the Powertrain Control Module (PCM). It uses this information to regulate the injector pulse as well as the fuel supply. The O2 Sensors have a heating element, which allows the sensor to reach a higher temperature and achieve a closed cycle in less time than it would normally take to heat the sensor in the exhaust.
The PCM provides the Oxygen Sensor with a ground circuit, in addition to a reference voltage which is usually 5 volts. Also for the sensor heater there is a cable that provides battery voltage and a ground. The reference voltage of the sensor changes according to the oxygen content in the exhaust. That variation is between 0.1 to 0.9 volts. The lower voltage being a poor exhaust and the higher voltage a rich exhaust.
If the PCM detects a signal voltage that is above the range determined by a time lapse, the Check Engine lamp will illuminate and DTC code P0152 OBDII will be set.