A photoeye (also written “photo eye” or “photo-eye”) is a sensor that uses a beam of light to detect whether an object is present. It works by emitting a light signal, usually infrared, and then monitoring what happens to that signal. If something blocks, reflects, or changes the beam, the sensor registers a detection and sends an electrical signal to a controller. Photoeyes are one of the most common sensors in industrial automation, but you’ll also find them on garage doors, automatic faucets, and retail checkout conveyors.
How a Photoeye Works
Every photoeye has two core components: an emitter and a receiver. The emitter sends out a focused beam of light, typically infrared because it’s invisible to workers and less affected by ambient lighting. The receiver contains a light-sensitive element that converts incoming photons into an electrical signal, a process rooted in the photoelectric effect. When photons strike the sensor’s semiconductor material, they knock electrons loose, generating a tiny current proportional to the amount of light hitting the surface. The sensor’s internal circuit interprets that current: if it rises above or drops below a set threshold, the sensor switches its output on or off.
That output signal travels to a programmable controller or relay, which then triggers an action. On a conveyor line, that action might be stopping a belt. On a garage door, it reverses the motor. The entire detection cycle happens in milliseconds.
Three Main Types of Photoeyes
Through-Beam (Thru-Beam)
A through-beam photoeye splits the emitter and receiver into two separate housings mounted across from each other. The emitter sends a continuous beam to the receiver. When an object passes between them and breaks the beam, the receiver loses its signal and triggers a detection. This is the most reliable type and offers the longest sensing range, which makes it the go-to choice for wide conveyor lanes or loading dock openings. The tradeoff is that you need to mount, wire, and align two devices instead of one.
Retroreflective
A retroreflective photoeye houses both the emitter and receiver in a single unit. The emitter sends a beam to a reflector (a small, inexpensive panel mounted on the opposite side), and the beam bounces back to the receiver. When an object blocks the reflected beam, the sensor triggers. This setup cuts wiring costs in half because only one device needs power and a signal connection. It works well for counting items on a line, like bottles or packages, where consistent detection at moderate distances is needed. The reflector itself is passive and requires no wiring.
Diffuse (Reflective)
A diffuse photoeye is the simplest to install. The emitter and receiver sit in the same housing, and there’s no reflector. Instead, the sensor relies on the target object itself to bounce light back to the receiver. When an object enters the sensing range, light reflects off its surface and returns to the sensor, triggering detection. This is the most cost-effective option and the easiest to set up since you’re only mounting one device with nothing on the other side. The limitation is shorter range and sensitivity to the target’s color and surface finish. Dark or matte objects reflect less light, which can cause missed detections if the sensor isn’t adjusted properly.
Where Photoeyes Are Used
The most widespread application is conveyor control. Complex conveyor systems with multiple transfers, merges, and accumulation lanes rely on a series of photoeyes so the control system knows exactly where every box or product is at any moment. When a photoeye detects a package arriving at a junction, the controller decides whether to divert it, stop the belt, or let it pass. Facilities handling high volumes of packages, like distribution centers, may have hundreds of photoeyes running simultaneously.
In manufacturing, photoeyes confirm that a part is in position before a machine cycle begins. This prevents a press from stamping an empty fixture or a robot arm from welding in the wrong spot. They’re also used for counting parts coming off a production line, detecting jams, and verifying that labels or caps have been applied correctly.
Outside of factories, photoeyes appear in everyday life more than most people realize. Garage door safety sensors are through-beam photoeyes mounted near the floor on either side of the door opening. Automatic doors in retail stores use diffuse photoeyes to detect approaching customers. Elevator doors use them to prevent closing on a person.
Wiring and Output Types
Photoeyes connect to controllers using one of two standard output types: PNP or NPN. A PNP sensor (sometimes called a “sourcing” sensor) switches positive voltage to the output when it detects something. An NPN sensor (a “sinking” sensor) switches the ground side of the circuit instead. The detection behavior is the same; the difference is purely electrical and depends on what type of input your controller expects. Most modern industrial controllers accept either, but mixing them up will result in a sensor that appears dead even when it’s working perfectly.
Each photoeye also needs a power supply, typically 10 to 30 volts DC for industrial models. The wiring is straightforward: power, ground, and one or two signal wires. Many sensors include a small indicator LED on the housing that lights up during detection, which is helpful during setup and troubleshooting.
Alignment and Setup
Through-beam and retroreflective photoeyes need proper alignment to function. The emitter and receiver (or reflector) must be aimed directly at each other. Even small misalignments caused by vibration, an accidental bump, or thermal expansion of mounting brackets can shift the optical axis enough to cause false triggers or missed detections.
If a sensor has a sensitivity adjuster, a reliable alignment method is to set the adjuster to the midpoint between its minimum and maximum. Then physically adjust the emitter by moving it up, down, left, and right until you find the center of the receiving angle. Repeat the same process with the receiver. Once both are centered, turn the sensitivity adjuster to maximum. This gives you the widest margin of error for day-to-day vibration and drift.
Diffuse sensors are simpler to align since there’s only one device, but they need their sensitivity tuned to match the target. Most have a teach-in button: you place a sample object at the detection point, press the button, and the sensor calibrates itself to that object’s reflectivity.
Keeping Photoeyes Reliable
The most common cause of photoeye failure isn’t the sensor dying. It’s a dirty lens. Dust, grease, moisture, and debris accumulate on the optical surface over time, gradually weakening the signal until the sensor starts missing detections or triggering erratically. In dusty environments like woodworking shops, flour mills, or concrete plants, lens contamination can become a problem within days.
Cleaning requires care. Wiping a dry, dusty lens with a cloth can scratch the surface coating, which degrades performance permanently. The better approach is to first blow dust off with compressed air or a dust blower, then gently wipe with a soft, lint-free cloth if residue remains. Protecting the lens from contamination in the first place, using air curtains, sensor hoods, or protective covers, extends cleaning intervals significantly.
Vibration is the second most common issue. Sensors mounted on equipment that shakes during operation gradually lose alignment. Checking alignment quarterly, or whenever detection becomes inconsistent, prevents most nuisance faults. In high-vibration environments, mounting sensors on vibration-dampening brackets or separate structures keeps them stable longer.

