Advertisement
Pitoer

Untitled

Dec 24th, 2022
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ########################################
  2. # PIMMELDRUCKER 0815
  3. ########################################
  4.  
  5. ########################################
  6. # KINEMATIC configuration
  7. ########################################
  8.  
  9. [stepper_x]
  10. step_pin: PC15
  11. dir_pin: PF0
  12. enable_pin: !PF1
  13. microsteps: 16
  14. rotation_distance: 40
  15. endstop_pin: ^!PF2
  16. position_endstop: 0
  17. position_max: 230
  18. homing_speed: 50
  19.  
  20. [tmc5160 stepper_x]
  21. cs_pin: PC14
  22. sense_resistor: 0.075
  23. run_current: 0.85
  24. stealthchop_threshold: 0
  25. spi_software_mosi_pin: PG15
  26. spi_software_miso_pin: PB6
  27. spi_software_sclk_pin: PB3
  28.  
  29. [stepper_y]
  30. step_pin: PE3
  31. dir_pin: PE2
  32. enable_pin: !PE4
  33. microsteps: 16
  34. rotation_distance: 40
  35. endstop_pin: ^!PC13
  36. position_endstop: 230
  37. position_max: 230
  38. homing_speed: 50
  39.  
  40. [tmc5160 stepper_y]
  41. cs_pin: PE1
  42. sense_resistor: 0.075
  43. run_current: 0.85
  44. stealthchop_threshold: 0
  45. spi_software_mosi_pin: PG15
  46. spi_software_miso_pin: PB6
  47. spi_software_sclk_pin: PB3
  48.  
  49. [stepper_z]
  50. step_pin: PB8
  51. dir_pin: PB7
  52. enable_pin: !PB9
  53. microsteps: 16
  54. rotation_distance: 2
  55. endstop_pin: ^PE0
  56. position_endstop: 0.5
  57. position_max: 230
  58.  
  59. [tmc5160 stepper_z]
  60. cs_pin: PB5
  61. sense_resistor: 0.075
  62. run_current: 0.6
  63. stealthchop_threshold: 0
  64. spi_software_mosi_pin: PG15
  65. spi_software_miso_pin: PB6
  66. spi_software_sclk_pin: PB3
  67.  
  68. ########################################
  69. # EXTRUDER & BED configuration
  70. ########################################
  71.  
  72. [extruder]
  73. step_pin: PG12
  74. dir_pin: PG11
  75. enable_pin: !PG13
  76. microsteps: 16
  77. gear_ratio: 50:17
  78. rotation_distance: 23.52
  79. nozzle_diameter: 0.400
  80. filament_diameter: 1.750
  81. heater_pin: PB1 # Heat0
  82. sensor_pin: PC1 # T0 Header
  83. sensor_type: ATC Semitec 104GT-2
  84. control: pid
  85. pid_Kp: 14.669
  86. pid_Ki: 0.572
  87. pid_Kd: 94.068
  88. min_temp: 0
  89. max_temp: 250
  90.  
  91. max_extrude_only_distance: 500
  92. max_extrude_only_velocity: 120
  93. max_extrude_only_accel: 800
  94.  
  95. pressure_advance: 0.1
  96. pressure_advance_smooth_time: 0.02
  97.  
  98. [tmc5160 extruder]
  99. cs_pin: PG10
  100. sense_resistor: 0.075
  101. run_current: 0.5
  102. stealthchop_threshold: 0
  103. spi_software_mosi_pin: PG15
  104. spi_software_miso_pin: PB6
  105. spi_software_sclk_pin: PB3
  106.  
  107. [heater_bed]
  108. heater_pin: PA2
  109. sensor_type: EPCOS 100K B57560G104F
  110. sensor_pin: PC0 # BED
  111. control: pid
  112. pid_Kp: 325.10
  113. pid_Ki: 63.35
  114. pid_Kd: 417.10
  115. min_temp: 0
  116. max_temp: 130
  117.  
  118. [heater_fan my_nozzle_fan]
  119. pin: PE6
  120. heater: extruder
  121. heater_temp: 45.0
  122. fan_speed: 1.0
  123.  
  124. [fan]
  125. pin: PE5 # FAN1
  126. kick_start_time: 1.0
  127.  
  128. [controller_fan my_controller_fan]
  129. pin: PA1
  130. max_power: 0.5
  131. #shutdown_speed:
  132. #cycle_time:
  133. #hardware_pwm:
  134. #kick_start_time:
  135. #off_below:
  136. #tachometer_pin:
  137. #tachometer_ppr:
  138. #tachometer_poll_interval:
  139. #enable_pin:
  140. # See the "fan" section for a description of the above parameters.
  141. #fan_speed: 1.0
  142. # The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  143. # will be set to when a heater or stepper driver is active.
  144. # The default is 1.0
  145. #idle_timeout:
  146. # The amount of time (in seconds) after a stepper driver or heater
  147. # was active and the fan should be kept running. The default
  148. # is 30 seconds.
  149. #idle_speed:
  150. # The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  151. # will be set to when a heater or stepper driver was active and
  152. # before the idle_timeout is reached. The default is fan_speed.
  153. #heater:
  154. #stepper:
  155. # Name of the config section defining the heater/stepper that this fan
  156. # is associated with. If a comma separated list of heater/stepper names
  157. # is provided here, then the fan will be enabled when any of the given
  158. # heaters/steppers are enabled. The default heater is "extruder", the
  159. # default stepper is all of them.
  160.  
  161.  
  162.  
  163.  
  164. ########################################
  165. # PRINTER configuration
  166. ########################################
  167.  
  168. [mcu]
  169. serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_4700370016504D5543363820-if00
  170. restart_method: command
  171.  
  172. [printer]
  173. kinematics: corexy
  174. max_velocity: 250
  175. max_accel: 4500
  176. max_z_velocity: 10
  177. max_z_accel: 80
  178.  
  179. square_corner_velocity: 5
  180.  
  181. max_accel: 5500
  182. max_accel_to_decel: 2500
  183.  
  184. [idle_timeout]
  185. timeout: 360
  186.  
  187. [display_status]
  188.  
  189. [virtual_sdcard]
  190. path: ~/gcode_files
  191.  
  192. [bed_screws]
  193. screw1: 15,15
  194. screw2: 210,15
  195. screw3: 210,210
  196. screw4: 15,210
  197.  
  198. [static_digital_output reset_display]
  199. pins: !PC6, !PD13
  200.  
  201.  
  202. [board_pins]
  203. aliases:
  204. # EXP1 header
  205. EXP1_1=PC11, EXP1_3=PC10, EXP1_5=PG8, EXP1_7=PG6, EXP1_9=<GND>,
  206. EXP1_2=PA15, EXP1_4=PA8, EXP1_6=PG7, EXP1_8=PG5, EXP1_10=<5V>,
  207. # EXP2 header
  208. EXP2_1=PB14, EXP2_3=PD10, EXP2_5=PH10, EXP2_7=PB10, EXP2_9=<GND>,
  209. EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
  210. # not sure on this: Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
  211.  
  212. # See the sample-lcd.cfg file for definitions of common LCD displays.
  213.  
  214. #[display]
  215. #lcd_type: st7920
  216. #cs_pin: EXP1_4
  217. #sclk_pin: EXP1_5
  218. #sid_pin: EXP1_3
  219. #encoder_pins: ^EXP2_5, ^EXP2_3
  220. #click_pin: ^!EXP1_2
  221. #kill_pin: ^!EXP2_8
  222.  
  223. #[output_pin beeper]
  224. #pin: EXP1_1
  225.  
  226. [gcode_macro CANCEL_PRINT]
  227. rename_existing: BASE_CANCEL_PRINT
  228. gcode:
  229. TURN_OFF_HEATERS
  230. CLEAR_PAUSE
  231. SDCARD_RESET_FILE
  232. G28 XY
  233. G0 Z210
  234. BASE_CANCEL_PRINT
  235.  
  236. [gcode_macro PAUSE]
  237. rename_existing: BASE_PAUSE
  238. gcode:
  239. {% set x_park = printer.toolhead.axis_minimum.x|float - 5.0 %}
  240. {% set y_park = printer.toolhead.axis_minimum.y|float - 5.0 %}
  241. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  242. {% set act_z = printer.toolhead.position.z|float %}
  243. {% if act_z < (max_z - 2.0) %}
  244. {% set z_safe = 2.0 %}
  245. {% else %}
  246. {% set z_safe = max_z - act_z %}
  247. {% endif %}
  248. SAVE_GCODE_STATE NAME=PAUSE_state
  249. BASE_PAUSE
  250. G91
  251. G1 E-{E} F2100
  252. G1 Z{z_safe} F900
  253. G90
  254. G0 X{x_park} Y{y_park} F6000
  255. G91
  256.  
  257. [gcode_macro RESUME]
  258. rename_existing: BASE_RESUME
  259. gcode:
  260. G91
  261. G1 E{E} F2100
  262. G90
  263. RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
  264. BASE_RESUME
  265.  
  266. [gcode_macro PA_OFF]
  267. gcode: SET_PRESSURE_ADVANCE ADVANCE=0 smooth_time=0
  268.  
  269. [gcode_macro PA_ON]
  270. gcode: SET_PRESSURE_ADVANCE ADVANCE=0.08 smooth_time=0.08
  271.  
  272. [gcode_macro LOAD_FILAMENT]
  273. gcode:
  274. {% set speed = params.SPEED|default(300) %}
  275. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
  276. G91
  277. G92 E0
  278. G1 E350 F{max_velocity}
  279. G1 E25 F{speed} #purge
  280. M300
  281. M300
  282.  
  283.  
  284. [gcode_macro UNLOAD_FILAMENT]
  285. gcode:
  286. {% set speed = params.SPEED|default(300) %}
  287. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
  288. G91
  289. G92 E0
  290. G1 E25 F{speed} # purge
  291. G1 E-420 F{max_velocity}
  292. M300
  293. M300
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement