Proximity and presence sensors tell a machine that a part has arrived, a guard is closed, a bin is full or a bottle is missing. Four technologies cover most industrial applications: inductive, capacitive, photoelectric and ultrasonic. Each one detects a different physical effect, so each one has targets it handles well and situations where it struggles. This guide explains how they work in plain terms and how to choose between them, especially when you are replacing a sensor on an existing machine.
Inductive sensors: metal only, very robust
An inductive sensor contains a coil driven by an oscillator. The coil produces an alternating magnetic field just in front of the sensing face. When a metal object enters that field, eddy currents form in the metal and draw energy from the oscillator. The electronics notice the drop in oscillation and switch the output.
- Targets: metals only. Steel gives the full rated distance; aluminum, brass and copper are detected at a shorter distance. Datasheets list correction factors for each material.
- Range: short, from about a millimeter to a few tens of millimeters depending on the body size.
- Shielded (flush) vs unshielded (non-flush): a shielded sensor can be mounted flush in metal and has a shorter range; an unshielded sensor reaches farther but needs a metal-free zone around its head.
- Strengths: no moving parts, sealed housings, unaffected by dust, oil, water or most coolants. They are the default choice for detecting metal parts, cams, gear teeth and cylinder positions.
Plan for a margin: the rated sensing distance is measured with a standard steel target, so in real use keep the target well inside the rated distance. For a deeper look at these two technologies, see our article How It Works: Inductive & Capacitive Sensors.
Capacitive sensors: almost any material
A capacitive sensor measures the capacitance between its sensing electrode and its surroundings. Any object that changes that capacitance, metal or not, can trigger it. Materials with a high dielectric constant, such as water and water-based products, are detected more easily than dry plastics, wood or paper.
- Typical uses: level detection of liquids, granules and powders, often through the wall of a plastic or glass tank; detecting cardboard, plastic parts or filled containers.
- Adjustment: most models have a sensitivity setting (potentiometer or teach button) so the sensor can ignore the container wall and react only to the contents.
- Watch out for: humidity, condensation and product build-up on the face, which can cause false detection. Re-adjust the sensitivity after cleaning or after a change of product.
Photoelectric sensors: light, long range, four main modes
A photoelectric sensor has an emitter (usually an LED, visible red, infrared or laser) and a receiver. The output changes when the amount of light reaching the receiver crosses a threshold. How the light gets from the emitter to the receiver defines the sensing mode.
Through-beam
The emitter and receiver are two separate units facing each other. An object is detected when it blocks the beam. Through-beam gives the longest range and the most reliable detection of opaque objects, regardless of their color or surface. The drawback is two devices to mount, align and wire.
Retro-reflective
The emitter and receiver share one housing and the light bounces back from a reflector across the path. The object is detected when it breaks the beam. Wiring is on one side only, which simplifies installation. Shiny objects can reflect light back like the reflector and fool the sensor; a polarized retro-reflective model, used with a corner-cube reflector, solves most of these cases. Clear bottles and films need a model specifically designed for transparent objects.
Diffuse (proximity)
There is no reflector: the sensor detects light scattered back from the object itself. It is the easiest to install, but the sensing distance depends heavily on the target. A white, matte surface is seen much farther than a black or glossy one, and a bright background behind the target can be detected by mistake.
Background suppression
A refinement of the diffuse mode. Instead of measuring only the amount of returned light, the sensor uses the angle of the returning light (triangulation) to judge distance. It detects objects up to a set distance and ignores anything beyond it, with much less influence from color. It is the usual answer for detecting dark parts in front of a shiny conveyor frame.
Most photoelectric sensors can be set to light-on (output on when the receiver sees light) or dark-on (output on when the light is interrupted). Check this setting first when a replacement sensor seems to work backwards.

The four main photoelectric sensing modes.
Ultrasonic sensors: sound instead of light
An ultrasonic sensor sends short pulses of high-frequency sound and measures the time the echo takes to return. Because it measures distance with sound, the color and transparency of the target do not matter.
Advantages:
- Detects clear glass, transparent films, liquids and objects of any color.
- Works in dust and mist that would blind an optical sensor, within limits.
- Many models offer an analog distance output as well as switching outputs, which makes them popular for tank level measurement.
Limitations:
- A blind zone right in front of the face, where nothing can be detected.
- Soft, sound-absorbing targets (foam, fabric) and steeply angled surfaces return a weak echo.
- The speed of sound changes with air temperature, so accuracy depends on temperature compensation; strong air currents also disturb the reading.
- Slower response than inductive or photoelectric sensors.

How an ultrasonic sensor measures distance.
Outputs and wiring
Whatever the technology, the output must match the input it feeds. Common versions are:
- 3-wire DC, PNP (sourcing) or NPN (sinking): the most common type for PLC inputs. A PNP sensor will not work correctly on an input designed for NPN, and the reverse.
- 2-wire DC or AC: wired in series with the load like a switch. They draw a small leakage current when off, which can keep some sensitive inputs or relays from releasing.
- Relay output: a dry contact, useful for mixed voltages, found mostly on larger photoelectric sensors.
- Analog (4-20 mA or 0-10 V): distance or level as a continuous value.
- IO-Link: a point-to-point digital link that also carries settings and diagnostics on many recent sensors.
Also check normally open (NO) or normally closed (NC) operation, the supply voltage range, the connector (M8, M12 or cable) and the housing size.
Selection table
| Technology | Detects | Relative range | Main strengths | Main limits |
|---|---|---|---|---|
| Inductive | Metals | Short | Very robust, immune to dirt and liquids | Metal only, reduced range on non-ferrous metals |
| Capacitive | Most solids and liquids | Short | Level through non-metallic walls | Sensitive to humidity and build-up |
| Photoelectric through-beam | Opaque objects | Longest | Reliable, independent of color | Two units to mount and align |
| Photoelectric retro-reflective | Opaque objects | Long | Wiring on one side | Shiny and clear objects need special models |
| Photoelectric diffuse / background suppression | Objects that reflect light | Short to medium | One unit, no reflector | Range depends on color and surface (less so with background suppression) |
| Ultrasonic | Solids and liquids, any color or transparency | Short to long | Clear objects, level, analog distance | Blind zone, soft targets, temperature and air currents |
Values for guidance only. Always check the sensing distance, response time, temperature range and enclosure (IP) rating in the manufacturer's data for the exact model.
Replacing a sensor on an existing machine
- Read the full part number on the old sensor: it usually encodes the range, output type (PNP/NPN), NO/NC and connector.
- Match the sensing technology and mode, not only the body size.
- Confirm the output type and supply voltage against the PLC or relay input.
- Check the mounting: flush or non-flush, thread size, reflector type if any.
Safety: work on electrical equipment must be done by qualified personnel following the applicable electrical code and the manufacturer's instructions.
Key takeaways
- Inductive for metal, capacitive for non-metallic materials and levels, photoelectric for range, ultrasonic for clear objects and liquids.
- Through-beam is the most reliable photoelectric mode; background suppression handles dark targets and shiny backgrounds.
- The output type (PNP, NPN, 2-wire, analog) must match the input it feeds.
- Keep the target well inside the rated distance and check the datasheet for the exact model.
Related parts at 3JIndustry
Browse our used sensors, or see PLC and automation parts for the inputs they connect to.
Looking for a discontinued part? Send the full part number to sales@3jindustry.com or use our contact page.