Industrial sensors and actuators
UAT 202 Fundamentals of Automation Technology
Lesson
By the end of this module you will be able to
- Choose inductive, capacitive and photoelectric presence sensors to suit the object and task
- Explain PNP and NPN outputs and connect them to the matching PLC input type
- Convert a 4–20 mA signal to a measurement and detect open wires or sensor faults
- Compare actuators: valves and cylinders, relays and contactors, and stepper and servo motors
Why this matters
The battery-swap station must know when a drone has landed, whether a battery is on the belt, and whether the charging cabinet is too hot. Choose the wrong sensor type, such as a metal-only sensor for a plastic battery case, and the system cannot “see” the battery; wire a sensor to the wrong PLC input type and no signal arrives even though the sensor works.
Presence sensors
| Type | Principle | Detects | Use in the station |
|---|---|---|---|
| Inductive | Electromagnetic field | Metal only | Detecting that the metal gripper arm is in position |
| Capacitive | Electrostatic field | Metal and non-metal, such as plastic, wood and liquids | Detecting the plastic battery case |
| Photoelectric | Light beam | Objects that block or reflect light | Detecting the drone on the landing pad |
Photoelectric sensors come in three types: through-beam, with separate transmitter and receiver and the object blocking the beam; retro-reflective, with transmitter and receiver in one housing and light returned from a reflector; and diffuse, with light reflected from the object itself.
PNP and NPN
A three-wire sensor has a positive supply wire, a negative supply wire and a signal wire. When it detects an object:
- PNP (sourcing) connects the signal wire to the positive supply; current flows out of the sensor into the PLC input
- NPN (sinking) connects the signal wire to the negative supply; current flows into the sensor
The PLC input must be the matching type: sinking inputs for PNP sensors, and sourcing inputs for NPN sensors. Always check the manuals of both the sensor and the input module, including the supply voltage in that sensor model’s datasheet.
The 4–20 mA signal
Sensors measuring continuous values, such as temperature or pressure, commonly send a 4–20 mA current in industry. Current is the same everywhere in a series loop, so long cables do not distort it as they do a voltage signal. It starts at 4 mA rather than 0 mA (a live zero) so a “true zero” can be told apart from a “broken wire”.
NAMUR recommendation NE 43 standardises signal levels for transmitter failure information. General sources describe values at or below 3.6 mA, or at or above 21 mA, as failures; check these figures against the manual of the transmitter model used.
Example 1 Converting the cabinet temperature signal
The temperature transmitter is ranged 0–100 °C over 4–20 mA.
def to_temperature(ma, lo=0.0, hi=100.0):
if ma <= 3.6:
return None, "fault: low (open wire or dead sensor)"
if ma >= 21.0:
return None, "fault: high (sensor failure)"
value = lo + (ma - 4.0) / 16.0 * (hi - lo)
note = "ok" if 4.0 <= ma <= 20.0 else "outside range, check sensor"
return value, note
for ma in (4.0, 8.8, 12.0, 20.0, 2.1, 21.5, 3.8):
value, note = to_temperature(ma)
shown = f"{value:6.1f} °C" if value is not None else " --- "
print(f"{ma:5.1f} mA -> {shown} {note}")
4.0 mA -> 0.0 °C ok
8.8 mA -> 30.0 °C ok
12.0 mA -> 50.0 °C ok
20.0 mA -> 100.0 °C ok
2.1 mA -> --- fault: low (open wire or dead sensor)
21.5 mA -> --- fault: high (sensor failure)
3.8 mA -> -1.3 °C outside range, check sensor
2.1 mA does not mean a sub-zero temperature; it means a broken wire or dead sensor. The program must report a fault and make the system safe, for example by stopping charging, rather than computing a temperature. 3.8 mA lies between the measuring range and the failure band, so the program still computes a value (−1.3 °C) but warns to check the sensor.
Actuators
- Solenoid valves and pneumatic cylinders: electricity switches a valve, which lets compressed air push a piston. A single-acting cylinder extends with air and returns by spring; a double-acting cylinder uses air both to extend and retract. The station’s battery gripper uses this
- Relays and contactors: a small signal switches a large circuit; a contactor is a large relay for high-power loads such as motors
- Stepper and servo: a stepper motor turns in steps according to pulses, usually without position feedback (open loop), while a servo has an encoder that measures position and corrects it (closed loop). Steppers are cheaper, but if overloaded they can lose steps without the controller knowing
Relays and contactors: circuits and contact ratings
A relay is a switch operated by electricity. Inside is a coil (an electromagnet); when current flows through it, it pulls a metal armature that moves the contacts. The coil circuit and the contact circuit are electrically separate, so a 24 V DC PLC output of a few tens of milliamps can switch a 230 V AC fan safely, much like a small key that opens a large gate.
- Terminals: every changeover contact has a common terminal (COM), a normally open (NO) terminal that connects to COM only when the coil is energised, and a normally closed (NC) terminal that is connected when the coil is off. One changeover contact is called SPDT; a relay with two sets, such as the Omron MK-S DPDT, can switch two circuits at once
- Coil ratings: Omron’s MK-S datasheet gives a 24 V DC coil a rated current of 55.8 mA (430 Ω). The relay must pick up at no more than 80% of rated voltage, so a supply that sags does not immediately stop it working
- Latching (self-holding) circuit: wire a NO contact of the relay itself in parallel with the START button. Once the coil is energised, that contact holds the current path by itself after START is released, until the NC STOP button breaks the circuit. This is the original hardwired circuit that the seal-in ladder rung of module 3 copies
- Flyback diode: when the current in a DC coil is cut, the coil produces a high reverse voltage spike that can damage the transistor driving it. A diode across the coil absorbs this spike. The MK-S datasheet offers models with a built-in diode, and states that their release time grows from 20 ms to at most 40 ms, which must be allowed for in timing-critical work
Contact ratings depend on the type of load. The MK-S NO contact is rated 10 A at 250 V AC and 10 A at 30 V DC for resistive loads, but only 7 A at 250 V AC for inductive loads with a power factor of 0.4, because the magnetic energy in a coil or motor makes an arc as the contacts open and erodes them. The electrical life at rated load is 100,000 operations, far below the mechanical life of 5,000,000 operations.
A contactor is a relay built for high-power loads, especially motors. IEC 60947-4-1 (2023 edition) rates contactors by utilisation category: AC-1 is for non-inductive or slightly inductive loads such as heaters, and AC-3 is for squirrel-cage motors that are started and switched off while running (Lovato’s explanation). A motor draws a starting current several times its running current, so the same contactor has a lower rating in AC-3 than in AC-1. Choose a contactor by its AC-3 rating against the motor’s nameplate current, and add an overload relay to protect the motor.
Example 2 Choosing a relay or contactor for the station’s loads
The PLC’s transistor outputs are rated 0.5 A at 24 V DC (assumed). The candidate relay is the Omron MK-S with a 24 V DC coil. Load currents come from the nameplates of the station’s devices (assumed values). The team’s rule: the load current times 1.25 must not exceed the rating.
PLC_OUT_A = 0.5 # transistor output rating per point (assumed)
COIL_A = 0.0558 # MK-S relay, 24 VDC coil
RATING = {"AC resistive": 10.0, "AC inductive": 7.0} # MK-S NO contact, 250 VAC
MARGIN = 1.25 # team policy: load x 1.25 must not exceed the rating
loads = [("pad floodlight 230 VAC", "AC resistive", 0.26),
("cabinet fan 230 VAC", "AC inductive", 0.9),
("gripper valve 24 VDC", "DC inductive", 0.25),
("conveyor motor 3-phase 400 V", "motor", 1.9)]
print(f"relay coil {COIL_A * 1000:.1f} mA = {COIL_A / PLC_OUT_A:.0%} of the PLC output rating")
for name, kind, amps in loads:
if kind in RATING:
ok = amps * MARGIN <= RATING[kind]
verdict = f"MK-S relay ({kind} rating {RATING[kind]:.0f} A): {'OK' if ok else 'too small'}"
elif kind == "DC inductive":
ok = amps * MARGIN <= PLC_OUT_A
verdict = f"PLC output directly + flyback diode: {'OK' if ok else 'use a relay'}"
else:
verdict = f"contactor rated AC-3 >= {amps * MARGIN:.1f} A + overload relay"
print(f"{name:<29} {amps:4.2f} A -> {verdict}")
relay coil 55.8 mA = 11% of the PLC output rating
pad floodlight 230 VAC 0.26 A -> MK-S relay (AC resistive rating 10 A): OK
cabinet fan 230 VAC 0.90 A -> MK-S relay (AC inductive rating 7 A): OK
gripper valve 24 VDC 0.25 A -> PLC output directly + flyback diode: OK
conveyor motor 3-phase 400 V 1.90 A -> contactor rated AC-3 >= 2.4 A + overload relay
The relay coil uses only 11% of the output’s capacity, so the PLC can drive it directly. The fan is an inductive load, so it is checked against the 7 A rating, not the 10 A one. The small DC valve can run straight from the PLC output, but it needs a flyback diode. The three-phase motor needs a contactor with an AC-3 rating, because it has three poles and a starting current that an ordinary relay is not designed to switch. Life matters too: if the fan relay switched 20 times an hour around the clock (480 operations a day), 100,000 operations would last only about 208 days, so relays that switch often belong in the maintenance plan.
Module lab
Lab: testing sensors and actuators on the training rig
- Test the inductive, capacitive and photoelectric sensors with a metal object, a plastic object and the battery case, recording detection distances.
- Read the labels on the sensors and PLC input module, identify PNP or NPN and sinking or sourcing, then wire them under the instructor’s supervision (power off before every connection).
- Use a signal simulator or multimeter to measure a 4–20 mA loop at 4, 12 and 20 mA, and check against the code in Example 1.
- Disconnect one 4–20 mA signal wire, observe the reading, and check that the program reports a fault.
- Command a solenoid valve to move a cylinder, record the travel time, and note whether it is single or double acting.
Common mistakes
Watch out
- Using an inductive sensor for plastic objects
- Wiring a PNP sensor to a non-matching input type
- Converting signals below 4 mA into a measurement instead of reporting a fault
- Switching a high-power motor directly with a small relay
- Switching a DC coil without a flyback diode, so the voltage spike damages the output transistor
- Using a stepper where exact position matters without position checking
Summary
- Inductive sensors detect metal, capacitive sensors both metal and non-metal, and photoelectric sensors use three beam arrangements
- PNP connects the signal to the positive supply and NPN to the negative, and must match the PLC input
- 4–20 mA starts at 4 mA to tell zero from a broken wire, and out-of-range signals must be reported as faults
- Choose actuators by load and whether position must be measured
- Rate relay and contactor contacts by load type: inductive loads get a lower rating, and motors need a contactor chosen by its AC-3 rating
Check your understanding
- To detect a plastic battery case, should you use an inductive or a capacitive sensor?
- A 0–100 °C transmitter sends 16 mA. What is the temperature?
- A relay contact is rated 10 A for resistive loads and 7 A for inductive loads at 250 V AC. Under the team’s 1.25 margin, may it switch a 230 V AC fan drawing 6 A?
- How should a reading of 0.5 mA be interpreted?
- When it detects an object, what does a PNP sensor connect its signal wire to?
Answers
- Capacitive, because inductive sensors detect metal only
- °C
- No: the fan is an inductive load, and A exceeds the 7 A inductive rating
- A fault, such as a broken wire or unpowered sensor, not a measurement
- The positive supply (sourcing)
Key formulas
| Converting 4–20 mA to a measurement |
Key references
- ifm electronic. Proximity sensors explained: types, applications and benefits. link
- KEYENCE. Photoelectric sensors. link
- Fluke Corporation. What is a 4-20 mA current loop? link
- NAMUR. (2021). NE 43: Standardization of the signal level for the failure information of digital transmitters. link
- Oriental Motor. The choice between servo motors and stepper motors. link
- Bolton, W. (2015). Programmable logic controllers (6th ed.). Newnes.
- Omron. MK-S general-purpose relays (MKS2P/MKS3P) datasheet. link
- International Electrotechnical Commission. (2023). Low-voltage switchgear and controlgear – Part 4-1: Contactors and motor-starters – Electromechanical contactors and motor-starters (IEC 60947-4-1:2023). link
- Lovato Electric. What is the utilization category of a contactor? Lovato Academy. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Lab or field practice from worksheets with a safety checklist
Learning evidence: Checked worksheets and quiz results