Ask a search engine what “sensors for automation” means and you get a parts list. Inductive, capacitive, photoelectric, ultrasonic. Each one gets a definition and a slogan. Read the list and you still cannot answer the question that sent you here: which sensor do I put on my machine?
This guide takes the opposite route. A sensor’s job on an automated machine is not to be “a capacitive sensor.” It is to answer one of five questions the machine asks continuously. Learn the questions and the parts list stops being a list of names to memorize. It becomes a set of answers you can pick from, including the moment each answer stops working.
What Sensors for Automation Actually Do: Five Jobs, Not a Parts List
In automation, a sensor is the machine’s input organ. It sits where the physical world meets the controller: a part arriving, a piston reaching its end, a tank emptying. The sensor converts that event into an electrical signal the PLC can act on. Everything downstream, the relay, the counter, the motion command, fires only because a sensor answered one of five questions:
The five questions every automated machine asks
Is it there, or has it arrived? (presence and position)
How many have passed? (counting)
How much is left? (level)
What is it right now? (measuring: pressure, temperature, speed, distance)
Has it reached the end / is something about to collide? (travel end and guarding)
The five sensing jobs and the families that answer them
| Machine question | Sensor families that answer it | Where you will find them |
|---|---|---|
| Is it there / has it arrived? | Inductive proximity (metal only), capacitive proximity, photoelectric (diffuse, retro-reflective, through-beam), magnetic reed & Hall | Cylinder bodies, slide ends, pallet stops, part-in-place stations |
| How many have passed? | Photoelectric through-beam or diffuse, inductive proximity for metal parts | Conveyor sides, counting wheels, drop chutes |
| How much is left? | Capacitive proximity, float switches, level sensors, ultrasonic | Hoppers, tanks, cooling sumps |
| What is it right now? | Pressure, temperature and flow transmitters; rotary encoders for speed and position | Process lines, motor shafts, drive feedback |
| Has it hit the end / is something about to collide? | Mechanical limit switches and micro switches | Rail ends, door travel, mechanical stops |
Three notes before we go deeper. First, the type taxonomy you will find elsewhere, the seven- or ten-type lists, is correct but organized backward. It sorts sensors by the physics inside them. Machines sort sensors by the job they must do, and most jobs accept more than one physics. Second, this article means industrial automation sensors: the ones that survive on a plant floor and talk to a PLC. Consumer electronics, including the “proximity sensor” that blanks your phone screen, is a different world whose rules do not transfer. Third, the mechanical limit switch belongs on this map even though it is the unglamorous cousin. It answers the fifth question with contact, zero electronics, and one moving part that will eventually wear out. All of that is information.
Why That Sensor “Failed” (and How to Read a Sensor With No Nameplate)
The most common question about sensors in automation is not “which one do I buy?” It is “why does the one I have keep misbehaving?” Before ordering a replacement, work through what follows.
Most sensors that look failed are not failing at all. The target, the gap, and the environment usually fail first – so check them before you order a replacement.
Check the Target, the Gap, and the Environment Before the Sensor
Three things cause the large majority of false triggers, missed detections, and intermittent readings. All three live outside the sensor.
The target. Inductive proximity sensors trigger on metal content inside their detection zone, and they are unforgiving about target consistency. A 2025 Eng-Tips thread on a printing press is the textbook case. A registration sensor was missing one of two metal flags, and the engineer suspected the sensor. The veterans on the thread pointed at the flags themselves. The targets had been bumped and no longer presented the same surface area at the same distance, so the sensor’s detection point shifted between revolutions. The fix was new targets, not a new sensor; the forum noted proximity switches more than 50 years old were still doing their job on similar machines. When a machine that used to detect reliably starts missing, suspect the thing being detected before the detector.
The gap and alignment. Sensing distance is a physical window, not a guarantee. Set too far and targets skim past undetected. Set too close and the target can strike the sensor face. The same printing-press thread shows the practical consequence: moving an M8-class sensor a fraction of a millimeter changed whether one target out of two registered. “Just under 1/16 inch” was a position held by feel, and it sat at the edge of the window.
The environment. Metal dust, welding spatter, coolant mist, and neighboring sensors can all fake a reading. A case documented on the AutomationDirect community forum shows an unshielded capacitive sensor suffering interference in service. The standard remedies are spacing from surrounding metalwork and a shielded type. A recurring theme in maintenance forums is sensors that “drift, fail intermittently, or give false readings.” On investigation that complaint usually traces to contamination, cable damage, or marginal power, not the sensing element itself.
Ten-minute fault-finding sequence before you blame the sensor
- Clean the sensor face and inspect for physical damage or cracks.
- Confirm the target is consistent: same material, same size, same orientation every cycle.
- Measure the actual gap against the rated sensing distance – leave margin, don’t sit at the edge.
- Check for metal dust, coolant, or strong vibration at the mounting point.
- If more than one sensor is mounted close together, check the manufacturer’s minimum spacing.
- Verify supply voltage at the sensor terminals under load, not at the cabinet.
- Only then compare the sensor’s behavior against its datasheet.
What Each Sensor Family Is “Fooled” By
Every sensing physics has a blind spot baked into its principle. Knowing the blind spot turns “this sensor is broken” into “this sensor is the wrong tool for this condition.”
Sensor family blind spots and how to verify them on site
| Family | What it actually responds to | Typical false-trigger sources | On-site check |
|---|---|---|---|
| Inductive proximity | Metals only, at a distance that shrinks for non-ferrous targets (aluminum and copper detect far shorter than steel) | Metal dust, swarf, adjacent metal targets, magnetic clamps | Test with the same metal the machine processes; confirm the rated range assumed steel |
| Capacitive proximity | Anything with a high dielectric constant – damp wood, water, granules, liquids, and also metals | Nearby grounded metal, humidity changes, product buildup on the face | Confirm what the sensor is “seeing” through: a layer of damp dust can become the target |
| Photoelectric (diffuse) | Reflected light from the target | Shiny, dark, or transparent objects; dust on the lens; strong ambient light | Aim at the actual product finish – a black or clear item may need through-beam instead |
| Photoelectric (through-beam) | Anything that blocks the beam | Misalignment, vibration of emitter or receiver brackets | Check both lenses and the bracket rigidity; beam interruption is absolute |
| Ultrasonic | Reflected sound from dense materials | Foam, fabric, and porous materials absorb sound instead of reflecting it | Confirm the target is acoustically dense – foam or mesh will read as “nothing” |
| Reed switch (magnetic) | A magnet brought into range | Contact wear and mechanical aging of the reed element | Reed contacts age; in high-cycle cylinder duty many engineers now spec Hall-effect types for longer life |
Four Clues to Decode a Sensor With No Nameplate
The replacement scenario that defeats most people: the old sensor works electrically, but the machine builder is long gone, the part number is worn off, and nobody knows what was originally fitted. You can rebuild the specification from the hardware itself. In the printing-press thread above, the engineer identified the likely part purely from appearance. An 8 mm threaded barrel was enough to start comparing. The four clues, in order:
Four clues to read a sensor with no nameplate
- Thread diameter: measure the barrel. M8, M12, M18 and M30 are the standard cylindrical sizes, and each diameter has a typical rated-range band (an M8 inductive is commonly rated around 1-2 mm, M12 around 2-4 mm, M18 around 5-8 mm, M30 around 10-15 mm).
- Wire count: two wires means a 2-wire AC or DC type; three wires means DC with an NPN or PNP output; four wires means two outputs (NO + NC).
- Wire colors: brown = supply (+), blue = 0 V, black = the switched output, white = the second output. Reading the output against the supply tells you NPN (output switches to 0 V) versus PNP (output switches to +V).
- State at rest: measure continuity with a multimeter to confirm normally-open or normally-closed – the single most dangerous spec to guess, because it decides what happens on a broken wire.
The output question, NPN versus PNP and the NO/NC logic, is covered in depth in our separate guides on [NPN versus PNP output] and [proximity sensor wiring], which walk through matching a sensor to a PLC input card. For this article the point is simpler. Four physical clues on a dead sensor produce a complete, orderable specification, and every one of them is visible without a datasheet.
Choosing Automation Sensors by the Job They Must Do
New machines and retrofits are where the parts-list approach really breaks down. A machine asks several of the five questions at once, and each question has several legitimate answers. Work through the questions one at a time.
Confirm the sensor before you order.
Picking between sensing families for a machine job? Send the job description with target material, mounting spot, and distance, and we'll confirm the family and the part number before you order.
Confirm my sensor specCounting Parts on a Line
Counting is the job with the widest spread of valid answers, because the product decides the physics. Metal parts in a consistent stream: an inductive proximity sensor is the simple, reliable choice. No lens to foul, and it detects only the metal you care about. Cardboard boxes, plastic bottles, paper, anything non-metal: switch to photoelectric. A through-beam pair, with emitter and receiver facing each other across the conveyor, is the least fooled option, because the part must physically break the beam. A diffuse sensor, a single housing that reads light reflected back from the part, is easier to mount but can be defeated by dark, shiny, or clear products. It must be tested against the real item.
The failure case that separates experience from theory is clumping. When products touch, stick together, or vary in height, no simple beam counter is reliable. A 2024 r/PLC thread on counting croissants on a bakery conveyor produced six workable answers: through-beam across the tops of the items; a photoeye plus an encoder that measures how long the beam stays blocked, then computes part length against belt speed; an ultrasonic sensor reading the peak of each item; a short weighing section; and full vision systems. The thread’s veterans noted the correct answer depends entirely on whether the products arrive in a single line, uniformly spaced. The lesson for automation: when parts clump, solve the product flow first. Separate the parts and counting becomes trivial. If you cannot separate them, expect to pay for a vision system. No proximity or photoelectric trick makes clumped, irregular products countable at the accuracy you want.
Detecting Presence and Position
Presence and position is the highest-volume job in automation, and the decision tree is short.
Metal target, short range (under roughly 10-15 mm), dirty or oily site. Inductive proximity. No moving parts, no lens, and IP67-rated cylindrical types shrug off coolant and swarf. This is the workhorse. For cylindrical inductive types, the standard M8/M12/M18/M30 barrels with rated ranges around 1-2 / 2-4 / 5-8 / 10-15 mm cover the overwhelming majority of applications.
Non-metal target, or long range, or open access. Photoelectric. Retro-reflective units reach several meters with one cable run. Through-beam pairs reach tens of meters and are used across dock doors and long conveyor spans. Laser-typed units are commonly rated for ranges of 50 meters or longer; Keller Technology’s overview of object-detection sensor types notes laser beams of this class.
Cylinder piston position. Magnetic sensors, reed or Hall-effect, mount on the cylinder body and detect the piston’s magnet through the barrel wall. No external bracket, no alignment. Reed types are cheap and adequate at low cycle rates. At high cycle rates their mechanical contacts age, which is why many engineers spec Hall-effect types for continuous duty.
End of travel, doors, mechanical stops. The humble limit switch. It touches the target, so it is immune to dust, light, and metal confusion, at the cost of a contact that wears. Rated electrical life, often 500,000+ operations on industrial types, is the spec that tells you when it will need attention.
High repeatability, rotating or fast-moving targets. An inductive sensor paired with an encoder. On the printing press from earlier, the engineer used encoder pulse counts between sensor triggers to measure registration consistency. The sensor answered “there,” and the encoder answered “exactly where, to 0.1 mm.” When a machine needs both a trigger and precision, plan for both sensors from the start.
Three Cases Where the Obvious Answer Fails
Case one: “capacitive sensors detect plastic.” The textbook says inductive = metal, capacitive = plastic, and half of that sentence is wrong. Capacitive sensors respond to dielectric constant, and metal has an enormous one. A capacitive sensor will trigger on a steel plate as readily as on a bag of granules. Real engineers exploit this: in an r/AskEngineers thread on counting crushed cans, a respondent recommended capacitive precisely because it would detect the metal cans and ignore the plastic trash around them. That is the opposite of the textbook shortcut. The mechanism matters more than the mnemonic.
A capacitive sensor will happily detect metal
"Capacitive = plastic" is only half the sentence. Capacitive sensing responds to anything with a high dielectric constant – and metals carry the highest of all. Inductive sees metal only; capacitive sees metal and everything else – which is why it sometimes beats inductive on a mixed line.
Case two: “sensing distance is printed on the box.” Rated distance is defined against a standard square steel target, with a stated tolerance (commonly ±10%). It shrinks dramatically for other metals: aluminum and copper reduce the detection range of a standard inductive sensor well below its steel rating. This is why a sensor that worked on steel prototypes can miss on a machine that actually processes aluminum. Some modern sensor lines use factor-1 compensation to sense all metals at nearly equal range. That is a genuine improvement, but it must be specified deliberately. If your process metal is aluminum, stainless, or brass, ask the question before ordering, not after installing. (The full treatment of how real-world range shrinks and how to size around it is in our separate guide on [proximity sensor sensing distance].)
Case three: “more technology is better.” Ultrasonic sensors detect almost any dense material regardless of color or transparency. They are excellent for tank levels and non-contact distance over a few meters. But foam, fabric, and porous materials absorb the sound pulse and read as empty. Vision systems solve the problems nothing else can, at ten times the cost, with lighting, lens-cleaning, and processing requirements that a maintenance crew owns forever. And true safety-rated guarding, light curtains and safety switches with PL/Category ratings, is a separate regulatory world from ordinary sensing. Never substitute a standard sensor where a safety function is required. Part of choosing is knowing when not to choose a fancy sensor at all.
The Decision Matrix
Automation sensing jobs: first choice, alternatives, and when each fails
| Machine job | First choice | Alternatives | Disqualify the first choice when | Boundary it fails at |
|---|---|---|---|---|
| Counting metal parts | Inductive proximity | Through-beam photoelectric (if parts have holes or irregular shape) | Parts are non-ferrous and small | Range shrinks on aluminum/copper – verify with actual material |
| Counting boxes, bottles, any non-metal | Through-beam photoelectric | Retro-reflective; diffuse (clean, uniform product only) | Product is clear glass or highly reflective; dust heavy | Diffuse types fail on dark/clear products; through-beam needs clean lenses |
| Counting clumped or irregular products | Fix the flow (separate parts) first; then beam or inductive | Ultrasonic peak-counting; weighing section; vision | Parts cannot be separated | No simple sensor counts clumps accurately – expect vision cost |
| Metal part presence, short range, dirty site | Inductive proximity (M12/M18 typical) | Capacitive (if non-metal too) | Target is non-metal | Detection volume shrinks off-axis – respect rated range ± tolerance |
| Presence of any object, long range | Retro-reflective photoelectric | Through-beam for extreme range/dirt; laser for long range | Transparent targets; mirror finishes | Retro types struggle with clear/glossy items |
| Cylinder piston position | Hall-effect magnetic | Reed switch (low cycle rate) | High cycle rate (reed ages) | Reed contacts wear mechanically – spec Hall for continuous duty |
| End of travel / guarding | Limit switch (mechanical) | Proximity if contact unacceptable | High cycle rate wears contacts; washdown sites | Electrical life ~500k ops is the planning number |
| Level in tanks/hoppers | Capacitive or float switch (conductive liquids) | Ultrasonic (clean, non-foaming) | Foam, vapor, sticky buildup | Ultrasonic reads foam as empty |
| Speed or position feedback | Incremental encoder | Resolver on very harsh duty | Sub-degree precision required on a budget | Encoder counts are lost on power loss – home the axis |
Locking the Part Number: Four Specs That Decide Everything
Once the job and the family are settled, the entire purchase reduces to four parameters. Get all four right and the part number writes itself. Miss one and the sensor arrives wrong. Confirm them in this order:
Four specs to lock before you order
- Sensing distance, with margin: rated range is quoted at ±10% against a standard steel test piece and shrinks on other metals – size so the real target sits inside 50-80% of the rated range, never at its edge.
- Output type: NPN or PNP must match the PLC input card – an NPN sensor on a PNP input simply does not switch (see the NPN vs PNP guide for the full matching logic and the conversion options).
- NO or NC, and what a broken wire does: normally-closed outputs fail to a “stop” signal on a cable break; for safety-related positions that is the direction you want.
- Mounting and environment: thread diameter (M8/M12/M18/M30), shielded or unshielded (shielded types mount flush in metal), supply voltage (12-24 V DC is the automation standard), and IP rating for the actual site – IP67 for washdown and coolant, IP65 for most dry indoor duty.
Notice that this list contains no brand and no series. That is the point. A four-parameter specification is a portable request. Read it over the phone, paste it into an inquiry form, or hand it to a distributor’s counter. The person on the other side can price it against any catalog without calling you back. A complete sensor sentence sounds like this: “M18 inductive proximity, 8 mm rated range, PNP normally-open, 3-wire, 12-24 V DC, IP67, shielded, with a 2-meter cable.” Any supplier can quote that sentence in one pass. Most incomplete inquiries, “I need a proximity sensor,” get three phone calls back and a 50% chance of the wrong part.
Stocking Sensors Like a Distributor: Coverage by Job, Not by Catalog
Everything above lands, sooner or later, on a distributor’s shelf. The inquiries arrive in the language of jobs, not catalogs. A customer says “my conveyor needs to count boxes,” or “I need a sensor for the cylinder on my wrapper,” or “this old sensor has 18 on the barrel and three wires.” If your stock is organized the way the internet lists sensors (one SKU per family, a little of everything), each of those inquiries finds a maybe. If your stock is organized by the five jobs, each inquiry finds an answer.
A starter sensing assortment, organized by job coverage
| Job your customers ask about | Stock these | Variants worth carrying | Why this depth wins |
|---|---|---|---|
| Metal presence and position | Inductive proximity, M12 and M18, shielded | NPN and PNP outputs; NO as the mainstream, NC for safety-return positions | M12/M18 are the two barrel sizes that dominate machine and repair demand |
| Counting and presence of any object | Photoelectric diffuse type, plus one through-beam pair | Diffuse for short-range machine mounting; through-beam for conveyor spans | Diffuse covers most in-machine counting; through-beam is the fallback when product or dust defeats it |
| Cylinder position | Magnetic sensors for cylinder bodies | Reed and Hall-effect; a couple of cable lengths | Cylinder duty is the single most common retrofit inquiry – sensors get knocked off or outlive the machine |
The two output topologies are where assortments usually lose orders. A machine built for PNP inputs cannot use your NPN stock, and the repair market still holds an enormous installed base of legacy NPN equipment. Carrying both NPN and PNP in the same housings and detection distances turns “do you have one for my machine?” from a maybe into a yes. If you carry only one topology, you are telling half the machines that walk in to buy elsewhere.
That breadth is exactly the kind of thing a single multi-category supplier exists to solve. OMCH builds the inductive proximity range those M12 and M18 sockets take, in NPN, PNP, and two-wire variants, alongside photoelectric diffuse and through-beam families and reed and Hall magnetic sensors for cylinder duty. Where output topology matters most, the model code itself tells you what you are wiring: our HG11 fiber amplifier ships as an -N or -P variant, so the part number carries the wiring answer. And because we also make the rest of the control cabinet, relays, power supplies, encoders, switches, across 30-plus categories with thousands of models, a distributor consolidates what would otherwise be ten supplier files into one catalog and one purchase order. Our product selection support will match a part against a drawing, a photo of a dead sensor, or a stated four-parameter spec. That happens before you commit stock to a new line.
One honest boundary, in the interest of the stocking decision itself. The framework in this article covers standard, dry-to-coolant industrial duty. Washdown-food, explosive-atmosphere, and ultra-cleanroom sites carry their own sensor families with their own certifications. Those inquiries deserve a specialist, and the right move for a small distributor is often to refer them and keep the relationship, rather than stock a line that turns over once a year. Stock the three job columns above, translate every inquiry into the four parameters, and the sensor counter pays for itself.
Need a sensor line that covers the three job columns without three supplier files? Send the job description or a photo of the old part. Our product selection support will match the spec against the range before you order.
Get the Sensor Line That Answers the Five Jobs.
Tell us which machine jobs your customers ask about. We'll confirm families, output types, and part numbers across inductive, photoelectric, and magnetic lines before you commit stock.
Send your sensor inquiryReferences
- Keller Technology Corporation. “7 Types of Automation Sensors for Object Detection Machines & Systems.” 2026. https://www.kellertechnology.com/blog/7-types-of-sensors-for-object-detection/
- Eng-Tips Forums. “Looking to replace inductive prox switch in demanding application.” 2025. https://www.eng-tips.com/threads/looking-to-replace-inductive-prox-switch-in-demanding-application.528519/
- r/PLC. “Sensor for Counting Croissants.” 2024. https://www.reddit.com/r/PLC/comments/1f8nsex/sensor_for_counting_croissants/
- OMCH. “Proximity Sensor.” 2026. https://www.omch.com/proximity-sensor/
- OMCH. “Product Selection.” 2026. https://www.omch.com/product-selection/
- OMCH. “Home.” 2026. https://www.omch.com/



