An encoder is a device that senses mechanical motion. It translates motion such as speed, direction, and shaft angle into electrical signals. There are many different types of encoders. Most encoders generate square waves, making them ideal for use in digital circuits. For this training module the designer will only consider rotary encoders although encoders are also available in linear configurations.