Farmbot Rotatory Encoders

Hi.

I'm trying to use the Nema 17 with rotatory encoders, that are use in the farmbot, in a school project.

I have been able to make them move but I can't use the encoders. I don't know how to see them to check if they are moving correctly.

I'm using an arduino mega and the RAMPs Shield 1.4

I'm connecting them as follows.

Could you please give me a small example of the programming?

Thank you very much.

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.

You need to post more information on your project, remember nobody here knows anything about it.

Post a link to the product page or data sheet for the encoders.

Also, study the information in this tutorial and encoder library page.

You can check encoder function with a multimeter.

FARMBOT is an X/Y -2 axis plotter with a water sprayer head.
you set your plants on the table and then set water times.
the X/Y locations are then watered accordingly.

As for the use of encoders and steppers, they can be used for feed-back but a simple home routine eleminates the need.
for a multiple axis mill that might take hours to complete, they can re-zero on the fly. and if you have ever gotten half way through when the cutter breaks.... you know how hard it it is to pick from some point in the G-Code.

for the OP : there are lots of search results on using encoders. if you cannot find what you need, then please post the make and model of the encoder. there are scores of possible encoders styles, so we would need specifics.

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.