bigtreetech / Manta-E3EZ

76 stars 9 forks source link

Z_Endstop is always open #33

Open sabergo1 opened 10 months ago

sabergo1 commented 10 months ago

The z endstop is always shown triggered when queried in mainsail m119.

I have a Beacon3d sensor configured as the virtual endstop. The beacon module installed and nothing plugged into the z-endstop or BL-Touch pins.

The beacon sensor light triggers when brought into range of the bed and goes out when moved up (manually). M119 status never changes.

Config File:

[mcu] serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_5E002D000C504B5735313920-if00

[include mainsail.cfg]

[stepper_x] step_pin: PA14 dir_pin: !PA10 enable_pin: !PA13 microsteps: 16 rotation_distance: 40 endstop_pin: ^PC4 position_endstop: 0 position_max: 233 homing_speed: 50

[stepper_y] step_pin: PC8 dir_pin: !PA15 enable_pin: !PC14 microsteps: 16 rotation_distance: 40 endstop_pin: ^PB0 position_endstop: 0 position_max: 234 homing_speed: 50

[stepper_z] step_pin: PD2 dir_pin: !PD4 enable_pin: !PD3 microsteps: 16 rotation_distance: 8 gear_ratio: 2:1 endstop_pin: probe:z_virtual_endstop # use beacon as virtual endstop homing_retract_dist: 0 # beacon needs this to be set to 0

position_min: -5

position_max: 250

[extruder] step_pin: PD5 dir_pin: PD6 enable_pin: !PB3 microsteps: 16 rotation_distance: 8.087 ##8.087 prusament asa; 8.168 3dxtech asa ##HemeraXS_7.6start## nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PB11 #HE0 sensor_type: ATC Semitec 104NT-4-R025H42G sensor_pin: PA4 #TH0 control: pid pid_Kp: 21.527 pid_Ki: 1.063 pid_Kd: 108.982 min_temp: 0 max_temp: 250

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

TMC5160 configuration

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

[tmc5160 stepper_x] cs_pin: PB8 spi_software_miso_pin: PC11 spi_software_mosi_pin: PC12 spi_software_sclk_pin: PC10

diag1_pin: PF3

run_current: 0.800 stealthchop_threshold: 999999 sense_resistor: 0.075

[tmc5160 stepper_y] cs_pin: PC9 spi_software_miso_pin: PC11 spi_software_mosi_pin: PC12 spi_software_sclk_pin: PC10

diag1_pin: PF4

run_current: 0.800 stealthchop_threshold: 999999 sense_resistor: 0.075

[tmc5160 stepper_z] cs_pin: PD0 spi_software_miso_pin: PC11 spi_software_mosi_pin: PC12 spi_software_sclk_pin: PC10

diag1_pin: PF5

run_current: 0.650 stealthchop_threshold: 999999 sense_resistor: 0.075

[tmc5160 extruder]

cs_pin: PD1 spi_software_miso_pin: PC11 spi_software_mosi_pin: PC12 spi_software_sclk_pin: PC10 run_current: 0.800 stealthchop_threshold: 999999 sense_resistor: 0.075

[beacon] serial: /dev/serial/by-id/usb-Beacon_Beacon_RevD_1AB2BF0A515137474C202020FF0C3A29-if00 x_offset: -14 # update with offset from nozzle on your machine y_offset: +28 # update with offset from nozzle on your machine mesh_main_direction: x mesh_runs: 2

[static_digital_output usb_pullup_enable]

pins:

[bed_mesh]
speed: 150 mesh_min: 20, 20 mesh_max: 205, 205 algorithm: bicubic probe_count: 5,5
horizontal_move_z: 8

[safe_z_home]
home_xy_position: 117, 117

speed: 100

z_hop: 3

z_hop_speed: 5

[filament_switch_sensor material_0]

switch_pin: PC5

[extruder1]

step_pin: PB7

dir_pin: PB6

enable_pin: !PB4

heater_pin: PB10 # HE1

sensor_pin: PA5 # T1

[filament_switch_sensor material_1]

switch_pin: PB1

[heater_bed] heater_pin: PB2 #HB sensor_type: ATC Semitec 104GT-2 sensor_pin: PA3 #TB control: pid

tuned for stock hardware with 50 degree Celsius target

pid_Kp: 54.027 pid_Ki: 0.770 pid_Kd: 948.182 min_temp: 0 max_temp: 130

[fan] pin: PA8

[heater_fan fan1] pin: PB15

[heater_fan fan2] pin: PB14

[printer] kinematics: cartesian max_velocity: 300 max_accel: 3000 max_z_velocity: 5 max_z_accel: 100

[board_pins] aliases:

EXP1 header

EXP1_1=PC1, EXP1_3=PC3, EXP1_5=PC0, EXP1_7=PA2, EXP1_9=<GND>,
EXP1_2=PC2,  EXP1_4=<RST>, EXP1_6=PA0, EXP1_8=PA1, EXP1_10=<5V>

[bed_screws] screw1: 33, 33 screw2: 33, 202 screw3: 202, 202 screw4: 202, 33

[screws_tilt_adjust] screw1: 47, 5 screw1_name: front left screw screw2: 216, 5 screw2_name: front right screw screw3: 216, 174 screw3_name: rear right screw screw4: 47, 174 screw4_name: rear left screw horizontal_move_z: 10. speed: 50. screw_thread: CW-M4

[display] lcd_type: st7920 cs_pin: EXP1_7 sclk_pin: EXP1_6 sid_pin: EXP1_8 encoder_pins: ^EXP1_5, ^EXP1_3 click_pin: ^!EXP1_2

[output_pin beeper] pin: EXP1_1

[gcode_macro G29] # If moving from marlin to klipper uncomment to mimic G29 gcode: BED_MESH_CALIBRATE

G1 X0 Y0 Z10 F4000

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

Start Print and End Print

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

Replace the slicer's custom start and end g-code scripts with

START_PRINT and END_PRINT.

[gcode_macro START_PRINT] gcode: {% set BED_TEMP = params.BED_TEMP|default(70)|float %} {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(245)|float %}

Start bed heating

M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}

[gcode_macro END_PRINT] gcode:

Turn off bed, extruder, and fan

M140 S0
M104 S0
M106 S0
#Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
#Raise nozzle by 10mm
G1 Z10 F3000
G90
Disable steppers
M84