Photoelectric sensor types explained: through-beam, retroreflective, diffuse and background suppression
A practical guide to the core photoelectric sensing principles, through-beam, retroreflective, diffuse and background suppression, covering range, reliability, target and surface dependence, light source choice, output options and how to pick the right one for your application.
How photoelectric sensors work, and why the principle matters
A photoelectric sensor detects the presence, absence or distance of an object by emitting light, usually from an LED or laser diode, and measuring how that light returns to a photodetector. The electronics modulate the emitted light at a known frequency so the receiver can reject ambient light (sunlight, factory lighting, welding flash) and respond only to its own signal. When the received signal crosses a threshold, the sensor switches its output. That is the entire concept; almost everything else is geometry.
The geometry is what separates the main families. In a through-beam arrangement the emitter and receiver sit in separate housings facing each other, and the object is detected when it interrupts the beam. In retroreflective sensing, emitter and receiver share one housing and the light makes a round trip to a passive reflector; the object is detected when it breaks that return path. In diffuse sensing there is no reflector at all, and the sensor relies on light scattered back from the surface of the target itself. Background suppression is a refined diffuse variant that adds positional optics so the sensor responds to where the light comes back from, not merely how much comes back.
Two performance concepts underpin every selection decision. Excess gain (often called margin) is the ratio of received light to the minimum needed to switch; you want generous excess gain so the sensor keeps working as lenses get dusty, alignment drifts and targets vary. Hysteresis is the gap between the on and off thresholds that prevents output chatter when a target sits near the switching point. A sensor can be optically capable yet unreliable in the field if it is installed with thin margin, and the principle you choose largely sets how much margin you start with.
Through-beam: maximum range and reliability
Through-beam (also called opposed-mode or transmitted-beam) places a separate emitter and receiver on opposite sides of the detection zone. Because the light travels one way and only has to reach the receiver, rather than make a reflected round trip, through-beam delivers the longest ranges of any photoelectric type, commonly from a fraction of a metre up to tens of metres, and the highest excess gain. That large margin is the real prize: it tolerates dust, oil mist, condensation and lens contamination far better than reflective principles, which is why through-beam dominates harsh and long-distance applications.
Detection does not depend on the target's colour, gloss, texture or angle, because the object simply has to block the beam. A matte black part and a polished chrome part interrupt the beam identically. This makes through-beam the most reliable choice for objects with widely varying surfaces and the go-to for position detection on fast lines where you cannot guarantee a consistent face toward the sensor. The main drawbacks are mechanical: you must mount, wire and power two housings on opposite sides, and you must align them, which becomes finicky at long range or with small targets.
Through-beam also handles edge cases other types struggle with. With a small effective beam it resolves small parts, and a precise laser through-beam can detect sub-millimetre objects or thin wires. Transparent objects are the notable exception: clear glass, PET and film pass most of the light, so an ordinary through-beam may not see enough attenuation to switch. For reliable clear-object detection, look specifically at sensors built for transparent targets, whether through-beam with tightened thresholds or dedicated clear-object retroreflective models, rather than assuming any through-beam will catch a transparent part.
- Best for: long range, dirty or wet environments, objects of any colour or finish, small or fast parts.
- Strengths: highest excess gain and reliability, colour and shine independent, longest range, sharp switching.
- Weaknesses: two housings to mount, wire and align; higher install cost; alignment effort grows with distance.
- Watch out for: transparent targets (use a clear-object variant), and keep both heads mechanically stable so alignment does not drift.
Retroreflective: one head, a reflector, and a conveyor-friendly compromise
Retroreflective sensing keeps the emitter and receiver in a single housing and bounces the beam off a passive corner-cube reflector or reflective tape mounted opposite. The object is detected when it interrupts the beam on its way to or from the reflector. This single-sided design is the practical win: you power and wire only one device, and the passive reflector needs no electrical connection, which simplifies installation on conveyors, doorways and machine guards compared with through-beam.
Range sits between through-beam and diffuse, typically up to several metres, and reliability is good but lower than through-beam because the light makes a round trip, roughly halving the available margin and making the sensor more sensitive to dirt on the lens or reflector. The classic failure mode is shiny targets: a polished or mirror-like object can reflect enough light straight back to mimic the reflector, so the sensor never sees the beam break. The standard remedy is a polarised retroreflective sensor, which uses crossed polarising filters together with a corner-cube reflector that rotates the polarisation of the returned light. The sensor accepts the rotated light from the reflector but rejects light from a flat shiny object, which largely preserves the original polarisation; this is essential when detecting metal cans, foil packs or glossy film.
Retroreflective is the natural fit for detecting objects crossing a known line, counting boxes on a conveyor, sensing pallets or confirming a gate is clear, where you can place a reflector and need consistent triggering without two-sided mounting. For transparent containers there are dedicated clear-object retroreflective sensors that combine polarisation with fine threshold control to catch the small dip in returned light as a PET bottle or glass passes.
- Best for: conveyors, gates and medium-range presence detection where two-sided mounting is impractical.
- Strengths: single wired head plus passive reflector, easy alignment, good range, lower cost than two-sided through-beam.
- Weaknesses: roughly half the margin of through-beam; shiny targets can fool a non-polarised version; the reflector is one more part to keep clean and aligned.
- Specify: polarised models for glossy or metallic targets; clear-object variants for transparent containers.
Diffuse (reflective): convenient short range, but surface-dependent
Diffuse-mode sensors, sometimes called reflective or proximity sensors, place the emitter and receiver in one housing and detect the light scattered back from the target itself, with no reflector required. That makes them the simplest to install: one device, one cable, pointed at where the object will appear. The convenience is real, but it comes with the principle's defining weakness, the amount of returned light depends heavily on the target's colour, gloss, surface texture and the angle it presents. A bright white card returns far more light than a matte black part at the same distance, so the effective switching distance is not a fixed number but a function of the target.
This surface dependence creates two notorious failure modes. First, sensing range collapses on dark or low-reflectivity targets: a sensor that reliably detects white paper at a given distance may only see a black rubber part at a fraction of that distance. Second, and more dangerous, is false triggering from the background, if a bright wall, shiny machine frame or another conveyor sits behind the target, a plain diffuse sensor can latch onto the background and never report the gap when a dark object passes in front of it. Because the threshold is purely amplitude-based, the sensor cannot tell a near dark object from a far bright background.
Plain diffuse therefore earns its place where the target is consistent and the background is far away or non-reflective: detecting a known product on an open fixture, confirming a fill level against open space, or short-range presence checks where you control what the sensor can see. It is the cheapest and easiest principle and entirely adequate when the optical scene is predictable, but it is the wrong tool the moment you have mixed target colours or a close, bright background. That is precisely the gap background suppression was created to close.
- Best for: short range, a consistent target, no reflector possible, controlled or distant background.
- Strengths: lowest cost, simplest single-sided install, no reflector to mount.
- Weaknesses: range varies with target colour, shine and angle; can false-trigger on bright backgrounds; least predictable principle.
- Avoid when: targets vary widely in reflectivity, or a shiny or bright surface sits just behind the detection point.
Background and foreground suppression: distance-based, colour-independent switching
Background suppression (BGS) solves the diffuse sensor's amplitude problem by switching on distance instead of brightness. Optically it uses triangulation: the returned light lands on a position-sensitive element, typically a two-segment photodiode or a PSD, and the angle at which the light arrives corresponds to the object's distance. A fixed or adjustable cutoff defines the switching distance, objects nearer than the cutoff are detected, and anything beyond it, the background, is ignored, largely regardless of how reflective each surface is. This is why BGS reliably detects a black part in front of a white wall: the geometry, not the amount of light, decides the output.
The colour independence is strong but not absolute. Very dark or specular targets return little usable light, and steeply angled glossy surfaces can deflect the spot away from the receiver, so manufacturers still quote a black/white range difference, just a far smaller one than plain diffuse. Foreground suppression (FGS) is the mirror image of the same triangulation principle: it detects objects beyond a set distance and ignores anything closer, which is useful when a near object, such as a guard rail or the edge of a chute, would otherwise trigger the sensor.
Because BGS depends on where the spot lands, a small, well-defined spot matters, which is one reason laser-based BGS sensors are used for small parts and tight cutoffs. The trade-offs versus plain diffuse are shorter maximum range and higher cost, but for mixed-colour parts, close backgrounds or precise edge detection on a conveyor, that is usually a price worth paying.
- Best for: mixed-colour or mixed-finish parts, a close or bright background, and precise short-range presence or edge detection.
- Strengths: switching distance largely independent of target colour and reflectivity; rejects the background by geometry.
- Weaknesses: shorter range and higher cost than plain diffuse; very dark or steeply angled glossy targets still reduce performance.
- Related: foreground suppression (FGS) inverts the rule, ignoring objects closer than the set distance.
Light source: red, infrared and laser
The emitter wavelength and beam shape are a real engineering choice, not a detail. A visible red LED produces a spot you can see, which makes through-beam and retroreflective alignment far easier and helps you confirm exactly where the sensor is looking; this convenience is why visible red is the default for most general-purpose sensing. Infrared emitters are efficient and slightly more tolerant of light contamination such as dust films, and their invisible beam avoids distracting operators, but you lose the visible spot, so alignment relies on signal-strength indicators instead.
Laser sources give a very small, well-collimated spot with a long, stable working range. That precision is what you want for detecting tiny parts, thin wires or fine edges, and for the tight triangulation that background-suppression and distance-measuring sensors rely on. The cost is a more demanding alignment and the usual eye-safety classification to observe during installation.
Wavelength interacts with the target and the contaminants in the air, but no light source overcomes a fundamentally unsuitable principle. If a diffuse sensor is fooled by a bright background, switching from red to infrared will not fix it; moving to background suppression will. Choose the principle first, then pick the light source that best supports alignment, spot size and the working environment.
- Visible red LED: easy alignment with a visible spot; the general-purpose default.
- Infrared LED: efficient and a little more tolerant of light contamination; invisible beam needs signal-strength alignment.
- Laser: small precise spot, long stable range; ideal for tiny targets and tight triangulation, with eye-safety classes to respect.
Outputs, switching logic and a reliable install
The detection principle gets the right light to the receiver; the output and switching configuration turn that into a signal your controller can trust. Discrete sensors are specified as PNP (sourcing) or NPN (sinking) to match the PLC input card, and as light-on (output active when the receiver sees light) or dark-on (output active when the beam is blocked). For a through-beam guarding a gap, dark-on usually means object present; for a diffuse sensor watching for a returned signal, light-on usually means object present. Getting this pairing right at design time avoids inverted logic surprises during commissioning.
Many modern sensors add IO-Link, which carries the switching state plus diagnostics, remaining margin, contamination warnings and parameter settings, over the same three-wire cable. That turns a binary sensor into a device you can configure and monitor from the controller, recover automatically after a swap, and watch for a slowly fouling lens before it causes a line stop. Response time is the other electrical specification that matters: a sensor must switch fast enough that a part moving at line speed is still in the beam when the output is read, so check the minimum object presence time against the rated response time, not just the catalogue range.
Whatever the principle, the install discipline is the same. Start with generous excess gain so dust, drift and target variation do not eat your margin, keep lenses and reflectors clean and accessible, and mount heads rigidly so vibration cannot walk the alignment off a small target. Where a sensor watches a moving line, confirm the response time and trigger timing against the actual part speed. A well-chosen principle installed with thin margin or sloppy mounting will still fail; a modest sensor installed with healthy margin and stable optics tends to run for years.
- Match the output type to the controller: PNP/NPN, and light-on vs dark-on for the correct active state.
- Prefer IO-Link where you want remote setup, margin and contamination diagnostics, and fast recovery after a swap.
- Check response time against minimum object presence time at full line speed, not just the rated range.
- Engineer in margin: generous excess gain, clean optics and rigid mounting outlast a clever principle installed carelessly.
Frequently asked questions
Related categories
- Photoelectric sensors
- Industrial sensors
- Laser measurement sensors
- Contrast and color sensors
- Vision sensors
Related guides
How to choose machine vision lighting
A practical guide to choosing machine vision lighting: geometry, wavelength, strobe vs continuous, ambient control and how to maximise feature contrast for reliable inspection.
Smart camera vs PC-based vision
How to choose between all-in-one smart cameras and PC/embedded vision with a separate camera, based on inspection complexity, throughput, flexibility, AI needs and total cost of ownership.
How to choose an industrial camera
A practical, application-first method for selecting an industrial camera: derive resolution from field of view and smallest detail, then match shutter, speed, interface, lens and lighting.