Photoelectric and Vision Sensors

Through-beam, retro-reflective and diffuse sensors, excess gain, background suppression, laser sensors, color and vision.

How photoelectric sensors work

A photoelectric sensor sends out light and watches the light that returns. An emitter (an LED, usually infrared or red, or a laser diode) sends a modulated beam; a receiver (a photodiode or phototransistor) detects it. The beam is modulated at a few kilohertz so that the receiver ignores steady ambient light, and an object is detected when it changes the amount of light reaching the receiver. Range is far greater than for the sensors in Proximity Sensors: from millimeters to tens of meters, and the target can be almost anything.

The sensing modes

Photoelectric sensing modesThrough-beamEmitterReceiverobject breaks the beamRetro-reflectiveEmitter andreceiverreflectorobject blocks the returning beamDiffuse (proximity)Emitter andreceiverlight reflects from the object itselfrange: up to 60 m or moretwo units, wired apartrange: up to 10 to 15 mone unit and a reflectorrange: a few cm to about 1 mone unit; depends on the object
The three basic photoelectric modes.
ModeOutput switches when…RangeStrengthsWeaknesses
Through-beamAn object interrupts the beamUp to 60 m or moreLongest range and most reliable; works with dirty lenses; detects small objectsTwo units to mount and wire; alignment
Retro-reflectiveAn object interrupts the beam to a reflectorUp to 10 to 15 mOne unit, one cable; easy alignmentShiny objects can look like the reflector (use polarization)
Diffuse (proximity)An object reflects light back to the sensorUp to about 1 mOne unit, no reflector, simpleDepends on the color, finish and angle of the object; the background may reflect

Excess gain and contamination

Excess gain is the amount of light reaching the receiver divided by the minimum needed to switch it. A value of 1 is the point where the sensor just switches; the higher it is, the more reserve against dirt on the lens, mist, aging of the LED and slight misalignment. For a through-beam or retro-reflective sensor the received light falls with the square of the distance, so the excess gain is approximately (rated range ÷ distance)².

Excess gain against distance (schematic)1%10%100%0.11 (limit)10100100010000distance (percent of the maximum range)excess gainexcess gain 100 at 10 percent of rangeUse the sensor at a distance where the excess gain is well above 1, so that dirt, aging and misalignment do not stop it working.
Excess gain against distance on logarithmic axes: it falls with the square of the distance.
EnvironmentExcess gain wanted (typical)Examples
Clean air1.5Clean room, packaging in a clean building
Slightly dirty5Dust, light oil mist, lenses wiped now and then
Moderately dirty10Machine shop, food plant, regular cleaning
Very dirty50Paper dust, heavy smoke or steam, no cleaning

Worked example: choosing the rated range

  • A through-beam pair rated for 20 m is used at 5 m: the excess gain is (20 ÷ 5)² = 16, excellent. At 10 m it is (20 ÷ 10)² = 4, still fine for a moderately dirty place.
  • A machine in a dirty workshop needs an excess gain of 10 at 6 m. The rated range must be at least 6 × √10 = 19.0 m: choose a 20 m through-beam sensor, not a 10 m one.
  • The same rule shows why a sensor at the very end of its range fails as soon as the lens needs cleaning.

Diffuse sensors: color, background and foreground

A diffuse sensor relies on the light reflected from the target itself, so its range depends strongly on how reflective the target is. The rated range is given for a standard white test card (90 percent reflectance); a black matt surface reflects only about 6 percent, and glossy or angled surfaces can reflect the light away.

Worked example: white against black

The received signal is proportional to the reflectance divided by the square of the distance, so for the same signal the range scales with √(reflectance). A sensor with a 300 mm range on the white card (90 percent) reaches only 300 × √(6 ÷ 90) = 77 mm on a black target (6 percent). Setting the sensitivity on a white part and then running black parts is the commonest reason for a diffuse sensor that “misses”. Use the data-sheet curve for the actual colors.

  • Background suppression (BGS) uses triangulation: two receivers (or a position-sensitive detector) measure the angle of the returned light, so the sensor ignores anything beyond a set distance, whatever its color. It detects a dark object in front of a bright background and is far less dependent on color.
  • Foreground suppression ignores anything nearer than a set distance, for example a conveyor belt surface or a guard.
  • Convergent beam (fixed-focus) sensors concentrate the light at a point and detect only objects at that distance: good for small parts and for ignoring the background.
  • Wide-beam sensors detect objects with holes or an irregular shape and handle a loose position, with less precision.

Retro-reflective sensors and polarization

A retro-reflective sensor sends light to a corner-cube reflector, which returns it exactly along the same path, so the sensor has to be aligned only roughly. A shiny object can reflect enough light to fool a plain sensor: a polarized retro-reflective sensor puts a polarizing filter in front of the emitter and a perpendicular one in front of the receiver, and uses a reflector that rotates the polarization by 90°. Only the reflector’s light reaches the receiver, a mirror-like object (which preserves the polarization) does not.

  • Reflectors: size and quality set the range; keep them clean and use a large one at long range. A reflector tape works for short ranges.
  • Clear objects: glass and clear plastic (bottles, film) need a special sensor (clear-object detection), which uses a polarized beam and a high-sensitivity setting.
  • Range figures in data sheets are for a standard reflector, and the range is shorter with a smaller one.

Fiber optics, laser, color and contrast sensors

TypeWhat it doesTypical use
Fiber-optic sensorsGlass or plastic fibers bring the light to a tiny head; the amplifier sits elsewhereSmall spaces, high temperature, very small objects, harsh environments
Laser sensorsA visible, narrow laser spotSmall parts, precise edges, long range, easy aiming (note the laser class)
Laser distance (triangulation or time of flight)Measures the distance to the surface, analog outputThickness, height, level (see Position, Displacement and Speed Sensors)
Color sensorsCompare the red, green and blue content of the reflected light with taught valuesSorting, checking the right label or product
Contrast / mark sensorsDetect a printed mark against its backgroundRegistration marks on packaging film
Luminescence sensorsDetect fluorescent or UV-reactive marks or glueAdhesive checks, security marks
Light curtains and gridsMany beams in a rowMeasuring and counting objects; a safety light curtain is a different, certified device (see Safety Sensors and Devices)

Vision sensors and cameras

A vision sensor is a small camera with a processor and ready-made inspection tools (find, measure, count, read a code or text, compare with a taught image). It is the choice when a simple beam cannot tell good from bad: presence of several features, positions and orientations, print quality, codes. The three things that matter most are the lighting (a good light and a stable background are half the job), the optics, and the resolution.

Worked example: resolution for a defect

A 1 280-pixel-wide sensor looks at a field of view of 100 mm: each pixel covers 100 ÷ 1 280 = 0.078 mm. To find a defect of 0.4 mm the rule of thumb is to have at least three to five pixels across it: 0.4 ÷ 0.078 = 5.1 pixels, which is just enough. A wider field of view or a smaller defect would need a higher-resolution camera or two cameras.

  • Lighting: backlight for silhouettes, ring light for surfaces, dome light for shiny parts, dark-field for scratches. Control or exclude ambient light.
  • Triggering: a photoelectric sensor usually triggers the image so that the part is in the same place every time.
  • Output: pass/fail to a PLC input, or data over Ethernet (EtherNet/IP, PROFINET) with the measured values (see Industrial Ethernet).
  • 2-D, 3-D and smart cameras: a smart camera runs the application itself; a PC-based system gives more power and flexibility; 3-D sensors measure height with structured light or lasers.

Speed, ambient light and outputs

  • Response time and frequency: typically 0.1 to 1 ms for a standard sensor (500 to 5 000 Hz) and less for special ones. With a response time of 1 ms in each direction the maximum switching rate is 1 ÷ (2 × 1 ms) = 500 Hz.
  • Smallest object and speed: for an object of length L moving at v, the pulse lasts L ÷ v: a 3 mm object at 1 m/s gives a pulse of 3 ms, so the sensor and the PLC input must respond in under about a third of that.
  • Ambient light: modulated light and filters make sensors immune to normal lighting, but direct sun, welding flash and some LED or fluorescent lights can cause false switching: shield the sensor or use a narrower beam.
  • Outputs: PNP or NPN (see Sensor Outputs and Wiring), relay, analog, IO-Link. Light-on (the output is on when light is received) and dark-on (on when it is blocked) are usually a selectable setting.
  • Fail-safe wiring: use the output that is on in the healthy state (dark-on for a beam normally uninterrupted, for example) so that a broken wire or a failed sensor looks like a detection, not an absence.

Choosing a mode

SituationUseWhy
Long distance or dirty environmentThrough-beamHighest excess gain
One side only, medium distancePolarized retro-reflectiveA single unit, tolerant of shiny objects
Close range, any colorBackground suppressionIgnores the background and the color
Tiny parts or tight spacesFiber-optic or laserSmall spot and head
Transparent objectsClear-object retro sensor or through-beam with high sensitivitySpecial optics
Features, codes or qualityVision sensorBeam sensors cannot judge
Metal parts at a short range in a dirty placeInductive sensor (see Proximity Sensors)Immune to dirt and light

Troubleshooting

SymptomLikely causeCheck
Intermittent or lost detectionDirty lens, misalignment, too little excess gainClean; re-align; check the margin (rated range ÷ distance)²
Detects white but not black partsDiffuse sensor with the sensitivity set on a white targetUse background suppression, or set the sensitivity on the darkest part
Always onBackground or conveyor reflects, a shiny object in a retro sensorUse BGS or a polarized retro sensor; angle the sensor
Two neighboring sensors disturb each otherCross-talk between beamsDifferent frequencies or channels, physical shielding, change the geometry
False triggers in bright lightSunlight or flash into the receiverA shade, a narrower field of view, a laser sensor
Works at the bench, fails on the machineVibration moves the sensor, dust, steam or oil mistRigid bracket, higher gain margin, air purge on the lens

Related

FAQ

Why does my diffuse sensor stop detecting dark objects?

Dark objects reflect far less light (about 6 percent against 90 percent for white), so the range falls to roughly a quarter. Use background suppression, a sensor with a longer rated range, or a through-beam arrangement.

What does “light-on” and “dark-on” mean?

Light-on: the output is on when the receiver sees light. Dark-on: the output is on when the beam is blocked. Choose according to the logic you need and the fail-safe behavior.

Do I need an air purge?

In dusty, steamy or oily places a small stream of clean air across the lens keeps it clear and greatly cuts maintenance, if the air supply is clean and dry.

Is a laser sensor always better?

Not always. It has a small, precise spot and long range, but the light is more sensitive to a surface’s finish and a laser class label applies. A standard LED sensor is more forgiving for large objects.

References

  • Banner Engineering, Handbook of Photoelectric Sensing (excess gain tables and sensing-mode guidance).
  • Sick and Pepperl+Fuchs, Photoelectric sensors technical guides; Keyence, Vision and laser sensor guides.
  • IEC 60947-5-2, Low-voltage switchgear: proximity devices; IEC 60825-1 (laser product classes).

Last reviewed: October 2026. Ranges and reflectances are typical; always use the manufacturer’s data and curves for the real sensor and target.