diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-07-26 22:06:14 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-07-28 11:22:28 -0400 |
commit | 654546e3382b87610a51d01d17c917fb8d8bbaeb (patch) | |
tree | 4bba3ad08ded17c6b022eb930bc1e970818733c8 /config | |
parent | 170389ef145a2805738d8411eb65433de09eeaac (diff) | |
download | kutter-654546e3382b87610a51d01d17c917fb8d8bbaeb.tar.gz kutter-654546e3382b87610a51d01d17c917fb8d8bbaeb.tar.xz kutter-654546e3382b87610a51d01d17c917fb8d8bbaeb.zip |
stepper: Support stepper phase adjustments when homing
Add support for enhancing the precision of endstop switches by also
inspecting the phase of the stepper motor when the endstop triggers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'config')
-rw-r--r-- | config/example.cfg | 22 | ||||
-rw-r--r-- | config/makergear-m2-2012.cfg | 6 |
2 files changed, 27 insertions, 1 deletions
diff --git a/config/example.cfg b/config/example.cfg index b458e8b4..5614b5fc 100644 --- a/config/example.cfg +++ b/config/example.cfg @@ -11,7 +11,7 @@ # available pin and board names.) # Pin names may be preceded by an '!' to indicate that a reverse # polarity should be used (eg, trigger on low instead of high). Input -# pins may be prceded by an '^' to indicate that a hardware pull-up +# pins may be preceded by a '^' to indicate that a hardware pull-up # resistor should be enabled for the pin. @@ -38,6 +38,26 @@ homing_retract_dist: 5.0 # Distance to backoff (in mm) before homing a second time during homing homing_positive_dir: False # If true, homes in a positive direction (away from zero) +homing_stepper_phases: 0 +# One may optionally set this to the number of phases of the stepper +# motor driver (which is the number of micro-steps multiplied by +# four). When set, the phase of the stepper driver will be used +# during homing to improve the accuracy of the endstop switch. +homing_endstop_accuracy: 0.200 +# Sets the expected accuracy (in mm) of the endstop. This represents +# the maximum error distance the endstop may trigger (eg, if an +# endstop may occasionally trigger 100um early or up to 100um late +# then set this to 0.200 for 200um). This setting is used with +# homing_stepper_phases and is only useful if that parameter is also +# configured. +#homing_endstop_phase: 0 +# This specifies the phase of the stepper motor driver to expect +# when hitting the endstop. This setting is only meaningful if +# homing_stepper_phases is also set. Only set this value if one is +# sure the stepper motor driver is reset every time the mcu is +# reset. If this is not set, but homing_stepper_phases is set, then +# the stepper phase will be detected on the first home and that +# phase will be used on all subsequent homes. position_min: -0.25 # Minimum valid distance (in mm) the user may command the stepper to # move to (not currently enforced) diff --git a/config/makergear-m2-2012.cfg b/config/makergear-m2-2012.cfg index 1721cac7..a3a9173e 100644 --- a/config/makergear-m2-2012.cfg +++ b/config/makergear-m2-2012.cfg @@ -12,6 +12,8 @@ max_velocity: 500 max_accel: 3000 endstop_pin: ^PB6 homing_speed: 50.0 +homing_stepper_phases: 32 +homing_endstop_accuracy: .200 position_min: -0.25 position_endstop: 0.0 position_max: 200 @@ -25,6 +27,8 @@ max_velocity: 500 max_accel: 3000 endstop_pin: ^PB5 homing_speed: 50.0 +homing_stepper_phases: 32 +homing_endstop_accuracy: .200 position_min: -0.25 position_endstop: 0.0 position_max: 250 @@ -39,6 +43,8 @@ max_accel: 30 endstop_pin: ^PB4 homing_speed: 4.0 homing_retract_dist: 2.0 +homing_stepper_phases: 32 +homing_endstop_accuracy: .050 position_min: 0.1 position_endstop: 0.7 position_max: 200 |