Almost every automated machine is full of small, unassuming cylinders and rectangles wired back to a PLC input – proximity sensors, quietly answering the one question that most industrial control comes down to: is something there, yes or no? What’s easy to miss, especially for anyone new to controls, is that “proximity sensor” isn’t one technology. Inductive, capacitive, and photoelectric sensors detect entirely different physical properties, and each one has applications where it excels and applications where it will fail in ways that look, to an untrained eye, exactly like a broken sensor.
This guide walks through how each sensor type actually works at a physical level, where each one is the obviously right choice, and how to wire a sensor’s output correctly to a PLC input card – because a surprising number of “the sensor is broken” maintenance calls turn out to be an NPN sensor wired to a PNP-expecting input, not a hardware failure at all.
What a Proximity Sensor Actually Detects
A proximity sensor, broadly defined, detects the presence or absence of an object without physical contact — no lever, no plunger, no mechanical wear. That’s the entire shared definition. Beyond it, the three common types diverge completely in what physical property they’re actually measuring: inductive sensors detect a target’s effect on an electromagnetic field, capacitive sensors detect a target’s effect on an electric field, and photoelectric sensors detect a target’s interruption or reflection of a light beam.
Because they sense different properties, they’re suited to detecting different kinds of targets. Inductive sensors only respond to metal. Capacitive sensors respond to almost anything with enough mass or a different dielectric constant than air, including liquids, powders, and plastics. Photoelectric sensors respond to essentially anything that blocks or reflects light, regardless of material, which makes them the most universally applicable of the three but also the most affected by environmental conditions like dust, mist, or ambient light.
Inductive Sensors: How Eddy Currents Detect Metal
An inductive proximity sensor works by generating a high-frequency oscillating magnetic field at its sensing face, produced by a coil inside the sensor. When a metallic object enters that field, the changing magnetic flux induces small circulating currents in the metal’s surface – eddy currents – and those eddy currents draw energy out of the sensor’s oscillating field, damping its amplitude. The sensor’s internal circuitry watches for that damping and switches its output when the amplitude drop crosses a threshold, which corresponds to a metal target being within range.
Because the physical mechanism depends on inducing eddy currents, inductive sensors respond only to metal, and not equally to all metals – ferrous metals like steel typically give the sensor’s full rated sensing range, while non-ferrous metals like aluminium, brass, and copper reduce the effective range, sometimes by 30-50%, because they conduct the induced eddy currents differently. This is why an inductive sensor’s datasheet range is often specified for mild steel, with a correction factor table for other metals.
Inductive sensors are the default choice for detecting metal machine parts directly: a cylinder rod at the end of its stroke, a gear tooth passing a fixed point for speed sensing, a metal pallet or fixture in a conveyor system, or a bolt head confirming a fastener is present. They’re rugged, immune to non-metallic contaminants like oil, dust, and coolant on the sensing face, and have no moving parts to wear – which is exactly why they’ve become the default limit-switch replacement in most modern machine design.
Capacitive Sensors: Detecting Non-Metallic and Liquid Targets
A capacitive sensor works on a different principle entirely: its sensing face forms one plate of a capacitor, with the surrounding environment (air, normally) acting as the dielectric between that plate and a virtual second plate. When a target material enters the sensing field, it changes the effective dielectric constant of that space, which changes the sensor’s internal capacitance. The sensor’s oscillator circuit is tuned to start oscillating once that capacitance shift crosses a threshold, and that oscillation is what triggers the output.
Because capacitance depends on dielectric constant rather than metallic conductivity, capacitive sensors can detect materials that would be completely invisible to an inductive sensor: plastic pellets in a hopper, wood, glass, granular powders, and – notably – liquids and liquid levels through a non-metallic container wall, since most liquids (especially water-based ones) have a dielectric constant dramatically higher than air and register strongly.
This liquid-sensing capability is the standout application: a capacitive sensor mounted against the outside of a plastic tank can detect the liquid level inside without any port, seal, or wetted part at all, which is enormously useful for corrosive or hygienic liquids where a wetted sensor would be a maintenance and contamination liability. The trade-off is that capacitive sensors are inherently less precise and more sensitive to environmental interference than inductive sensors – humidity, temperature, and even a buildup of dust or residue on the sensing face can shift the baseline capacitance enough to cause false triggers, so most capacitive sensors include a sensitivity adjustment specifically to tune out that kind of background drift.
Photoelectric Sensors: Through-Beam, Retroreflective, and Diffuse
Photoelectric sensors use a light source – almost always an infrared or visible LED, occasionally a laser for precision applications – and a receiver, and detect a target based on how it interrupts or reflects that light. Unlike inductive and capacitive sensors, “photoelectric” isn’t one sensing arrangement but three genuinely different configurations, each with its own trade-offs.
Through-Beam
A through-beam sensor uses two separate units – an emitter and a receiver – mounted facing each other, often several meters apart, with the target passing between them. Detection happens when the target physically blocks the beam. This arrangement gives the longest sensing range and the highest reliability of the three configurations, since it doesn’t depend on the target’s reflectivity at all, only on it being opaque enough to block the beam. The tradeoff is installation complexity and cost: two separate units need to be mounted, aligned, and wired on opposite sides of the target’s path, which isn’t always physically practical.
Retroreflective
A retroreflective sensor puts the emitter and receiver in a single housing and relies on a separate reflector — a specialized prismatic reflector, not just any shiny surface — mounted on the opposite side of the target’s path to bounce the beam back. Detection happens when the target interrupts the beam on its way to or from the reflector. This gets most of through-beam’s reliability with only one active unit to wire, at the cost of needing a reflector installed and kept clean and aligned.
Diffuse (Direct Reflective)
A diffuse sensor also combines emitter and receiver in one housing, but has no reflector at all — it relies on the target itself scattering enough light directly back to the receiver. This is the simplest and cheapest configuration to install, since it needs nothing mounted on the far side of the target, but it’s also the most target-dependent: a matte, light-colored target reflects well and gives good range, while a dark, glossy, or angled target can scatter far less light back and dramatically shorten the sensor’s effective range, sometimes unpredictably. Diffuse sensors work best in applications where the target material and orientation are reasonably consistent.
Choosing the Right Sensor for Your Application
| Sensor Type | Detects | Typical Application |
| Inductive | Metal targets only (ferrous best, non-ferrous reduced range) | Cylinder position, metal part/fixture detection, gear-tooth speed sensing |
| Capacitive | Almost any material: plastics, powders, liquids, glass, wood | Liquid level through a tank wall, hopper/bin level, non-metallic part detection |
| Photoelectric (through-beam) | Any opaque target, longest range, most reliable | Long-range object counting, safety light curtains, large gaps between mounting points |
| Photoelectric (retroreflective) | Any opaque target, single-side mounting | Conveyor product detection where a reflector can be mounted opposite |
| Photoelectric (diffuse) | Reflective-enough target, shortest reliable range | Simple part-present detection where target material is consistent |
As a practical starting point: if the target is metal and the application is a simple mechanical position check, default to inductive – it’s the most rugged and contamination-resistant option. If the target is a liquid, powder, or non-metallic material, capacitive is usually the only one of the three that will work at all. If the application needs long range, high reliability, or the target material varies, lean toward photoelectric, and pick through-beam or retroreflective over diffuse whenever mounting a second component is practical, since both are meaningfully more reliable than diffuse sensing.
NPN vs PNP Output: Matching Sensor to PLC Input
Almost all industrial proximity sensors are wired as three-wire DC devices: power, ground, and a switched output. That output is built around a transistor, and it comes in two electrically incompatible flavors – NPN and PNP – that describe how the sensor switches the signal line relative to the supply.
An NPN sensor is a sinking output: when the sensor detects a target, its output transistor connects the signal wire down to the 0V (common) rail, pulling the signal line low. A PLC input wired for this needs to supply its own current that flows from the input, through the sensor, down to ground – meaning the PLC input card itself must be a sourcing input, since it’s sourcing the current the sensor sinks.
A PNP sensor is a sourcing output: when the sensor detects a target, its output transistor connects the signal wire up to the +DC supply rail, pushing the signal line high. The matching PLC input needs to be a sinking input, accepting current sourced from the sensor and sinking it to ground internally.
This is the single most common wiring point of confusion in the field, and the rule to remember is that the sensor and the PLC input are always opposite terms describing the same current path: a sourcing (PNP) sensor needs a sinking PLC input, and a sinking (NPN) sensor needs a sourcing PLC input. Many PLC input cards, especially in North America, are wired as sinking inputs by convention, which is why PNP sensors are the more common default choice in that market; European machine-building convention has historically leaned NPN, though this varies by industry and manufacturer.
| PNP (sourcing) sensor -> sinking PLC input | +24VDC —- Sensor(+) | 0V —- Sensor(-) | Sensor OUT —- PLC Input (switches +24V to the input when active) | PLC Input Common —- 0V | NPN (sinking) sensor -> sourcing PLC input | +24VDC —- Sensor(+) | 0V —- Sensor(-) | Sensor OUT —- PLC Input (switches 0V/ground to the input when active) | PLC Input Common —- +24VDC |
If a sensor’s LED is confirmed to be switching correctly (it lights up when the target is present, or vice versa depending on normally-open/normally-closed configuration) but the PLC never sees the input change state, the very first thing to check – before assuming the sensor or the PLC card has failed – is whether the sensor’s output type matches the input card’s sinking/sourcing configuration. This single check resolves an outsized share of “intermittent” or “dead” sensor complaints.
Sensing Range and Target Material Considerations
Every proximity sensor’s datasheet lists a rated sensing distance, but that number is measured under a specific reference condition, and real-world performance varies based on the target.
- Inductive sensors: rated range is specified for a standard mild steel target of a defined size (often equal to the sensor’s own diameter); smaller targets, non-ferrous metals, and targets offset from centre all reduce the effective range, sometimes substantially.
- Capacitive sensors: rated range depends heavily on the target’s dielectric constant; water-based liquids and other high-dielectric materials give strong, long-range detection, while low-dielectric plastics may need the sensor mounted much closer, or its sensitivity increased.
- Photoelectric sensors: rated range depends on target colour, surface finish, and angle for diffuse sensors especially – a dark, matte, or angled target can cut effective range dramatically compared to the light-coloured flat target used in datasheet testing, while through-beam range is largely unaffected by target reflectivity since it only needs to block the beam.
When a sensor’s real-world performance falls noticeably short of its datasheet range, checking the target material and mounting geometry against the sensor’s rated test conditions is usually a faster diagnostic step than assuming the unit is faulty.
Common Sensor Wiring Mistakes That Look Like Sensor Failure
- NPN/PNP mismatch – by far the most common: a correctly functioning sensor wired to an incompatible input type never registers, and the sensor gets blamed and replaced when nothing was wrong with it.
- Normally open vs normally closed confusion – many sensors are configurable or ordered as either NO or NC; wiring or programming logic that assumes the wrong one produces inverted behaviour that looks like a stuck or failed sensor.
- Insufficient target size or offset for inductive sensors – mounting a sensor to detect a target smaller than its rated reference target, or off to one side of the sensing face, can produce a marginal, intermittent detection that looks like a flaky sensor rather than a mounting geometry issue.
- Capacitive sensitivity left at factory default – a capacitive sensor’s sensitivity potentiometer often needs field adjustment for the specific target and mounting condition; left at default, it may false-trigger on background material (like a tank wall) or fail to trigger on the intended target.
- Dirty or misaligned photoelectric optics – a receiver lens fogged with mist, dust, or oil, or a retroreflective reflector nudged out of alignment, produces intermittent or degraded detection that’s easy to misdiagnose as an electronic fault rather than a cleaning or alignment issue.
FAQ: Proximity Sensor Questions Answered
What is the difference between inductive and capacitive sensors?
Inductive sensors detect metal targets by sensing eddy currents induced in the target by an oscillating magnetic field, so they only respond to metal. Capacitive sensors detect a target’s effect on an electric field’s dielectric constant, so they can sense almost any material with enough mass or a different dielectric than air, including plastics, powders, and liquids.
Can a capacitive sensor detect liquid?
Yes — capacitive sensors are commonly used to detect liquid level, often mounted against the outside of a non-metallic tank wall with no wetted parts at all. Most liquids, especially water-based ones, have a dielectric constant well above air’s, which gives a strong, reliable capacitance shift for the sensor to detect.
What is the difference between NPN and PNP sensors?
NPN sensors have a sinking output, switching the signal line down to ground (0V) when active, and require a sourcing PLC input. PNP sensors have a sourcing output, switching the signal line up to the supply voltage when active, and require a sinking PLC input. The sensor and PLC input types must be complementary, not identical, for correct wiring.
What is an eddy current in an inductive sensor?
An eddy current is a small circulating electrical current induced in a conductive metal target when it enters an inductive sensor’s oscillating magnetic field. These currents draw energy from the sensor’s field, damping its amplitude – a change the sensor’s circuitry detects and uses to switch its output when a metal target is present.
Why would a photoelectric sensor work inconsistently even though it’s wired correctly?
Inconsistent detection despite correct wiring is usually optical, not electrical: a dirty or misaligned lens, a nudged retroreflective reflector, a target that’s too dark, glossy, or angled for reliable diffuse sensing, or ambient light/mist interference. Checking the optics and target reflectivity typically resolves this before any electronic fault needs to be considered.
What does dielectric constant mean in the context of capacitive sensing?
Dielectric constant is a measure of how much a material reduces an electric field passing through it compared to a vacuum (air is close to 1). Capacitive sensors detect targets by sensing the shift in effective capacitance that occurs when a material with a different dielectric constant than air enters the sensing field – the larger that difference, the stronger and more reliable the detection.
Key Definitions
Eddy Current: A small circulating electrical current induced in a conductive target by a changing magnetic field, which is the physical mechanism an inductive proximity sensor uses to detect metal.
Dielectric Constant: A measure of how much a material reduces an electric field relative to a vacuum or air; capacitive sensors detect targets by sensing the capacitance shift caused by a material’s dielectric constant differing from air’s.
Sinking vs Sourcing Input: Describes the direction current flows through a PLC’s discrete input relative to its common terminal. A sourcing input supplies current outward to be sunk by the field device (matching an NPN sensor); a sinking input accepts current sourced by the field device (matching a PNP sensor).
Further Reading
- Wiring a Photoelectric Sensor to a PLC Input Card
- Encoders Explained
- PLC Data Types Explained
External References
- SICK sensor technology guide
- KEYENCE proximity sensor reference
- Omron sensor selection guide


