Here it is.
printer.cfg.zip (4.8 KB)
# This file contains common pin mappings for the BIGTREETECH Manta M8P
# To use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" and USB communication.
# See docs/Config_Reference.md for a description of parameters.
[virtual_sdcard]
path: /home/biqu/printer_data/gcodes
[display_status]
[pause_resume]
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_210036000C504B4633373520-if00
[mcu EBBCan]
canbus_uuid: 716f2d3151ab #c26bdd8865fb
########################################
# STEPPERS
#######################################
[stepper_x]
step_pin: PE2
dir_pin: !PB4 #add ! to invert motor
enable_pin: !PC11
microsteps: 16
rotation_distance: 32
endstop_pin: EBBCan: PB6 #^PF3
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: PF12
dir_pin: !PF11 # add ! to invert motor
enable_pin: !PB3 #Remove !
microsteps: 16
rotation_distance: 32
endstop_pin: ^PF4
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: PD7
dir_pin: PD6
enable_pin: !PF10
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_max: 285
position_min: -5.0
homing_speed: 30
second_homing_speed: 3
homing_retract_dist: 15
[stepper_z1]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD5
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
[stepper_z2]
step_pin: PC9
dir_pin: !PC8
enable_pin: !PD1
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
########################################
# EXTRUDER
#######################################
[extruder]
step_pin: EBBCan: PD0
dir_pin: !EBBCan: PD1
enable_pin: !EBBCan: PD2
microsteps: 16
rotation_distance: 3.484 #3.433
#gear_ratio: 7:1
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan: PB13 #PA2 V1.1
sensor_type: Generic 3950 #EPCOS 100K B57560G104F
sensor_pin: EBBCan: PA3
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 270
pressure_advance = 0.019
[heater_bed]
heater_pin: PB7
sensor_pin: PA0 # TB
sensor_type: EPCOS 100K B57560G104F #ATC Semitec 104GT-2
#control: watermark
min_temp: 0
max_temp: 130
########################################
# FAN
#######################################
[fan]
pin: EBBCan: PA0
[heater_fan hotend_fan]
pin: EBBCan: PA1
heater: extruder
heater_temp: 50.0
kick_start_time: 2
########################################
# PRINTER
#######################################
[printer]
kinematics: corexy
max_velocity: 800
max_accel: 10000 #4000
max_accel_to_decel: 10000 #4000
max_z_velocity: 100
max_z_accel: 200
square_corner_velocity: 5.0 #4.5
[input_shaper]
shaper_freq_x: 75.8
shaper_type_x: mzv
shaper_freq_y: 75.8
shaper_type_y: mzv
[adxl345]
cs_pin: EBBCan: PB12
spi_software_sclk_pin: EBBCan: PB10
spi_software_mosi_pin: EBBCan: PB11
spi_software_miso_pin: EBBCan: PB2
axes_map: x,y,z
[resonance_tester]
accel_chip: adxl345
probe_points: 150, 150, 30
[bltouch]
sensor_pin: ^EBBCan: PB8
control_pin: EBBCan: PB9
x_offset: 0
y_offset: -25
#z_offset: 3.35
speed: 7.5
samples: 2
sample_retract_dist: 10.0
stow_on_each_sample: False
probe_with_touch_mode: True
[safe_z_home]
home_xy_position: 150,150
speed: 50
[z_tilt]
z_positions:
0, 50
160, 300
200, 50
#center_Y186
points:
0, 50
160, 300
300, 50
speed: 150
horizontal_move_z: 10
retries: 10
retry_tolerance: 0.005
[bed_screws]
screw1: 30, 0
screw2: 30, 270
screw3: 280, 270
screw4: 280, 0
########################################
# FIRMWARE RETRACTION
########################################
[firmware_retraction]
retract_length: 0.2
retract_speed: 20
########################################
# BED MESH
########################################
[bed_mesh]
speed: 80
horizontal_move_z: 8
mesh_min: 12, 0
mesh_max: 298,273
probe_count: 5,5
algorithm: bicubic #lagrange
mesh_pps: 4, 4 #1, 1
bicubic_tension: .5 #.5
move_check_distance: 5 #10
split_delta_z: .025
fade_start: 1
fade_end: 10
fade_target: 0
########################################
# TMC2209 configuration
########################################
[tmc2209 stepper_x]
uart_pin: PC10
run_current: 1.0 #0.800
#hold_current: 0.600
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_y]
uart_pin: PF13
run_current: 1.0 #0.800
#hold_current: 0.600
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_z]
uart_pin: PF9
run_current: 0.60000
#hold_current: 0.500
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 extruder]
uart_pin: EBBCan: PA15
run_current: 0.800
#stealthchop_threshold: 999999
[tmc2209 stepper_z1] # was z1
uart_pin: PD4
run_current: 0.600
#hold_current: 0.500
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_z2] # was z2
uart_pin: PD0
run_current: 0.600
#hold_current: 0.500
interpolate: False
#stealthchop_threshold: 999999
########################################
# BOARD PINS
#######################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE9, EXP1_2=PE10,
EXP1_3=PE11, EXP1_4=PE12,
EXP1_5=PE13, EXP1_6=PE14, # Slot in the socket on this side
EXP1_7=PE15, EXP1_8=PB10,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_2=PB13,
EXP2_3=PF7, EXP2_4=PB12,
EXP2_5=PE7, EXP2_6=PB11, # Slot in the socket on this side
EXP2_7=PE8, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
#############################
# MACROS
#############################
[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:
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% 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:
## Move head and retract only if not already in the pause state and park set to true
{% 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 park positon for x and y #####
# default is your max posion from your printer.cfg
{% 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 %}
##### calculate save lift position #####
{% 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 %}
##### end of definitions #####
{% 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 %}
########################################
# Bed Leveling
########################################
[gcode_macro BED_LEVEL]
gcode:
G28 X Y
G28 Z F9000
Z_TILT_ADJUST
######################################
# Start GCode
######################################
[gcode_macro START_PRINT]
gcode:
#Get Bed and Extruder temperature from Slicer GCode
#{% set BED_TEMP = params.BED_TEMP| default|}
#{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP| defaut|}
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(205)|float %}
#Preheat nozzle and bed
M104 S{EXTRUDER_TEMP} T0
M140 S{BED_TEMP}
# Use absolute coordinates
G90
#Home
G28 X Y
G28 Z F4800
Z_TILT_ADJUST #[<probe_parameter>=<value>]
#Use defaut bed mesh
BED_MESH_PROFILE LOAD=default
#Heat nozzle and bed
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP} T0
#Precondition extruder
G92 E0
G1 Z2.0 F600
G1 Z0.2 F600
G1 Z2.0 F600
#Prime line
PRIME_LINE
M117 Printing...
######################################
# Prime line
######################################
[gcode_macro PRIME_LINE]
gcode:
M117 Prime Line
G92 E0 ;Reset Extruder
# move z axis
G1 Z3.6 F3000 ;Move Z Axis up
# move to prime position
G1 X5 Y85 Z2 F5000.0 ;Move to start position
G1 X5 Y200.0 Z0.35 F1500.0 E15 ;Draw the first line
G1 X7 Y200.0 Z0.35 F5000.0 ;Move to side a little
G1 X7 Y85 Z0.35 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z4.0 F3000 ;Move Z Axis up
######################################
# load filament
######################################
[gcode_macro M701]
gcode:
SAVE_GCODE_STATE NAME=loading_filament
M117 Loading Filament
M83
G92 E0.0
LOW_TEMP_CHECK
G1 E50 F6000 # length of bowden tube till cold-end (~420mm)
G1 E50 F200 # some extra to prime the nozzle --> slower
G92 E0.0
RESTORE_GCODE_STATE NAME=loading_filament
######################################
# unload filament
######################################
[gcode_macro M702]
gcode:
SAVE_GCODE_STATE NAME=unloading_filament
M125 # park
M117 Unloading Filament
LOW_TEMP_CHECK
G91 # set relative
G1 E10 F100
G92 E0.0
G1 E-50 F6000 # the E is the length of the bowden tube (420mm) + 100 mm.
G92 E0.0
RESTORE_GCODE_STATE NAME=unloading_filament
######################################
# filament change
######################################
[gcode_macro M600]
gcode:
M117 Filament Change
M118 Filament Change
SAVE_GCODE_STATE NAME=filament_change
PAUSE
LOW_TEMP_CHECK
G91 # relative
G1 E-1 F300 # retract 1
M125 # park
M702 # unload
M117 New filament
M118 New filament
COUNTDOWN TIME=25 MSG="Switch"
M701
COUNTDOWN TIME=10 MSG="Clean"
RESUME
M117 Resuming
M118 Resuming
RESTORE_GCODE_STATE NAME=filament_change
M117 Printing..
M118 Printing..
#######################################
# COUNTDOWN MACRO
#######################################
[gcode_macro COUNTDOWN]
gcode:
{% set MSG = params.MSG|default("Time: ") %}
{% set TIME = params.TIME|default(10) %}
# countdown
{% for s in range(TIME|int, 0, -1) %}
# dwell 1 second
G4 P1000
# echo
M117 {params.MSG} {s}s
M118 {params.MSG} {s}s
{% endfor %}
######################################
# End Gcode
######################################
[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 E-3
# Raise nozzle by 10mm
G1 Z10 F3000
G90
G1 X298 Y298 Z284 F7000
G1 E-1 F100
#G1 X-2 Y-2 E-3 F300
# Disable steppers
M84
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.028709, 0.173709, 0.173709, 0.118709, -0.006291
#*# -0.076291, 0.043709, 0.123709, 0.043709, -0.026291
#*# -0.136291, -0.026291, -0.006291, -0.101291, -0.131291
#*# -0.146291, -0.041291, -0.011291, -0.091291, -0.196291
#*# -0.246291, -0.066291, -0.051291, -0.146291, -0.196291
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 4
#*# mesh_y_pps = 4
#*# algo = bicubic
#*# tension = 0.5
#*# min_x = 12.0
#*# max_x = 298.0
#*# min_y = 0.0
#*# max_y = 273.0
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 17.614
#*# pid_ki = 0.599
#*# pid_kd = 129.462
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 62.610
#*# pid_ki = 6.049
#*# pid_kd = 162.003
#*#
#*# [bltouch]
#*# z_offset = 1.000