Guest User

Untitled

a guest
May 5th, 2022
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. # This file contains common pin mappings for the BIGTREETECH SKR
  2. # MINI 2.0. To use this config, the firmware should be compiled for
  3. # the STM32F103 with a "28KiB bootloader". Also select "enable extra
  4. # low-level configuration options" and configure "GPIO pins to set
  5. # at micro-controller startup" to "!PA14".
  6.  
  7. # The "make flash" command does not work on the SKR mini. Instead,
  8. # after running "make", copy the generated "out/klipper.bin" file to a
  9. # file named "firmware.bin" on an SD card and then restart the SKR
  10. # mini with that SD card.
  11.  
  12. # See the example.cfg file for a description of available parameters.
  13.  
  14. [mcu]
  15. ## Obtain mcu value by "ls -l /dev/serial/by-id/"
  16. serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_31FFD8054254393010651957-if00
  17.  
  18. [mcu rpi]
  19. serial: /tmp/klipper_host_mcu
  20.  
  21. [adxl345]
  22. cs_pin: rpi:None
  23.  
  24. [resonance_tester]
  25. accel_chip: adxl345
  26. probe_points:
  27. 60,60,10 # an example
  28.  
  29.  
  30. [stepper_x]
  31. step_pin: PB13
  32. dir_pin: PB12 # check https://docs.vorondesign.com/build/startup/#v0 if moving in the wrong direction
  33. enable_pin: !PB14
  34. rotation_distance: 39.8043
  35. microsteps: 16
  36. endstop_pin: PC0
  37. position_endstop: 120
  38. position_max: 120
  39. homing_speed: 70 # Increase after initial setup, Max 100
  40. homing_retract_dist: 5
  41. homing_positive_dir: true
  42.  
  43. [tmc2209 stepper_x]
  44. uart_pin: PC11
  45. tx_pin: PC10
  46. uart_address: 0
  47. interpolate: True
  48. run_current: 1.0 # For V0.1 spec NEMA14 40Ncm
  49. hold_current: 0.6
  50. sense_resistor: 0.110
  51. stealthchop_threshold: 500
  52.  
  53.  
  54. [stepper_y]
  55. step_pin: PB10
  56. dir_pin: PB2 # check https://docs.vorondesign.com/build/startup/#v0 if moving in the wrong direction
  57. enable_pin: !PB11
  58. rotation_distance: 39.8043
  59. microsteps: 16
  60. endstop_pin: PC1
  61. position_endstop: 119
  62. position_max: 119
  63. homing_speed: 70 # Increase after initial setup, Max 100
  64. homing_retract_dist: 5
  65. homing_positive_dir: true
  66.  
  67. [tmc2209 stepper_y]
  68. uart_pin: PC11
  69. tx_pin: PC10
  70. uart_address: 2
  71. interpolate: True
  72. run_current: 1.0 # For V0.1 spec NEMA14 40Ncm
  73. hold_current: 0.6
  74. sense_resistor: 0.110
  75. stealthchop_threshold: 500
  76.  
  77.  
  78. [stepper_z]
  79. step_pin: PB0
  80. dir_pin: !PC5 # Remove ! if moving opposite direction
  81. enable_pin: !PB1
  82. rotation_distance: 8 # For T8x8 integrated lead screw
  83. microsteps: 16
  84. endstop_pin: PC2
  85. position_endstop: -0.10
  86. position_max: 120
  87. position_min: -5
  88. homing_speed: 50 # Max 100
  89. second_homing_speed: 3.0
  90. homing_retract_dist: 3.0
  91.  
  92. [tmc2209 stepper_z]
  93. uart_pin: PC11
  94. tx_pin: PC10
  95. uart_address: 1
  96. interpolate: True
  97. run_current: 0.37 # For V0.1 spec NEMA17 LDO-42STH25-1004CL200E 1.0A
  98. hold_current: 0.35
  99. #run_current: 0.2 # For V0.1 spec NEMA17 OMC 17LS13-0404E-200G 0.4A
  100. #hold_current: 0.15
  101. sense_resistor: 0.110
  102. stealthchop_threshold: 500
  103.  
  104.  
  105. [extruder]
  106. step_pin: PB3
  107. dir_pin: PB4 # Add ! if moving opposite direction
  108. enable_pin: !PD2
  109. full_steps_per_rotation: 200 # 1.8° motor LDO
  110. #full_steps_per_rotation: 400 # 0.9° motor i.e OMC 14HR07-1004VRN
  111. rotation_distance: 5.57528
  112. #gear_ratio: 44:14, 37:17 #LGX Lite
  113. #gear_ratio: 50:10 #mini afterburner
  114. microsteps: 16
  115. nozzle_diameter: 0.400
  116. filament_diameter: 1.750
  117. heater_pin: PC8
  118. sensor_type: NTC 100K beta 3950 # Adjust for your hotend thermistor (see options below)
  119. sensor_pin: PA0
  120. #control: pid # Do PID calibration
  121. #pid_Kp: 28.182
  122. #pid_Ki: 1.978
  123. #pid_Kd: 100.397
  124. min_temp: 0
  125. max_temp: 270
  126. min_extrude_temp: 170
  127. max_extrude_only_distance: 790.0
  128. max_extrude_cross_section: 0.9
  129.  
  130. #Ziro PLA Dragon HF - Stock o.4mm nozzle
  131. pressure_advance: 0.033
  132. pressure_advance_smooth_time: 0.040
  133.  
  134.  
  135. [tmc2209 extruder]
  136. uart_pin: PC11
  137. tx_pin: PC10
  138. uart_address: 3
  139. interpolate: True
  140. run_current: 0.55 #LGX Lite Nema 14 20mm
  141. hold_current: 0.45
  142. #run_current: 0.2 # for LDO 36STH17-1004AHG
  143. #hold_current: 0.1 # for LDO 36STH17-1004AHG
  144. #run_current: 0.5 # for OMC 14HR07-1004VRN rated at 1A
  145. #hold_current: 0.3 # for OMC 14HR07-1004VRN rated at 1A
  146. sense_resistor: 0.110
  147. stealthchop_threshold: 500
  148.  
  149.  
  150. [heater_bed]
  151. heater_pin: PC9
  152. sensor_type: NTC 100K beta 3950 # For Keenovo, verify yours
  153. sensor_pin: PC3
  154. smooth_time: 3.0
  155. #max_power: 0.6 # Only need this for 100w pads
  156. min_temp: 0
  157. max_temp: 120
  158. #control: pid # Do PID calibration
  159. #pid_kp: 68.453
  160. #pid_ki: 2.749
  161. #pid_kd: 426.122
  162.  
  163. [verify_heater heater_bed]
  164. check_gain_time: 95
  165.  
  166.  
  167. [printer]
  168. kinematics: corexy
  169. max_velocity: 300
  170. max_accel: 8000
  171. max_z_velocity: 15
  172. max_z_accel: 45
  173. square_corner_velocity: 6.0
  174.  
  175.  
  176. [heater_fan hotend_fan]
  177. pin: PC7
  178. max_power: 1.0
  179. kick_start_time: 0.5
  180. heater: extruder
  181. heater_temp: 50.0
  182. #fan_speed: 1.0 # You can't PWM the delta fan unless using blue wire
  183.  
  184.  
  185. [fan]
  186. pin: PC6
  187. max_power: 1.0
  188. kick_start_time: 0.5
  189. #depending on your fan, you may need to increase or reduce this value
  190. #if your fan will not start
  191. off_below: 0.13
  192. cycle_time: 0.010
  193.  
  194.  
  195. [idle_timeout]
  196. timeout: 1800
  197.  
  198.  
  199. [safe_z_home]
  200. home_xy_position: 120,120
  201. speed: 50.0
  202. z_hop: 3
  203.  
  204.  
  205. # Tool to help adjust bed leveling screws. One may define a
  206. # [bed_screws] config section to enable a BED_SCREWS_ADJUST g-code
  207. # command.
  208. [bed_screws]
  209. screw1: 60,5
  210. screw1_name: front screw
  211. screw2: 5,115
  212. screw2_name: back left
  213. screw3: 115,115
  214. screw3_name: back right
  215.  
  216.  
  217. [gcode_macro PRINT_START]
  218. # Use PRINT_START for the slicer starting script - please customize for your slicer of choice
  219. gcode:
  220. G28 ; home all axes
  221. G1 Z20 F3000 ; move nozzle away from bed
  222. G0 Y2 X38 ; go to tongue of print bed
  223. G1 Z0.4 F500.0 ; move bed to nozzle
  224. G92 E0.0 ; reset extruder
  225. G91 ;set to relative positioning
  226. G1 X30 E10 F200.0 ; pre-purge prime LENGTH SHOULD MATCH YOUR PRINT_END RETRACT
  227. G1 X10 F2000 ;fast move to break strings
  228. G90 ; absolute positioning
  229. G92 E0.0 ; reset extruder
  230. G1 Z2.0 ; move nozzle to prevent scratch
  231.  
  232.  
  233. SET_GCODE_OFFSET Z=-0.001
  234.  
  235. [gcode_macro PRINT_END]
  236. # Use PRINT_END for the slicer ending script - please customize for your slicer of choice
  237. gcode:
  238. M400 ; wait for buffer to clear
  239. G92 E0 ; zero the extruder
  240. G1 E-6.0 F3600 ; retract filament
  241. G91 ; relative positioning
  242.  
  243. # Get Boundaries
  244. {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
  245. {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
  246. {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
  247.  
  248. # Check end position to determine safe direction to move
  249. {% if printer.toolhead.position.x < (max_x - 20) %}
  250. {% set x_safe = 20.0 %}
  251. {% else %}
  252. {% set x_safe = -20.0 %}
  253. {% endif %}
  254.  
  255. {% if printer.toolhead.position.y < (max_y - 20) %}
  256. {% set y_safe = 20.0 %}
  257. {% else %}
  258. {% set y_safe = -20.0 %}
  259. {% endif %}
  260.  
  261. {% if printer.toolhead.position.z < (max_z - 2) %}
  262. ; {% set z_safe = 2.0 %}
  263. {% set z_safe = max_z %}
  264. {% else %}
  265. {% set z_safe = max_z - printer.toolhead.position.z %}
  266. {% endif %}
  267.  
  268. G0 Z5 F3600 ; move nozzle up
  269. G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
  270. TURN_OFF_HEATERS
  271. M107 ; turn off fan
  272. G90 ; absolute positioning
  273. G0 X118 Y1 F3600 ; park nozzle at front and move Z to bottom
  274. M18 ; Disable steppers
  275.  
  276. ;Lights off
  277. M104 S40
  278. G4 P5000
  279. M104 S0
  280. M105
  281.  
  282. [gcode_macro LOAD_FILAMENT]
  283. gcode:
  284. M83 ; set extruder to relative
  285. G1 E50 F300 ; load
  286. G1 E40 F150 ; prime nozzle with filament
  287. M82 ; set extruder to absolute
  288.  
  289. [gcode_macro UNLOAD_FILAMENT]
  290. gcode:
  291. M83 ; set extruder to relative
  292. G1 E20 F300 ; extrude a little to soften tip
  293. G1 E-100 F2000 ; retract some, but not too much or it will jam
  294. M82 ; set extruder to absolute
  295.  
  296. # Sensor Types
  297. # "EPCOS 100K B57560G104F"
  298. # "ATC Semitec 104GT-2"
  299. # "NTC 100K beta 3950" (Keenovo Heater Pad)
  300. # "Honeywell 100K 135-104LAG-J01"
  301. # "NTC 100K MGB18-104F39050L32"
  302. # "AD595"
  303. # "PT100 INA826"
  304.  
  305. #*# <---------------------- SAVE_CONFIG ---------------------->
  306. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  307. #*#
  308. #*# [extruder]
  309. #*# control = pid
  310. #*# pid_kp = 19.999
  311. #*# pid_ki = 0.895
  312. #*# pid_kd = 111.744
  313. #*#
  314. #*# [heater_bed]
  315. #*# control = pid
  316. #*# pid_kp = 63.749
  317. #*# pid_ki = 2.690
  318. #*# pid_kd = 377.711
  319. #*#
  320. #*# [input_shaper]
  321. #*# shaper_type_x = mzv
  322. #*# shaper_freq_x = 77.8
  323. #*# shaper_type_y = mzv
  324. #*# shaper_freq_y = 77.0
  325.  
Advertisement
Add Comment
Please, Sign In to add comment