Are my encoders working?

You’ve enabled the encoders in the Hardware widget on the Device page and are experiencing movement issues. For movement issues with encoders disabled, see Why is my FarmBot not moving?. Make sure movement works well with encoders disabled before proceeding.

Symptoms of encoders not working:

  • Motors keep moving and don’t stop when hitting the end of an axis.
  • Encoders always display 0 in Controls page Move widget, even when motors do not.
    (image credit: @Ascend)
  • Displayed position in the Farm Designer (or Move widget motor coordinates) resets to zero after a movement to a non-zero location is complete.
  • If you send a command to move an axis in one direction from about the middle of the axis, then push it back manually in the opposite direction while it’s moving, it continues trying to move and doesn’t pause to retry the movement.
  • If you move the motors slowly by hand, the encoders always display 0 in Controls page Move widget as shown in the screenshot above.

Potential Solutions for encoders not working:

  • Make sure encoders are plugged in to the correct axes.
  • Check the encoder connections (v1.3+). (Pay special attention to the black and dark gray wires if using v1.2.)
  • Make sure the firmware version selected matches the kit hardware version you have. (Arduino: v1.2, Farmduino with black power connector: v1.3, Farmduino with red power connector: v1.4)
  • Unplug and plug back in the power supply to reset the firmware.
  • Reflash the firmware by factory resetting and configuring FarmBot OS again. (Alternatively, select a different FIRMWARE in the Device widget and then select the desired firmware again. You should see logs indicating that the firmware has been flashed.)

Symptoms of encoders working, but incorrect settings:

  • Moving an axis, or pressing Home axis or Calibrate axis results in an immediate stop.
  • Moving an axis results in the motor starting and immediately stopping several times. With the default number of movement retries, the motor will appear to pulse three times with little to no movement of the axis.
  • Disabling encoders results in correct movement.

Potential Solutions for encoders working poorly:

  • Try inverting the encoders in the Hardware settings widget.
  • Reduce the maximum motor speed to 80 (or 16 for z-axis) in Hardware settings.
  • Increase the number of steps used for acceleration to 100 (or 20 for z-axis). (Alternatively, try a zero or near zero value.)
  • Decrease the minimum speed to 10 (or 2 for z-axis). (Alternatively, increase the minimum speed to 40 (or 8 for z-axis).)
2 Likes