An encoder is a sensor that detects rotation angle or linear displacement. Encoders are used in devices that need to operate in high speed and with high accuracy.
A rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular position or motion of a shaft or axle to analog or digital output signals. There are two main types of rotary encoder: absolute and incremental.