If you’ve ever found yourself standing in front of a misbehaving machine wondering, “how do I test a photoelectric switch?”, you’re not alone — and I’ve got your back.
Whether you’re working with a Sick photoelectric sensor on a conveyor line, or setting up an M12 photoelectric sensor in a packaging unit, this guide will walk you through the essentials in a way that makes sense. No jargon overload. Just practical know-how.
Let’s start simple. A photoelectric switch — also called a photoelectric sensor — is a device that detects objects using light. It’s like giving your machine a pair of eyes.
The sensor emits a light beam (usually infrared), and when something breaks or reflects that beam, the sensor reacts — switching its output on or off. This action can start or stop equipment, count items, or even trigger alarms.
These sensors are everywhere — in factories, lifts, car parks, and even automatic taps.
Why Testing Photoelectric Sensors MattersNow, here’s the thing. Photoelectric switches are reliable — until they aren’t. Dirt builds up, alignment shifts, cables wear out. When that happens, your system might miss objects, count incorrectly, or fail altogether.
Testing helps you:
And let’s be honest — when a sensor fails mid-shift, you don’t want to be guessing.
Right — time to roll up our sleeves. Here’s the full rundown on how to understand, diagnose, and test your sensor confidently.
Before testing, we need to understand what kind of sensor you’re dealing with. Not all photoelectric switches behave the same — and knowing the type makes testing way easier.
There are three main types:
If you’re working with something like a 12 volt DC photoelectric switch, it might fall into any of these categories — the voltage just tells you the power it needs.
This part trips a lot of folks up. PNP and NPN refer to how the sensor’s output behaves:
PNP (sourcing): Output goes high (+V) when active.
NPN (sinking): Output goes low (0V) when active.
Knowing this helps you test with a multimeter — we’ll get to that in a bit.
A photoelectric proximity sensor works by turning light into an electrical signal — but let’s break that down.
It has three main components:
Emitter – Sends out a beam of light, usually infrared.
Receiver – Detects whether the light beam is received or interrupted.
Control Circuit – Processes the signal from the receiver and switches the output ON or OFF based on detection.
The exact working method depends on the sensor type:
Through-beam: The emitter and receiver are separate. If an object breaks the beam, the output changes.
Retroreflective: Emitter and receiver are in one unit, and a reflector bounces the light back.
Diffuse reflective: The object itself reflects the light back to the sensor.
In simple terms, if the receiver sees the beam, it reacts one way. If it doesn’t, it reacts another. That’s how the sensor “knows” something’s there — and triggers your system accordingly.
Let’s troubleshoot before testing. These are the most common issues I’ve seen:
Dirt or dust on the lens (super common in food and packaging)
Misalignment between emitter and receiver
Loose wiring or connector damage (watch out for those M12 plug pins!)
Power supply problems, especially if the wrong voltage is supplied
False triggering caused by background reflections
Want to prevent most of these? Wipe the sensor down regularly and always check alignment.
Here’s what you’ll need to test like a pro:
Digital multimeter (set to DC voltage)
Power supply (e.g., 12V DC for most models)
Test object or reflector
Clean cloth (trust me — clean the lens!)
Optional: A PLC or indicator module if testing in a control panel setup
Let’s dive into the hands-on part. Here’s how to test a photoelectric switch step by step:
Look for visible damage.
Clean the sensor lens.
Use a 12V or 24V DC supply as required.
Double-check polarity on wiring — red is usually +V, blue is 0V.
Set your multimeter to DC voltage.
Connect black probe to ground, red probe to the sensor output.
With no object present, record the output voltage.
You should see either high (for PNP) or low (for NPN).
Block the beam (or present an object for diffuse sensors).
Watch for the voltage to switch.
Repeat with different distances or materials.
Confirm consistent switching.
Using a Sick photoelectric sensor? Many of them have an LED indicator that helps with alignment and detection — make use of it!
So there you have it — a complete guide on how to test a photoelectric switch without stress or second-guessing.
With the right tools, a little background knowledge, and a calm step-by-step approach, you can diagnose issues, confirm performance, and keep your systems running like clockwork. Whether you’re working with a Sick photoelectric sensor, an infrared photoelectric switch sensor, or a compact M12 photoelectric sensor, testing doesn’t need to be complicated.
And if you’re ever unsure, revisit this guide. Bookmark it. Share it with a colleague. Because a working sensor is a happy sensor — and a happy sensor keeps your world moving.