FYSETC / FYSETC-SPIDER

FYSETC Board - 3d printer motherboard for VORON and other open source project.
310 stars 148 forks source link

Spider V2.2/klipper sensorless homing issue #143

Open Cabinfourus opened 11 months ago

Cabinfourus commented 11 months ago

I am trying to configure Klipper to run my Cartesian 3D printer. I am having trouble with the diag pin for sensorless homing and the TMC2209 driver. Klipper keeps giving me this error " pin virtual_endstop used multiple times in config". I have been through the configuration multiple times and cannot see the conflict. The X and Y pins on the Spider V2.2 board share pins PB13 and PB14 with the X and Y min endstop connections. I want to use sensorless homing. When I add the diag pin configuration to my printer.cfg file, it comes back with the error. How do I configure the Spider V2.2 board with the Fysetc TMC 2209 V3.0 drivers to use sensorless homing in Klipper? Also, I'd like to use the ADXL345 sensor with the Spider V2.2 board but I am not sure which pins to use for the connections. This is my configuration- #####################################

Spider v2.2

#####################################

[stepper_x] step_pin: PE11 dir_pin: !PE10 enable_pin: !PE9 microsteps: 16 rotation_distance: 40 endstop_pin: tmc2209_stepper_x:virtual_endstop position_endstop: -18 position_min = -20 position_max: 300 homing_speed = 45 full_steps_per_rotation: 200 step_pulse_duration: 0.000000100 homing_retract_dist = 0

[stepper_y] step_pin: PD8 dir_pin: !PB12 enable_pin: !PD9 microsteps: 16 rotation_distance: 40 endstop_pin: tmc2209_stepper_x:virtual_endstop position_endstop: 3 position_max: 300 homing_speed = 40 full_steps_per_rotation: 200 step_pulse_duration: 0.000000100 homing_retract_dist = 0

[stepper_z] step_pin: PD14 dir_pin: !PD13 enable_pin: !PD15 microsteps: 16 rotation_distance: 8 endstop_pin = probe:z_virtual_endstop position_min = -2 position_max = 280 homing_speed = 12 full_steps_per_rotation: 200 step_pulse_duration: 0.000000100

[stepper_z1] step_pin = PE6 dir_pin = !PC13 enable_pin = !PE5 microsteps = 16 rotation_distance = 8 full_steps_per_rotation: 200 step_pulse_duration: 0.000000100

[extruder] step_pin: PD5 dir_pin: !PD6 enable_pin: !PD4 microsteps: 16 rotation_distance: 33.500 nozzle_diameter: 0.400 filament_diameter: 1.750 pressure_advance = 0.15 pressure_advance_smooth_time = 0.1 smooth_time = 2.0 min_extrude_temp = 170 heater_pin: PB15 sensor_type = NTC 100K MGB18-104F39050L32 sensor_pin: PC0 control: pid pid_Kp: 22 pid_Ki: 1.08 pid_Kd: 114 min_temp: 0 max_temp: 325

####################################

Heated BED

####################################

[heater_bed] heater_pin: PB4 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC0 control: watermark min_temp: 0 max_temp: 130 control = pid pid_kp = 73.064 pid_ki = 0.729 pid_kd = 1830.251

#####################################

FAN Control

#####################################

fan for printed model FAN0

[fan] pin: PA13

fan for hotend FAN1

[heater_fan heatbreak_cooling_fan]

pin: PA14 shutdown_speed: 1

fan for control board FAN2

[heater_fan my_control_fan] pin: PB2

####################################

MCU Serial number and Temp sensor

####################################

[mcu]

Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify

serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00

[temperature_sensor mcu_temp] sensor_type = temperature_mcu

######################################

Printer type and settings

######################################

[printer] kinematics: cartesian max_velocity: 300 max_accel: 3000 #Max 4000 max_accel_to_decel: 1500 square_corner_velocity: 5.0 max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V max_z_accel: 100

########################################

TMC UART configuration

########################################

[tmc2209 stepper_x] uart_pin: PE7 diag_pin: PB13 run_current: 0.6 stealthchop_threshold: 999999

[tmc2209 stepper_y] uart_pin: PE15 diag_pin: PB13 run_current: 0.6 stealthchop_threshold: 999999

[tmc2209 stepper_z] uart_pin: PD10 run_current: 0.6 stealthchop_threshold: 999999

[tmc2209 extruder] uart_pin: PD7 run_current: 0.6 sense_resistor: 0.110 stealthchop_threshold: 999999

[tmc2209 stepper_z1] uart_pin: PC14 run_current: 0.6 stealthchop_threshold: 999999

########################################

BL TOUCH CONFIGURATION

########################################

[bltouch] sensor_pin = ^PA0 control_pin = PA2 pin_move_time = 0.680 stow_on_each_sample = True probe_with_touch_mode = False pin_up_reports_not_triggered = True pin_up_touch_mode_reports_triggered = True x_offset = -42 y_offset = 12 speed = 5.0 samples = 1 sample_retract_dist = 5.0 lift_speed = 5.0 samples_result = average samples_tolerance = 0.100 samples_tolerance_retries = 1 z_offset = 0.950

########################################

BED MESH AND Z TILT

########################################

[bed_mesh] speed = 90 horizontal_move_z = 10.0 mesh_min = 35, 35 mesh_max = 245, 270 probe_count = 8, 8 mesh_pps = 3, 3 algorithm = bicubic bicubic_tension = 0.2 relative_reference_index = 12 fade_start = 0.4 fade_end = 10.0

[z_tilt] z_positions = -55, 325 145, 145 points = 80, 270 270, 30 speed = 45 horizontal_move_z = 10

#######################################

ADXL345 AND IMPUT SHAPER

#######################################

[resonance_tester] accel_chip = adxl345 probe_points = 150,150,200

[input_shaper] shaper_type = mzv damping_ratio_x = 0.1 damping_ratio_y = 0.1 shaper_type_x = ei shaper_freq_x = 45.8 shaper_type_y = zv shaper_freq_y = 21.0

#######################################

RUNOUT SENSOR

#######################################

[filament_switch_sensor RunoutSensor] pause_on_runout = True runout_gcode = PAUSE insert_gcode = RESUME switch_pin = !PA3

######################################

HOMING X Y Z

######################################

[safe_z_home] home_xy_position = 150, 150 speed = 55.0 z_hop = 10 z_hop_speed = 5.0 move_to_previous = False

#####################################

HEATER VERIFICATION

#####################################

[verify_heater extruder] max_error = 160 check_gain_time = 35 hysteresis = 5 heating_gain = 2

[verify_heater heater_bed bed] max_error = 160 check_gain_time = 70 hysteresis = 5 heating_gain = 1

##################################

RETRACTION

##################################

[firmware_retraction] retract_length = 6 retract_speed = 60 unretract_extra_length = 2 unretract_speed = 10

##################################

EXTRAS

##################################

[gcode_arcs] resolution = 1.0

[virtual_sdcard] path = ~/gcode_files

[display_status]

[endstop_phase]

[pause_resume] recover_velocity = 50

################################

MACROS

################################

[gcode_macro POWER_OFF_PRINTER] gcode = {action_call_remote_method("set_device_power", device="Printer", state="off")}

[delayed_gcode delayed_printer_off] initial_duration = 0. gcode = {% if printer.idle_timeout.state == "Idle" %} POWER_OFF_PRINTER {% endif %}

[gcode_macro UNLOAD_FILAMENT] gcode = {% set speed = params.SPEED|default(500) %} G91 G1 E-50 F{speed} G1 E-50 F{speed} G92

[gcode_macro LOAD_FILAMENT] gcode = {% set speed = params.SPEED|default(500) %} G91 G1 E50 F{speed} G1 E50 F{speed} G92

[gcode_macro START_PRINT] gcode = G90 SET_GCODE_OFFSET Z=0.0 G28 BED_MESH_PROFILE LOAD="default" G1 X15 Y20 Z5 F6000 G1 Z0.15 F300

[gcode_macro END_PRINT] gcode = M140 S0 M104 S0 M106 S0 G91 G1 X-2 Y-2 E-3 F300 G1 Z20 F3000 G90 M84

[gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL

[gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} M83 G1 E{extrude} F2100 {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params}

[gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE variable_park = True gcode = {% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%} _TOOLHEAD_PARK_PAUSE_CANCEL {% endif %} TURN_OFF_HEATERS CANCEL_PRINT_BASE

[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT variable_extrude = 1.0 gcode = {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set z_park_delta = 2.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - z_park_delta) %} {% set z_safe = z_park_delta %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} M83 G1 E-{extrude} F2100 {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G91 G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %}

[gcode_macro BED_MESH_CALIBRATE] rename_existing = BASE_BED_MESH_CALIBRATE gcode = BED_MESH_CLEAR G1 X125 Y125 Z5 F6000 BASE_BED_MESH_CALIBRATE

[bed_mesh default]

version = 1 points = -0.115000, -0.065000, -0.042500, -0.040000, -0.045000, -0.067500, -0.080000, -0.100000 -0.092500, -0.042500, -0.015000, 0.000000, 0.042500, -0.020000, -0.032500, -0.037500 -0.105000, -0.045000, 0.012500, 0.010000, 0.015000, -0.002500, -0.027500, -0.047500 -0.125000, -0.060000, -0.022500, -0.005000, 0.017500, -0.007500, -0.022500, -0.070000 -0.130000, -0.065000, -0.042500, -0.022500, 0.002500, -0.050000, -0.062500, -0.102500 -0.145000, -0.107500, -0.065000, -0.030000, -0.040000, -0.032500, -0.080000, -0.107500 -0.187500, -0.112500, -0.072500, -0.052500, -0.042500, -0.067500, -0.082500, -0.097500 -0.167500, -0.117500, -0.080000, -0.067500, -0.052500, -0.067500, -0.072500, -0.085000 tension = 0.2 min_x = 35.0 algo = bicubic y_count = 8 mesh_y_pps = 3 min_y = 35.0 x_count = 8 max_y = 269.99 mesh_x_pps = 3 max_x = 245.0

########################################

EXP1 / EXP2 (display) pins

########################################

[board_pins] aliases:

EXP2 header

EXP1_10=<5V>, EXP1_9=<GND>,
EXP1_8=PD1,   EXP1_7=PD0,
EXP1_6=PC12,  EXP1_5=PC10,     # Slot in the socket on the other side
EXP1_4=PD2,   EXP1_3=PC11,
EXP1_2=PA8,   EXP1_1=PC9,

# EXP1 header
EXP2_10=<5V>, EXP2_9=<GND>,
EXP2_8=<RST>, EXP2_7=PB10,
EXP2_6=PA7,   EXP2_5=PC7,       # Slot in the socket on the other side
EXP2_4=PA4,   EXP2_3=PC6,
EXP2_2=PA5,   EXP2_1=PA6

See the sample-lcd.cfg file for definitions of common LCD displays.

Cabinfourus commented 11 months ago

WOW! I own several Fystec boards and I am starting to use them but with the lack of help I am finding with this problem from them, I think I will go back to Makerbase or BTT boards.

ejhoness commented 11 months ago

I don't know if I can help, the x and y endstops are the same pin [stepper_y] step_pin: PD8 dir_pin: !PB12 enable_pin: !PD9 microsteps: 16 rotation_distance: 40 endstop_pin: tmc2209_stepper_x:virtual_endstop

Cabinfourus commented 11 months ago

This has been one of the most confusing boards I have ever dealt with. I will NEVER buy another Fyetc product.

Rushmere3D commented 10 months ago

Both your X and Y are configured for endstop_pin: tmc2209_stepper_x:virtual_endstop & diag_pin: PB13

Simply looking at the provided pin out could fix the issue. Can't see how this is a Fysetc problem, more user error.

Rushmere3D commented 10 months ago

And an ADXL sensor connects to the Raspberry Pi, not the spider. Follow the Klipper docs.