Whether you're automating an entrance, adding a hand-operated control to a radio, or protecting a machine with a beam sensor, you eventually land on the same question: which sensing component actually fits the job? In the sensors encoders machine safety space, two parts often end up in the same shopping cart: a photoelectric switch that detects objects with a light beam, and a rotary encoder that translates shaft rotation into position changes. This head-to-head compares the Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial Sensor against the One 5PIN EC11 30 Position Rotary Encoder With Push Switch Split Shaft so you can pick the right one for your build.
Quick Verdict
If your priority is non-contact detection over distance, the photoelectric switch is the clear choice. If your priority is precise manual input for a panel or radio, the EC11 rotary encoder is the natural fit. They solve different problems, so the decision comes down to whether you need to sense objects or capture rotation.
At a Glance
| Product | Price | Price bar | Sensing type | Key specs | Best for |
|---|---|---|---|---|---|
| Photoelectric Switch | USD 39.72 | Photoelectric beam sensor | 0-20M range, 6-36V, NPN | Presence detection, automation applications | |
| EC11 Rotary Encoder | USD 21.00 | Rotary encoder with push switch | 5-pin, 30 detents, split shaft, 12.5mm shaft | Panel knobs, radios, user input |
Where Each Product Wins
Where the photoelectric switch wins: This is the part to pick when you need to detect something crossing a path. It is a photoelectric beam sensor with an IP66-rated housing, so it suits gates, garage doors, and other outdoor presence-sensing jobs better than a manual rotary input.
Where the rotary encoder wins: This is the part to pick when you need a hand-operated control. It is a rotary encoder, so it suits panel controls and user input better than a light-beam detector.
Product Notes
Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial Sensor

With a 0-20M sensing range and a 6-36V operating window, this photoelectric switch is built for jobs where you need to know whether something is there. The NPN normally-open output works with many automation inputs, and the IP66-rated housing makes it a reasonable pick for outdoor gates and garage doors, not just indoor machines. One thing to keep in mind: this is a beam-style sensing part, not a rotary input, so you should pair it with a controller or relay that accepts NPN signals. The price is also the larger of the two at $39.72, so it makes sense when your control setup is built around photoelectric sensing.
One 5PIN EC11 30 Position Rotary Encoder With Push Switch Split Shaft

At $21.00, this EC11 encoder is the lower-priced option. It provides 30 detents per rotation, so you get a clear click at each step, and the push switch lets the same shaft act as a button when pressed. The 12.5mm shaft length makes it suitable for panel or radio use. The main limitation is that it is not a sensing device; it only reports rotation. Because it is a specific 5-pin, 12.5mm-shaft part, it suits builds that already match that layout. That click-by-click feel makes it a natural fit for radio controls.
Final Choice by Use Case
Choose the photoelectric switch when your build needs non-contact beam detection. Choose the rotary encoder when you need a hand-operated panel control. If you're still deciding, ask one question: does this part need to see something, or does it need to be turned by a hand?