Proximity Sensor vs Photoelectric Sensor: Which to Use?
Proximity vs photoelectric sensor compared — sensing range, target materials, how each works, environment, and how to choose for a detection application.
The difference between a proximity sensor and a photoelectric sensor: A proximity sensor detects objects without contact using an electromagnetic field (inductive) or electrostatic field (capacitive) — it works over short ranges (typically 1–60 mm) and is immune to ambient light. A photoelectric sensor uses a beam of light to detect objects and can reach several metres, but the target does not need to be metallic. Choose a proximity sensor when the target is metal (inductive) or any solid material at short range (capacitive); choose a photoelectric sensor when the detection distance exceeds 60 mm, the target is non-metallic, or you need to detect clear or coloured objects at distance.
Last Updated: June 2026 | Written by industrial automation engineers with hands-on experience wiring inductive, capacitive, through-beam, retroreflective, and diffuse sensors to PLC input modules across manufacturing, packaging, and materials-handling applications.
Choosing the wrong sensor wastes commissioning time, causes nuisance trips, and sometimes creates safety issues. This guide lays the decision side-by-side so you can pick confidently the first time.
For the full landscape of industrial sensing technologies, see types of industrial sensors. If you are new to how sensors wire into a PLC input card, read PLC programming basics fundamentals guide first.
Quick-Answer Comparison Table
Use this table as a first filter. The sections below give the engineering detail behind each row.
| Factor | Inductive Proximity | Capacitive Proximity | Through-Beam Photoelectric | Retroreflective Photoelectric | Diffuse Photoelectric |
|---|---|---|---|---|---|
| Sensing range | 1–60 mm (standard) | 2–25 mm (standard) | Up to 60 m | Up to 10 m | Up to 2 m |
| Target material | Ferrous and non-ferrous metals only | Any solid or liquid, including plastics, wood, glass | Any opaque object | Any object that blocks the beam | Any object that reflects enough light back |
| Contact required | No | No | No | No | No |
| Ambient light immunity | Full — no light path | Full — no light path | Good (modulated beam) | Good (modulated beam) | Moderate (depends on model) |
| Dusty/dirty environment | Excellent | Good | Poor (both faces must stay clean) | Moderate (one face) | Moderate |
| Transparent/clear targets | No | Yes (with tuning) | No (beam passes through) | No | No |
| Typical output | PNP or NPN discrete | PNP or NPN discrete | PNP or NPN discrete | PNP or NPN discrete | PNP or NPN discrete |
| Wiring to PLC | 3-wire (L+, 0V, signal) | 3-wire (L+, 0V, signal) | 3-wire each emitter/receiver | 3-wire | 3-wire |
| Relative cost | Low | Low–moderate | Moderate–high (two units) | Moderate | Low–moderate |
What Is a Proximity Sensor?
A proximity sensor detects the presence of an object without physical contact by sensing changes in a field generated at the sensor face. The two dominant types in industrial automation are inductive and capacitive — they share the same form factor and output options but use completely different physics.
Inductive Proximity Sensors
An inductive proximity sensor generates a high-frequency oscillating electromagnetic field at its sensing face using a ferrite-core coil. When a metallic object enters that field, eddy currents are induced in the target. Those eddy currents drain energy from the oscillator circuit, reducing amplitude. The sensor's internal circuit detects the amplitude drop and switches the output.
Key characteristics:
- Target must be metal. Ferrous metals (steel, iron) give the longest range. Non-ferrous metals (aluminium, copper, brass) give a reduced range — typically 30–60% of the rated distance on the datasheet.
- Rated sensing distance is specified for a standard mild-steel target of a defined size. Always derate for other metals.
- Flush-mountable variants have shielded coils and can be recessed in a metal bracket. Non-flush (unshielded) variants have longer range but require clearance around the face.
- IP67 or IP68 rated versions are common, making them well-suited to washdown or coolant-mist environments.
- No moving parts, no optics — extremely reliable over millions of switching cycles.
Capacitive Proximity Sensors
A capacitive proximity sensor generates an electrostatic field between two internal electrodes. When any material — metal, plastic, liquid, wood, granular material — enters the field, it changes the capacitance of the system. The sensor detects this change and switches the output.
Key characteristics:
- Can detect non-metallic targets including plastics, cardboard, food products, and liquids through a non-metallic container wall.
- A sensitivity adjustment potentiometer (or teach button on newer models) lets you set the switching threshold to reject background objects.
- More susceptible to moisture, humidity, and buildup on the sensing face than inductive sensors. Not recommended for splashing water environments without careful selection.
- Common applications: level detection through a tank wall, detecting labels on a web, paper-jam detection in printing.
For a direct comparison of the two proximity sub-types, see inductive vs capacitive proximity sensor.
What Is a Photoelectric Sensor?
A photoelectric sensor detects objects using modulated infrared or visible light. An emitter transmits a pulsed light beam; a receiver measures whether the beam arrives, is interrupted, or reflects back. Because the beam is modulated (pulsed at a specific frequency), the receiver can reject ambient light from florescent tubes, sunlight, and welding arcs.
There are three optical configurations, each with different strengths:
Through-Beam (Opposed Mode)
The emitter and receiver are separate units mounted opposite each other. The receiver output changes when an object breaks the beam. This gives the longest detection range (up to 60 m in some models) and the highest reliability — even a lightly opaque or coloured target breaks the beam cleanly.
Downsides: you need to run cable to two separate housings and align both during commissioning. If the application involves conveyors or machinery with complex routing, this doubles the wiring work.
Retroreflective
The emitter and receiver share a single housing and both face the same direction. The beam travels to a prismatic reflector (corner-cube target) and returns to the receiver in the same housing. An object breaks the beam when it passes between sensor and reflector.
Range is shorter than through-beam (up to around 10 m). One cable run. The reflector must stay clean and properly aimed. Polarising filters on both the sensor and reflector allow detection of shiny, reflective objects — without polarisation, a shiny target can bounce enough light back to fool the sensor into thinking the beam is unbroken.
Diffuse (Proximity Mode)
The emitter and receiver again share a single housing, but instead of a dedicated reflector, the sensor detects light reflected off the target itself. No separate reflector is needed. Alignment is minimal — just point the sensor at the target zone.
Range is the shortest of the three modes — typically up to 2 m depending on target reflectivity. Dark or matte targets reflect less light and shorten the effective range significantly. Shiny or white targets reflect more. Background suppression (BGS) diffuse sensors use triangulation optics to reject objects beyond a set distance, solving the problem of a bright background triggering false positives.
How Each Sensor Wires to a PLC Input
Both proximity sensors and photoelectric sensors typically output a 3-wire discrete signal: supply positive (L+, usually 24 VDC), supply negative (0 V), and a switched signal wire. The signal wire is either NPN (sinking) or PNP (sourcing) depending on the sensor model.
- PNP (sourcing): The signal wire switches positive (24 V) when the sensor activates. Wire directly to a standard sourcing PLC input.
- NPN (sinking): The signal wire switches to 0 V when the sensor activates. Wire to a sinking PLC input, or through a relay for a sourcing input card.
Most modern PLC input modules accept either type with correct wiring. For a full walkthrough of how NPN and PNP devices interact with sinking and sourcing input cards, see sinking vs sourcing NPN PNP.
Through-beam photoelectric sensors have two devices: the emitter requires only power (L+ and 0 V) and has no signal output; the receiver has the standard 3-wire output.
Sensor output waveform is identical for a PLC's perspective: a discrete on/off state that maps to a single input bit (e.g., I0.0 in Siemens, I:0/0 in Allen-Bradley). The PLC program reads that bit exactly the same way regardless of whether it came from an inductive sensor detecting a steel part or a through-beam photoelectric detecting a cardboard box.
When to Use a Proximity Sensor
Choose a proximity sensor when one or more of the following apply:
- The target is metallic and the sensing distance is within 60 mm — an inductive proximity sensor is the most reliable, lowest-maintenance choice.
- The environment is dirty, wet, or contaminated — inductive sensors tolerate coolant, oil, and metal chips better than any optical sensor.
- Mounting space is tight — inductive sensors come in M5, M8, M12, M18, and M30 barrel sizes and fit into very compact machine nests.
- High switching speed is required — inductive sensors can switch at several kHz, outperforming most photoelectrics in high-speed part-counting applications.
- The target is non-metallic and within 25 mm — a capacitive sensor detects plastic, glass, liquid, or granular material at short range.
- Level detection through a container wall is needed — capacitive sensors see the change in dielectric caused by a liquid or powder behind a plastic or glass wall.
Avoid inductive sensors when the target is plastic, wood, or cardboard. Avoid capacitive sensors in environments with standing water, foam, or steam that could form a false dielectric at the face.
Example: Part-Present Detection on a CNC Machine
A machined aluminium part sits in a fixture 8 mm from a flush-mount M12 inductive sensor. The part is aluminium, so you derate the nominal 8 mm sensing distance to roughly 50–60% for non-ferrous metal — confirmed at 5 mm actual gap. The sensor is IP68, sealed against the coolant mist. It wires PNP to the machine's PLC input card. No alignment needed, no optics to fog up.
When to Use a Photoelectric Sensor
Choose a photoelectric sensor when one or more of the following apply:
- The sensing distance is greater than 60 mm — through-beam and retroreflective sensors cover metres, not millimetres.
- The target is non-metallic and a proximity sensor cannot detect it — photoelectrics work on cardboard, plastic bottles, fabric, wood, and any opaque object.
- Small objects must be detected at moderate range — a focused beam diffuse sensor with a laser emitter can detect a 2 mm wire or thread at 50–100 mm range.
- Colour or contrast detection is needed — colour-sensing photoelectric sensors compare reflected wavelengths against a taught reference.
- The target area must be large — a single through-beam pair can guard an access area or a wide conveyor zone.
- Object height or profile must be verified — multiple photoelectric pairs stacked vertically create a light curtain effect for profiling.
Avoid diffuse photoelectrics on highly reflective (mirror-finish) targets without polarising filters or BGS. Avoid through-beam sensors in heavy dust or spray environments where the beam path cannot be kept reasonably clear.
Example: Bottle Detection on a Filling Line
Clear PET bottles at 400 mm from the sensor, travelling at 60 bottles per minute. A standard diffuse sensor fails — the beam passes through a clear bottle. Options:
- Retroreflective with polarising filter: The bottle disturbs the polarised beam even though it is transparent. Works reliably if the reflector stays clean.
- Through-beam: The bottle refracts the beam enough to trigger a detection at high sensitivity settings. The most reliable choice for clear containers but requires two cable runs.
- Capacitive proximity: Only works if the bottle passes within 15–20 mm of the face — typically impractical on a filling line conveyor.
Common Pitfalls and How to Avoid Them
Reflective Targets Fooling Diffuse Sensors
A polished stainless-steel part reflects so much light that a diffuse sensor triggers before the part is in the correct detection window — or reflects at an angle that prevents detection entirely. Use a retroreflective sensor with a polarising filter, or switch to an inductive sensor if the part is metal.
Transparent Targets Passing Through a Beam Undetected
Clear glass, clear film, and clear PET bottles allow most of the light beam to pass through. Through-beam sensors set to high sensitivity, or retroreflective sensors with polarising filters, handle clear targets best. Standard diffuse sensors do not.
Dust and Contamination Blocking Optical Sensors
Fine dust settling on the emitter or receiver face accumulates over time and reduces beam intensity to the point of false triggering or missed detections. In dusty environments: use an air purge fitting on the sensor housing, schedule regular face cleaning, or switch to an inductive proximity sensor if target material allows.
Reduced Range on Non-Ferrous Metals
Engineers sometimes specify an inductive sensor for an aluminium target using the nominal sensing distance from the datasheet — which is rated for mild steel. Aluminium typically gives 50–60% of the rated distance, copper and brass even less. Always verify the reduction factor in the datasheet and confirm with a test at the actual gap distance.
Electrical Noise from Long Cable Runs
Sensor cables routed alongside power cables or motor drives can pick up enough noise to cause false switching at the PLC input. Use shielded sensor cable, tie the shield at one end only (typically at the panel), and keep sensor cables in a dedicated cable tray away from power wiring.
Frequently Asked Questions
What is the difference between a proximity sensor and a photoelectric sensor? A proximity sensor uses an electromagnetic or electrostatic field to detect objects at very short range (typically under 60 mm) without contact, and has no optical path to contaminate. A photoelectric sensor uses a modulated light beam to detect objects and can operate over much longer distances — from centimetres to tens of metres — but requires a clear optical path between emitter and receiver (or between sensor and reflector/target in diffuse mode).
Which has a longer range — proximity or photoelectric? Photoelectric sensors have significantly longer range. Through-beam photoelectrics can reliably detect objects at 10–60 m. Standard inductive proximity sensors top out at around 60 mm for large-format barrel styles (M30), and most are in the 4–20 mm range. Capacitive proximity sensors have similar range limits.
Can a proximity sensor detect plastic? An inductive proximity sensor cannot detect plastic — it only reacts to metallic targets. A capacitive proximity sensor can detect plastic, as well as wood, glass, liquids, and granular materials, because it senses changes in dielectric properties rather than conductivity. Photoelectric sensors detect plastic readily in through-beam, retroreflective, and (for opaque plastics) diffuse configurations.
Which is better for object detection on a conveyor? It depends on the target material and gap distance. For metal parts at short gap, an inductive proximity sensor is simpler and more robust. For non-metallic parts, larger gaps, or variable object sizes, a through-beam or retroreflective photoelectric sensor is the standard choice. For clear containers specifically, through-beam at high sensitivity or a retroreflective with polarising filter is required.
Making the Final Choice
Neither sensor type is universally superior. The decision comes down to three questions:
- What is the target material? Metal and short range = inductive proximity. Any solid material, longer range = photoelectric.
- What is the operating environment? Heavy contamination, washdown, coolant = proximity sensor. Clean, controlled environment = either technology is viable.
- What is the required sensing distance? Under 60 mm = proximity sensor is an option. Over 60 mm = photoelectric sensor is the only practical choice.
A useful shortcut: start with inductive proximity for any metal target in a machine tool or press environment, and start with through-beam photoelectric for any conveyor detection task involving non-metallic objects at distances over 100 mm. From that baseline, adjust based on cable routing, target surface properties, and environmental conditions.
For the broader context of how these and other sensors fit into an automation system, see types of industrial sensors. For wiring detail on getting the NPN/PNP output into your PLC correctly, see sinking vs sourcing NPN PNP. For foundational PLC input concepts, see the PLC programming basics fundamentals guide.


