A thermoelectric device creates voltage when there is a different temperature on each side. Conversely, when a voltage is applied to it, it creates a temperature difference. At the atomic scale, an applied temperature gradient causes charge carriers in the material to diffuse from the hot side to the cold side. Thermoelectric effect can be used to generate electricity, measure temperature or change the temperature of objects. Because the direction of heating and cooling is determined by the polarity of the applied voltage, thermoelectric devices can be used as temperature controllers.