Farmbot Rotatory Encoders

ardly:
Nema 17 just means it is a stepper motor with a 1.7 inch x 1.7 inch faceplate.
You say they are "used in the farmbot" but nobody here knows what the farmbot is.

It is also not clear why you would use encoders with a stepper motor since one oof the advantages of a stepper is that you can count the steps it makes and so don't need encoders to give feedback.

Steppers with encoders are fairly standard kit - enables stall detection which isn't really possible reliably
any other way, and is very handy for controls of machine tools which can be rotated by hand as well as by
the motor.

Most encoders require pull-up resistors to be used (either real ones or the internal pullups). For an
electrically noisy environment use 2k2 external pullups rather than hope the weak internal ones will
be reliable.