Advertisement
Guest User

Untitled

a guest
Mar 30th, 2021
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.30 KB | None | 0 0
  1. # This file contains common pin mappings for the Two Trees Sapphire
  2. # Pro printer from 2020. To use this config, the firmware should be
  3. # compiled for the STM32F103. When running "make menuconfig", enable
  4. # "extra low-level configuration setup", select the 28KiB bootloader,
  5. # disable "USB for communication", select USART3 for the "Serial
  6. # Port", and set "GPIO pins to set at micro-controller startup" to
  7. # "!PC6,!PD13".
  8.  
  9. # Note that the "make flash" command does not work with the Sapphire
  10. # Pro. After running "make", run the following command:
  11. # ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano35.bin
  12. # Copy the file out/Robin_nano35.bin to an SD card and then restart the
  13. # printer with that SD card.
  14.  
  15. # See docs/Config_Reference.md for a description of parameters.
  16.  
  17. [stepper_x]
  18. step_pin: PE3
  19. dir_pin: !PE2
  20. enable_pin: !PE4
  21. microsteps: 16
  22. rotation_distance: 40
  23. endstop_pin: !PA15
  24. position_endstop: 0
  25. position_max: 230
  26. homing_speed: 50
  27.  
  28. [stepper_y]
  29. step_pin: PE0
  30. dir_pin: !PB9
  31. enable_pin: !PE1
  32. microsteps: 16
  33. rotation_distance: 40
  34. endstop_pin: !PA12
  35. position_endstop: 220
  36. position_max: 220
  37. homing_speed: 50
  38.  
  39. [stepper_z]
  40. step_pin: PB5
  41. dir_pin: !PB4
  42. enable_pin: !PB8
  43. microsteps: 16
  44. rotation_distance: 2
  45. endstop_pin: !PA11
  46. position_endstop: 1.0
  47. position_max: 220
  48. position_min: -2.0
  49. homing_speed: 8
  50. second_homing_speed: 2
  51.  
  52. [tmc2209 stepper_x]
  53. uart_pin: PA10
  54. run_current: 1.0
  55. hold_current: 0.4
  56. stealthchop_threshold: 81
  57.  
  58. [tmc2209 stepper_y]
  59. uart_pin: PA9
  60. run_current: 1.0
  61. hold_current: 0.4
  62. stealthchop_threshold: 81
  63.  
  64. [tmc2209 stepper_z]
  65. uart_pin: PC7
  66. run_current: 1.0
  67. hold_current: 0.55
  68. stealthchop_threshold: 0
  69.  
  70. [tmc2209 extruder]
  71. uart_pin: PC13
  72. run_current: 0.7
  73. hold_current: 0.4
  74. stealthchop_threshold: 40
  75.  
  76. [extruder]
  77. step_pin: PD6
  78. dir_pin: !PD3
  79. enable_pin: !PB3
  80. microsteps: 16
  81. rotation_distance: 7.898
  82. nozzle_diameter: 0.600
  83. filament_diameter: 1.750
  84. heater_pin: PC3
  85. sensor_type: ATC Semitec 104GT-2
  86. sensor_pin: PC1
  87. control: pid
  88. pid_Kp: 20.32
  89. pid_Ki: 1.66
  90. pid_Kd: 62.33
  91. min_temp: 10
  92. max_temp: 275
  93. max_extrude_only_distance: 300.0
  94. pressure_advance: 0.22
  95. pressure_advance_smooth_time: 0.020
  96.  
  97. [firmware_retraction]
  98. retract_length: 0.9
  99. retract_speed: 10
  100. unretract_extra_length: 0
  101. unretract_speed: 10
  102.  
  103. [bed_mesh]
  104. speed: 80
  105. horizontal_move_z: 1
  106. mesh_min: 25,25
  107. mesh_max: 205, 195
  108. probe_count: 3,3
  109. fade_start: 0.8
  110. fade_end: 5
  111.  
  112. [heater_bed]
  113. heater_pin: PA0
  114. sensor_type: EPCOS 100K B57560G104F
  115. sensor_pin: PC0
  116. control: pid
  117. pid_Kp: 32.36
  118. pid_Ki: 6.21
  119. pid_Kd: 112.43
  120. min_temp: 0
  121. max_temp: 130
  122.  
  123. [fan]
  124. pin: PB1
  125.  
  126. [mcu]
  127. serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  128. restart_method: command
  129.  
  130. [printer]
  131. kinematics: corexy
  132. max_velocity: 250
  133. max_accel: 1500
  134. max_accel_to_decel: 750
  135. max_z_velocity: 15
  136. max_z_accel: 50
  137. square_corner_velocity: 10
  138.  
  139. [static_digital_output reset_display]
  140. pins: !PC6, !PD13
  141.  
  142. [probe]
  143. pin: !PA2
  144. x_offset: 0.0
  145. y_offset: 0.0
  146. z_offset: -0.23
  147. speed: 2.0
  148. samples_tolerance: 0.03
  149. samples: 5
  150. #samples_result: median
  151. samples_tolerance_retries: 3
  152.  
  153. ########################
  154.  
  155. [virtual_sdcard]
  156. path: ~/gcode_files/sapphire
  157.  
  158. [pause_resume]
  159.  
  160. [display_status]
  161.  
  162. [gcode_macro PARK_MACRO]
  163. default_parameter_X: 0
  164. default_parameter_Y: 220
  165. default_parameter_Z: 5
  166. gcode:
  167. M117 PARKING..
  168. G91
  169. G1 E-3 F1000
  170. G1 Z{Z}
  171. G90
  172. G1 X{X} Y{Y} F3000
  173.  
  174. [gcode_macro UNLOAD]
  175. gcode:
  176. G91
  177. G1 E-500 F1000
  178. G90
  179.  
  180. [gcode_macro M600]
  181. gcode:
  182. PAUSE_MACRO
  183. UNLOAD
  184.  
  185. [gcode_macro PAUSE_MACRO]
  186. gcode:
  187. PAUSE
  188. PARK_MACRO
  189.  
  190. [gcode_macro PURGE]
  191. gcode:
  192. M117 PURGING...
  193. G91
  194. G1 E25.0 F600
  195. G4 P1000
  196. G1 E-3.0 F600
  197. G90
  198.  
  199. [gcode_macro LOAD_FILAMENT]
  200. gcode:
  201. M117 LOADING...
  202. G91
  203. G1 E25.0 F100
  204. G1 E300 F600
  205. G90
  206.  
  207. [gcode_macro RESUME_MACRO]
  208. gcode:
  209. M117 RESUME...
  210. G91
  211. G1 E3.5 F600
  212. G90
  213. G4 P1000
  214. RESUME
  215.  
  216. ################
  217.  
  218.  
  219. [gcode_macro CANCEL_PRINT]
  220. rename_existing: BASE_CANCEL_PRINT
  221. gcode:
  222. TURN_OFF_HEATERS
  223. CLEAR_PAUSE
  224. SDCARD_RESET_FILE
  225. BASE_CANCEL_PRINT
  226. M107
  227.  
  228. [gcode_macro PAUSE]
  229. rename_existing: BASE_PAUSE
  230. # change this if you need more or less extrusion
  231. variable_extrude: 1.0
  232. gcode:
  233. ##### read E from pause macro #####
  234. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  235. ##### set park positon for x and y #####
  236. # default is your max posion from your printer.cfg
  237. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  238. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  239. ##### calculate save lift position #####
  240. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  241. {% set act_z = printer.toolhead.position.z|float %}
  242. {% if act_z < (max_z - 2.0) %}
  243. {% set z_safe = 2.0 %}
  244. {% else %}
  245. {% set z_safe = max_z - act_z %}
  246. {% endif %}
  247. ##### end of definitions #####
  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. G1 X{x_park} Y{y_park} F6000
  255.  
  256. [gcode_macro RESUME]
  257. rename_existing: BASE_RESUME
  258. gcode:
  259. ##### read E from pause macro #####
  260. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  261. ##### end of definitions #####
  262. G91
  263. G1 E{E} F2100
  264. RESTORE_GCODE_STATE NAME=PAUSE_state
  265. BASE_RESUME
  266.  
  267. ###############
  268.  
  269. [gcode_arcs]
  270. resolution: 0.5
  271.  
  272. [gcode_macro G29]
  273. gcode:
  274. BED_MESH_OUTPUT
  275.  
  276. ###################
  277.  
  278. [gcode_macro Poziom_Start]
  279. gcode:
  280. BED_MESH_CALIBRATE
  281. # TESTZ Z=-3
  282.  
  283. [gcode_macro PROBE_MACRO]
  284. gcode:
  285. PROBE
  286.  
  287. #[gcode_macro Z_MINUS]
  288. #gcode:
  289. # TESTZ Z=-0.025
  290.  
  291. #[gcode_macro Z_PLUS]
  292. #gcode:
  293. # TESTZ Z=+0.025
  294.  
  295. #[gcode_macro Poziom_OK]
  296. #gcode:
  297. # ACCEPT
  298. # TESTZ Z=-3
  299.  
  300. [gcode_macro Zapisz_Ustawienia]
  301. gcode:
  302. SAVE_CONFIG
  303.  
  304. ##################
  305.  
  306. #*# <---------------------- SAVE_CONFIG ---------------------->
  307. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  308. #*#
  309. #*# [bed_mesh default]
  310. #*# version = 1
  311. #*# points =
  312. #*# 0.100000, 0.275000, 0.100000
  313. #*# 0.125000, 0.350000, 0.150000
  314. #*# 0.200000, 0.450000, 0.340000
  315. #*# tension = 0.2
  316. #*# min_x = 25.0
  317. #*# algo = lagrange
  318. #*# y_count = 3
  319. #*# mesh_y_pps = 2
  320. #*# min_y = 25.0
  321. #*# x_count = 3
  322. #*# max_y = 195.0
  323. #*# mesh_x_pps = 2
  324. #*# max_x = 205.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement