How to replace a discontinued sensor: PNP or NPN, NO or NC and M12 connector cables
Proximity and photoelectric sensors work in harsh conditions – vibration, dust, oil, impacts. That is why they often fail, and after a few years a specific model is often discontinued. Finding a replacement is easy if you know what to compare.
1. Operating principle
- Inductive – detects only metal, contactless, very reliable.
- Capacitive – detects non-metals too (plastic, liquids, granules), often used for level control.
- Photoelectric – works with a light beam: diffuse (reflection from the object), with reflector, or through-beam transmitter-receiver pair.
2. Body and sensing range
Cylindrical sensors are identified by thread size: M8, M12, M18, M30. The sensing range of inductive sensors depends on size and mounting method: flush-mountable the sensor can be screwed into metal flush with the surface, but has a shorter range; non-flush – longer range, but the area around its head must be kept clear.
3. Output: PNP or NPN
This is the most common mistake when replacing a sensor. PNP the output switches '+' to the load when activated (most common in Europe), NPN – connects the load to '–'. If PLC inputs are designed for PNP sensors, an NPN sensor will not work with them (and vice versa).
4. Output function: NO or NC
NO – the output switches on when an object is detected; NC – it switches off. In photoelectric sensors this is called Light-ON / Dark-ON. Some sensors have both outputs or a switchable mode.
5. Connector and wire colours
Many industrial sensors have an M12 or M8 connector, or a fixed cable. The common colour code for 3-wire DC sensors is:
- Brown (1) – supply +10…30 V DC
- Blue (3) – 0 V
- Black (4) – output
- White (2) – second output or not used (in 4-wire sensors)
Always check against the data sheet of the specific model before connecting.
6. Power supply and protection
Usually 10–30 V DC. Compare the protection class (IP67, IP68, IP69K for washdown equipment) and the operating temperature.
Example
Photoelectric diffuse sensor Omron E3FA-DP21 (M18, PNP, M12 connector) – a popular replacement for older M18 optical sensors. An example of an inductive sensor is SICK IME12-02BPSZC0K.
How to find a replacement in a few minutes
Photograph the sensor's marking and use the 📷 button in the search field – the system will recognise the code. If the model is no longer available, code search will automatically suggest the official manufacturer replacement and other manufacturers' alternatives with prices. All sensors are in the section Sensors.
