Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file contains pin mappings for the stock 2020 Creality Ender 3
- # V2. To use this config, during "make menuconfig" select the
- # STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
- # communication.
- # 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 must not match the last filename
- # that was flashed.
- # See docs/Config_Reference.md for a description of parameters.
- # ================================================================================
- [extruder]
- max_extrude_only_distance: 100.0
- step_pin: PB4
- dir_pin: PB3
- enable_pin: !PC3
- microsteps: 16
- rotation_distance: 32.256
- 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_temp: 0
- max_temp: 250
- pressure_advance: 1.0 ##17JAN2022 PETG
- #pressure_advance: 0.540 ##updated 16JAN2022
- #pressure_advance: 0.856 ##Updated 14JAN2022
- # ================================================================================
- [firmware_retraction]
- retract_length: 10
- retract_speed: 70
- #unretract_extra_length: 0
- #unretract_speed: 40
- # ================================================================================
- [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
- # ================================================================================
- [mcu]
- serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
- restart_method: command
- # ================================================================================
- [printer]
- kinematics: cartesian
- max_velocity: 200
- max_accel: 1500
- max_z_velocity: 5
- max_z_accel: 100
- # ================================================================================
- #[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
- # ================================================================================
- # Stepper Definitions
- # ================================================================================
- [stepper_x]
- step_pin: PC2
- dir_pin: PB9
- enable_pin: !PC3
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PA5
- position_endstop: 0
- position_max: 250
- homing_speed: 25
- # ================================================================================
- [stepper_y]
- step_pin: PB8
- dir_pin: PB7
- enable_pin: !PC3
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PA6
- position_endstop: 0
- position_max: 250
- homing_speed: 25
- # ================================================================================
- [stepper_z]
- step_pin: PB6
- dir_pin: !PB5
- enable_pin: !PC3
- microsteps: 16
- rotation_distance: 8
- endstop_pin: probe:z_virtual_endstop
- position_max: 250
- position_min: -5
- # ================================================================================
- # BLTouch Definition
- # ================================================================================
- [bltouch]
- sensor_pin: ^PB1
- control_pin: PB0
- x_offset: -44
- y_offset: -9
- z_offset:1.249
- speed: 5.0
- sample_retract_dist: 8.0
- samples: 2
- # ================================================================================
- [safe_z_home]
- home_xy_position: 117.5,117.5 # Change coordinates to the center of your print bed
- speed: 25
- z_hop: 10 # Move up 10mm
- z_hop_speed: 5
- # ================================================================================
- [bed_mesh]
- speed: 120
- horizontal_move_z: 5
- mesh_min: 15,15
- mesh_max: 206,206
- probe_count: 3,3
- algorithm: bicubic
- fade_start: 1
- fade_end: 10
- fade_target: 0
- # ================================================================================
- [screws_tilt_adjust]
- screw1: 70.5,37.5
- screw1_name: front left screw
- screw2: 240,37.5
- screw2_name: front right screw
- screw3: 240,207.5
- screw3_name: rear right screw
- screw4: 70.5,207.5
- screw4_name: rear left screw
- horizontal_move_z: 10
- speed: 50
- screw_thread: CW-M4
- # ================================================================================
- [virtual_sdcard]
- path: ~/gcode_files
- # ================================================================================
- [display_status]
- # ================================================================================
- [respond]
- default_type: command
- [pause_resume] recover_velocity: 50
- # ================================================================================
- [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
- CANCEL_PRINT_BASE
- # ================================================================================
- [gcode_macro G29]
- gcode:
- BED_MESH_CALIBRATE PROFILE=ender3
- BED_MESH_PROFILE LOAD=ender3
- SET_GCODE_OFFSET Z=-0.08
- # ================================================================================
- [gcode_macro START_PRINT]
- gcode:
- {% set BED_TEMP = params.BED_TEMP|default(60) %}
- {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200) %}
- # Set and wait for bed to reach temperature
- M190 S{BED_TEMP}
- # Pre-heat extruder to 160
- M104 S160
- # Set GCODE offset
- SET_GCODE_OFFSET Z=0
- #auto bed leveling create mesh
- G29
- # Move Z up
- G1 Z10.0 F3000
- # Reset extruder
- G92 E0
- # Set extruder temperature
- M104 S{EXTRUDER_TEMP}
- # Move Z axis up a little to prevent scratching heat bed
- G1 Z2.0 F3000
- # Move to start position
- G1 X0.1 Y20 Z5.0 F5000.0
- # Wait for Extruder temperature
- M109 S{EXTRUDER_TEMP}
- # Move to start for purge line
- G1 X0.1 Y20 Z0.3 F5000.0
- # Draw 1st line
- G1 X0.1 Y150.0 Z0.3 F1500.0 E15
- # Move to side a little
- G1 X0.4 Y150.0 Z0.3 F5000.0
- # Draw 2nd line
- G1 X0.4 Y20 Z0.3 F1500.0 E30
- # Reset extruder
- G92 E0
- # Move Z up a little
- G1 Z5.0 F3000
- # ================================================================================
- [gcode_macro END_PRINT]
- gcode:
- G91
- # Retract a bit
- G1 E-2 F2700
- G1 E-2 Z0.2 F2400
- G1 X5 Y5 F3000
- # Turn off bed, extruder, and fan
- M140 S0
- M104 S0
- M106 S0
- # Raise nozzle by 10mm
- G1 Z10 F3000
- G90
- # Deliver print
- G1 X0 Y220
- # Disable steppers
- M84 X Y E
- # Clear bed mesh
- BED_MESH_CLEAR
- # Turn off gcode offset
- SET_GCODE_OFFSET Z=0
- # ================================================================================
- [gcode_arcs]
- resolution: 1.0
- # An arc will be split into segments. Each segment's length will
- # equal the resolution in mm set above. Lower values will produce a
- # finer arc, but also more work for your machine. Arcs smaller than
- # the configured value will become straight lines. The default is
- # 1mm.
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [bltouch]
- #*#
- #*# [bed_mesh ender3]
- #*# version = 1
- #*# points =
- #*# -0.016250, -0.063750, -0.095000
- #*# -0.023750, 0.011250, 0.087500
- #*# -0.110000, -0.038750, 0.005000
- #*# tension = 0.2
- #*# mesh_x_pps = 2
- #*# algo = bicubic
- #*# min_x = 15.0
- #*# min_y = 15.0
- #*# y_count = 3
- #*# mesh_y_pps = 2
- #*# x_count = 3
- #*# max_x = 206.0
- #*# max_y = 206.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement