Logic & Relay

Photos from current listings. Actual item, color, and included accessories may vary.

Rotary Encoder Buying Guide

A rotary encoder converts shaft rotation into digital pulses, and the primary trade-off is mechanical vs. optical sensing plus detent feel, resolution, and interface type. Durable options use sealed metal bushings, defined detent torque, and standard quadrature outputs; compromises use open plastic bearings and vague pulse counts. Buy mechanical for panel knobs, optical for precision motor feedback.

Encoder Type:Mechanical incremental vs OpticalDetents per Rev:12 / 15 / 30 (mechanical)Pulses per Rev:128 PPR (optical, 2-channel)Output Interface:Quadrature A/B + push switch
Typical price range$1.99 – $450.00

Median $28.49

Key takeaways

  • Mechanical encoders (e.g., KY-040, Alps 30-detent) use metal wipers on a resistive track, offering 12–30 detents per revolution and a momentary push switch.
  • Optical encoders (e.g., 91Q128) use an LED/phototransistor pair for 128 pulses per revolution, 2-channel quadrature, and no contact wear.
  • Quadrature output provides direction and position via two 90° phase-shifted channels; incremental encoders need an index or home switch for absolute reference.

At a glance

Category
Sensors, Encoders & Machine Safety
Last updated
Nov 28, 2026

Current offers

Highlights

  • Mechanical encoders (e.g., KY-040, Alps 30-detent) use metal wipers on a resistive track, offering 12–30 detents per revolution and a momentary push switch.
  • Optical encoders (e.g., 91Q128) use an LED/phototransistor pair for 128 pulses per revolution, 2-channel quadrature, and no contact wear.
  • Quadrature output provides direction and position via two 90° phase-shifted channels; incremental encoders need an index or home switch for absolute reference.
  • PCB-mount modules like KY-040 include pull-up resistors and a threaded shaft with nut for panel mounting; bare encoders require external debouncing circuitry.

Best use cases

  • Best fit: Arduino/PCB projects needing a menu knob or volume control — choose KY-040 5-pack with knob caps and threaded bushings; skip bare encoder ICs unless you have debounce circuitry.
  • Best fit: Motor feedback on steppers/servos — pick optical 128 PPR 2-channel quadrature (e.g., 91Q128); skip mechanical 30-detent encoders, which lack resolution and wear out.
  • Best fit: Panel-mount user interface with push-to-select — use Alps-style 30-detent encoder with momentary switch; skip 12-detent modules if you need fine adjustment.
  • Wrong fit: High-vibration or dusty environments with open mechanical encoders — specify sealed IP-rated optical or magnetic types instead.

Buying tips

  • Match detents to task: 12–15 detents for coarse mode selection, 30 detents for fine volume/tuning, and 128 PPR optical for motor position feedback.
  • Verify output type: incremental quadrature (A/B channels) for relative position; add an index channel if you need a home reference on every revolution.
  • Check shaft and bushing: 6mm D-shaft with threaded bushing and nut for panel mount; bare 5mm shaft needs a press-fit knob and no panel support.
  • For microcontroller use, confirm 5V or 3.3V logic compatibility and whether pull-up resistors are onboard (KY-040 has them; bare encoders do not).

Specs

Encoder TypeMechanical incremental vs Optical
Detents per Rev12 / 15 / 30 (mechanical)
Pulses per Rev128 PPR (optical, 2-channel)
Output InterfaceQuadrature A/B + push switch

Related searches

What to check before buying

  • Measure panel thickness and shaft length: threaded bushing must protrude enough for the nut and knob — typically 5–7mm panel plus 10mm shaft.
  • Confirm knob fit: 6mm D-shaft or 6mm round shaft with set screw; 4mm shafts need matching small knobs.
  • Check logic voltage: 5V modules work with Arduino Uno; 3.3V systems need level shifting or a 3.3V-rated encoder.
  • Plan for debouncing: mechanical encoders need 100nF capacitors or software debounce; optical encoders output clean square waves.

FAQ

All Sensors, Encoders & Machine Safety buying guides

Data sources: eBay / Amazon listings and product attribute feeds. Updated Nov 28, 2026.

Some links on this page are affiliate links. If you buy after clicking one, we may earn a commission at no extra cost to you. This does not change which products appear here or their order. Affiliate disclosure.