HomeRobotics & KinematicsQuadrature Rotary Encoder

Quadrature Rotary Encoder

Interactive 3D quadrature rotary encoder: watch a slotted disc spin past two optical read-heads 90° out of phase, decode A/B pulses into position and velocity, and see how missed edges cause real position drift.

Robotics & Kinematics3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
robotics-engineering ↗ Open standalone

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 simulator drives a real 3D 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. A sensor-noise slider lets you drop real edges 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.

⚙ Under the hood

Interactive 3D quadrature rotary encoder: watch a slotted disc spin past two optical read-heads 90° out of phase, decode A/B pulses into position and velocity, and see how missed edges cause real position drift.

roboticsencodersensorscontrol-systemskinematicsservo

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)