A sensor is a device that detects and responds to some type of input from the physical environment. They consist of the three components: transmitter, receiver, and controllers.
Optoelectronic sensors detect objects with light from a part of the spectrum to trigger a function to control, to switch or to regulate.
Inductive proximity sensors are contactless and are triggered by a metallic object approximating to the sensing face.
Capacitive proximity sensors work contactless and detect metallic and non-metallic matters, solid or liquid.
Ultrasonic sensors work with the travel time measurement of high-frequency sonic impulses. The periodically sent impulses are reflected on the object and return as an echo to the sensor (see figure below). The integrated electronic provides the range of the object.
Magnetic switches utilized mainly with cylinders (pneumatic, hydraulic). They are contactless proximity switches based on reed contacts or fully electronic sensors (Hall, AMR, and GMR).
In addition to the above, numerous other sensor types are available. Many use the technology of the above sensors but are packaged for a special function or application.