fingerfunk99

klipper_prusa_mk2.5

Dec 12th, 2021
1,337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.95 KB | None | 0 0
  1. ####################################
  2. # Machine Settings
  3. ####################################
  4. [mcu]
  5. serial: /dev/serial/by-id/usb-Prusa_Research__prusa3d.com__Original_Prusa_i3_MK2_CZPX1217X003XK15303-if00
  6.  
  7. [printer]
  8. kinematics: cartesian
  9. max_velocity: 200
  10. max_accel: 2000
  11. max_z_velocity: 20
  12. max_z_accel: 100
  13.  
  14. [ad5206 stepper_digipot]
  15. enable_pin: PD7
  16. # Scale the config so that the channel value can be specified in amps.
  17. # (For Rambo v1.0d boards, use 1.56 instead.)
  18. scale: 2.08
  19. # Channel 1 is E0, 2 is E1, 3 is unused, 4 is Z, 5 is X, 6 is Y
  20. channel_1: 1.34
  21. channel_2: 1.0
  22. channel_4: 1.1
  23. channel_5: 1.1
  24. channel_6: 1.1
  25.  
  26. # Enable 16 micro-steps on steppers X, Y, Z, E0, E1
  27. [static_digital_output stepper_config]
  28. pins:
  29. PG1, PG0,
  30. PK7, PG2,
  31. PK6, PK5,
  32. PK3, PK4,
  33. PK1, PK2
  34.  
  35. [static_digital_output yellow_led]
  36. pins: !PB7
  37.  
  38. [stepper_x]
  39. step_pin: PC0
  40. dir_pin: PL1
  41. enable_pin: !PA7
  42. step_distance: .01
  43. endstop_pin: ^PB6
  44. position_endstop: 0
  45. position_min: -5
  46. position_max: 250
  47. homing_speed: 50
  48. homing_retract_dist: 5
  49. homing_positive_dir: false
  50.  
  51. [stepper_y]
  52. step_pin: PC1
  53. dir_pin: PL0
  54. enable_pin: !PA6
  55. step_distance: .01
  56. endstop_pin: ^PB5
  57. position_endstop: 0
  58. position_min: -10
  59. position_max: 210
  60. homing_speed: 50
  61. homing_retract_dist: 5
  62. homing_positive_dir: false
  63.  
  64. [stepper_z]
  65. step_pin: PC2
  66. dir_pin: PL2
  67. enable_pin: !PA5
  68. step_distance: .0025
  69. endstop_pin: probe:z_virtual_endstop
  70. position_min: -1
  71. position_max: 215
  72. homing_speed: 10
  73. homing_retract_dist: 5
  74.  
  75. [output_pin stepper_xy_current]
  76. pin: PL3
  77. pwm: True
  78. scale: 2.0
  79. cycle_time: .002
  80. hardware_pwm: True
  81. static_value: 0.83
  82.  
  83. [output_pin stepper_z_current]
  84. pin: PL4
  85. pwm: True
  86. scale: 2.0
  87. cycle_time: .002
  88. hardware_pwm: True
  89. value: 0.830
  90.  
  91. [output_pin stepper_e_current]
  92. pin: PL5
  93. pwm: True
  94. scale: 2.0
  95. cycle_time: .002
  96. hardware_pwm: True
  97. static_value: 1.0
  98.  
  99. [probe]
  100. pin: ^PB4
  101. x_offset: 0.0
  102. y_offset: 0.0
  103. #z_offset: 0.3375
  104. #Hardened Steel Nozzle:
  105. z_offset: 0.7375
  106. #z_offset: 0.5375
  107. #Brass Nozzle:
  108. #z_offset: 0.6375
  109. speed: 10.0
  110.  
  111. [extruder]
  112. step_pin: PC3
  113. dir_pin: !PL6
  114. enable_pin: !PA4
  115. #Prusa:
  116. #step_distance: .0059
  117. #Pancake:
  118. step_distance: .0075
  119. nozzle_diameter: 0.400
  120. filament_diameter: 1.750
  121. max_extrude_cross_section: 50.0
  122. max_extrude_only_distance: 200.0
  123. heater_pin: PE5
  124. sensor_type: EPCOS 100K B57560G104F
  125. sensor_pin: PF0
  126. min_temp: 0
  127. max_temp: 300
  128. pressure_advance: 0.065
  129.  
  130. [heater_bed]
  131. heater_pin: PG5
  132. sensor_type: EPCOS 100K B57560G104F
  133. sensor_pin: PF2
  134. min_temp: 0
  135. max_temp: 130
  136.  
  137. [fan]
  138. pin: PH3
  139.  
  140. [heater_fan nozzle_cooling_fan]
  141. pin: PH5
  142.  
  143. [idle_timeout]
  144. timeout: 600
  145.  
  146. ######################################################################
  147. # Beeper
  148. ######################################################################
  149.  
  150. # M300 : Play tone. Beeper support, as commonly found on usual LCD
  151. # displays (i.e. RepRapDiscount 2004 Smart Controller, RepRapDiscount
  152. # 12864 Full Graphic). This defines a custom I/O pin and a custom
  153. # GCODE macro. Usage:
  154. # M300 [P<ms>] [S<Hz>]
  155. # P is the tone duration, S the tone frequency.
  156. # The frequency won't be pitch perfect.
  157.  
  158. [output_pin BEEPER_pin]
  159. pin: PH2
  160. # Beeper pin. This parameter must be provided.
  161. # ar37 is the default RAMPS/MKS pin.
  162. pwm: True
  163. # A piezo beeper needs a PWM signal, a DC buzzer doesn't.
  164. value: 0
  165. # Silent at power on, set to 1 if active low.
  166. shutdown_value: 0
  167. # Disable at emergency shutdown (no PWM would be available anyway).
  168. cycle_time: 0.001
  169. # PWM frequency : 0.001 = 1ms will give a base tone of 1kHz
  170. scale: 1000
  171. # PWM parameter will be in the range of (0-1000 Hz).
  172. # Although not pitch perfect.
  173.  
  174. ####################################
  175. # Mesh Bed Leveling
  176. ####################################
  177. [bed_mesh]
  178. speed: 100
  179. horizontal_move_z: 5
  180. #samples: 1
  181. #sample_retract_dist: 2.0
  182. mesh_min: 60,40
  183. mesh_max: 180,150
  184. probe_count: 3,3
  185. fade_start: 1.0
  186. fade_end: 10.0
  187. move_check_distance: 5.0
  188. split_delta_z: .025
  189. mesh_pps: 2,2
  190. algorithm: lagrange
  191. bicubic_tension: .2
  192.  
  193. ######################################################################
  194. # "RepRapDiscount 2004 Smart Controller" type displays
  195. ######################################################################
  196. [display]
  197. lcd_type: hd44780
  198. rs_pin: PD5
  199. e_pin: PD3
  200. d4_pin: PD2
  201. d5_pin: PG4
  202. d6_pin: PH7
  203. d7_pin: PG3
  204. #menu_root: filament
  205. #menu_timeout: 30
  206. encoder_pins: ^PJ1, ^PJ2
  207. click_pin: ^!PH6
  208. #kill_pin: ^!EXP2_8
  209.  
  210. ######################################################################
  211. # Filament Change
  212. ######################################################################
  213.  
  214. # M600: Filament Change. This macro will pause the printer, move the
  215. # tool to the change position, and retract the filament 50mm. Adjust
  216. # the retraction settings for your own extruder. After filament has
  217. # been changed, the print can be resumed from its previous position
  218. # with the "RESUME" gcode.
  219.  
  220. [pause_resume]
  221. recover_velocity: 50
  222.  
  223. [filament_switch_sensor filasens]
  224. pause_on_runout: false
  225. runout_gcode:
  226. M117 OUT OF FILAMENT
  227. M600
  228. insert_gcode:
  229. M117 FILAMENT INSERTED
  230. LOAD_FILAMENT
  231. RESUME
  232. event_delay: 1.0
  233. switch_pin: !PD1
  234.  
  235. [gcode_macro M600]
  236. gcode:
  237. SAVE_GCODE_STATE NAME=filament_change
  238. PAUSE
  239. M83
  240. G1 E-5 F1000
  241. PARK
  242. UNLOAD_FILAMENT
  243. RESTORE_GCODE_STATE NAME=filament_change
  244.  
  245. [gcode_macro PARK]
  246. gcode:
  247. M117 PARKING
  248. G91
  249. G1 Z10 F200
  250. G90
  251. G1 X120 Y0 Z200 F1000
  252.  
  253. [gcode_macro PAUSE]
  254. rename_existing: BASE_PAUSE
  255. gcode:
  256. M117 PAUSED..
  257. BASE_PAUSE
  258. SET_IDLE_TIMEOUT TIMEOUT=10000
  259. #Turn Off Nozzle Fan
  260. #M107 P1
  261.  
  262. [gcode_macro RESUME]
  263. rename_existing: BASE_RESUME
  264. gcode:
  265. M117 Resuming..
  266. BASE_RESUME
  267. #Turn On Nozzle Fan
  268. M106 S{ printer.fan.speed * 255} P1
  269.  
  270. [gcode_macro LOAD_PLA]
  271. gcode:
  272. M104 T0 S230
  273. PARK
  274. M109 T0 S230
  275. LOAD_FILAMENT
  276. G1 Z100 F2000
  277.  
  278. [gcode_macro LOAD_PETG]
  279. gcode:
  280. M104 T0 S250
  281. PARK
  282. M109 T0 S250
  283. LOAD_FILAMENT
  284. G1 Z100 F2000
  285.  
  286. [gcode_macro LOAD_FILAMENT]
  287. gcode:
  288. M117 Loading Filament...
  289. LOW_TEMP_CHECK
  290. M83
  291. G1 E80 F300
  292. G1 E15 F50
  293. M400
  294. M117 Load Complete
  295. G1 E-1.2 F50
  296.  
  297. [gcode_macro UNLOAD_FILAMENT]
  298. gcode:
  299. M117 Unloading Filament...
  300. LOW_TEMP_CHECK
  301. M83
  302. G1 E-100 F1000
  303. M400
  304. M117 Remove Filament Now!
  305. M300 S300 P500
  306. M300 S100 P500
  307.  
  308. [gcode_macro LOW_TEMP_CHECK]
  309. default_parameter_T:230
  310. gcode:
  311. {% if printer.extruder.target != 0 %} # if there is a setpoint for extruder
  312. {% if printer.extruder.temperature < printer.extruder.target %} # if not reached, heat
  313. #M117 Heating from {printer.extruder.temperature} to {printer.extruder.target}.
  314. M109 S{printer.extruder.target|float}
  315. {% endif %}
  316. {% else %} # if no setpoint for extruder
  317. {% if printer.extruder.target < T %} # heat to T.
  318. #M117 No setpoint, heating to {T}.
  319. M109 S{T}
  320. {% endif %}
  321. {% endif %}
  322.  
  323. [gcode_macro M300]
  324. default_parameter_S: 1000
  325. # Use a default 1kHz tone if S is omitted.
  326. default_parameter_P: 100
  327. # Use a 10ms duration is P is omitted.
  328. gcode:
  329. SET_PIN PIN=BEEPER_pin VALUE={S}
  330. G4 P{P}
  331. SET_PIN PIN=BEEPER_pin VALUE=0
  332.  
  333. ######################################################################
  334. # Start Print and End Print
  335. ######################################################################
  336. [gcode_macro START_PRINT]
  337. default_parameter_BED_TEMP: 50
  338. default_parameter_EXTRUDER_TEMP: 240
  339. gcode:
  340. CLEAR_PAUSE
  341. # Home the printer
  342. M117 HOMING...
  343. G28
  344. #####
  345. ## Warm the printer for calibrating
  346. #M117 WARMING...
  347. ## Warm bed
  348. #M140 S50
  349. ## Warm nozzle
  350. #M109 S160
  351. #M190 S50
  352. ## Calibrate Bed Mesh
  353. M117 CALIBRATING...
  354. BED_MESH_CALIBRATE
  355. G28
  356. #####
  357. # Use absolute coordinates
  358. G90
  359. # Move the nozzle near the bed
  360. G1 Z5 F3000
  361. # Move the nozzle very close to the bed
  362. G1 Z0.2 F300
  363. G92 E0.0
  364. # Start nozzle heating
  365. M117 HEATING...
  366. M104 S{EXTRUDER_TEMP}
  367. # Wait for bed to reach temperature
  368. M190 S{BED_TEMP}
  369. # Set and wait for nozzle to reach temperature
  370. M109 S{EXTRUDER_TEMP}
  371. M220 S100
  372. # Intro line
  373. G1 X60.0 E9.0 F1000.0
  374. # Intro line
  375. G1 X100.0 E15.0 F1000.0
  376. # reset extruder distance position
  377. G92 E0.0
  378. #M117 I LOVE YOU HOLLY! :)
  379. M117 PRINTING
  380.  
  381. [gcode_macro END_PRINT]
  382. gcode:
  383. # Turn off bed, extruder, and fan
  384. M140 S0
  385. M104 S0
  386. M107 S0
  387. M107 S1
  388. # Move nozzle away from print while retracting
  389. G91
  390. # Raise nozzle by 1mm
  391. G1 Z1 F3000
  392. # Present part
  393. G90
  394. G1 X0 Y210 F3000
  395. M117 FINISHED
  396. UNLOAD_FILAMENT
  397. SET_IDLE_TIMEOUT TIMEOUT=600
  398.  
  399. ####################################
  400. # Homing
  401. ####################################
  402. [gcode_macro HOME]
  403. gcode:
  404. {% if printer.toolhead.homed_axes != "xyz" %}
  405. G28
  406. G1 Z0.2
  407. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment