Simple devices that answer a yes-or-no question
Not every position measurement needs an encoder. Often a machine only needs to know whether something is there: has the slide reached the end of its travel, is the guard closed, is there a part at the station? Limit switches and proximity sensors answer this kind of question with an on or off signal that a controller can read directly.
Because they are simple, these devices are everywhere. They set the home reference for a machine axis, mark the end of travel, count items on a line and confirm that a cylinder has fully extended.
Mechanical limit switches
A limit switch is a switch operated by physical contact. A moving part of the machine, such as a cam, a dog or a carriage, pushes an actuator on the switch (a lever, plunger or roller), which changes the state of electrical contacts inside.
Common features include:
- Normally open and normally closed contacts. A normally open contact closes when pressed; a normally closed contact opens. Many switches have both.
- Different actuator styles. Roller levers suit cams moving past, plungers suit head-on contact, and adjustable rod or wobble-stick types suit loose or irregular targets.
- Rugged housings. Many are sealed for washdown, oil and dust, and they can switch fairly high loads directly.
Their strengths are low cost, easy understanding and a clear, physical on/off action. Their weaknesses come from the contact itself. Moving parts wear, contacts can become dirty or pitted, and fast machines can bounce or damage the lever. Limit switches also need a mechanical target that reaches them in the same way every time.
Proximity sensors
A proximity sensor detects a target without touching it. Since nothing rubs, there is little wear, and sealed sensors work well in dirty and wet places. The main types differ by what they can detect.
- Inductive sensors detect metal. They produce an oscillating magnetic field and sense when a metal target disturbs it. Ferrous and non-ferrous metals typically have different sensing distances, so manufacturers publish correction factors.
- Capacitive sensors detect a wide range of materials, including plastics, liquids and powders, by sensing changes in an electric field. They are often used for level detection through a tank wall, though they can be sensitive to buildup and humidity.
- Magnetic sensors, such as reed switches and Hall-effect devices, respond to a magnet. A magnet on a cylinder piston is a very common way to report piston position, as seen on many pneumatic actuators.
- Photoelectric sensors use a light beam, which is broken or reflected by the target. They can sense at long range and detect nearly any visible object, but dust, fog and dirty lenses can affect them. Ultrasonic sensors, which use sound waves, are a related option.
The sensing distance listed on a datasheet is a nominal figure measured under standard conditions. In practice, the usable gap is smaller, and mounting variation, target material and temperature all matter. Installers typically leave margin rather than operate at the limit.
Electrical output styles
Proximity sensors usually have a solid-state output instead of a mechanical contact. In DC systems the common choices are:
- PNP (sourcing), which switches the positive supply to the load.
- NPN (sinking), which switches the load to the negative side.
Both exist in normally open and normally closed forms. The controller input must match the type, or the signal will never be read as intended. Two-wire, three-wire and four-wire versions exist, and AC sensors are also available. Always follow the datasheet and the plant’s wiring standards, since a mismatch is among the most common causes of a new sensor appearing dead.
For a reliable safety-related function, a single standard switch is generally not enough on its own. Dedicated safety devices and circuits are used instead, which is a separate subject, touched on in the discussion of emergency stop circuits.
Where each type fits
Mechanical limit switches are often chosen for end-of-travel protection on heavy slides, for rugged environments where a physical actuator is acceptable, and for situations where the switch must handle a real electrical load. Inductive proximity sensors are the standard choice for detecting metal parts, cams and machine positions without wear. Capacitive sensors suit non-metallic or liquid targets. Magnetic sensors suit anything where a magnet can be fitted. Photoelectric sensors suit longer distances and objects of unknown material.
In a typical machine, these devices sit alongside process control sensors and other inputs that wire into a PLC input card or a fieldbus module. Sensors with more detail, such as analog position sensors or encoders, take over where on/off information is not enough.
Homing and end-of-travel roles
Two roles come up again and again. A home sensor gives an incremental-feedback axis a known reference at start-up. The machine moves slowly toward the sensor, detects it and sets zero. Overtravel limits sit at the ends of an axis to stop it before it hits a hard stop. Software limits can also be configured, but hardware limits remain an independent layer that works even if the program is wrong.
Why sensors give false signals
When a sensor misbehaves, the causes are usually ordinary.
- Misalignment or loose mounting. A bracket that has shifted slightly can put the target outside the sensing range.
- Contamination. Metal swarf, oil film or dirt on a face can cause false triggers. This is a particular issue with magnetic buildup on inductive sensors.
- Electrical noise. Long sensor cables run alongside motor cables can pick up interference.
- Damage and wear. Crushed housings, cut cables, worn levers or water ingress.
- Wrong type. A sensor that cannot see the target material or distance will behave erratically.
Working on sensors near moving machinery needs the machine to be isolated and locked out following the plant’s procedures, and bypassing a limit device to keep a machine running is dangerous. Follow the manufacturer’s documentation and local rules; use trained, authorized staff. This article is general information, not engineering advice.