There are many situations where a sensor is required to detect the presence of some object. The sensor used in such situations can be a mechanical switch, giving an on-off output when the switch contacts are opened or closed by the presence of an object. Figure 1.18 illustrates the forms of a number of such switches.