Device Selection #01: Photoelectric, Proximity or Ultrasonic — Choosing by Workpiece Material and Surface
Short answer: choose a proximity sensor when the target is metal at a close distance in a dirty environment; choose a photoelectric sensor when you need long range, or need to detect objects of any color or small parts; choose an ultrasonic sensor when the target is transparent, has a glossy surface, is a liquid, or when color and translucency would fool a photoelectric sensor. All three answer the same question — "is there an object here / how far away is it" — but each relies on a different physical principle, so the material and surface of the workpiece are what decide which one to pick. This article helps you look at the workpiece and the environment and choose the right sensor, instead of buying the wrong one and discovering intermittent detection out on the line.
Quick comparison of the three sensor types
| Criterion | Proximity | Photoelectric | Ultrasonic |
|---|
| Principle | Electromagnetic / capacitive field | Light beam (infrared/laser) | Reflected sound waves |
| Detectable targets | Metal (inductive type); any object (capacitive type) | Almost any solid object | Any sound-reflecting object, including transparent/liquid |
| Typical range | 1–40 mm | A few cm to tens of meters | 3 cm to a few meters |
| Transparent/glossy targets | Capacitive yes; inductive no | Difficult, easily fooled | Good |
| Effect of dust, oil, mist | Little effect | Sensitive, lens needs cleaning | Little effect from dust; sensitive to strong airflow and hot air |
| Effect of surface color | None | Yes (black absorbs light) | None |
| Response speed | Very fast | Very fast | Slower |
| Relative cost | Low | Medium | Higher |

Proximity sensor: close, rugged, only suits certain targets
A proximity sensor detects an object without contact, based on the change in a physical field as the object approaches. There are two main families:
- Inductive: detects metal only. This is the most common type in factories because it is rugged, cheap, resistant to dust and oil, and responds quickly. It is used to detect metal parts, cylinder position (via the magnetic ring), count metal products, and set travel limits.
- Capacitive: detects almost any object (metal, plastic, wood, liquid, granules) through a change in capacitance. In return it is sensitive to humidity and harder to adjust, so it is typically used for level detection in tanks and for non-metallic objects.
The common strength of proximity sensors is durability and tolerance of dirty environments: there is no lens to collect dust, they are not fooled by color, and they respond extremely fast. Their weakness is the short range (usually a few millimeters to a few tens of millimeters). If you need to detect an object far away, a proximity sensor is not a fit.
One practical note: the range of an inductive sensor depends on the type of metal. The rated value in the catalog is for steel; for aluminum, copper or stainless steel the range drops significantly (the datasheet provides a correction factor). Choose the range with a margin based on the actual material of the workpiece.
Photoelectric sensor: long range, flexible, afraid of dirt and color
A photoelectric sensor emits a beam of light (infrared, red, or laser) and detects the object through the change in the amount of light received. It is the most flexible type in terms of range and target type, and comes in three arrangements:
- Through-beam: the emitter and receiver face each other; when an object breaks the beam it triggers. Longest range (up to tens of meters) and most reliable, but you must mount two heads and align them.
- Retro-reflective: one head both emits and receives, using a reflector facing it. Medium range, mounted on one side.
- Diffuse: one head, using the object itself as the reflecting surface. Most compact to mount but shortest range, and it depends on the color and gloss of the object — a black object absorbs light and is hard to detect, a glossy object reflects light erratically.
The strengths of photoelectric sensors are long range, the ability to detect small objects (laser type), and high speed. Their weakness is sensitivity to the environment: dust, oil and mist on the lens cause errors, and the diffuse type is fooled by color and gloss. In a clean environment, where you need long range or need to detect a variety of objects, photoelectric is a good choice.
Ultrasonic sensor: for targets that defeat light
An ultrasonic sensor emits high-frequency sound waves and measures the time for the reflected wave to return, to know whether there is an object and how far away it is. Because it relies on sound rather than light, it handles exactly the cases where a photoelectric sensor fails:
- Transparent objects: glass bottles, clear plastic film, acrylic sheet — light passes through so photoelectric struggles, but sound reflects well.
- Glossy, mirror-like surfaces: they scatter light erratically but reflect sound stably.
- Liquids and color-changing surfaces: measuring liquid level, detecting objects that continuously change color.
Ultrasonic sensors are also little affected by dust. In return they are slower (they must wait for the wave to travel out and back), sensitive to strong airflow, hot air streams and porous sound-absorbing surfaces (foam, cotton), and have a blind zone right at the sensor face. They usually cost more than the other two types. Ultrasonic is therefore the choice when the material or surface rules out the two cheaper options, not the default.
Choosing: read the workpiece and the environment
The selection process:
- What is the target? Nearby metal → inductive proximity (cheapest, most rugged). Transparent/glossy/liquid → ultrasonic. Varied solid objects needing long range → photoelectric.
- How far away? A few mm → proximity. A few cm to tens of meters → photoelectric. A few cm to a few meters for difficult targets → ultrasonic.
- What is the environment? Lots of dust and oil → proximity or ultrasonic (avoid diffuse photoelectric). Clean, needs range → photoelectric.
- Does the surface cause problems? Black, glossy, transparent → avoid photoelectric, use ultrasonic or capacitive proximity.
Quick examples: detect an aluminum can on a conveyor at about 10 mm → inductive proximity (remember to derate the range for aluminum). Detect assorted-color cartons at 2 meters → through-beam or retro-reflective photoelectric. Detect a transparent water bottle → ultrasonic. Count small, matte-black parts at high speed → through-beam laser photoelectric.
Wiring: PNP or NPN, NO or NC
Choosing the right sensor type is only half of it; the other half is wiring it correctly to the controller. A digital sensor typically has a PNP (sourcing) or NPN (sinking) output, and a normally open (NO) or normally closed (NC) contact. Japanese PLCs often use sinking inputs, which suit PNP sensors; but check the PLC datasheet before buying. Choose the wrong PNP/NPN and a good sensor still cannot deliver a readable signal. As for NO/NC, choose by the safety principle: for critical circuits, wire it so that if the sensor fails or a wire breaks, the system goes to a safe state.
IP rating and environmental durability
Even after choosing the right sensing principle, you must still choose the right durability for the installation environment. The IP rating (for example IP67, IP69K) indicates how well the sensor withstands dust and water. A wash station or an area with high-pressure water jets needs IP69K; a spot where cutting oil is splashed around needs an oil-resistant housing; a welding environment needs a weld-field-immune type for proximity sensors, because the welding arc creates a strong electromagnetic field that causes false triggering. Ignore this factor and even the right sensor type will fail early or trigger falsely in the middle of the line.
Temperature also matters: areas near a furnace or a hot mold need a high-temperature sensor; a cold store needs a cold-resistant type that does not fog up on the lens (for the photoelectric type). Read the operating temperature range in the catalog and add a margin for the worst-case conditions at the installation point.
Switching distance, hysteresis and repeatability
For position-measurement or precise-detection applications, three parameters deserve a close look:
- Switching distance (Sn): the nominal value in the catalog; the actual working distance should be set within 70–80% of Sn to leave a margin for mounting tolerance, temperature and material.
- Hysteresis: the gap between the switch-on and switch-off points, which prevents signal chatter when the object sits right at the boundary. Necessary for stability, but it must be accounted for when position accuracy is required.
- Repeatability: the variation of the switching point between cycles; for precise positioning applications, repeatability matters more than range itself.
If the problem is really continuous distance measurement rather than just present/absent, you need a sensor with an analog output (analog ultrasonic, laser distance sensor) instead of a digital on/off sensor. This is a common mis-selection: buying a digital sensor for a problem that actually needs continuous measurement.
Example: reading one real station
A feeding station has four positions to detect:
- A steel part in the magazine, 8 mm away, oily environment: inductive proximity, IP67, set to work at ~6 mm (75% of range). Cheap, rugged, unafraid of oil.
- Whether the clamp cylinder has closed: a magnetic sensor mounted in the cylinder groove (a form of proximity), reading the piston position.
- Assorted-color finished boxes running on a conveyor, 1.5 m away: retro-reflective photoelectric, mounted on one side, with plenty of range to spare.
- Liquid adhesive level in a transparent tank: analog ultrasonic for level measurement, because the liquid and the transparent tank wall rule out the photoelectric option.
Four positions, three different principles — because the material, distance and surface differ at each spot. This is the right way to think: choose a sensor for each detection point, rather than forcing one type across the whole station.
Common mistakes
- Using diffuse photoelectric on black or glossy objects. The object absorbs or scatters the light, giving intermittent detection; switch to ultrasonic or through-beam.
- Not derating proximity range for the material. The catalog lists the range for steel; aluminum and stainless steel have shorter ranges.
- Using photoelectric in a dusty, oily environment with no cleaning plan. A dirty lens causes false triggering.
- Placing ultrasonic too close to the object, inside the blind zone, or where there is a stream of hot air or strong airflow.
- Buying the right sensor but the wrong PNP/NPN output for the PLC.
Quick selection checklist
- [ ] What is the target made of (metal / non-metal / transparent / liquid)?
- [ ] How far does the detection need to reach?
- [ ] Is the surface black, glossy or transparent in a way that troubles light?
- [ ] Is the environment full of dust, oil or mist?
- [ ] Does response need to be very fast (ultrasonic is slower)?
- [ ] Have you checked that the PNP/NPN, NO/NC output matches the controller?
- [ ] Have you derated the detection range for the real material and conditions?
If you are designing an automated station and are unsure which sensor to choose for each detection point, MINATA can advise on device selection based on the real workpiece and environment of your line. See MINATA's Engineering & Manufacturing service.
Reference: the センサ・スイッチ (sensors and switches) chapter and the "位置決めスイッチのIPコード" protection-rating table in the MISUMI technical catalog. Look up specific ranges, outputs and IP ratings in each supplier's sensor-line datasheet.
More in the Device Selection series
View all MINATA technical articles