Proximity Sensors
Inductive, capacitive, magnetic and ultrasonic sensors: how they work, sensing distance, correction factors, mounting and hysteresis.
The proximity sensor families
A proximity sensor detects the presence of an object without touching it. It is the workhorse of discrete automation: there is no contact, so nothing wears, and a typical housing is sealed against oil, dust and water. They differ in what they detect and how far away. The family covered here is metal and material detection at short range; longer ranges with light are in Photoelectric and Vision Sensors, and measuring where something is (an analog position) is in Position, Displacement and Speed Sensors.
| Type | Principle | Detects | Typical range |
|---|---|---|---|
| Inductive | A coil’s oscillation is damped by eddy currents in a metal target | Metals only | 1 to 40 mm |
| Capacitive | An object changes the capacitance of the electrode | Almost anything: metal, plastic, liquids, powders, wood | 1 to 30 mm (adjustable) |
| Magnetic (reed, Hall, GMR) | A magnet’s field operates a switch or a chip | A magnet attached to the target | Up to 50 mm or more, depending on the magnet |
| Ultrasonic | Time of flight of a sound pulse | Almost any solid or liquid surface | 5 cm to 10 m |
Inductive sensors
An inductive sensor has a coil and an oscillator behind its face. The coil makes a high-frequency magnetic field. When a metal target enters the field, eddy currents in the metal absorb energy and reduce the oscillation amplitude. A trigger circuit senses the drop and switches the output. The sensor is unaffected by dirt, oil, water or light, and has no moving parts, which is why it is so common.
- Normal outputs: a PNP or NPN transistor, normally open (NO) or normally closed (NC), two-wire AC or DC, or an analog or IO-Link output (see Sensor Outputs and Wiring).
- Standard target: a square of 1 mm thick mild steel, with a side equal to the face diameter or to three times the sensing distance, whichever is larger. All the data sheet ranges refer to it.
- Shielded (flush) and unshielded (non-flush): a shielded sensor has a metal ring that focuses the field forward, allowing it to be mounted flush in metal but giving a shorter range; an unshielded sensor reaches about twice as far but needs free space around the face.
- Long-range, analog and factor-1 sensors: special types detect all metals at the same distance (factor 1), or give a signal that varies with distance.
Sensing distance, flush mounting and correction factors
The nominal sensing distance Sn is the distance for the standard target at the standard conditions. Real sensors vary with temperature and from unit to unit, so the standard defines: the real distance Sr (0.9 to 1.1 Sn at the rated voltage and temperature), the usable distance Su (0.9 to 1.1 Sr over the whole range of temperature and voltage), and the assured operating distance Sa = 0 to 0.81 Sn, the zone in which the sensor is guaranteed to switch. Design to Sa, not Sn.
Worked example: detecting a brass part
- A sensor has Sn = 8 mm. For the standard steel target the assured distance is Sa = 0.81 × 8 = 6.48 mm.
- For brass the correction factor is about 0.4: the nominal distance is 8 × 0.4 = 3.2 mm, and the assured distance is 6.48 × 0.4 = 2.59 mm. Mount the sensor so that the brass part passes within 2.5 mm.
- Hysteresis is typically 3 to 20 percent of Sn, say 15 percent: 1.2 mm for this sensor. A target must retreat that much beyond the switching point before the output resets. It prevents chatter, but it limits how finely two nearby positions can be distinguished.
- If the target is smaller than the standard (a thin wire, a small screw) the sensing distance is reduced further; for targets thinner than the skin depth the sensor can fail to see them. A sensor with a larger Sn or a smaller, sharper one may be needed.
| Size (typical) | Shielded Sn | Unshielded Sn |
|---|---|---|
| M8 | 1.5 to 2 mm | 2.5 to 4 mm |
| M12 | 2 to 4 mm | 4 to 8 mm |
| M18 | 5 to 8 mm | 8 to 12 mm |
| M30 | 10 to 15 mm | 15 to 22 mm |
| 40 mm rectangular | 15 to 20 mm | 25 to 40 mm |
Switching frequency
A sensor needs a short time to respond and to release, which limits the number of cycles per second. The switching frequency (about 100 Hz to 5 kHz for inductive sensors, and as low as 10 to 50 Hz for large capacitive ones) is measured with a standard target. The controller input must also be fast enough: a standard PLC input scanned every 5 to 10 ms misses anything above 50 to 100 Hz, and needs a high-speed counter for faster signals.
Worked example: counting gear teeth
A sensor watches a 20-tooth gear turning at 3 000 rpm (50 rev/s). The pulse rate is 50 × 20 = 1 000 Hz. An M12 sensor rated for 1 kHz is at its limit: choose a high-speed type (2 to 5 kHz) with margin, and connect it to a high-speed counter input (see Encoders, Resolvers and Feedback), because the PLC’s normal scan cannot see 1 kHz. The tooth gap must be wide enough for the sensor to release (a gap of at least the diameter of the sensing face).
Capacitive sensors
A capacitive sensor has an electrode that forms a capacitor with its surroundings. Any object (not only metal) that enters the field changes the capacitance and switches the sensor, because the dielectric constant of the object (water about 80, plastic 2 to 4, air 1) increases it. They can detect the level of a liquid or powder through the wall of a plastic or glass container, and the presence of non-metal parts. Most have a potentiometer for the sensitivity.
- Higher dielectric constant gives a longer range: water-based materials are detected far better than dry plastic or powder.
- Moisture and dirt on the sensor face can cause false switching, as can a wet wall: set the sensitivity with the container in its normal state, and use a compensating sensor if the build-up is heavy.
- Level through a wall: the container wall must be non-metallic and thin; mount the sensor flat against it. Use a metal tank with an internal probe instead.
- Range is shorter than an inductive sensor of the same size and the switching frequency lower; do not use one where an inductive sensor would do.
Magnetic sensors: reed, Hall, magnetoresistive
| Type | How it works | Strengths | Limits |
|---|---|---|---|
| Reed switch | Two ferromagnetic reeds in a glass tube close in a magnetic field | No power needed, simple, cheap | Mechanical contacts: limited life and speed (about 1 kHz); glass is fragile |
| Hall-effect sensor | A voltage across a semiconductor appears in a magnetic field | Solid state, fast, long life, can be analog | Needs power; limited range |
| GMR / TMR sensor | Resistance of a thin-film stack changes with the field | Very sensitive, small, long range for the size | More sensitive to stray fields |
Magnetic sensors detect a magnet fixed to the target. They are used on pneumatic cylinders (a magnet in the piston, a sensor in a slot on the barrel), as door and guard switches, and to detect position through non-magnetic walls (stainless steel, plastic, aluminum). Steel nearby can distort the field and shift the switching point.
Ultrasonic sensors
An ultrasonic sensor sends a pulse of sound (typically 40 kHz to 400 kHz) and measures the time until the echo returns. The distance is d = c × t ÷ 2, with c the speed of sound, about 331.3 + 0.606 × T m/s with T the air temperature in °C. It works on almost any surface, independent of color, and with transparent or shiny targets.
Worked example: distance and temperature error
- At 20 °C the speed of sound is 331.3 + 0.606 × 20 = 343.4 m/s. An object 1.00 m away returns an echo after t = 2d ÷ c = 2 × 1.0 ÷ 343.4 = 5.82 ms.
- At 40 °C the speed is 355.5 m/s. A sensor that still assumes the 20 °C value computes the distance from the same echo time with the wrong speed: an object at 1.00 m is shown at 1.00 × 343.4 ÷ 355.5 = 0.966 m, an error of 3.4 percent, 34 mm too short. Most industrial sensors compensate for temperature with a built-in sensor: check (and mind that the air temperature along the beam may differ from the sensor’s).
- Dead zone and beam: a sensor cannot measure within its blind zone (the transducer still rings, typically 5 to 30 cm), the beam spreads as a cone of 5 to 15°, and the sensor sees the nearest strong reflection, including a wall or a pipe in the beam path.
- Soft, sound-absorbing targets (foam, cloth) and very rough surfaces return weak echoes; targets at an angle above about 10 to 15° reflect the sound away.
- Environment: air currents, steam, dust, high temperature gradients and noise at the same frequency (compressed air, other ultrasonic sensors) degrade the reading.
- Level and distance: widely used for tank level, roll diameter and object detection: output may be a switch, 4 to 20 mA, 0 to 10 V or IO-Link.
Choosing between them
| Sensor | Choose when | Avoid when |
|---|---|---|
| Inductive | The target is metal and close; the environment is dirty or wet | The target is not metal, or the gap is large |
| Capacitive | You must detect plastic, liquid, powder or wood, or the level through a wall | The sensor can get wet or dirty with deposits you cannot compensate |
| Magnetic | You can attach a magnet; detection through non-magnetic walls; cylinder end positions | There is a lot of steel or stray magnetic field nearby |
| Ultrasonic | The target is any material, color or transparent; distances of 0.1 to 10 m | The target is soft, angled, or in turbulent or very hot air |
| Photoelectric | Long range, small objects, fast switching (see Photoelectric and Vision Sensors) | The lens will be covered by dirt, steam or oil mist |
Mounting and interference
- Respect the free zone: a flush sensor can be mounted in metal with its face level; an unshielded sensor needs clear metal-free space around the face (about three times the diameter or the sensing distance).
- Space the sensors apart so that they do not interfere: the data sheet gives the minimum distance side by side (commonly twice the diameter for flush, three times for non-flush sensors) and face to face.
- Protect the face: a target that hits the sensor destroys it. Mount it so that the target stops short, and use a protective bracket. Do not use the sensor as a mechanical stop.
- Fix it firmly: do not over-tighten the nuts on a plastic body, and use a lock washer; vibration loosens a mount and shifts the switching point.
- Use the same type on the same machine so that spare parts and wiring practice are simple (see Installing and Troubleshooting Sensors).
- Weld spatter and strong fields near welders or induction heaters can switch or damage an inductive sensor: use welding-resistant types.
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| Never switches | Target out of range, wrong material, wrong supply, a failed output | Check the LED, the gap against Sa and the correction factor; measure the supply and output |
| Always on | Metal or a build-up near the face, sensitivity too high (capacitive), a shorted output | Remove the target; clean the face; reduce the sensitivity |
| Switches intermittently | Target at the edge of the range, vibration, a loose connector | Move the sensor closer; tighten; check the cable for damage |
| Detects two things | Wrong mounting (metal behind a non-flush sensor), another sensor interfering | Mounting distances and spacing |
| Drifts with temperature | Marginal sensing distance, an ultrasonic sensor without compensation | Sense at less than 0.8 Sn; use a compensated sensor |
| PLC misses fast pulses | The input filter or the scan is too slow | Use a high-speed input or a counter card |
Related
- Sensors and Field Devices: the overview of this guide.
- Photoelectric and Vision Sensors and Position, Displacement and Speed Sensors: longer-range and analog alternatives.
- Sensor Outputs and Wiring and Installing and Troubleshooting Sensors: wiring and mounting.
- I/O Wiring and Signals.
FAQ
What does “flush” mean?
A shielded (flush) sensor can be installed with its face level with the surrounding metal without false switching; an unshielded (non-flush) sensor has a longer range but needs a metal-free zone around the face.
Why is the real range of my inductive sensor less than the data sheet says?
The catalog range applies to a standard mild-steel target. Other metals (brass, aluminum, copper, stainless) and smaller targets reduce it. Multiply by the correction factor, and design to 81 percent of Sn.
Can an inductive sensor detect aluminum?
Yes, at about a third to half of the steel range, unless it is a factor-1 type that detects all metals equally.
Capacitive or ultrasonic for level?
Capacitive for a switch point through a thin plastic or glass wall or in a probe; ultrasonic (or radar) for a continuous level from the top of an open or closed tank. See Pressure, Level and Flow Sensors.
References
- IEC 60947-5-2, Low-voltage switchgear: proximity switches (Sn, Sr, Su, Sa).
- Pepperl+Fuchs, Balluff, Sick and Omron, Proximity sensor technical guides (correction factors, mounting, frequency).
- Fraden, J., Handbook of Modern Sensors, Springer.
Last reviewed: October 2026. Ranges and factors are typical; always use the data sheet of the sensor you buy.
