A light source and photosensor combine for effective, reliable, non-contact proximity detection of nearby objects.
Part 1 of this article looked at the principles and three basic approaches to optical proximity sensing, also called photoelectric sensing. This part looks at physical implementations of the system, input/output specifics, and other considerations.
Q: Is this a relatively new form of non-contact proximity sensing?
A: Actually, it’s the oldest. As soon as photosensitive and photoconductive sensors, along with basic electrical components, were available, light was used for this type of sensing. However, it was a difficult proposition as the light source was an incandescent bulb. The illumination from this bulb needed complicated lenses to focus it on a target. Also, the light was always on and could not be modulated (incandescent bulbs have a very long thermal time constant), so the ambient light easily overwhelmed and added noise to the sensor path.
Q: Has photoelectric-based proximity sensing always involved electronics?
A: Not necessarily. Units with incandescent bulbs easily use very simple components, such as circuitry, to create an on/off switch action and closure via a relay. This relay output was used for basic operations, such as driving an electromechanical counter that could indicate, for example, how many bottles had passed on a production line. This is very crude by today’s standards, but it is all that was possible given the technology.
Q: What has changed?
A: Almost everything has changed except the underlying physics principles. First, photosensors and the associated electronics have improved and advanced with more effective sensors and electronics. At the same time, LEDs and even low-cost laser-diode sources were developed; these could be controlled and modulated via pulsing to differentiate their output from ambient light; also, the laser sources have much less dispersion (spread) and could be more easily aimed at a target.
Note that one of the unforeseen benefits of LEDs and laser diodes is not just that they are efficient light sources. Still, they can be easily modulated at rates of tens of hertz into megahertz and even gigahertz rates. This opens up a vast range of new design options.
The majority of photoelectric sensors use pulse-modulated light that emits light as a stream of pulses. This steam can be used to sense objects located some distance away because the effects of external light interference are easily ignored and removed with this system. In models with mutual interference protection, the emission cycle is varied within a specified range to handle coherent and external light interference.
Q: What is in a complete, ready-to-use proximity sensor?
A: Most are housed in small rectangular housings with basic circuitry, as shown in Figure 1. The light source and light sensor are co-packaged (except for units designed for through-beam use), and the electrical connections are basic power, output signal, and ground.

Q: What does the electrical output of a unit look like?
A: There are many options. Units are available with choices to match the needs of the input circuitry at the load that the optical output is driving. That unit is usually a programmable logic controller (PLC), a processor-based controller, or even an “Arduino-type” programmable unit.
Q: What are the output choices?
A: First, there’s the change in signal sense upon actuation, summarized in Figure 2. There are two operating modes: dark operation (DO) and light operation (LO). “Dark operate” is an operating mode in which the load is energized when light from the emitter is absent from the receiver. In contrast, “light operate” is an operating mode in which the load is energized when light from the emitter reaches the receiver.

Q: Those are two modes; are there others?
A: Yes, these relate to whether the sensor output is configured as a current source or sink. The appropriate choice depends on what the unit being driven by the sensor output needs to see, as shown in Figure 3. In every situation where a current flows between two devices, one of the devices will source the current while the other will need to sink it.

When current flows from Device #1 (sensor output) to Device #2 (PLC or other input), we say that Device #1 is sourcing the current, and Device #2 is sinking the current. If the current flows from Device #2 to Device #1, then Device #2 is sourcing the current while Device #1 is sinking the current.
Q: Which is better: current source or current sink?
A: While their attributes differ, neither is a clear winner. Some system designers prefer one over the other due to the different implications during faults such as an output short circuit. Still, preference is mostly a matter of historical custom. Many modern sensor units can be set to LO or DO mode and source versus sink mode via small switches on the unit or a communications port.
Q: Are these units offered in industry-standard rectangular packages?
A: While standard sizes are available, many non-standard packages accommodate different installation constraints. For specialty applications where space is extremely limited, the light source and sensor may be in separate, slim cylinder housings (usually threaded to facilitate mounting), with the bulk of the electronics located a short distance away.
Q: While photoelectric proximity sensing is simple in concept, there are undoubtedly real-world complications due to issues such as background interference, nearby objects, and other issues. What is done to deal with these?
A: Solutions are available using different physical arrangements, such as angling the source and sensors for distance triangulation, using multiple sensors, polarizing the emitted light beam, and other techniques. The use of various background suppression (BGS) techniques greatly minimizes any background object (such as the conveyor) beyond the set distance from being detected; the complementary foreground suppression (FGS) technique prevents objects closer than the set distance or objects that reflect less than a specified amount of light to the receiver from being detected.
Q: Who makes these off-the-shelf optical proximity units?
A: The list of vendors who design and build (not just re-label and re-sell) these units is very long, as they are among the most widely used proximity sensors. Some vendors offer highly specialized units optimized for one application (for use in extreme heat or dust, for example), while others offer a broad range of general-purpose units that can be tailored as needed. Some units offer different LED/laser diode outputs with a choice of wavelengths to better match application requirements.
Q: Given the advances in components, circuitry, and software, what does a latest-generation unit look like? What can it do?
A: Today’s state-of-the-art photoelectric proximity sensors incorporate features that make set-up easy while implementing algorithms that minimize false detection and non-detection. For example, the W10 from SICK GmbH (Germany) is an 18 mm × 57 mm × 42.2 mm unit in a stainless-steel housing rated for IP67/IP69 ruggedness, as shown in Figure 4.

It uses a red visible laser and includes a small integral touch screen to ease user setup of its many features, functions, and options. Among these features are ranges of 25 mm to 400 (or extended to 700) mm, a laser-triangulation system with line scanning for greatly improved accuracy, and easily observed in-zone/out-of-zone indicator LEDs. Other features include the availability of various types of foreground and background suppression, choice of source/sink and light/dark output modes, multiple learning modes, and dynamic algorithm tuning. Despite all these features, this compact unit’s connection to the PLC or controller uses an industry-standard 4-pin M12 connector.
Conclusion
Optical proximity sensors are, to use a cliché, a workhorse for countless industrial and commercial applications. While they have been successfully used for decades, modern sensor technology, advanced electronics, and embedded algorithms have raised their performance levels and capabilities while easing installation and interfacing.
While nearly all of these use a simple electrical interface, the industry also wants to incorporate the relatively new single-pair (two-wire) Ethernet standard. The importance of this type of sensing is clear from the many excellent online references which cover principles, installation, variations, use, and advanced hardware and algorithms.
References
SICK GmbH, “W10 Photoelectric proximity sensor”
Dynamic Measurement and Control Solutions LLC, “Exploring the Different Types of Proximity Sensors: Object Detection”
Omron Corp., “Photoelectric Sensors”
Automation.com, “Fundamentals of Photoelectric Sensors”
RealPars B.V., “Sinking and Sourcing PLC Inputs | What is the Difference?”
RealPars B.V., “Sinking and Sourcing: Which Connection Is Best for Your PLC?”
RealPars B.V., “Photoelectric Sensor Explained (with Practical Examples)”
GEYA Electrical Equipment Supply, “Proximity Sensor Types & Applications: The Ultimate Guide”
Machine Design, “Proximity sensors compared: Inductive, capacitive, photoelectric, and ultrasonic”
Softnoze, “Photoelectric Sensors Theory of Operation”
Balluff Inc, “Industrial sensing fundamentals – NPN vs PNP”
Related EE World content
IP67-rated USB type-A cable assemblies designed for IoT applications
What are submersible sensors?
Analyzing different proximity sensor technologies
Light Sensor Optimizes In Proximity
What is Single-Pair Ethernet and PoDL?
What is an open drain?