Calibration and Homing Improvements
roryaronson opened this issue · 1 comments
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:
- Move forwards at max speed in search of an axis end
- Once the axis end is reached, back up 10mm at 20% of max speed
- 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.
@TimEvWw I just tested this out with a new Genesis v1.5 bot. Here are my notes:
- Let's say my bot is at position (100, 100, -100). Then I tell it to
FIND HOME Y
. The bot will move the y-axis towards the home position and touch it, then it backs off 10mm AND sends the other axes to 0. Once it is at (0, 10, 0), it moves just the y-axis to touch the home position and back up several more cycles. So the problem here is the other axes moving to 0 mid-home-command. - Starting at (100, 100, -100) and pressing
FIND HOME Z
, it touches the home Z position, then instead of backing up 10mm it continues ramming into the home position for a brief moment. Then it zeroes the other axes (the issue in bullet point 1). Then it finishes the homing cycle, but again without ever backing off the home position, only ramming it. - If I move the y-axis to 300, then press
FIND HOME Y
, then the bot begins to move towards the home position. If I hand-stall the bot at say, 250 (a false home position), then it backs up a bit and then continues again towards home, expecting to find the home position at 250, but it won't because I took my hand away. Now I hand-stall it at 200. It does the same little cycle. Then I stall it again at 100 and it thinks that it has found the final home position, even though all of the stalls were false home positions. Instead, the bot should have reset the number of attempts it will make after the false home positions were not reached in subsequent attempts. See Steps 3 and 4b in the issue description. - Calibration isn't using the touch-the-axis-end-multiple-times routine at the axis-max positions, and it doesn't do the back up 10mm part when it finds the axis-home position (it just touches the home and then rams into it a bit more)