FarmBot / farmbot-arduino-firmware

Arduino firmware that executes g-code like commands over a serial line to move the FarmBot and operate the tool mount
MIT License
421 stars 197 forks source link

Calibration and Homing Improvements #108

Open roryaronson opened 5 years ago

roryaronson commented 5 years ago

Eliminate one leg of the journey

Currently, calibration is performed as: current position > find home > find max > go to home.

This should be changed to: current position > find max > find home. This will save time by eliminating one leg of the journey, which is significant for XL bots.

Touch the axis ends multiple times

Currently, both our calibration and homing sequences "touch" the axis ends just a single time before turning around to go find the other axis end or calling the sequence complete.

Most 3D printers touch their axis ends multiple times during calibration and homing to maintain high precision without sacrificing speed: They move at full speed until an axis end is touched the first time, then they back up about a centimeter, and then they move towards and touch the axis end a second time at a slower speed. We could do the same thing.

More importantly though than improving precision and speed, this change would reduce the risk of a premature or erroneous stall causing FarmBot to incorrectly set the home position or axis length.

I suggest the following for both calibration and homing sequences:

  1. Move forwards at max speed in search of an axis end
  2. Once the axis end is reached, back up 10mm at 20% of max speed
  3. Move forwards at 20% of max speed, expecting to find the axis end a second time in 10mm 4a. Once the axis end is found the second time, turn around to find the other axis end (if calibrating) or call the homing sequence complete 4b. If the axis end is not found a second time within, say, 12(?)mm, consider the first stall to have been a false axis end. Return to step 1.

This change would deprecate the Calibration Speed parameters in favor of max speed for the long legs and a percentage of max speed for the slower, second touches.

roryaronson commented 4 years ago

@TimEvWw I just tested this out with a new Genesis v1.5 bot. Here are my notes: