Channel A read-head Channel B read-head Index (Z) read-head
drag disc to jog shaft
A / B quadrature waveforms90° phase offset
A–B state plane

Quadrature Rotary Encoder (2D Disc & Scope)

Every closed-loop robot joint needs to know exactly where it is and how fast it's moving, and the workhorse sensor for that job is the quadrature rotary encoder: a slotted disc spinning past two optical read-heads set a quarter slot-period apart. This 2D simulator drives a top-down encoder disc from a motor-speed slider, decodes the resulting A/B square waves into a pulse count using selectable ×1/×2/×4 quadrature decoding, and derives both a decoded shaft angle and a sampled-window velocity estimate exactly the way a real servo drive would. Drag the disc directly to jog the shaft by hand, watch the scrolling oscilloscope and the A–B state-plane trace the four quadrature states, and use the sensor-noise slider to see position drift accumulate in real time — and why industrial drives re-home against a once-per-revolution index pulse rather than trusting pulse counts forever.