Chapter Goal: To understand how PLCs "see" the world. You'll learn to differentiate between the main types of industrial sensors, select the correct one for a specific application, and correctly wire them based on the crucial PNP vs. NPN concept.
A PLC program, by itself, is blind. It has no knowledge of the physical world. Sensors are the essential devices that act as the eyes and ears of the automation system. They convert a physical condition—like the presence of a box—into an electrical signal that a PLC digital input can understand.
This chapter focuses on discrete (or digital) sensors. Their job is to provide a simple "ON" or "OFF" answer to a question. For example: "Is the machine guard closed?" (YES/NO) or "Is there a bottle at the filling station?" (YES/NO).
Proximity sensors are robust, non-contact switches that detect objects at a very short range (typically from 1mm to 40mm). With no moving parts to wear out, they are extremely reliable in industrial settings.
Inductive Proximity Sensors
How They Work: An inductive sensor generates a high-frequency electromagnetic field from its sensing face. When a metal object enters this field, it causes a disruption that the sensor's internal circuitry detects, triggering the output to switch ON.
Key Characteristic: They can only detect metal objects. This is a critical feature, as it allows them to ignore non-metal objects like plastic pallets or cardboard boxes.
Common Applications:
Confirming a metal part is correctly seated in a clamp.
Detecting the presence of aluminum cans on a production line.
Counting the teeth of a metal gear to measure rotation.
Capacitive Proximity Sensors
How They Work: A capacitive sensor generates an electrostatic field. When any object with a dielectric constant different from air (which includes metal, plastic, wood, water, powders, etc.) enters this field, it changes the capacitance. The sensor detects this change and switches its output.
Key Characteristic: They can detect almost any material, making them very versatile. However, this also means they can be falsely triggered by things like moisture buildup or dust.
Common Applications:
Sensing the level of plastic pellets inside a non-metallic hopper.
Detecting the presence of a cardboard box at the end of a conveyor.
Confirming liquid is present inside a glass or plastic tube.
Photoelectric sensors (often called "photo-eyes") use a beam of light to detect objects, allowing for much longer sensing distances than proximity sensors. Every photoelectric sensor has two main parts: an Emitter (sends the light, usually infrared) and a Receiver (detects the light).
1. Through-Beam Sensors
Arrangement: The Emitter and Receiver are housed in two separate units, mounted opposite each other.
Principle of Operation: An object is detected when it physically passes between the two units and breaks the beam of light.
Pros: The most reliable and accurate type, offering the longest sensing range and best performance in dirty or dusty environments.
Cons: Requires mounting and wiring two separate devices.
Use Case: A perfect choice for a safety guard on a machine opening. If the beam is broken, the machine stops.
2. Retro-Reflective Sensors
Arrangement: The Emitter and Receiver are combined into a single housing. A special prismatic reflector is mounted opposite the sensor.
Principle of Operation: The sensor sends a beam of light to the reflector, which bounces it back to the receiver. An object is detected when it passes between the sensor and reflector, breaking the beam.
Pros: Easier to wire and install than a through-beam (only one side needs power).
Cons: Can have trouble detecting highly reflective objects (like a mirror or a shiny can), as the sensor might mistake the object's reflection for the reflector.
Use Case: The most common sensor for detecting boxes on a conveyor belt.
3. Diffuse-Reflective Sensors
Arrangement: The Emitter and Receiver are in a single housing, similar to retro-reflective, but no reflector is used.
Principle of Operation: The sensor sends out a beam of light and detects an object when the light bounces directly off the object's surface and back to the receiver.
Pros: Easiest, fastest, and cheapest to install.
Cons: The least reliable type. Its performance depends heavily on the object's characteristics—a light-colored, flat object will be detected much further away than a dark, curved, or absorbent object.
Use Case: Best used for simple presence detection where the object and position are consistent, such as detecting a leaflet in a tray.
This is a fundamental concept that every technician must master. PNP and NPN describe how a 3-wire DC sensor's output is electrically configured. Using the wrong type for your PLC input module will not work.
The 3 Wires:
Brown: Always connects to +24V DC.
Blue: Always connects to 0V DC (Common/Ground).
Black: The Signal Output that connects to the PLC input.
PNP — Sourcing Output
Think of the 'P' as Positive.
When a PNP sensor detects an object, its internal switch connects the Black signal wire to the Positive (+24V DC) source.
It SOURCES or provides a +24V signal to the PLC input.
This is the dominant standard in Europe and North America.
NPN — Sinking Output
Think of the 'N' as Negative.
When an NPN sensor detects an object, its internal switch connects the Black signal wire to the Negative (0V DC) source.
It SINKS the PLC input's signal down to 0V.
This is the dominant standard in Asia.
The Golden Rule: Your PLC's input module is designed to work with either PNP or NPN sensors. A "Sinking" input module expects a positive signal from a PNP sensor. A "Sourcing" input module provides its own power and expects to be pulled down to 0V by an NPN sensor. You must match the sensor type to the module type. Always check the datasheets for both components.