Logic & Relay

12mm Photoelectric Switch vs RCH20D Rotary Encoder: Which Sensor for Your Machine Safety Setup?

A 12mm photoelectric switch and an RCH20D rotary encoder solve different jobs: one detects objects crossing a beam, the other tracks shaft rotation. Here's how to choose.

Last updated Aug 17, 2026

When you're choosing among sensors encoders machine safety components, the first question is whether your machine needs to know that something is there or how far a shaft has turned. A photoelectric switch watches a beam and changes state when something interrupts it; a rotary encoder turns shaft rotation into pulses a controller can count. These two parts solve different problems, and your application dictates which one belongs on your list.

Before you compare specs, ask yourself what output your machine needs. If a gate closes when someone passes, a photoelectric switch gives you a simple presence signal. If a conveyor must position a part precisely, a rotary encoder reports the exact angle. That distinction is the whole decision.

Quick verdict

If your priority is presence detection - objects passing through an area, garage doors, gates, counting on a conveyor, or basic limit sensing - the Photoelectric Switch is the natural fit. If your priority is rotational feedback on a rotating shaft, the Rotary Encoder is the one to choose.

ProductPriceUse caseKey specification
Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial SensorUSD 39.72Presence detection, counting, gate and garage door sensing0-20M sensing range, NPN, normally open
Rotary Encoder Replacement for RCH20D-2000/3-8MM-5/0-LD/VC-1-M6-S IndustrialUSD 249.61Shaft rotation feedback2000 P/R, line driver, 8mm shaft

Where each product wins

Photoelectric Switch wins when the task is to know whether something is in a path. It suits basic go/no-go sensing jobs.

Rotary Encoder wins when the task is to measure a shaft's movement. It suits monitoring rotation precisely.

Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial Sensor

Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial Sensor

The Photoelectric Switch is built around a 0-20M sensing range, which lets you cover a wide open area. It suits outdoor gates, garage doors, counting, limit detection, and personnel passing, and the IP66 weatherproofing supports that. It uses an NPN output with a normally open contact, so it behaves like a straightforward object-detection switch in a control circuit. The main limitation is that it has no rotational feedback: it tells you whether something is in the beam, not how far a shaft has turned. For a long-range presence job, this is a strong, lower-cost choice. Just don't expect it to serve as an encoder.

Rotary Encoder Replacement for RCH20D-2000/3-8MM-5/0-LD/VC-1-M6-S Industrial

Rotary Encoder Replacement for RCH20D-2000/3-8MM-5/0-LD/VC-1-M6-S Industrial

The Rotary Encoder is the feedback device for shaft rotation. At 2000 pulses per revolution, it gives a controller fine-grained angular information, and the line driver output is paired with voltage control. The optical hollow shaft design and 8mm shaft line up with the RCH20D-2000 series, making it a natural fit for that encoder family. The trade-off is the price: at $249.61, it costs much more than the photoelectric switch, and it won't help if your only need is to detect an object crossing a beam. Use it when you need to know what a shaft is doing, not just whether something is there.

Final choice by use case

For a detect-something-in-the-way job across a long gap, choose the Photoelectric Switch. It does what a switch should do and leaves room in the budget.

For a track-how-far-a-shaft-turns job, choose the Rotary Encoder. It delivers the angular data a controller needs.

Products in this article
Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial SensorUSD 39.72View on eBayRotary Encoder ReplacementUSD 249.61View on eBay
Photoelectric Switch 12mm 636V 020M Laser Sensor NPN Industrial SensorUSD 39.72View on eBayRotary Encoder ReplacementUSD 249.61View on eBay

You may also like

Finding more guides for you…