Advertisement
lutzmor

klipper

Mar 8th, 2021
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.13 KB | None | 0 0
  1. ####################################
  2. ### HevORT SKR 1.4 Klipper setup ###
  3. ####################################
  4. ## Setup firmware
  5. # cd ~/klipper
  6. # make menuconfig
  7. #
  8. # - Micro-controller -- LPC176x (Smoothieboard )
  9. # - Processor model -- lpc1768 for a SKR 1.4 / lpc1769 for a SKR 1.4 turbo
  10. # - Target board uses Smootieware bootloader -- activated
  11. # - Use USB for communication (instead of serial ) -- activated
  12. ## Compile firmware
  13. # make
  14. ## Flash Firmware
  15. # You need to copy the firmware with scp/winscp or similar tools to the sd card, flashing
  16. # over make flash FLASH_DEVICE=/dev/serial/by-id/xxxxx isn't supported at the moment, i
  17. # currently work on a solution for this by modifying/exchanging the bootloader but not
  18. # working right now so the sd card solution is the only working one.
  19. ## Side note
  20. # -- I use an additional toolbard on the carriage so some pins might differ to a pure SKR setup
  21. # i will note the pin to use in a comment when no toolboard is connected.
  22. # -- And i don't use any kind of hotend fans, and my watercooling is controlled seperatly so nothing
  23. # in the setup around that. I only connect the berdAir pump to the main SKR and let it control
  24. # the part cooling with it.
  25.  
  26. ## Flash bootloader
  27. # A warning beforehand :) this may destroy your board ;) so be carfull
  28. # I recommend the usb to ttl way ( the st-link way didn't worked for me) and i was afraid that i crashed
  29. # my board in the first place.
  30. # TODO with linux
  31.  
  32. ###########################################
  33. ### First SKR 1.4 board for x/y and bed ###
  34. ###########################################
  35. # Further documentation ( https://www.klipper3d.org/Config_Reference.html#mcu )
  36. [mcu]
  37. serial: /dev/serial/by-id/usb-Klipper_lpc1769_0D40FF01C0846AAFA0A3555EC72000F5-if00
  38.  
  39. ########################################################
  40. ### Second SKR 1.4 board for z / z1 / z2 and bltouch ###
  41. ### To get the proper id disconnect the main mcu ###
  42. ### and do a ls -l /dev/serial/by-id/ ###
  43. ########################################################
  44. # Further documentation ( https://www.klipper3d.org/Config_Reference.html#mcu-my_extra_mcu )
  45. [mcu z]
  46. serial: /dev/serial/by-id/usb-Klipper_lpc1769_1680FF0AC0846AAF7DCA555EC02000F5-if00
  47.  
  48. ########################################
  49. ### Toolhead setup ####
  50. #######################
  51. ## Necessary parts
  52. # CAN USB converter ( https://www.tindie.com/products/lll7/can-usb-converter-uccb/ )
  53. # Toolboard ( https://github.com/bondus/KlipperToolboard )
  54. ## Setup
  55. ### Setup firmware
  56. # cd ~/klipper
  57. # make menuconfig
  58. # - Micro-controller Architecture -- STMicroelectronis STM32
  59. # - Processor model -- STM32F103
  60. # - Bootloader offset -- 2KiB bootloader (HIDBootloader
  61. # - Use USB for communication - disabled
  62. # - Use CAN for communication ( instead of serial ) - activated
  63. # - CAN pins -- Pins PB8(rx) and PB9(tx)
  64. ### Flash firmware ( the toolboard needs to be connected to the pi via usb )
  65. # - First off connect BOOT1 pin of the board to a 3.3v pin ( SWD the pin closest to the Stepper drivers ) and power the toolboard up
  66. # -- When the board is in bootloader mode the green LED will flash quickly
  67. # - make flash FLASH_DEVICE=1209:beba
  68. ## Setup CanSerial
  69. # - cd ~/CanSerial
  70. # - sudo cp canserial.service /lib/systemd/system/canserial.service
  71. # - sudo systemctl daemon-reload
  72. # - sudo systemctl enable canserial.service
  73. # - sudo systemctl start canserial.service
  74. #[mcu head]
  75. #serial: /tmp/ttyCAN0_5aa658bb599a # Change to your ID
  76. #restart_method = command
  77.  
  78. ########################################
  79. ### Raspberry Pi connection for adxl ###
  80. ########################################
  81. # Further documentation ( https://www.klipper3d.org/RPi_microcontroller.html )
  82. # All necessary config is done in klipper/resonance.cfg
  83. [mcu rpi]
  84. serial: /tmp/klipper_host_mcu
  85.  
  86. ##############################
  87. ### Basic Printer settings ###
  88. ##############################
  89. # Further documentation ( https://www.klipper3d.org/Config_Reference.html#printer )
  90. [printer]
  91. kinematics: corexy
  92. max_velocity: 400
  93. max_accel: 500
  94. max_z_velocity: 10
  95. max_z_accel: 100
  96.  
  97. #############################
  98. ### Stepper configuration ###
  99. #############################
  100. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#stepper )
  101. # Further documentation ( https://www.klipper3d.org/Config_Reference.html#tmc2209 )
  102.  
  103. #####################################################
  104. ### Stepper motor for x connected to the main mcu ###
  105. #####################################################
  106. [stepper_x]
  107. step_pin: P2.2
  108. dir_pin: P2.6
  109. enable_pin: !P2.1
  110. microsteps: 16
  111. rotation_distance: 40 # belt pitch * pulley tooth
  112. full_steps_per_rotation: 400 # 360 * motor degree
  113. endstop_pin: P1.29 # Endstop pin on the skr 1.4
  114. #endstop_pin: head:PA1 # Endstop pin on the toolhead
  115. position_endstop: 0
  116. position_max: 345 # max position in y
  117. homing_speed: 50 # homeing speed 0 - 100
  118. homing_retract_dist: 5 # how far the toolhead should move back before slow homing
  119.  
  120. [tmc2209 stepper_x]
  121. uart_pin: P1.10
  122. interpolate: True # enable step interpolation (the driver will internally step at a rate of 256 micro-steps)
  123. run_current: 1.344 # set "vref" due to uart mode - value something about 80% of max amp of the motor
  124. hold_current: 0.269
  125. sense_resistor: 0.110
  126. stealthchop_threshold: 0 # turn stealthchop off
  127.  
  128. #####################################################
  129. ### Stepper motor for y connected to the main mcu ###
  130. #####################################################
  131. [stepper_y]
  132. step_pin: P0.19
  133. dir_pin: P0.20
  134. enable_pin: !P2.8
  135. microsteps: 16
  136. rotation_distance: 40 # belt pitch * pulley tooth
  137. full_steps_per_rotation: 400 # 360 * motor degree
  138. endstop_pin: P1.28 # Endstop pin on the skr 1.4
  139. position_endstop: 0
  140. position_max: 345 # max position in y
  141. homing_speed: 50 # homeing speed 0 - 100
  142. homing_retract_dist: 5 # how far the toolhead should move back before slow homing
  143.  
  144. [tmc2209 stepper_y]
  145. uart_pin: P1.9
  146. interpolate: True # enable step interpolation (the driver will internally step at a rate of 256 micro-steps)
  147. run_current: 1.344 # set "vref" due to uart mode - value something about 80% of max amp of the motor
  148. hold_current: 0.269
  149. sense_resistor: 0.110
  150. stealthchop_threshold: 0 # turn stealthchop off
  151.  
  152. ##################################################
  153. ### Stepper motor for z connected to the z mcu ###
  154. ##################################################
  155. [stepper_z]
  156. step_pin: z:P0.22
  157. dir_pin: z:P2.11
  158. enable_pin: !z:P0.21
  159. microsteps: 16
  160. rotation_distance: 4 # screw pitch * number of seperate threads ( sfu1204 4 * 1 )
  161. full_steps_per_rotation: 200 # 360 * motor degree
  162. position_max: 355 # max height of Z
  163. endstop_pin: probe:z_virtual_endstop # use bltouch as endstop
  164.  
  165. [tmc2209 stepper_z]
  166. uart_pin: z:P1.8
  167. interpolate: True # enable step interpolation (the driver will internally step at a rate of 256 micro-steps)
  168. run_current: 1.200 # set "vref" due to uart mode - value something about 80% of max amp of the motor
  169. sense_resistor: 0.110
  170. stealthchop_threshold: 0 # turn stealthchop off
  171.  
  172. ###################################################
  173. ### Stepper motor for z1 connected to the z mcu ###
  174. ###################################################
  175. [stepper_z1]
  176. step_pin: z:P2.2
  177. dir_pin: z:P2.6
  178. enable_pin: !z:P2.1
  179. microsteps: 16
  180. rotation_distance: 4 # screw pitch * number of seperate threads ( sfu1204 4 * 1 )
  181. full_steps_per_rotation: 200 # 360 * motor degree
  182.  
  183. [tmc2209 stepper_z1]
  184. uart_pin: z:P1.10
  185. interpolate: True # enable step interpolation (the driver will internally step at a rate of 256 micro-steps)
  186. run_current: 1.200 # set "vref" due to uart mode - value something about 80% of max amp of the motor
  187. sense_resistor: 0.110
  188. stealthchop_threshold: 0 # turn stealthchop off
  189.  
  190. ###################################################
  191. ### Stepper motor for z1 connected to the z mcu ###
  192. ###################################################
  193. [stepper_z2]
  194. step_pin: z:P0.19
  195. dir_pin: z:P0.20
  196. enable_pin: !z:P2.8
  197. microsteps: 16
  198. rotation_distance: 4 # screw pitch * number of seperate threads ( sfu1204 4 * 1 )
  199. full_steps_per_rotation: 200 # 360 * motor degree
  200.  
  201. [tmc2209 stepper_z2]
  202. uart_pin: z:P1.9
  203. interpolate: True # enable step interpolation (the driver will internally step at a rate of 256 micro-steps)
  204. run_current: 1.200 # set "vref" due to uart mode - value something about 80% of max amp of the motor
  205. sense_resistor: 0.110
  206. stealthchop_threshold: 0 # turn stealthchop off
  207.  
  208. ##########################
  209. ### Extruder Settings ####
  210. ##########################
  211. [extruder]
  212. step_pin: P2.13 # Step pin if extruder is connected to the SKR
  213. dir_pin: !P0.11 # Dir pin if extruder is connected to the SKR
  214. enable_pin: !P2.12 # Enable pin if extruder is connected to the SKR
  215. heater_pin: P2.7 # heater pin if Hotend is connected to the SKR
  216. sensor_pin: P0.24 # sensor pin if Thermistor is connected to the SKR
  217.  
  218. #step_pin: head0:PB3 # Step pin if extruder is connected to the toolhead
  219. #dir_pin: head0:PB4 # Dir pin if extruder is connected to the toolhead
  220. #enable_pin: !head0:PB6 # Enable pin if extruder is connected to the toolhead
  221. #heater_pin: head0:PA6 # heater pin if Hotend is connected to the toolhead
  222. #sensor_pin: head0:PA0 # sensor pin if Thermistor is connected to the toolhead
  223.  
  224. microsteps: 16
  225. rotation_distance: 33.500
  226. nozzle_diameter: 0.400
  227. filament_diameter: 1.750
  228. sensor_type: EPCOS 100K B57560G104F
  229. control: pid
  230. pid_Kp: 22.2
  231. pid_Ki: 1.08
  232. pid_Kd: 114
  233. min_temp: -273.15
  234. max_temp: 260
  235.  
  236. [tmc2209 extruder]
  237. uart_pin: P1.4 # uart pin if extruder is connected to the SKR
  238. #uart_pin: head0:PA10 # uart pin if extruder is connected to the toolhead
  239. #tx_pin: head0:PA9 # tx pin if extruder is connected to the toolhead
  240. interpolate: false
  241. run_current: 0.5
  242. sense_resistor: 0.110
  243. stealthchop_threshold: 0
  244.  
  245. ########################################
  246. ### Configuration for the heated bed ###
  247. ########################################
  248. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#heater_bed )
  249. [heater_bed]
  250. heater_pin: P2.5
  251. sensor_type: EPCOS 100K B57560G104F
  252. sensor_pin: P0.25
  253. control: pid
  254. pid_Kp: 54.027
  255. pid_Ki: 0.770
  256. pid_Kd: 948.182
  257. min_temp: 0
  258. max_temp: 150
  259.  
  260. #####################################
  261. ### Configuration for the bltouch ###
  262. #####################################
  263. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#bltouch )
  264. [bltouch]
  265. sensor_pin: ^z:P0.10
  266. control_pin: z:P2.0
  267. x_offset: 37.449
  268. y_offset: 26.253
  269. z_offset: 3
  270. stow_on_each_sample: false # Probe will not stowed after each attempt
  271. probe_with_touch_mode: true
  272. set_output_mode: 5V
  273. speed: 5
  274. samples: 1
  275. sample_retract_dist: 5
  276. samples_tolerance: 0.010
  277.  
  278. #########################################
  279. ### Configuration for the Safe z home ###
  280. #########################################
  281. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#safe_z_home )
  282. [safe_z_home]
  283. home_xy_position: 30,30
  284. speed: 50
  285. z_hop: 10 # Move up 10mm
  286. z_hop_speed: 5
  287.  
  288. ################################
  289. ### Configuration for Z tilt ###
  290. ################################
  291. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#z_tilt )
  292. [z_tilt]
  293. z_positions:
  294. -15,2
  295. 173,355
  296. 362,2
  297. points:
  298. 40,60
  299. 40,345
  300. 345,345
  301. 345,60
  302. speed: 50
  303. horizontal_move_z: 10
  304. retries: 3
  305. retry_tolerance: 0.010
  306.  
  307. ##############################
  308. ### Configuration bed mesh ###
  309. ##############################
  310. # Further Documentation ( https://www.klipper3d.org/Config_Reference.html#bed_mesh )
  311. [bed_mesh]
  312. speed: 120
  313. horizontal_move_z: 5
  314. mesh_min: 30,20
  315. mesh_max: 310, 310
  316. probe_count: 6,6
  317.  
  318. #########################
  319. ### Fan configuration ###
  320. #########################
  321. # Further documentation:
  322. # Fans - https://www.klipper3d.org/Config_Reference.html#fans
  323. # Fan - https://www.klipper3d.org/Config_Reference.html#fan
  324. # Heater fan - https://www.klipper3d.org/Config_Reference.html#heater_fan
  325. # Controller fan - https://www.klipper3d.org/Config_Reference.html#controller_fan
  326. # Temperature fan - https://www.klipper3d.org/Config_Reference.html#temperature_fan
  327. # Fan generic - https://www.klipper3d.org/Config_Reference.html#fan_generic
  328. [fan]
  329. pin: P2.3
  330.  
  331. # Resonance tuning
  332. [include extras/resonance.cfg]
  333.  
  334. # Fluidd specific stuff
  335. [include extras/fluidd.cfg]
  336. [include macros.cfg]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement