georgmierau

Klipper printer.cgf

Jun 27th, 2023
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. # For the ZNP Robin Nano DW v2.2 board:
  2. # - Compile with the processor model STM32F401.
  3. # - Select the 32KiB bootloader,
  4. # - Select (Serial (on # USART1 PA10/PA9) for the communication interface.
  5. # - Select (Serial (on # USART2 PA3/PA2) if you want to use the serial UART pins on J17 (wifi section)
  6. # Note that the "make flash" command does not work with ZNP Robin boards. After running "make", run the following command:
  7. # cp out/klipper.bin out/ZNP_ROBIN_NANO.bin
  8. #
  9. # Copy the file out/ZNP_ROBIN_NANO.bin to an SD card and then restart the printer with that SD card.
  10. # See docs/Config_Reference.md for a description of parameters.
  11.  
  12. #[include timelapse.cfg]
  13.  
  14. [exclude_object]
  15. [virtual_sdcard]
  16. path: /home/pi/printer_data/gcodes
  17.  
  18. [pause_resume]
  19.  
  20. [display_status]
  21.  
  22. [gcode_macro CANCEL_PRINT]
  23. description: Cancel the actual running print
  24. rename_existing: CANCEL_PRINT_BASE
  25. gcode:
  26. TURN_OFF_HEATERS
  27. CANCEL_PRINT_BASE
  28.  
  29. [gcode_macro PAUSE]
  30. description: Pause the actual running print
  31. rename_existing: PAUSE_BASE
  32. # change this if you need more or less extrusion
  33. variable_extrude: 1.0
  34. gcode:
  35. ##### read E from pause macro #####
  36. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  37. ##### set park positon for x and y #####
  38. # default is your max posion from your printer.cfg
  39. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  40. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  41. ##### calculate save lift position #####
  42. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  43. {% set act_z = printer.toolhead.position.z|float %}
  44. {% if act_z < (max_z - 2.0) %}
  45. {% set z_safe = 2.0 %}
  46. {% else %}
  47. {% set z_safe = max_z - act_z %}
  48. {% endif %}
  49. ##### end of definitions #####
  50. PAUSE_BASE
  51. G91
  52. {% if printer.extruder.can_extrude|lower == 'true' %}
  53. G1 E-{E} F2100
  54. {% else %}
  55. {action_respond_info("Extruder not hot enough")}
  56. {% endif %}
  57. {% if "xyz" in printer.toolhead.homed_axes %}
  58. G1 Z{z_safe} F900
  59. G90
  60. G1 X{x_park} Y{y_park} F6000
  61. {% else %}
  62. {action_respond_info("Printer not homed")}
  63. {% endif %}
  64.  
  65. [gcode_macro RESUME]
  66. description: Resume the actual running print
  67. rename_existing: RESUME_BASE
  68. gcode:
  69. ##### read E from pause macro #####
  70. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  71. #### get VELOCITY parameter if specified ####
  72. {% if 'VELOCITY' in params|upper %}
  73. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  74. {%else %}
  75. {% set get_params = "" %}
  76. {% endif %}
  77. ##### end of definitions #####
  78. {% if printer.extruder.can_extrude|lower == 'true' %}
  79. G91
  80. G1 E{E} F2100
  81. {% else %}
  82. {action_respond_info("Extruder not hot enough")}
  83. {% endif %}
  84. RESUME_BASE {get_params}
  85.  
  86. [mcu]
  87. serial: /dev/ttyUSB0
  88. restart_method: command
  89.  
  90. [led LED_Light]
  91. white_pin: PB9
  92. initial_white: 1.0
  93.  
  94. #[output_pin LED_Light] #toggle for LED Light - use this instead of [LED] for sonic pad
  95. #Pin: PB9
  96. #cycle_time: 0.01
  97. #pwm: true
  98. #value: 1
  99.  
  100. [printer]
  101. kinematics: cartesian
  102. max_velocity: 500
  103. max_accel: 3000
  104. max_z_velocity: 15
  105. max_z_accel: 100
  106. square_corner_velocity: 5
  107. # Use those higher values just to configure Input Shaper
  108. #max_accel: 10000
  109. #max_accel_to_decel: 10000
  110.  
  111. [stepper_x]
  112. step_pin: !PC12
  113. dir_pin: PB3
  114. enable_pin: !PD2
  115. microsteps: 16
  116. rotation_distance: 40
  117. endstop_pin: PA13
  118. position_endstop: -6.0
  119. position_min: -6
  120. position_max: 235
  121. homing_speed: 50
  122.  
  123. [stepper_y]
  124. step_pin: PC11
  125. dir_pin: PA15
  126. enable_pin: !PC10
  127. microsteps: 16
  128. rotation_distance: 40
  129. endstop_pin: PB8
  130. position_endstop: 0
  131. position_max: 235
  132. homing_speed: 50
  133.  
  134. [stepper_z]
  135. step_pin: PC7
  136. dir_pin: !PC9
  137. enable_pin: !PC8
  138. rotation_distance: 8
  139. microsteps: 16
  140. position_min: -2
  141. position_max: 280
  142. endstop_pin: probe:z_virtual_endstop # Use Z- as endstop
  143. homing_speed: 5.0
  144.  
  145.  
  146. [extruder]
  147. max_extrude_only_distance: 100.0
  148. step_pin: PB10
  149. dir_pin: PB1
  150. enable_pin: !PC6
  151. microsteps: 16
  152. nozzle_diameter: 0.400
  153. filament_diameter: 1.750
  154. heater_pin: PA6
  155. sensor_type: EPCOS 100K B57560G104F
  156. sensor_pin: PC1
  157. min_temp: 0
  158. max_temp: 250
  159. # Calibrate E-Steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders
  160. rotation_distance: 7.61
  161. # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
  162. # - Example: PID_CALIBRATE HEATER=extruder TARGET=200
  163. #control = pid
  164. #pid_kp = 30.356
  165. #pid_ki = 1.857
  166. #pid_kd = 124.081
  167. # Calibrate PA: https://www.klipper3d.org/Pressure_Advance.html
  168. #pressure_advance = 0.600
  169.  
  170. [heater_bed]
  171. heater_pin: PA5
  172. sensor_type: EPCOS 100K B57560G104F
  173. sensor_pin: PC0
  174. pwm_cycle_time: 0.020 # set to 0.0166 if your grid runs on 60Hz to fix lights flickering
  175. max_temp: 110
  176. min_temp: 0
  177. # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
  178. # - Example: PID_CALIBRATE HEATER=heater_bed TARGET=60
  179. #control = pid
  180. #pid_kp = 64.230
  181. #pid_ki = 0.723
  182. #pid_kd = 1425.905
  183.  
  184. [heater_fan hotend_fan]
  185. pin: PB0
  186. heater: extruder
  187. heater_temp: 50.0
  188.  
  189. [fan]
  190. pin: PA7
  191.  
  192. [force_move]
  193. enable_force_move: True
  194.  
  195. [safe_z_home]
  196. home_xy_position: 117.5, 117.5
  197. z_hop: 10
  198.  
  199. [probe]
  200. pin: ^PA8
  201. speed: 5
  202. lift_speed: 15
  203. samples: 1
  204. x_offset: -28
  205. y_offset: 20
  206. # Calibrate probe: https://www.klipper3d.org/Bed_Level.html
  207. # - Example: PROBE_CALIBRATE, then adjust with TESTZ Z=+/-X
  208. #z_offset = -0.100
  209.  
  210. [filament_switch_sensor filament_sensor]
  211. pause_on_runout: true
  212. switch_pin: PB4
  213.  
  214. [bed_mesh]
  215. speed: 300
  216. horizontal_move_z: 5.0
  217. mesh_min: 30,30
  218. mesh_max: 205,205
  219. probe_count: 6,6
  220. algorithm: bicubic
  221. fade_start: 1
  222. fade_end: 10
  223. fade_target: 0
  224.  
  225. #[input_shaper]
  226. # Calibrate IS: https://www.klipper3d.org/Resonance_Compensation.html
  227. #shaper_type_y = mzv
  228. #shaper_freq_y = 38.2
  229. #shaper_type_x = ei
  230. #shaper_freq_x = 79.6
  231.  
  232. [temperature_sensor raspberry_pi]
  233. sensor_type: temperature_host
  234. #min_temp: 10
  235. #max_temp: 105
  236.  
  237. [temperature_sensor mcu_temp]
  238. sensor_type: temperature_mcu
  239. sensor_temperature1: 25
  240. sensor_adc1: 0.210317
  241. #min_temp: 0
  242. #max_temp: 105
  243.  
  244. [gcode_macro M420]
  245. description: Load the current mesh
  246. gcode:
  247. BED_MESH_PROFILE LOAD=default
  248.  
  249. [gcode_macro G29]
  250. description: creates automated homing and bed mesh
  251. gcode:
  252. G28
  253. BED_MESH_CALIBRATE
  254. DATA_SAVE
  255.  
  256. #*# <---------------------- SAVE_CONFIG ---------------------->
  257. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  258. #*#
  259. #*# [probe]
  260. #*# z_offset = 1.660
  261. #*#
  262. #*# [bed_mesh default]
  263. #*# version = 1
  264. #*# points =
  265. #*# -0.200000, -0.210000, -0.182500, -0.162500, -0.115000, -0.050000
  266. #*# -0.135000, -0.130000, -0.087500, -0.052500, 0.005000, 0.062500
  267. #*# -0.052500, -0.070000, -0.040000, -0.002500, 0.037500, 0.092500
  268. #*# 0.010000, -0.012500, 0.007500, 0.037500, 0.080000, 0.145000
  269. #*# 0.097500, 0.042500, 0.042500, 0.060000, 0.095000, 0.152500
  270. #*# 0.142500, 0.070000, 0.070000, 0.085000, 0.135000, 0.215000
  271. #*# tension = 0.2
  272. #*# min_x = 30.0
  273. #*# algo = bicubic
  274. #*# y_count = 6
  275. #*# mesh_y_pps = 2
  276. #*# min_y = 30.0
  277. #*# x_count = 6
  278. #*# max_y = 205.0
  279. #*# mesh_x_pps = 2
  280. #*# max_x = 205.0
  281. #*#
  282. #*# [heater_bed]
  283. #*# control = pid
  284. #*# pid_kp = 67.427
  285. #*# pid_ki = 0.975
  286. #*# pid_kd = 1165.652
  287. #*#
  288. #*# [extruder]
  289. #*# control = pid
  290. #*# pid_kp = 26.897
  291. #*# pid_ki = 1.533
  292. #*# pid_kd = 118.010
  293.  
Advertisement
Add Comment
Please, Sign In to add comment