Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file contains pin mappings for the stock 2021 Creality Ender 3
- [include kpr-config/logger.cfg]
- [include kpr-config/edit_file.cfg]
- # S1 & S1 Pro. To use this config, check the STM32 Chip on the
- # Mainboard, during "make menuconfig" select accordingly either the
- # STM32F103 with "28KiB bootloader" or the STM32F401 with
- # "64KiB bootloader" and serial (on USART1 PA10/PA9) for both.
- # For a direct serial connection, in "make menuconfig" select
- # "Enable extra low-level configuration options" and Serial
- # (on USART2 PA3/PA2), which is 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 filename
- # must be changed to "firmware.bin"
- # With STM32F401, you might need to put "firmware.bin" in a
- # folder on the SD card called "STM32F4_UPDATE" in order to flash.
- # See docs/Config_Reference.md for a description of parameters.
- [include mainsail.cfg]
- [include shell_command.cfg]
- #[include usbadxl345.cfg]
- [virtual_sdcard]
- path: /home/khisanthax/printer_Ender5Plus_data/gcodes
- on_error_gcode: CANCEL_PRINT
- [mcu]
- serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
- restart_method: command
- # !Ender-3 S1
- # printer_size: 220x220x270
- # version: 3.6
- # Motherboard (Late 2020/2021) as the heater pins changed.
- # To use this config, during "make menuconfig" select the STM32F401
- # with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
- # communication.
- # 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 must not match the last filename
- # that was flashed.
- # See docs/Config_Reference.md for a description of parameters.
- ###fluidd set
- [display_status]
- [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
- [gcode_macro G29]
- gcode:
- g28
- bed_mesh_calibrate adaptive=1
- G1 X0 Y0 Z10 F4200
- [gcode_macro M600]
- description: Starts process of Filament Change
- gcode:
- {% if printer.extruder.temperature < 180 %}
- {action_respond_info("Extruder temperature too low")}
- {% else %}
- PAUSE_MACRO
- _DISABLE_FS
- UNLOAD_FILAMENT
- {% endif %}
- [gcode_macro PAUSE_MACRO]
- description: Pauses Print
- gcode:
- PAUSE
- SET_IDLE_TIMEOUT TIMEOUT={ 30 * 60 }
- [gcode_macro FC_RESUME]
- description: Resume print after Filament Change
- gcode:
- ##### read E from pause macro #####
- {% set E = printer["gcode_macro PAUSE"].extrude|float %}
- SET_IDLE_TIMEOUT TIMEOUT={ 10 * 60 }
- G1 E-{ E }
- # Reset extruder position
- G92 E0
- RESUME
- [gcode_macro UNLOAD_FILAMENT]
- description: Unloads Filament from extruder
- gcode:
- {% if printer.extruder.temperature < 180 %}
- {action_respond_info("Extruder temperature too low")}
- {% else %}
- SAVE_GCODE_STATE NAME=UNLOAD_state
- {% set z_lift = params.z_lift|default(50)|int %}
- {% set axis_max = printer.toolhead.axis_maximum %}
- {% set pos = printer.toolhead.position %}
- {% set z_diff = axis_max.z - pos.z %}
- {% set z_safe_lift = [ z_lift, z_diff ] | min%}
- G91 # relative positioning
- G0 Z{ z_safe_lift }
- # Reset extruder position
- G92 E0
- G1 E5.0 F300 # extrude a little
- G1 E-50 F{ 10 * 60 } # perform the unload
- G1 E-50 F{ 5 * 60 } # finish the unload
- RESTORE_GCODE_STATE NAME=UNLOAD_state
- {% endif %}
- [gcode_macro PURGE]
- description: Extrudes filament, used to clean out previous filament
- gcode:
- {% if printer.extruder.temperature < 180 %}
- {action_respond_info("Extruder temperature too low")}
- {% else %}
- SAVE_GCODE_STATE NAME=PURGE_state
- G91 # relative coords
- G1 E45.0 F{ 5 * 60 } # purge
- RESTORE_GCODE_STATE NAME=PURGE_state
- {% endif %}
- [gcode_macro LOAD_FILAMENT]
- description: Loads filament into the extruder
- gcode:
- {% if printer.extruder.temperature < 180 %}
- {action_respond_info("Extruder temperature too low")}
- {% else %}
- SAVE_GCODE_STATE NAME=LOAD_state
- G91 # Relative coords
- G1 E50 F{ 5 * 60 } # extrude
- G4 P{ 0.9 * 1000 } # dwell (ms)
- G1 E25.0 F{ 5 * 60 } # extrude a little more
- _ENABLE_FS
- RESTORE_GCODE_STATE NAME=LOAD_state
- {% endif %}
- [gcode_macro _DISABLE_FS]
- description: placeholder, disables filament sensor that might trigger an M600 in the middle of a load/unload/M600...
- gcode:
- SET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=0
- [gcode_macro _ENABLE_FS]
- description: placeholder, enables filament sensor
- gcode:
- SET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=1
- [gcode_macro HEAT]
- description: Heats up the extruder to get ready for Filament Change
- gcode:
- SET_HEATER_TEMPERATURE HEATER=extruder TARGET=200
- HOME_CHECK
- G1 Z10 F3000
- [gcode_macro COOL]
- description: Turns off all heaters
- gcode:
- TURN_OFF_HEATERS
- [gcode_macro BED_TRAMMING_1]
- description: Heats bed and starts process to level the bed with the screws
- gcode:
- M140 S60
- HOME_CHECK
- M190 S60
- SCREWS_TILT_CALCULATE
- [gcode_macro BED_TRAMMING_2]
- description: Continues the bed screw leveling process
- gcode:
- SCREWS_TILT_CALCULATE
- [gcode_macro BED_MESH]
- description: Heats bed, makes a mesh and saves it
- gcode:
- M140 S60
- HOME_CHECK
- M190 S60
- BED_MESH_CLEAR
- BED_MESH_CALIBRATE
- TURN_OFF_HEATERS
- SAVE_CONFIG
- [gcode_macro DISABLE_STEPPERS]
- description: Disables the printers stepper motors
- gcode:
- M84 X Y E
- [gcode_macro PID_EXTRUDER]
- description: PID Tune for the Extruder
- gcode:
- PID_CALIBRATE HEATER=extruder TARGET=200
- TURN_OFF_HEATERS
- SAVE_CONFIG
- [gcode_macro PID_BED]
- description: PID Tune for the Bed
- gcode:
- PID_CALIBRATE HEATER=heater_bed TARGET=60
- TURN_OFF_HEATERS
- SAVE_CONFIG
- [gcode_macro NOZZLE_MID]
- description: Moves nozzle to the center of the bed
- gcode:
- HOME_CHECK
- G1 X110 Y110 Z10 F6000
- [gcode_macro home_check]
- description: Checks if the printer is homed, it not it homes the printer
- gcode:
- {% if printer.toolhead.homed_axes != "xyz" %}
- G28
- {% endif %}
- [gcode_macro SHOW_PRINT]
- description: Moves the extruder out of the way and bed forward
- gcode:
- HOME_CHECK
- {% set z_lift = params.z_lift|default(50)|int %}
- {% set axis_max = printer.toolhead.axis_maximum %}
- {% set pos = printer.toolhead.position %}
- {% set z_diff = axis_max.z - pos.z %}
- {% set z_safe_lift = [ z_lift, z_diff ] | min%}
- G1 Z{ z_safe_lift }
- G1 X10 Y220 F4000
- [gcode_macro ZOffset_Setup]
- description: Starts Z-Offset Calibration, under 30 degrees Celsius
- gcode:
- {% if printer.heater_bed.temperature > 30 %}
- {action_respond_info("Bed temperature too high")}
- {% elif printer.extruder.temperature > 30 %}
- {action_respond_info("Extruder temperature too High")}
- {% else %}
- G28
- PROBE_CALIBRATE
- {% endif %}
- [gcode_macro Z_Down_01]
- description: Moves Z down by 0.1
- gcode:
- TESTZ Z=-.1
- [gcode_macro Z_Up_01]
- description: Moves Z up by 0.1
- gcode:
- TESTZ Z=+.1
- [gcode_macro Z_Low_Half]
- description: Sets Z between current value and previous lower value
- gcode:
- TESTZ Z=-
- [gcode_macro Z_High_Half]
- description: Sets Z between current value and previous higher value
- gcode:
- TESTZ Z=+
- [gcode_macro Accept_Save]
- description: Accepts the Z-Offset and saves the config
- gcode:
- ACCEPT
- SAVE_CONFIG
- [gcode_macro Abort_Setup]
- description: Aborts the Z-Offset calibration
- gcode:
- ABORT
- [screws_tilt_adjust]
- horizontal_move_z: 5
- screw1: 50,220
- screw1_name: Back left
- screw2: 228,220
- screw2_name: Back Right
- screw3: 50,74
- screw3_name: Front Left
- screw4: 228,74
- screw4_name: Front Right
- [stepper_x]
- step_pin: PC2
- dir_pin: PB9
- enable_pin: !PC3
- rotation_distance: 40
- microsteps: 16
- endstop_pin: !PA5
- position_min: -5
- position_endstop: -5
- position_max: 245
- homing_speed: 80
- [stepper_y]
- step_pin: PB8
- dir_pin: PB7
- enable_pin: !PC3
- rotation_distance: 40
- microsteps: 16
- endstop_pin: !PA6
- position_min: -2
- position_endstop: -2
- position_max: 230
- homing_speed: 80
- [stepper_z]
- step_pin: PB6
- dir_pin: !PB5
- enable_pin: !PC3
- rotation_distance: 8
- microsteps: 16
- endstop_pin: probe:z_virtual_endstop #enable to use bltouch
- #endstop_pin: !PA15 #disable to use bltouch
- #position_endstop: -0.1
- position_min: -10
- position_max: 275
- homing_speed: 4
- second_homing_speed: 1
- homing_retract_dist: 2.0
- [extruder]
- gear_ratio: 1:1
- max_extrude_only_distance: 1000.0
- step_pin: PB4
- dir_pin: PB3
- enable_pin: !PC3
- rotation_distance: 7.5
- microsteps: 16
- 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: 23.904
- pid_Ki: 1.476
- pid_Kd: 96.810
- min_temp: 0
- max_temp: 265
- pressure_advance_smooth_time: 0.04
- pressure_advance: 0.06
- [heater_bed]
- heater_pin: PA7
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PC4
- control: pid
- # tuned for stock hardware with 50 degree Celsius target
- pid_Kp: 74.000
- pid_Ki: 1.965
- pid_Kd: 696.525
- min_temp: 0
- max_temp: 125
- [idle_timeout]
- timeout: 172800
- [verify_heater extruder]
- check_gain_time: 200
- hysteresis: 5
- [fan]
- pin: PA0
- kick_start_time: 0.5
- #set heater fan runnig with temperature over 60;
- [heater_fan my_nozzle_fan]
- pin: PC0
- max_power: 0.8
- shutdown_speed : 0
- heater:extruder
- heater_temp : 60
- fan_speed : 1.0
- # [mcu rpi]
- # serial: /tmp/klipper_host_mcu
- # [adxl345]
- # cs_pin: rpi:None
- # spi_speed: 2000000
- # spi_bus: spidev2.0
- # [resonance_tester]
- # accel_chip: adxl345
- # accel_per_hz: 70
- # probe_points:
- # 117.5,117.5,10
- [input_shaper]
- #shaper_type_x = mzv
- #shaper_freq_x = 56.4
- #shaper_type_y = mzv
- #shaper_freq_y = 36.2
- [filament_switch_sensor filament_sensor]
- pause_on_runout: true
- switch_pin: ^!PC15
- [bltouch]
- sensor_pin: ^PC14 #signal check port ^stand for pull up
- control_pin: PC13 #singal control prot
- x_offset: -30.0
- y_offset: -40.0
- #z_offset: 0 #z off_set configuration
- speed: 20
- stow_on_each_sample = false #high speed for bltoch,
- samples: 1
- #probe_with_touch_mode = true
- [safe_z_home]
- home_xy_position:145,155
- speed: 200
- z_hop: 10
- z_hop_speed: 10
- [bed_mesh]
- speed: 150
- mesh_min: 15,30 #need to handle head distance with bl_touch; default 15,30
- mesh_max: 210,190 #max probe range; default 210,190
- probe_count: 8,8
- mesh_pps: 2,2
- #fade_start: 1
- #fade_end: 10
- #fade_target: 0
- algorithm: bicubic
- bicubic_tension: 0.2
- [bed_screws]
- screw1: 25, 33
- screw2: 202, 33
- screw3: 202, 202
- screw4: 25, 202
- [gcode_arcs]
- #resolution: 1.0
- [printer]
- kinematics: cartesian
- max_velocity: 300
- max_accel: 8000
- max_z_velocity: 10
- max_z_accel: 1000
- square_corner_velocity: 5.0
- [exclude_object]
- [include timelapse.cfg]
- #[include cx_gmcro.cfg]
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [bltouch]
- #*# z_offset =.700
- #*#
- #*# [bed_mesh default]
- #*# version = 1
- #*# points =
- #*# 0.250000, 0.167500, 0.117500, 0.087500, 0.115000, 0.272500, 0.082500, 0.017500
- #*# 0.152500, 0.115000, 0.055000, 0.025000, 0.032500, 0.115000, 0.080000, -0.015000
- #*# 0.087500, 0.057500, -0.022500, -0.032500, -0.027500, 0.002500, 0.035000, -0.077500
- #*# 0.077500, 0.040000, 0.002500, -0.040000, -0.037500, 0.020000, 0.030000, -0.052500
- #*# 0.060000, 0.027500, -0.010000, -0.032500, -0.037500, 0.017500, 0.047500, -0.047500
- #*# 0.070000, 0.037500, -0.002500, -0.025000, -0.017500, 0.022500, 0.072500, -0.017500
- #*# 0.102500, 0.102500, 0.042500, 0.015000, 0.025000, 0.080000, 0.112500, -0.000000
- #*# 0.160000, 0.155000, 0.122500, 0.100000, 0.105000, 0.150000, 0.180000, 0.075000
- #*# x_count = 8
- #*# y_count = 8
- #*# mesh_x_pps = 2
- #*# mesh_y_pps = 2
- #*# algo = bicubic
- #*# tension = 0.2
- #*# min_x = 15.0
- #*# max_x = 209.95000000000002
- #*# min_y = 30.0
- #*# max_y = 189.95
- #*#
- #*# [input_shaper]
- #*# shaper_type_x = zv
- #*# shaper_freq_x = 60.4
- #*# shaper_type_y = ei
- #*# shaper_freq_y = 44.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement