I'm seeing unexpected data on the A & B outputs of my ALPS incremental rotary encoder. The A & B pins are are attached to a microcontroller with pull-ups enabled and the centre pin is ground The pulses are aligned on their rising or falling edges rather than being 90 deg out of phase as I expected (and documented everywhere). Attached are two capture screenshots, one for clockwise the other anticlockwise rotation. Am I missing something?



  • \$\begingroup\$ You are missing the all-important link to the data sheet. \$\endgroup\$
    – Andy aka
    Aug 24, 2020 at 15:43
  • 1
    \$\begingroup\$ Looks like channel 1 is getting ANDed with channel 2. If it were a simple short, I’d expect both would rise or fall together, so I think the fault is more complex. If you have other pins available on the MCU, try the same setup on different pins; if it’s the same, try another encoder. \$\endgroup\$ Aug 24, 2020 at 15:48
  • \$\begingroup\$ Link to [datasheet] (docs.rs-online.com/8546/0900766b810a5d53.pdf) \$\endgroup\$ Aug 24, 2020 at 16:00
  • \$\begingroup\$ I've tried connecting to other pins on the microcontroller, same output. Only have the one encoder to hand. \$\endgroup\$ Aug 24, 2020 at 16:02
  • \$\begingroup\$ Which specfic part number you have, and does it match to what you ordered? Are you sure it is not a wrong part with absolute output? \$\endgroup\$
    – Justme
    Aug 24, 2020 at 16:38

1 Answer 1


You have, most likely, connected pin A or B to ground instead of C.

enter image description here

Figure 1. Encoder pinout. (Click to enlarge.)

enter image description here

Figure 2. (1) Encoder ABC. (2) Push-button pins.

Now that C is the centre pin.


simulate this circuit – Schematic created using CircuitLab

Figure 3. In (a) 'A' requires both switches to close before it will pull low. This will occur 25% of the time. 'B' just requires SW2 to be closed to pull low. This will occur 50% of the time.

  • \$\begingroup\$ Nice catch! +1. \$\endgroup\$
    – jonk
    Aug 24, 2020 at 17:40
  • \$\begingroup\$ Genius! - That's exactly what it was \$\endgroup\$ Aug 24, 2020 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.