Photoelectric and Vision Sensors
Through-beam, retro-reflective and diffuse sensors, excess gain, background suppression, laser sensors, color and vision.
On this page
- How photoelectric sensors work
- The sensing modes
- Excess gain and contamination
- Diffuse sensors: color, background and foreground
- Retro-reflective sensors and polarization
- Fiber optics, laser, color and contrast sensors
- Vision sensors and cameras
- Speed, ambient light and outputs
- Choosing a mode
- Troubleshooting
- FAQ
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
| Mode | Output switches when… | Range | Strengths | Weaknesses |
|---|---|---|---|---|
| Through-beam | An object interrupts the beam | Up to 60 m or more | Longest range and most reliable; works with dirty lenses; detects small objects | Two units to mount and wire; alignment |
| Retro-reflective | An object interrupts the beam to a reflector | Up to 10 to 15 m | One unit, one cable; easy alignment | Shiny objects can look like the reflector (use polarization) |
| Diffuse (proximity) | An object reflects light back to the sensor | Up to about 1 m | One unit, no reflector, simple | Depends 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)².
| Environment | Excess gain wanted (typical) | Examples |
|---|---|---|
| Clean air | 1.5 | Clean room, packaging in a clean building |
| Slightly dirty | 5 | Dust, light oil mist, lenses wiped now and then |
| Moderately dirty | 10 | Machine shop, food plant, regular cleaning |
| Very dirty | 50 | Paper 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
| Type | What it does | Typical use |
|---|---|---|
| Fiber-optic sensors | Glass or plastic fibers bring the light to a tiny head; the amplifier sits elsewhere | Small spaces, high temperature, very small objects, harsh environments |
| Laser sensors | A visible, narrow laser spot | Small 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 output | Thickness, height, level (see Position, Displacement and Speed Sensors) |
| Color sensors | Compare the red, green and blue content of the reflected light with taught values | Sorting, checking the right label or product |
| Contrast / mark sensors | Detect a printed mark against its background | Registration marks on packaging film |
| Luminescence sensors | Detect fluorescent or UV-reactive marks or glue | Adhesive checks, security marks |
| Light curtains and grids | Many beams in a row | Measuring 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
| Situation | Use | Why |
|---|---|---|
| Long distance or dirty environment | Through-beam | Highest excess gain |
| One side only, medium distance | Polarized retro-reflective | A single unit, tolerant of shiny objects |
| Close range, any color | Background suppression | Ignores the background and the color |
| Tiny parts or tight spaces | Fiber-optic or laser | Small spot and head |
| Transparent objects | Clear-object retro sensor or through-beam with high sensitivity | Special optics |
| Features, codes or quality | Vision sensor | Beam sensors cannot judge |
| Metal parts at a short range in a dirty place | Inductive sensor (see Proximity Sensors) | Immune to dirt and light |
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| Intermittent or lost detection | Dirty lens, misalignment, too little excess gain | Clean; re-align; check the margin (rated range ÷ distance)² |
| Detects white but not black parts | Diffuse sensor with the sensitivity set on a white target | Use background suppression, or set the sensitivity on the darkest part |
| Always on | Background or conveyor reflects, a shiny object in a retro sensor | Use BGS or a polarized retro sensor; angle the sensor |
| Two neighboring sensors disturb each other | Cross-talk between beams | Different frequencies or channels, physical shielding, change the geometry |
| False triggers in bright light | Sunlight or flash into the receiver | A shade, a narrower field of view, a laser sensor |
| Works at the bench, fails on the machine | Vibration moves the sensor, dust, steam or oil mist | Rigid bracket, higher gain margin, air purge on the lens |
Related
- Sensors and Field Devices: the overview of this guide.
- Proximity Sensors and Position, Displacement and Speed Sensors: other ways to detect and measure.
- Safety Sensors and Devices: safety light curtains are a different, certified class of device.
- Sensor Outputs and Wiring and Installing and Troubleshooting Sensors: wiring and installation.
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.
