Infrared proximity switches work by sending out beams of infrared invisible light. A photodetector on the switch determines if there are any objects nearby by detecting any reflection of the beam of light that was sent out. However, due to background light, a switch with only a light source and photodiode is susceptible to inaccurate readings. For that reason, more complex models modulate the transmitted light at a specific frequency and have receivers that only respond to said frequency.
Models that are even more complex can use the light reflected from an object to compute its distance from the sensor. In principle, acoustic proximity switches are similar to infrared switches, but instead of light, they use sound. Acoustic switches work by using a transducer to transmit inaudible sound waves at various frequencies in a preset sequence. Then, they measure the length of time the sound takes to hit a nearby object then return to a second transducer on the switch.
Essentially, acoustic switches are employing echolocation, a practice similar to sonar, used in nature by bats and dolphins. Capacitive proximity switches sense distance to objects by detecting changes in surrounding capacitance. A radio-frequency oscillator is connected to a metal plate, and its frequency changes when the plate nears an object.
When this change takes place, the frequency detector sends a signal telling the switch to open or close. Finally, inductive proximity switches sense distances to objects by generating magnetic fields, similar in this way, to metal detectors. To function, a wire coil is charged with an electrical current, which is measured by an electronic circuit. If a metallic part gets close enough to the coil, the current will increase and the switch will open or close accordingly.
Proximity switches are used primarily in manufacturing processes and equipment, robotics and security systems. For example, proximity switches may measure the position of machine components, detect the opening of a door or monitor a robot or its components proximity to an object, and steer it accordingly.