Proximity switches open or close an electrical circuit when they make contact with or come within a certain distance of an object. They are most commonly used in manufacturing equipment, robotics, and security systems. There are four basic types: infrared, acoustic, capacitive, and inductive.
Infrared proximity switches work by sending out beams of invisible infrared light. A photodetector on the switch detects any reflections of this light, which allow the device to determine whether there is an object nearby. As a switch with just a light source and photodiode is susceptible to false readings due to background light, more complex models modulate the transmitted light at a specific frequency and have receivers which only respond to that frequency. Even more complex sensors are able to use the light reflected from an object to compute its distance from the sensor.
Acoustic proximity sensors are similar in principle to infrared models, but use sound instead of light. They use a transducer to transmit inaudible sound waves at various frequencies in a preset sequence, then measure the length of time the sound takes to hit a nearby object and return to a second transducer on the switch. Essentially, acoustic proximity switches measure the time it takes for sound pulses to "echo" and use this measurement to calculate distance, just like sonar.
Capacitive switches sense distance to objects by detecting changes in capacitance around it. A radio-frequency oscillator is connected to a metal plate. When the plate nears an object, the radio frequency changes, and the frequency detector sends a signal telling the switch to open or close. These switches have the disadvantage of being more sensitive to objects that conduct electricity than to objects that do not.
Inductive proximity switches sense distance to objects by generating magnetic fields. They are similar in principle to metal detectors. A coil of wire is charged with electrical current, and an electronic circuit measures this current. If a metallic part gets close enough to the coil, the current will increase and the switch will open or close accordingly. The chief disadvantage of this type is that they can only detect metallic objects.
Proximity switches are used in manufacturing processes, to measure the position of machine components, for example. They are also used in security systems, in applications such as detecting the opening of a door, and in robotics, where they can monitor a robot or its components' nearness to objects and steer it accordingly.