Build a shaft encoder.