Thermocouples serve a wide variety of functions inside a water heater. Because thermocouples are designed to measure temperature, they are the perfect solid-state solution to the problem of how to regulate temperature within a closed system. Thermocouples measure temperature based upon voltage.
As temperature changes within the water heater, the amount of voltage transmitted through the thermocouple changes. Thermocouples are made of metals that transmit different amounts of voltage at different temperatures, but in a predictable way. The alloys of which the thermocouples are made govern the formulas used to determine actual temperature.
Safety and Usage
Inside a water heater, a thermocouple made of a certain metal will transmit electric current at a constant rate. The temperature of the surrounding water causes this rate to change. The microcomputers inside the water heater calculate how hot the water is based upon the amount of current transmitted by the thermocouple.
When the desired temperature is reached, the heater knows to hold the water at the given temperature until it's ready for use. The primary reason for using a thermocouple instead of a normal thermostat is that the thermocouple is far more rugged and suffers less wear and tear since it's a solid state option. Thermocouples are also used in gas furnaces and water heaters as a safety mechanism.
The thermocouple is inserted into the pilot light, and as long as the flame is lit, the voltage remains constant. If the pilot flame were to go out, the temperature change would cause a voltage change, closing a safety valve that is attached to the thermocouple.
Downsides exist to using a thermocouple, as well. They are notoriously inaccurate, and finding a specific temperature can only be done within a 5- to 10-degree (F) range. However, the long-lasting abilities of the thermocouple still make them the best tool overall for the job, since they are less susceptible to corrosion, especially when made of denser metals. This cuts down on wear and tear, as well as long-term maintenance costs.