[include fluidd.cfg] [include mainsail.cfg] [virtual_sdcard] path: /home/kelley/printer_data/gcodes on_error_gcode: CANCEL_PRINT # This file contains pin mappings for the Creality Ender-3 E # with the 32-bit Creality 4.2.2 board, BL Touch and Auto Bed Leveling. # To use this config, during "make menuconfig" select the STM32F103 # with "28KiB bootloader" and serial (on USART1 PA10/PA9) communication. # It should be noted that newer variations of this printer shipping in # 2022 may have GD32F103 chips installed and not STM32F103. You may # have to inspect the mainboard to ascertain which one you have. If it # is the GD32F103 then please select Disable SWD at startup in the # "make menuconfig" along with the same settings for STM32F103. # If you prefer a direct serial connection, in "make menuconfig" # select "Enable extra low-level configuration options" and select # serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC # cable used for the LCD module as follows: # 3: Tx, 4: Rx, 9: GND, 10: VCC # Flash this firmware by copying "out/klipper.bin" to a SD card and # turning on the printer with the card inserted. The firmware # filename must end in ".bin" and needs to be named "firmware.bin". # See docs/Config_Reference.md for a description of parameters. [pause_resume] [gcode_macro PAUSE] description: Pause the actual running print rename_existing: PAUSE_BASE # change this if you need more or less extrusion variable_extrude: 1.0 gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} ##### 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 %} ##### 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 - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} ##### end of definitions ##### PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description: Resume the actual running print rename_existing: RESUME_BASE gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} #### 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' %} G91 G1 E{E} F2100 {% 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 gcode: TURN_OFF_HEATERS {% if "xyz" in printer.toolhead.homed_axes %} G91 G1 Z4.5 F300 G90 {% else %} {action_respond_info("Printer not homed")} {% endif %} G28 X Y {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} G1 Y{y_park} F2000 M84 CANCEL_PRINT_BASE [stepper_x] step_pin: PC2 dir_pin: PB9 enable_pin: !PC3 microsteps: 16 rotation_distance: 40 endstop_pin: ^PA5 position_endstop: 0 position_max: 235 homing_speed: 50 [stepper_y] step_pin: PB8 dir_pin: PB7 enable_pin: !PC3 microsteps: 16 rotation_distance: 40 endstop_pin: ^PA6 position_endstop: 0 position_max: 235 homing_speed: 50 [stepper_z] step_pin: PB6 dir_pin: !PB5 enable_pin: !PC3 microsteps: 16 rotation_distance: 8 #endstop_pin: ^PA7 endstop_pin: probe:z_virtual_endstop #position_endstop: 0.0 position_max: 240 position_min: -10 [extruder] max_extrude_only_distance: 200.0 step_pin: PB4 dir_pin: PB3 enable_pin: !PC3 microsteps: 16 rotation_distance: 25.6 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PA1 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC5 control: pid # tuned for stock hardware with 200 degree Celsius target pid_Kp: 21.527 pid_Ki: 1.063 pid_Kd: 108.982 min_extrude_temp: 170 gear_ratio: 42:12 pressure_advance: 0.0325 min_temp: 0 max_temp: 300 # this entryt needs research [verify_heater extruder] check_gain_time: 300 hysteresis: 7 [heater_bed] heater_pin: PA2 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC4 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: PA0 [fan_generic extruder_partfan] # pin: PB15 pin: PC6 #[heater_fan heater_partfan] #pin: PB14 # need to get this info. PB14 is part of display. #max_power: #shutdown_speed: #cycle_time: #hardware_pwm: #kick_start_time: #off_below: #tachometer_pin: #tachometer_ppr: #tachometer_poll_interval: # See the "fan" section for a description of the above parameters. #heater: extruder # Name of the config section defining the heater that this fan is # associated with. If a comma separated list of heater names is # provided here, then the fan will be enabled when any of the given # heaters are enabled. The default is "extruder". #heater_temp: 50.0 # A temperature (in Celsius) that the heater must drop below before # the fan is disabled. The default is 50 Celsius. #fan_speed: 1.0 # The fan speed (expressed as a value from 0.0 to 1.0) that the fan # will be set to when its associated heater is enabled. The default # is 1.0 [mcu] serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 restart_method: command [printer] kinematics: cartesian max_velocity: 300 max_accel: 3000 max_z_velocity: 5 max_z_accel: 100 # Pin mappings for BLtouch [bltouch] sensor_pin: ^PB1 control_pin: PB0 x_offset: -31.5 y_offset: -49.5 #z_offset: 0.0 speed: 20 samples: 1 sample_retract_dist: 8.0 stow_on_each_sample = false #high speed for bltouch [safe_z_home] home_xy_position: 110,110 # Change coordinates to the center of your print bed z_hop: 10 # Move up 10mm z_hop_speed: 10 speed: 120 [bed_mesh] speed: 120 mesh_min: 20,0 #need to handle head distance with bl_touch mesh_max: 190,180.5 #max probe range #probe_count: 3,3 probe_count: 5,5 #probe_count: 7,7 #probe_count: 9,9 #probe_count: 12,12 fade_start: 1 fade_end: 10 fade_target: 0 algorithm: bicubic [bed_screws] screw1:30,25 screw1_name:1 screw2:270,25 screw2_name:2 screw3:270,270 screw3_name:3 screw4:30,270 screw4_name:4 [gcode_macro G29] #界面中增加G29指令 gcode: G28 bed_mesh_calibrate G1 X0 Y0 Z10 F4200 # save_config [gcode_macro BED_LEVEL] gcode: G28 BED_MESH_CALIBRATE [gcode_macro Z_AXI_CALIBRATE] gcode: G28 PROBE_CALIBRATE [gcode_macro SHAPER] gcode: G28 SHAPER_CALIBRATE [gcode_macro PID] gcode: G28 PID_CALIBRATE HEATER=extruder TARGET=260 PID_CALIBRATE HEATER=heater_bed TARGET=60 [gcode_macro Press_Advance_short] gcode: SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500 TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005 [gcode_macro Press_Advance_long] gcode: SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500 TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.020 #[display] #lcd_type: st7920 #cs_pin: PB12 #sclk_pin: PB13 #sid_pin: PB15 #encoder_pins: ^PB14, ^PB10 #click_pin: ^!PB2 #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [bltouch] #*# z_offset = 2.300 #*# #*# [bed_mesh ender-3e] #*# version = 1 #*# points = #*# 0.342500, 0.290000, 0.220000, 0.162500, 0.070000 #*# 0.117500, 0.137500, 0.075000, 0.097500, -0.025000 #*# -0.247500, -0.162500, -0.142500, -0.060000, -0.092500 #*# -0.540000, -0.422500, -0.295000, -0.167500, -0.145000 #*# -0.792500, -0.595000, -0.387500, -0.202500, -0.110000 #*# x_count = 5 #*# y_count = 5 #*# mesh_x_pps = 2 #*# mesh_y_pps = 2 #*# algo = bicubic #*# tension = 0.2 #*# min_x = 20.0 #*# max_x = 190.0 #*# min_y = 0.0 #*# max_y = 180.47 #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# 0.267500, 0.237500, 0.200000, 0.160000, 0.102500 #*# 0.062500, 0.095000, 0.070000, 0.092500, 0.020000 #*# -0.280000, -0.127500, -0.120000, -0.035000, -0.040000 #*# -0.575000, -0.430000, -0.282500, -0.135000, -0.067500 #*# -0.817500, -0.597500, -0.357500, -0.167500, -0.022500 #*# x_count = 5 #*# y_count = 5 #*# mesh_x_pps = 2 #*# mesh_y_pps = 2 #*# algo = bicubic #*# tension = 0.2 #*# min_x = 20.0 #*# max_x = 190.0 #*# min_y = 0.0 #*# max_y = 180.47