How do thermostatic expansion valves (TEVs) detect superheat in the gas leaving the evaporator?

Thermostatic expansion valves (TEVs) detect superheat in the gas leaving the evaporator through a built-in mechanism that senses the temperature of the gas. This mechanism is typically a bulb or a sensor that measures the temperature of the gas and compares it to the setpoint temperature. Based on this measurement, the TEV adjusts the flow of refrigerant to maintain the desired superheat.