If you have a brushless motor, you have some magnets, a bunch of coils arranged in a circle, and theoretically, all the parts you need to build a rotary encoder. A lot of people have used brushless or ...
An interesting trend in industrial motion control has been the replacement of self-contained encoders (rotation sensors with their own housing, bearings and shaft) with modular or “kit” encoders.