Jump to content
  • 0

Sensorless homing (X and Y) no longer works after configuring TAP


voronstress

Question

I spent all afternoon trying to get the X and Y working for sensorless homing and it seems like I got it to work with SGTHRS values of 75 and 65 respectively for both X and Y however, after the TAP wire was installed and some of the configs for TAP were done, my X and Y sensorless homing no longer seems to work. What could be the cause of this issue?

Even setting my SGTHRS values of 255 doesn't stop the X from homing, and it should not move at all once it starts if it is at this value

I have attached my Config File for reference

 

 

printer.txt

Edited by voronstress
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I have Tap and Sensorless Homig working on my 2.4R2, so I thought I would share my config files to see if you can sort out what is different. I have my configs broken out into seperate files, so there is a sensorless.cfg and printer.cfg involved. The other Includes you see are more related to macros and other settings. See if this is any help... I do not see your sensorless config in the file you posted, as a side note...

printer.cfg:

[include klipper-macros/*.cfg]
[include mainsail.cfg]
[include sensorless.cfg]
[include stealthburner_leds.cfg]

[gcode_macro _km_options]
# Any options variables declared here
gcode:
# These are examples of some likely customizations:
# Any sheets in the below list will be available with a configurable offset.
#variable_bed_surfaces: ['smooth_1','texture_1']
# Length (in mm) of filament to load (bowden tubes will be longer).
#variable_load_length: 90.0
# Hide the Octoprint LCD menu since I don't use it.
variable_menu_show_octoprint: False
# Customize the filament menus (up to 10 entries).
#variable_menu_temperature: [
#  {'name': 'PLA',  'extruder': 200.0, 'bed': 50.0},
#  {'name': 'PETG', 'extruder' : 230.0, 'bed': 85.0},
#  {'name': 'ABS',  'extruder': 245.0, 'bed': 100.0}]
# Length of filament (in millimeters) to purge at print start.
variable_start_purge_length: 30 # This value works for most setups.
# Any code you put here will run at klipper startup, after the initialization
# for these macros. For example, you could uncomment the following line to
# automatically adjust your bed surface offsets to account for any changes made
# to your Z endstop or probe offset.
#  ADJUST_SURFACE_OFFSETS
# X position to park toolhead (set "max" or "min" to infer from stepper config).
variable_park_x: 290.0
# Y position to park toolhead (set "max" or "min" to infer from stepper config).
variable_park_y: 290.0

# Optimized bed leveling
[include klipper-macros/optional/bed_mesh.cfg]

[gcode_macro _CLIENT_VARIABLE]
variable_use_custom_pos   : False ; use custom park coordinates for x,y [True/False]
#variable_custom_park_x    : 0.0   ; custom x position; value must be within your defined min and max of X
#variable_custom_park_y    : 0.0   ; custom y position; value must be within your defined min and max of Y
#variable_custom_park_dz   : 2.0   ; custom dz value; the value in mm to lift the nozzle when move to park position
#variable_retract          : 1.0   ; the value to retract while PAUSE
#variable_cancel_retract   : 5.0   ; the value to retract while CANCEL_PRINT
variable_speed_retract    : 35.0  ; retract speed in mm/s
variable_unretract        : 0   ; the value to unretract while RESUME
variable_speed_unretract  : 35.0  ; unretract speed in mm/s
#variable_speed_hop        : 15.0  ; z move speed in mm/s
#variable_speed_move       : 100.0 ; move speed in mm/s
variable_park_at_cancel   : True ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
#variable_park_at_cancel_x : None  ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
#variable_park_at_cancel_y : None  ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
variable_use_fw_retract   : True ; use fw_retraction instead of the manual version [True/False]
variable_idle_timeout     : 3600    ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
gcode:


[virtual_sdcard]
path: /home/voron/printer_data/gcodes
on_error_gcode: CANCEL_PRINT

[pause_resume]

[respond]

[exclude_object]

[save_variables]
filename: /home/voron/printer_data/config/variables.cfg

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17000D001150535556323420-if00
restart_method: command

[mcu EBB]
canbus_uuid: 2fff61130496

[printer]
kinematics: corexy
max_velocity: 350
max_accel: 6500
max_z_velocity: 15          
max_z_accel: 350
square_corner_velocity: 8.0

#####################################################################
#   X/Y Stepper Settings
#####################################################################

##  B Stepper - Left
##  Connected to MOTOR_0
##  Endstop connected to DIAG_0
[stepper_x]
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200  #set to 400 for 0.9 degree stepper
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_min: 0
position_max: 300
position_endstop: 300
homing_speed: 100   #Max 100
homing_retract_dist: 0
homing_positive_dir: true

[tmc2209 stepper_x]
uart_pin: PC4
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
diag_pin: ^PG6      # Set to MCU pin connected to TMC DIAG pin
driver_SGTHRS: 72 # 255 is most sensitive value, 0 is least sensitive

##  A Stepper - Right
##  Connected to MOTOR_1
##  Endstop connected to DIAG_1
[stepper_y]
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200  #set to 400 for 0.9 degree stepper
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_min: 0
position_endstop: 300
position_max: 300
homing_speed: 100  #Max 100
homing_retract_dist: 0
homing_positive_dir: true

[tmc2209 stepper_y]
uart_pin: PD11
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
diag_pin: ^PG9      # Set to MCU pin connected to TMC DIAG pin
driver_SGTHRS: 128 # 255 is most sensitive value, 0 is least sensitive


#####################################################################
#   Z Stepper Settings
#####################################################################

## Z0 Stepper - Front Left
##  Connected to MOTOR_2
##  Endstop connected to DIAG_2
[stepper_z]
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
endstop_pin: probe:z_virtual_endstop
##  Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
##  (+) value = endstop above Z0, (-) value = endstop below
##  Increasing position_endstop brings nozzle closer to the bed
##  After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
# position_endstop: -0.5
position_max: 260
position_min: -10
homing_speed: 5
second_homing_speed: 4
homing_retract_dist: 3

[tmc2209 stepper_z]
uart_pin: PC6
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0

##  Z1 Stepper - Rear Left
##  Connected to MOTOR_3
[stepper_z1]
step_pin: PG4
dir_pin: !PC1
enable_pin: !PA0
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32

##  Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 stepper_z1]
uart_pin: PC7
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0

##  Z2 Stepper - Rear Right
##  Connected to MOTOR_4
[stepper_z2]
step_pin: PF9
dir_pin: PF10
enable_pin: !PG2
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32

##  Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 stepper_z2]
uart_pin: PF2
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0

##  Z3 Stepper - Front Right
##  Connected to MOTOR_5
[stepper_z3]
step_pin: PC13
dir_pin: !PF0
enable_pin: !PF1
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32

##  Make sure to update below for your relevant driver (2208 or 2209)
[tmc2209 stepper_z3]
uart_pin: PE4
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0

#####################################################################
#   Extruder
#####################################################################

##  Connected to EBB-TMC2209
##  Heater - EBB:HE0
##  Thermistor - EBB:T0

[extruder]
step_pin: EBB: PD0
dir_pin: !EBB: PD1
enable_pin: !EBB: PD2
rotation_distance: 22.6789511
microsteps: 32
gear_ratio: 50:10
full_steps_per_rotation: 200
max_extrude_only_distance: 500
max_extrude_only_velocity: 120
max_extrude_only_accel: 800
pressure_advance: 0.03
pressure_advance_smooth_time: 0.04
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBB: PB13
sensor_type: ATC Semitec 104NT-4-R025H42G
sensor_pin: EBB: PA3
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 310

[tmc2209 extruder]
uart_pin: EBB: PA15
interpolate: false
run_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 0

[firmware_retraction]
retract_length: 2
#   The length of filament (in mm) to retract when G10 is activated,
#   and to unretract when G11 is activated (but see
#   unretract_extra_length below). The default is 0 mm.
retract_speed: 30
#   The speed of retraction, in mm/s. The default is 20 mm/s.
unretract_extra_length: 0
#   The length (in mm) of *additional* filament to add when
#   unretracting.
unretract_speed: 30
#   The speed of unretraction, in mm/s. The default is 10 mm/s.

####################################################################
# Fan Control
####################################################################
[fan]
pin: EBB: PA0

[heater_fan hotend_fan]
pin: EBB: PA1
heater: extruder
heater_temp: 50.0

[heater_fan exhaust_fan]
pin: PD15
heater: heater_bed
heater_temp: 30.0

#####################################################################
#   Bed Heater
#####################################################################

##  SSR Pin - HE1
##  Thermistor - TB
[heater_bed]
heater_pin: PA1
sensor_pin: PF3
sensor_type: Generic 3950
max_power: 0.6
min_temp: 0
max_temp: 120
#control: pid
#pid_kp: 58.437
#pid_ki: 2.347
#pid_kd: 363.769

####################################################################
# Filament Sensors
####################################################################
[filament_switch_sensor switch_sensor]
switch_pin: ^!PG14
pause_on_runout: False
runout_gcode:
  PAUSE
  M117 Filament switch runout
insert_gcode:
  M117 Filament switch inserted

# [filament_motion_sensor encoder_sensor]
# switch_pin: ^PG15
# detection_length: 10
# extruder: extruder
# pause_on_runout: False
# runout_gcode:
#   PAUSE
#   M117 Filament encoder runout
# insert_gcode:
#   M117 Filament encoder inserted

#####################################################################
#   Probe
#####################################################################

## Voron Tap
[probe]
pin: ^EBB:PB9
x_offset: 0
y_offset: 0.0
#z_offset: -0.5
speed: 6
samples: 3
samples_result: median
sample_retract_dist: 2.0
samples_tolerance: 0.006
samples_tolerance_retries: 3

####GCode to safely use Tap

activate_gcode:
    {% set PROBE_TEMP = 150 %}
    {% set MAX_TEMP = PROBE_TEMP + 5 %}
    {% set ACTUAL_TEMP = printer.extruder.temperature %}
    {% set TARGET_TEMP = printer.extruder.target %}

    {% if TARGET_TEMP > PROBE_TEMP %}
        { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
        M109 S{ PROBE_TEMP }
    {% else %}
        # Temperature target is already low enough, but nozzle may still be too hot.
        {% if ACTUAL_TEMP > MAX_TEMP %}
            { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
            TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
        {% endif %}
    {% endif %}

#####################################################################
#   Homing and Gantry Adjustment Routines
#####################################################################

[idle_timeout]
gcode:
  _KM_IDLE_TIMEOUT

# [safe_z_home]
##  XY Location of the Z Endstop Switch
##  Update -10,-10 to the XY coordinates of your endstop pin 
##  (such as 157,305) after going through Z Endstop Pin
##  Location Definition step.
# home_xy_position:150,150
# speed:100
# z_hop:10
[homing_override]
axes: xyz
gcode:
  {% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
    
  {% if home_all or 'X' in params %}
    STATUS_HOMING
    _HOME_X
  {% endif %}
  
  {% if home_all or 'Y' in params %}
    STATUS_HOMING
    _HOME_Y
  {% endif %}
  
  {% if home_all or 'Z' in params %}
    STATUS_HOMING
    G91
    G1 Y-140 F3600
    G1 X-140 F3600
    G28.6245197 Z
    G1 Z10
    STATUS_READY
  {% endif %}



[quad_gantry_level]
gantry_corners:
   -60,-10
   360,370
#  Probe points
points:
   50,25
   50,275
   250,275
   250,25

speed: 200
horizontal_move_z: 3
retries: 6
retry_tolerance: 0.0075
max_adjust: 10

[bed_mesh]
speed: 200
horizontal_move_z: 1
mesh_min: 40, 40
mesh_max: 260,260
fade_start: 0.6
fade_end: 10.0
probe_count: 5,5
mesh_pps: 2,2
algorithm: bicubic

##########################################
# Input Shaping
##########################################
[input_shaper]
#shaper_freq_x: 84.4
#shaper_freq_y: 44.0
#shaper_type_x: 3hump_ei
#shaper_type_y: mzv

[adxl345]
cs_pin: EBB: PB12
spi_software_sclk_pin: EBB: PB10
spi_software_mosi_pin: EBB: PB11
spi_software_miso_pin: EBB: PB2
axes_map: x,y,z

[resonance_tester]
probe_points:
  150,150,30
accel_chip: adxl345
min_freq: 5
max_freq: 133.33
accel_per_hz: 75


########################################
# EXP1 / EXP2 (display) pins
########################################

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PE8, EXP1_2=PE7,
    EXP1_3=PE9, EXP1_4=PE10,
    EXP1_5=PE12, EXP1_6=PE13,    # Slot in the socket on this side
    EXP1_7=PE14, EXP1_8=PE15,
    EXP1_9=<GND>, EXP1_10=<5V>,

    # EXP2 header
    EXP2_1=PA6, EXP2_2=PA5,
    EXP2_3=PB1, EXP2_4=PA4,
    EXP2_5=PB2, EXP2_6=PA7,      # Slot in the socket on this side
    EXP2_7=PC15, EXP2_8=<RST>,
    EXP2_9=<GND>, EXP2_10=<5V>

###########################################
## NeoPixel SB Head
###########################################
[neopixel sb_leds]
pin: EBB:PD3
#   The pin connected to the neopixel. This parameter must be provided.
chain_count: 3
#   The number of Neopixel chips that are "daisy chained" to the
#   provided pin. The default is 1 (which indicates only a single
#   Neopixel is connected to the pin).
color_order: RGBW
#   Set the pixel order required by the LED hardware. Options are GRB,
#   RGB, GRBW, or RGBW. The default is GRB.
initial_RED: 0.5
initial_GREEN: 0.5
initial_BLUE: 0.5
#   Sets the initial LED color of the Neopixel. Each value should be
#   between 0.0 and 1.0. The WHITE option is only available on RGBW
#   LEDs. The default for each color is 0.#
#####################################################################
#   Macros
#####################################################################
[gcode_macro G32]
gcode:
    SAVE_GCODE_STATE NAME=STATE_G32
    STATUS_CALIBRATING_Z
    G90
    G28.6245197
    QUAD_GANTRY_LEVEL
    G28.6245197
    STATUS_BUSY
    PARK
    RESTORE_GCODE_STATE NAME=STATE_G32
    STATUS_READY

 

Here is my sensorless.cfg:
 

[gcode_macro _HOME_X]
gcode:
    # Always use consistent run_current on A/B steppers during sensorless homing
    {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
    {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
    {% set HOME_CURRENT = 0.7 %}
    STATUS_HOMING
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
    
    # Home
    G28.6245197 X
    # Move away
    G91
    G1 X-10 F1200
    
    # Wait just a second… (give StallGuard registers time to clear)
    G4 P1000
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}

[gcode_macro _HOME_Y]
gcode:
    # Set current for sensorless homing
    {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
    {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
    {% set HOME_CURRENT = 0.7 %}
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}

    # Home
    STATUS_HOMING
    G28.6245197 Y
    # Move away
    G91
    G1 Y-10 F1200

    # Wait just a second… (give StallGuard registers time to clear)
    G4 P1000
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
    # Home
    G28.6245197 X
    # Move away
    G91
    G1 X-10 F1200
    
    # Wait just a second… (give StallGuard registers time to clear)
    G4 P1000
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}

[gcode_macro _HOME_Y]
gcode:
    # Set current for sensorless homing
    {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
    {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
    {% set HOME_CURRENT = 0.7 %}
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}

    # Home
    STATUS_HOMING
    G28.6245197 Y
    # Move away
    G91
    G1 Y-10 F1200

    # Wait just a second… (give StallGuard registers time to clear)
    G4 P1000
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}

I hope you find your problem, Good Luck!
 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...