Advertisement
Guest User

Ender 3 Pro / 4.2.7 / CRTouch / Sprite Extruder - Klipper cfg

a guest
Nov 7th, 2022
3,665
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.69 KB | Source Code | 1 0
  1. # !Ender-3 Pro ABL
  2. # printer_size: 220x220x250
  3. # version: 3.0
  4. # This file contains pin mappings for the stock 2020 Creality Ender 3
  5. # Pro with the 32-bit Creality 4.2.7 board. To use this config, during
  6. # "make menuconfig" select the STM32F103 with a "28KiB bootloader" and
  7. # serial (on USART1 PA10/PA9) communication.
  8.  
  9. # It should be noted that newer variations of this printer shipping in
  10. # 2022 may have GD32F103 chips installed and not STM32F103. You may
  11. # have to inspect the mainboard to ascertain which one you have. If it
  12. # is the GD32F103 then please select Disable SWD at startup in the
  13. # "make menuconfig" along with the same settings for STM32F103.
  14.  
  15. # If you prefer a direct serial connection, in "make menuconfig"
  16. # select "Enable extra low-level configuration options" and select
  17. # serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
  18.  
  19. # Flash this firmware by copying "out/klipper.bin" to a SD card and
  20. # turning on the printer with the card inserted. The firmware
  21. # filename must end in ".bin" and must not match the last filename
  22. # that was flashed.
  23.  
  24. # See docs/Config_Reference.md for a description of parameters.
  25.  
  26. ###fluidd set
  27. [virtual_sdcard]
  28. path: ~/gcode_files
  29.  
  30. [display_status]
  31.  
  32. [pause_resume]
  33.  
  34. [gcode_macro PAUSE]
  35. description: Pause the actual running print
  36. rename_existing: PAUSE_BASE
  37. # change this if you need more or less extrusion
  38. variable_extrude: 1.0
  39. gcode:
  40. ##### read E from pause macro #####
  41. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  42. ##### set park positon for x and y #####
  43. # default is your max posion from your printer.cfg
  44. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  45. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  46. ##### calculate save lift position #####
  47. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  48. {% set act_z = printer.toolhead.position.z|float %}
  49. {% if act_z < (max_z - 2.0) %}
  50. {% set z_safe = 2.0 %}
  51. {% else %}
  52. {% set z_safe = max_z - act_z %}
  53. {% endif %}
  54. ##### end of definitions #####
  55. PAUSE_BASE
  56. G91
  57. {% if printer.extruder.can_extrude|lower == 'true' %}
  58. G1 E-{E} F2100
  59. {% else %}
  60. {action_respond_info("Extruder not hot enough")}
  61. {% endif %}
  62. {% if "xyz" in printer.toolhead.homed_axes %}
  63. G1 Z{z_safe} F900
  64. G90
  65. G1 X{x_park} Y{y_park} F6000
  66. {% else %}
  67. {action_respond_info("Printer not homed")}
  68. {% endif %}
  69.  
  70. [gcode_macro RESUME]
  71. description: Resume the actual running print
  72. rename_existing: RESUME_BASE
  73. gcode:
  74. ##### read E from pause macro #####
  75. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  76. #### get VELOCITY parameter if specified ####
  77. {% if 'VELOCITY' in params|upper %}
  78. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  79. {%else %}
  80. {% set get_params = "" %}
  81. {% endif %}
  82. ##### end of definitions #####
  83. {% if printer.extruder.can_extrude|lower == 'true' %}
  84. G91
  85. G1 E{E} F2100
  86. {% else %}
  87. {action_respond_info("Extruder not hot enough")}
  88. {% endif %}
  89. RESUME_BASE {get_params}
  90.  
  91. [gcode_macro CANCEL_PRINT]
  92. description: Cancel the actual running print
  93. rename_existing: CANCEL_PRINT_BASE
  94. gcode:
  95. TURN_OFF_HEATERS
  96. {% if "xyz" in printer.toolhead.homed_axes %}
  97. G91
  98. G1 Z4.5 F300
  99. G90
  100. {% else %}
  101. {action_respond_info("Printer not homed")}
  102. {% endif %}
  103. G28 X Y
  104. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  105. G1 Y{y_park} F2000
  106. M84
  107. CANCEL_PRINT_BASE
  108.  
  109. [stepper_x]
  110. step_pin: PB9
  111. dir_pin: PC2
  112. enable_pin: !PC3
  113. microsteps: 16
  114. rotation_distance: 40
  115. endstop_pin: ^PA5
  116. position_endstop: 0
  117. position_max: 235
  118. homing_speed: 50
  119.  
  120. [stepper_y]
  121. step_pin: PB7
  122. dir_pin: PB8
  123. enable_pin: !PC3
  124. microsteps: 16
  125. rotation_distance: 40
  126. endstop_pin: ^PA6
  127. position_endstop: 0
  128. position_max: 235
  129. homing_speed: 50
  130.  
  131. [stepper_z]
  132. step_pin: PB5
  133. dir_pin: !PB6
  134. enable_pin: !PC3
  135. rotation_distance: 8
  136. microsteps: 16
  137. endstop_pin: probe:z_virtual_endstop #enable to use bltouch
  138. # endstop_pin: ^PA7 #disable to use bltouch
  139. # position_endstop: 0
  140. position_min: -10
  141. position_max: 250
  142. homing_speed: 4
  143. second_homing_speed: 1
  144. homing_retract_dist: 2.0
  145.  
  146. [extruder]
  147. max_extrude_only_distance: 200.0
  148. step_pin: PB3
  149. dir_pin: PB4
  150. enable_pin: !PC3
  151. microsteps: 16
  152. rotation_distance: 25.6
  153. nozzle_diameter: 0.400
  154. filament_diameter: 1.750
  155. heater_pin: PA1
  156. sensor_type: EPCOS 100K B57560G104F
  157. sensor_pin: PC5
  158. min_extrude_temp: 170
  159. gear_ratio: 42:12
  160. min_temp: 0
  161. max_temp: 250
  162. pressure_advance: 0.0325
  163. control: pid
  164. # tuned for stock hardware with 200 degree Celsius target
  165. pid_Kp: 21.527
  166. pid_Ki: 1.063
  167. pid_Kd: 108.982
  168. min_temp: 0
  169. max_temp: 300
  170.  
  171. #max_extrude_only_distance: 200.0
  172. #step_pin: PB3
  173. #dir_pin: PB4
  174. #enable_pin: !PC3
  175. #microsteps: 16
  176. #rotation_distance: 25.6
  177. #nozzle_diameter: 0.400
  178. #filament_diameter: 1.750
  179. #heater_pin: PA1
  180. #sensor_type: EPCOS 100K B57560G104F
  181. #sensor_pin: PC5
  182. #control: pid
  183. # tuned for stock hardware with 200 degree Celsius target
  184. #pid_Kp: 21.527
  185. #pid_Ki: 1.063
  186. #pid_Kd: 108.982
  187. #min_temp: 0
  188. #max_temp: 300
  189.  
  190. [verify_heater extruder]
  191. check_gain_time: 200
  192. hysteresis: 5
  193.  
  194. [heater_bed]
  195. heater_pin: PA2
  196. sensor_type: EPCOS 100K B57560G104F
  197. sensor_pin: PC4
  198. control: pid
  199. # tuned for stock hardware with 50 degree Celsius target
  200. pid_Kp: 54.027
  201. pid_Ki: 0.770
  202. pid_Kd: 948.182
  203. min_temp: 0
  204. max_temp: 130
  205.  
  206. [fan]
  207. pin: PA0
  208.  
  209. [mcu]
  210. serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  211. restart_method: command
  212.  
  213. [mcu rpi]
  214. serial: /tmp/klipper_host_mcu
  215.  
  216. [adxl345]
  217. cs_pin: rpi:None
  218. spi_speed: 2000000
  219. spi_bus: spidev2.0
  220.  
  221. [resonance_tester]
  222. accel_chip: adxl345
  223. accel_per_hz: 70
  224. probe_points:
  225. 117.5,117.5,10
  226.  
  227. [input_shaper]
  228. shaper_type_y = 2hump_ei
  229. shaper_freq_y = 52.6
  230. shaper_type_x = mzv
  231. shaper_freq_x = 62.8
  232.  
  233. [printer]
  234. kinematics: cartesian
  235. max_velocity: 300
  236. max_accel: 5000
  237. max_z_velocity: 10
  238. max_z_accel: 1000
  239. square_corner_velocity: 5.0
  240.  
  241. [bltouch]
  242. sensor_pin: PB1 #signal check port ^stand for pull up
  243. control_pin: PB0 #singal control prot
  244. x_offset: -29.0
  245. y_offset: -44.0
  246. #z_offset: 0 #z off_set configuration
  247. speed: 20
  248. stow_on_each_sample = false #high speed for bltoch,
  249. samples: 1
  250. probe_with_touch_mode = true
  251.  
  252. [safe_z_home]
  253. home_xy_position:139,154
  254. speed: 200
  255. z_hop: 10
  256. z_hop_speed: 10
  257.  
  258. [bed_mesh]
  259. speed: 150
  260. mesh_min: 15,30 #need to handle head distance with bl_touch
  261. mesh_max: 190,190 #max probe range
  262. probe_count: 5,5
  263. fade_start: 1
  264. fade_end: 10
  265. fade_target: 0
  266. algorithm: bicubic
  267.  
  268.  
  269. [bed_screws]
  270. screw1: 25, 33
  271. screw2: 202, 33
  272. screw3: 202, 202
  273. screw4: 25, 202
  274.  
  275. [include timelapse.cfg]
  276.  
  277. [gcode_macro G29]
  278. gcode:
  279. G28
  280. bed_mesh_calibrate
  281. G1 X0 Y0 Z10 F4200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement