Check engine lights can seem mysterious. Understanding how a check engine light occurs greatly increases the likelihood of repairing the issue. Generally speaking, it’s all just voltage.
Battery voltage enters the engine control unit. Battery voltage will be about 12 volts, but may be higher or lower. In order for the computer to work accurately, it needs a steady and constant voltage supply. The computer therefore takes battery voltage and reduces it to reference voltage. Reference voltage will be much lower than battery voltage, and commonly is 5 volts
The reference voltage then enters a sensor of some kind. Based on what the sensor is seeing, it will have a varying level of resistance. A temperature sensor may increase in resistance as the temperature increases. The amount of resistance combined with the known reference voltage allows the car to calculate the sensor’s environment (temperature, throttle position, etc)
If 5 volts enter a sensor that has 2 volts of resistance, then the computer will see 3 volts as the signal voltage. The car then compares what the sensor is reading to what it expects to see. If the voltage is not within the accepted levels, a check engine light results. The process by which a car sends reference voltage to a sensor and the sensor returns a signal voltage for the computer to read is known as closed loop diagnostics. The voltage is sent out, and returned, completing a loop.
So far, it’s fairly simple. The difficulty occurs when there are multiple components working together in a loop.