Skip to content
HYPERPCB

Why does the B output of a rotary encoder go through a resistor?

Published 2026-09-13

Short answer

A resistor on the B channel usually does one (or more) of these:

  • Provides biasing (pull‑up/pull‑down) for open‑collector/open‑drain outputs
  • Acts as a series damper and current limiter for ESD/clamp‑diode protection
  • Forms an RC filter to debounce mechanical contacts or tame ringing/EMI

Is it a pull‑up, a series damper, or an RC filter?

Identify it by placement and value:

  • Pull‑up/pull‑down: 1–10 kΩ to VCC/GND, often both A and B. If only B is populated, A may rely on the MCU’s internal pull‑up.
  • Series damper: 22–220 Ω in line with the signal, placed near the source. No nearby capacitor. Purpose: reduce edge rate, ringing, and limit current into input clamp diodes, especially when the encoder is 5 V and the MCU is 3.3 V.
  • RC filter/debounce: a resistor with a capacitor to ground at the receiver side. Time constant τ = R × C. Common choices:

• Mechanical encoders: τ ≈ 0.5–5 ms (e.g., 10 kΩ + 100 nF → 1 ms)

• Optical/Hall encoders: τ kept small, e.g., 1 kΩ + 1 nF → 1 µs, to preserve high‑speed edges

What if only channel B has the resistor?

That is often intentional:

  • Direction sampling: Firmware may interrupt on A’s edges and sample B once; filtering B reduces spurious direction flips from bounce or EMI without slowing A’s edge timing.
  • Trace or cable asymmetry: If B routes longer or leaves the board, a series resistor on B damps ringing; A may not need it.
  • Clamp‑current limit: If B can exceed the MCU rail during transients (hot‑plug, ESD, long cable), a series resistor limits current through the input’s protection diodes. Example: 5 V source into a 3.3 V MCU with ~0.6 V clamp headroom → worst‑case overdrive ≈ 1.1 V. To keep clamp current ≤ 5 mA, choose R ≥ 1.1 V / 5 mA ≈ 220 Ω; 470 Ω–1 kΩ is a conservative choice.

Sizing and speed checks

  • Mechanical encoders bounce for 1–10 ms. With τ ~1 ms and a Schmitt‑trigger input, you’ll suppress most chatter.
  • High‑resolution optical encoders: Maximum channel frequency f = (RPM/60) × PPR. Example: 3000 RPM, 600 PPR → f = 30 kHz. Keep rise/fall time tr ≈ 2.2τ well below 1/(10f) to avoid duty‑cycle distortion: here tr << 3.3 µs, so τ ≤ ~1 µs is safe (e.g., 1 kΩ + 1 nF).
  • Series damping for ringing: Start at 33–100 Ω. Verify on a scope at operating cable length; adjust so overshoot < 10% without excessive edge delay.

Layout and protection tips

  • Place series resistors at the source; place RC capacitors at the receiver.
  • Use Schmitt‑trigger inputs or a buffer (e.g., 74HC/LVC‑1G14) for mechanical encoders.
  • For cables >1 m or noisy environments, prefer differential (RS‑422/485‑style) encoders with 100–120 Ω termination and a line receiver; avoid heavy RC on single‑ended lines at high speed.
  • Add ESD protection (low‑capacitance TVS) close to the connector; don’t rely only on MCU clamps.

Manufacturing notes for encoder PCBs

Boards can be built and inspected to IPC Class 2 or IPC Class 3 acceptance criteria, and RoHS/REACH compliance is supported for hazardous substance control.

Send your encoder PCB Gerbers for a 24‑hour quote and 1‑business‑day DFM feedback. — Get a quote