In the broadest definition, a
sensor is an object whose purpose is to detect events or changes in its environment, and then provide a corresponding output. A sensor is a type of
transducer; sensors may provide various types of output, but typically use electrical or optical signals. For example, a
thermocouple generates a known voltage (the output) in response to its temperature (the environment). A
mercury-in-glass thermometer, similarly, converts measured temperature into expansion and contraction of a liquid, which can be read on a calibrated glass tube.