The optical encoder is a transducer commonly used for measuring rotational motion. It consists of a shaft connected to a circular disc, containing one or more tracks of alternating transparent and opaque areas. A light source and an optical sensor are mounted on opposite sides of each track.