Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply
Conceptual product illustration of a compact photoelectric sensor on a steel bracket.

What Is a Photoelectric Sensor and How Does It Work?

A photoelectric sensor detects an object without touching it by sending out light and monitoring what reaches a receiver. An object can interrupt a beam or reflect light back. The sensor turns that change into an electrical signal that a machine controller can use to detect a part, count a box or check a position.

How does a photoelectric sensor turn light into an output?

Think of a photoelectric sensor, sometimes called a photoeye, as a light source and a light detector working together. It does not need to recognize what an object is. It needs a dependable optical difference between the condition you want to detect and the condition you want to ignore.

  1. Emit: an LED or laser sends visible or infrared light toward the sensing area.
  2. Receive: an optical receiver converts the light reaching it into an electrical signal.
  3. Decide: the electronics process that signal and compare it with the detection setting.
  4. Switch: the output changes state according to the selected operating logic. A PLC—a programmable logic controller—can then use that state.

Many sensors pulse their light and filter the received signal to distinguish it from surrounding illumination. That helps reject interference; it does not make every sensor immune to sunlight or another nearby emitter. The basic processing chain is described in Datasensing’s photoelectric sensor overview.

This guide focuses on industrial presence-detection switches. Some optical sensors also measure distance, color or contrast, but a basic ON/OFF output does not automatically provide those measurements. A laser specifies the light source—not a separate fourth sensing mode.

How do through-beam, retro-reflective and diffuse sensors differ?

The key difference is where the receiver gets its light. Follow that path before looking at the housing shape: two similar-looking sensors can require completely different installations.

Through-beam: the object interrupts light between two units

Through-beam light path with no target presentA separate emitter on the left sends light directly to a receiver on the right. An opaque target entering the space between them interrupts the beam. EmitterReceiver Direct light reaches receiver
Clear path shown. Detection uses a reduction in received light when an object blocks the path.

The emitter and receiver face each other across the detection area. The target passes between them and reduces the light reaching the receiver.

For an opaque carton, this avoids relying on the carton’s surface to return light. It is a useful starting point when both sides of a conveyor are accessible. The tradeoff is mounting, powering and aligning two units.

Retro-reflective: the object interrupts light returning from a reflector

Retro-reflective light path with no target presentAn emitter and receiver share a housing on the left. Light travels to a passive reflector on the right and returns to the receiver. The outward and return paths are separated here for clarity. SensorReflectorOut / return One powered sensor + reflector
Clear path shown. The reflector is part of the optical system; it is not another powered sensor.

The emitter and receiver sit in one housing. A specified retroreflector on the opposite side sends the light back. An object is detected by interrupting that return.

This keeps the electrical wiring on one side, although the opposite side still needs space for the reflector. Use the reflector specified for the sensor; ordinary mirror glass is not an interchangeable substitute.

Diffuse: the object itself returns light to the sensor

Diffuse sensing with a target presentThe emitter and receiver share a housing on the left. Light reaches a target on the right. Some scattered light returns toward the receiver; other light scatters in different directions. SensorTarget The target provides the return
Target present shown. Only part of the scattered light reaches the receiver.

There is no separate receiver or reflector across the gap. The sensor emits light toward the target and detects the light reflected back from it.

This is convenient for checking part presence when only one side is accessible. However, the target’s surface, angle and distance affect the return. The sensor must also distinguish the target from whatever is behind it.

These original diagrams simplify the optical paths; they are not installation drawings or beam-size specifications. The three arrangements are also explained in KEYENCE’s introductory guide.

Fiber optics and fork housings change how the optics are packaged. A fiber unit can carry light to a small sensing head; an optical fork can hold the emitter and receiver opposite one another in a shared body. Still ask whether the target is interrupting light or returning it.

Does “output ON” mean an object is present?

Not always. There are three separate questions: is light reaching the receiver, is the output active, and what does the controller interpret that output to mean?

Light-ON and Dark-ON describe the received-light condition

Light-ON activates the output for the light-received condition. Dark-ON activates it for the light-interrupted or sufficiently reduced-light condition. “Light” and “dark” refer to the sensor’s optical signal, not whether the factory lights are on.

In a correctly arranged through-beam installation, an opaque object reduces received light, so Dark-ON can make the output active for object present. In a basic diffuse installation, a target returning sufficient light can instead make Light-ON active for object present. Always check the exact model’s operating diagram.

NPN and PNP describe the electrical interface

For common DC transistor outputs, PNP sources current toward the load when active; NPN sinks current toward the supply’s 0 V. Neither term determines the optical mode. A sensor can be PNP and Dark-ON, for example. Nor does “output ON” always mean a high measured voltage: an active NPN output is commonly near 0 V.

NO (normally open) and NC (normally closed) labels must also be read against the manufacturer’s stated normal condition. Do not infer the complete truth table from a housing label, wire color or indicator alone.

Illustrative example: counting cartons on a conveyor

Assume an aligned through-beam pair, opaque cartons large enough to interrupt the effective beam, Dark-ON operation and a compatible PLC input. The intended sequence is:

Logical states only; sensor and input delays are omitted.
What passes the sensor?Received lightDark-ON outputCounting consequence
A gap before the cartonSufficient lightOFFThe input is ready for the next OFF-to-ON transition.
The carton blocks the beamReduced below the switching levelONThe program can count one new activation.
A gap after the cartonSufficient light againOFFReset allows the following carton to create a new activation.

What if two cartons touch? If they continuously block the same beam, the sensor may correctly report one uninterrupted occupied state. It cannot invent a gap between them. Counting each carton then requires separation or another detectable feature—not simply a higher sensitivity setting.

The sensor supplies a state; the controller decides how to count its transitions. Counting on every program scan while the input stays active would count one stationary carton repeatedly.

Can photoelectric sensors detect clear, black or shiny objects?

Yes, suitable models can—but “detects plastic” or “detects metal” is too broad to guarantee the result. What matters is how the particular target changes the chosen light path.

  • Clear glass and plastic: light may pass through instead of being blocked. A clear-object sensor is designed to recognize smaller or different optical changes. Test the actual container, including its walls, label, contents and changing orientation.
  • Black or dark parts: a plain diffuse sensor may receive too little return at the required distance. An opaque dark part can be easier to detect by interrupting a through-beam path, where reflection from its face is not required.
  • Shiny or curved surfaces: a small angle change can send reflected light toward or away from the receiver. In retro-reflective sensing, an unsuitable sensor may mistake a shiny target’s return for the reflector. Polarized mirror-surface-rejection optics can help, but are not a universal clear-object solution.
  • A bright background: a diffuse sensor may respond to the conveyor or frame after the target leaves. Raising sensitivity can make that problem worse.

What does background suppression change?

A background-suppression sensor uses distance discrimination to help separate the target from a farther background. In triangulation-based models, the position of the reflected spot on the receiver changes with distance. This is different from simply turning down a brightness threshold.

It still needs adequate separation between target and background, suitable target geometry and operation within the model’s limits. Do not treat background suppression as a promise to ignore every shiny surface or detect every dark object. OMRON explains the distance-setting principle using its triangulation-based models.

How far—and how fast—can a photoelectric sensor detect?

Range is meaningful only with its reference conditions

There is no single range for “a photoelectric sensor.” A through-beam rating describes the emitter-to-receiver spacing; a retro-reflective rating depends on the specified reflector. A diffuse range is measured with a stated reference target, often white paper. A smaller, darker or tilted target can give a different usable result.

Beam spot size and minimum detectable object are also different specifications. A small visible spot helps you aim, but it does not by itself prove that the sensor will detect a thin edge or clear film. Check the spot or beam geometry at the real working distance and the conditions behind any minimum-object claim.

The object and the gap both need enough time

Response time is the delay between an optical change and the corresponding output change. Check both operating and reset behavior. For repeated objects, the target must remain detectable long enough to produce a usable output, and the gap must allow it to reset.

A fast sensor can still feed a controller that misses short pulses because of its input filter, update timing or program. This is why a target that works when moved slowly by hand may fail at production speed. Verify the sensor output and the controller’s recorded event—not only whether an indicator appears to blink.

OMRON’s photoelectric terminology guide distinguishes rated distance, reference targets and response time. Its definitions do not establish specifications for another manufacturer’s model.

What should you check when detection is unstable?

First identify where the expected change disappears. This is more useful than adjusting sensitivity repeatedly.

  1. The optical indication is already unstable. Check the target-present and target-absent conditions, alignment, lens cleanliness, moving brackets, background reflections and nearby light sources. Confirm what each indicator actually means in the manual.
  2. The sensor’s indication changes, but the controller input does not. Check the output mode, supply, wiring, input compatibility and load limits. An indicator is not proof that the electrical signal reaches the receiving input correctly.
  3. The input changes, but the machine count or action is wrong. Check pulse duration, gaps, input filtering and program logic. The carton example above shows why correct presence detection is not automatically correct counting.

Begin with the machine secured against hazardous motion. Mounting, wiring and electrical measurements should follow the equipment instructions and be performed by qualified personnel where required. Keep guards and protective functions in place during any permitted running test.

What should you know before choosing a photoelectric sensor?

Start with a sentence describing the event: “Detect an opaque carton crossing this point,” “confirm a component is in this fixture,” or “distinguish the printed mark from the surrounding film.” These are different optical tasks even if each ends with an ON/OFF signal.

Then bring together the details that determine whether the event is distinguishable:

  • The actual target sample, its smallest size, surface and worst position.
  • The available mounting sides, working distance and background.
  • The fastest movement and shortest gap between successive targets.
  • The supply and receiving input, including the required output logic.
  • The likely contamination, ambient light, vibration and cleaning conditions.

Use these details to choose the optical arrangement, then verify the exact model with representative samples. For a closer comparison of installation tradeoffs, continue with the three-mode selection guide.

Presence detection is not personnel protection. An ordinary industrial photoeye must not be substituted for a safety-rated protective device. A personnel-protection application needs appropriately selected safety equipment and validation of the complete safety function. OMRON makes this boundary explicit in its photoelectric sensor safety precautions.

The essential question is simple: what changes at the receiver when the target arrives? Once that is clear, the sensing mode, output logic and checks on the machine become much easier to understand.

Sources and method references

The carton sequence is an illustrative teaching example, not a customer case or test result. Optical diagrams are original simplified illustrations; the hero is an AI-generated conceptual product image, not an exact-model photograph. Manufacturer examples explain principles, not unverified ratings for xsz sensor products.

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare