Match limit switches, proximity, photoelectric and analog sensors to applications, and name the actuators that controls drive.
Why it matters
A controller is only as good as what it can sense and what it can move. Most automation faults are not in the PLC program: they are a dirty photo-eye, a proximity sensor knocked out of range, a cut cable or a sticking valve. Knowing which sensor suits which job, and how it is wired, is what lets you fix a machine quickly and replace a part with the right one.
Discrete (on/off) sensors
Limit switches are mechanical: a lever, plunger or roller is pushed by the moving part, which changes NO and NC contacts. Rugged and easy to understand, but they wear and need contact with the target.
Inductive proximity sensors detect metal without contact, using an electromagnetic field at the sensing face. Range is short, typically a few millimeters up to a few tens of millimeters, and depends on the metal: steel is detected at the rated distance, aluminum and brass at shorter range. Uses: detecting a cylinder rod end, gear teeth for speed, a metal pallet in position.
Capacitive proximity sensors detect almost anything, including plastic, wood, powder and liquid, often through a non-metallic tank wall. They usually have a sensitivity adjustment. Uses: level in a plastic hopper, detecting cardboard boxes.
Photoelectric sensors use a light beam:
- Through-beam: separate emitter and receiver facing each other. Longest range and most reliable; the object breaks the beam.
- Retroreflective: emitter and receiver in one housing, aimed at a reflector. Easier to install; shiny objects can fool them unless the sensor is polarized.
- Diffuse: the light bounces off the object itself. Simplest to mount but shortest range, and affected by the object's color.
Magnetic (reed or Hall-effect) switches clip onto pneumatic cylinders and detect a magnet in the piston to report extended or retracted.
Pressure, flow, level and temperature switches change state at a set point, for example low oil pressure.
Sinking and sourcing (NPN and PNP)
Three-wire DC sensors have power (brown, +24 V), common (blue, 0 V) and output (black).
- A PNP (sourcing) sensor switches +24 V onto the output wire when it detects. It needs a sinking PLC input.
- An NPN (sinking) sensor connects the output to 0 V when it detects. It needs a sourcing input.
Mixing them up gives an input that never turns on. Check the sensor's part number and the input card's wiring diagram before replacing one. Most sensors also have an indicator LED showing when they detect, which is the first thing to check when troubleshooting.
Analog sensors
Analog sensors give a value, not just on/off:
- Pressure transmitters, level transmitters, flow meters.
- Temperature: thermocouples (wide range, small voltage) and RTDs (accurate resistance change, often Pt100).
- 4 to 20 mA is the standard signal. A live zero of 4 mA means a reading of 0 mA tells you the wire is broken.
Worked example. A pressure transmitter is ranged 0 to 150 psi on 4 to 20 mA. The PLC reads 13.6 mA.
pressure = (13.6 − 4) / (20 − 4) × 150 = 9.6 / 16 × 150 = 90 psi
Encoders count pulses as a shaft turns, giving position and speed. Incremental encoders count from a reference; absolute encoders know their position at power-up.
Actuators
Outputs move the machine:
- Contactors and motor starters switch motors; relays switch smaller loads.
- Solenoid valves shift pneumatic and hydraulic valves.
- Pilot lights, horns and stack lights tell people what is happening.
- Variable frequency drives control motor speed (next lesson).
- Servo drives and stepper drives control precise position.
PLC output cards come as relay outputs (switch AC or DC, slower, contacts wear), transistor outputs (DC, fast) and triac outputs (AC).
Matching sensors to applications
Application Good choice
Detect a steel bracket 5 mm away Inductive proximity
Detect clear plastic bottles on a conveyor Through-beam or a clear-object photo sensor
Detect level of grain through a plastic bin Capacitive proximity
Know if an air cylinder is retracted Magnetic reed switch on the cylinder
Measure tank level continuously 4-20 mA level transmitter
Detect a door is closed (not for safety) Limit switch or inductive sensor
Measure shaft speed Inductive sensor on gear teeth, or an encoder
Safety functions such as guard doors use special safety-rated devices, covered in the machine safety lesson. An ordinary sensor is not a safety device.
Common mistakes
- Replacing a PNP sensor with an NPN one.
- Expecting an inductive sensor to see aluminum at the steel rating.
- Diffuse photo-eyes aimed at a shiny background that reflects light back.
- Reading 0 mA as "zero pressure" instead of a broken loop.
Safety
Control panels contain voltages that can kill, stored energy in drives and capacitors, and machines that can start unexpectedly. Everything in this course is practised on paper or in simulators. Working in real panels requires employer training, supervision by a qualified person, lockout/tagout and the arc-flash practices in NFPA 70E (https://www.nfpa.org/codes-and-standards/nfpa-70e-standard-development/70e), and for electricians a registered apprenticeship and state or local licence. Checked on 2026-10-23.
Recap
- Limit switches touch; inductive sensors see metal; capacitive sensors see most materials; photo sensors use light (through-beam is most reliable).
- PNP sources +24 V, NPN sinks to 0 V; match the input card.
- 4 to 20 mA analog signals: value = (mA − 4) / 16 × span.
Try it
Open the Do tab and take the quiz on matching sensors to applications.