Advertisement
Guest User

Untitled

a guest
Dec 14th, 2022
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.91 KB | None | 0 0
  1. [include mainsail.cfg]
  2. [include klicky-probe.cfg]
  3.  
  4. # This file contains common pin mappings for the BigTreeTech Octopus V1.
  5. # To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader"
  6. # Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference
  7.  
  8. # after running "make", copy the generated "klipper/out/klipper.bin" file to a
  9. # file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card.
  10.  
  11. # See docs/Config_Reference.md for a description of parameters.
  12.  
  13. ## Voron Design Trident 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config
  14.  
  15. ## *** THINGS TO CHANGE/CHECK: ***
  16. ## MCU paths [mcu] section
  17. ## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types
  18. ## Leadscrew Rotation Distance [stepper_z], [stepper_z1], [stepper_z2]
  19. ## Z Endstop Switch location [safe_z_home] section
  20. ## Z Endstop Switch offset for Z0 [stepper_z] section
  21. ## PID tune [extruder] and [heater_bed] sections
  22. ## Probe pin [probe] section
  23. ## Fine tune E steps [extruder] section
  24.  
  25. [mcu]
  26. ## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
  27. ##--------------------------------------------------------------------
  28. serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_060029000850314D35323820-if00
  29. restart_method: command
  30.  
  31.  
  32. [mcu can0]
  33. #serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
  34. #canbus_uuid: 00b537a5e248
  35. canbus_uuid:6f92b8136517
  36.  
  37. [adxl345]
  38. cs_pin: can0: PB12
  39. spi_software_sclk_pin: can0: PB10
  40. spi_software_mosi_pin: can0: PB11
  41. spi_software_miso_pin: can0: PB2
  42. axes_map: x,y,z
  43.  
  44. [resonance_tester]
  45. accel_chip: adxl345
  46. probe_points:
  47. 175,175,20 # an example
  48.  
  49. #######################################################################
  50. ## RGB
  51. #######################################################################
  52. [neopixel StealthBurner]
  53. pin: can0:PD3
  54. chain_count: 3
  55. color_order: GRBW
  56. initial_RED: 1.0
  57. initial_GREEN: 1.0
  58. initial_BLUE: 1.0
  59. initial_WHITE: 1.0
  60.  
  61. ##--------------------------------------------------------------------
  62.  
  63.  
  64. [printer]
  65. kinematics: corexy
  66. max_velocity: 300
  67. max_accel: 3000 #Max 4000
  68. max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V
  69. max_z_accel: 350
  70. square_corner_velocity: 5.0
  71.  
  72. #####################################################################
  73. # X/Y Stepper Settings
  74. #####################################################################
  75.  
  76. ## B Stepper - Left
  77. ## Connected to MOTOR_0
  78. ## Endstop connected to DIAG_0
  79. [stepper_x]
  80. step_pin: PF13
  81. dir_pin: PF12
  82. enable_pin: !PF14
  83. rotation_distance: 40
  84. microsteps: 32
  85. full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
  86. endstop_pin:can0: PB6
  87. position_min: 0
  88. ##--------------------------------------------------------------------
  89.  
  90. ## Uncomment below for 250mm build
  91. #position_endstop: 250
  92. #position_max: 250
  93.  
  94. ## Uncomment for 300mm build
  95. #position_endstop: 300
  96. #position_max: 300
  97.  
  98. ## Uncomment for 350mm build
  99. position_endstop: 350
  100. position_max: 350
  101.  
  102. ##--------------------------------------------------------------------
  103. homing_speed: 25 #Max 100
  104. homing_retract_dist: 5
  105. homing_positive_dir: true
  106.  
  107. ## Make sure to update below for your relevant driver (2208 or 2209)
  108. [tmc2209 stepper_x]
  109. uart_pin: PC4
  110. interpolate: False
  111. run_current: 0.8
  112. sense_resistor: 0.110
  113. stealthchop_threshold: 0
  114.  
  115. ## A Stepper - Right
  116. ## Connected to MOTOR_1
  117. ## Endstop connected to DIAG_1
  118. [stepper_y]
  119. step_pin: PG0
  120. dir_pin: PG1
  121. enable_pin: !PF15
  122. rotation_distance: 40
  123. microsteps: 32
  124. full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
  125. endstop_pin: PG9
  126. position_min: 0
  127. ##--------------------------------------------------------------------
  128.  
  129. ## Uncomment for 250mm build
  130. #position_endstop: 250
  131. #position_max: 250
  132.  
  133. ## Uncomment for 300mm build
  134. #position_endstop: 300
  135. #position_max: 300
  136.  
  137. ## Uncomment for 350mm build
  138. position_endstop: 350
  139. position_max: 350
  140.  
  141. ##--------------------------------------------------------------------
  142. homing_speed: 25 #Max 100
  143. homing_retract_dist: 5
  144. homing_positive_dir: true
  145.  
  146. ## Make sure to update below for your relevant driver (2208 or 2209)
  147. [tmc2209 stepper_y]
  148. uart_pin: PD11
  149. interpolate: False
  150. run_current: 0.8
  151. sense_resistor: 0.110
  152. stealthchop_threshold: 0
  153.  
  154. #####################################################################
  155. # Z Stepper Settings
  156. #####################################################################
  157.  
  158. ## Z0 Stepper - Front Left
  159. ## Connected to MOTOR_2
  160. ## Endstop connected to DIAG_2
  161. [stepper_z]
  162. step_pin: PF11
  163. dir_pin: PG3
  164. enable_pin: !PG5
  165. # Rotation Distance for TR8x8 = 8, TR8x4 = 4, TR8x2 = 2
  166. rotation_distance: 4
  167. microsteps: 32
  168. endstop_pin: PG10
  169. ## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
  170. ## (+) value = endstop above Z0, (-) value = endstop below
  171. ## Increasing position_endstop brings nozzle closer to the bed
  172. ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
  173. position_endstop: -0.5
  174. ## All builds use same Max Z
  175. position_max: 250
  176. position_min: -2.5
  177. homing_speed: 8.0 # Leadscrews are slower than 2.4, 10 is a recommended max.
  178. second_homing_speed: 3
  179. homing_retract_dist: 3
  180.  
  181. ## Make sure to update below for your relevant driver (2208 or 2209)
  182. [tmc2209 stepper_z]
  183. uart_pin: PC6
  184. interpolate: False
  185. run_current: 0.6
  186. sense_resistor: 0.110
  187. stealthchop_threshold: 0
  188.  
  189. ## Z1 Stepper - Rear Center
  190. ## Connected to MOTOR_3
  191. [stepper_z1]
  192. step_pin: PG4
  193. dir_pin: PC1
  194. enable_pin: !PA0
  195. # Rotation Distance for TR8x8 = 8, TR8x4 = 4, TR8x2 = 2
  196. rotation_distance: 4
  197. microsteps: 32
  198.  
  199. ## Make sure to update below for your relevant driver (2208 or 2209)
  200. [tmc2209 stepper_z1]
  201. uart_pin: PC7
  202. interpolate: False
  203. run_current: 0.6
  204. sense_resistor: 0.110
  205. stealthchop_threshold: 0
  206.  
  207. ## Z2 Stepper - Front Right
  208. ## Connected to MOTOR_4
  209. [stepper_z2]
  210. step_pin: PF9
  211. dir_pin: PF10
  212. enable_pin: !PG2
  213. # Rotation Distance for TR8x8 = 8, TR8x4 = 4, TR8x2 = 2
  214. rotation_distance: 4
  215. microsteps: 32
  216.  
  217. ## Make sure to update below for your relevant driver (2208 or 2209)
  218. [tmc2209 stepper_z2]
  219. uart_pin: PF2
  220. interpolate: False
  221. run_current: 0.6
  222. sense_resistor: 0.110
  223. stealthchop_threshold: 0
  224.  
  225.  
  226. #####################################################################
  227. # Extruder
  228. #####################################################################
  229. ###
  230. # Connected to MOTOR_6
  231. # Heater - HE0
  232. # Thermistor - T0
  233. [extruder]
  234. step_pin: can0: PD0
  235. dir_pin: can0: PD1
  236. enable_pin: !can0: PD2
  237. ## Update value below when you perform extruder calibration
  238. ## If you ask for 100mm of filament, but in reality it is 98mm:
  239. ## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
  240. ## 22.6789511 is a good starting point
  241. rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
  242. ## Update Gear Ratio depending on your Extruder Type
  243. ## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio)
  244. ## Use 80:20 for M4, M3.1
  245. gear_ratio: 50:10 #BMG Gear Ratio
  246. microsteps: 16
  247. full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
  248. nozzle_diameter: 0.400
  249. filament_diameter: 1.75
  250. heater_pin: can0: PB13
  251. ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
  252. ## Use "Generic 3950" for NTC 100k 3950 thermistors
  253. sensor_type: Generic 3950
  254. sensor_pin: can0: PA3
  255. min_temp: 10
  256. max_temp: 270
  257. max_power: 1.0
  258. min_extrude_temp: 170
  259. control = pid
  260. pid_kp = 26.213
  261. pid_ki = 1.304
  262. pid_kd = 131.721
  263. ## Try to keep pressure_advance below 1.0
  264. #pressure_advance: 0.05
  265. ## Default is 0.040, leave stock
  266. #pressure_advance_smooth_time: 0.040
  267.  
  268. ## E0 on MOTOR6
  269. ## Make sure to update below for your relevant driver (2208 or 2209)
  270. [tmc2209 extruder]
  271. uart_pin: can0: PA15
  272. interpolate: false
  273. run_current: 0.5
  274. sense_resistor: 0.110
  275. stealthchop_threshold: 0
  276.  
  277.  
  278.  
  279. #####################################################################
  280. # Bed Heater
  281. #####################################################################
  282.  
  283. [heater_bed]
  284. ## SSR Pin - HE1
  285. ## Thermistor - TB
  286. heater_pin: PA3
  287. ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
  288. ## Use "Generic 3950" for Keenovo heaters
  289. sensor_type:Generic 3950
  290. sensor_pin: PF3
  291. ## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 .
  292. max_power: 0.6
  293. min_temp: 0
  294. max_temp: 120
  295. control: pid
  296. pid_kp: 58.437
  297. pid_ki: 2.347
  298. pid_kd: 363.769
  299.  
  300. #####################################################################
  301. # Probe
  302. #####################################################################
  303.  
  304. [probe]
  305. ## Inductive Probe
  306. ## This probe is not used for Z height, only Quad Gantry Leveling
  307. pin: !can0:PB7
  308. # Select the probe port by type:
  309. ## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V.
  310. #pin: ~!PB7
  311. ## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO.
  312. #pin: PG15
  313. ## For Octopus Pro Probe port; NPN and PNP proximity switch types can be set by jumper
  314. #pin: ~!PC5
  315.  
  316. #--------------------------------------------------------------------
  317.  
  318. x_offset: 0
  319. y_offset: 25.0
  320. z_offset: 0
  321. speed: 10.0
  322. samples: 3
  323. samples_result: median
  324. sample_retract_dist: 3.0
  325. samples_tolerance: 0.006
  326. samples_tolerance_retries: 3
  327.  
  328. #####################################################################
  329. # Fan Control
  330. #####################################################################
  331.  
  332. [fan]
  333. ## Print Cooling Fan - FAN0
  334. pin: can0: PA1
  335. kick_start_time: 0.5
  336. ## Depending on your fan, you may need to increase this value
  337. ## if your fan will not start. Can change cycle_time (increase)
  338. ## if your fan is not able to slow down effectively
  339. off_below: 0.10
  340.  
  341. [heater_fan hotend_fan]
  342. ## Hotend Fan - FAN1
  343. pin: can0: PA0
  344. max_power: 1.0
  345. kick_start_time: 0.5
  346. heater: extruder
  347. heater_temp: 50.0
  348. ## If you are experiencing back flow, you can reduce fan_speed
  349. #fan_speed: 1.0
  350.  
  351. [controller_fan controller_fan]
  352. ## Controller fan - FAN2
  353. pin: PD12
  354. kick_start_time: 0.5
  355. heater: heater_bed
  356.  
  357. #[heater_fan exhaust_fan]
  358. ## Exhaust fan - FAN3
  359. #pin: PD13
  360. #max_power: 1.0
  361. #shutdown_speed: 0.0
  362. #kick_start_time: 5.0
  363. #heater: heater_bed
  364. #heater_temp: 60
  365. #fan_speed: 1.0
  366.  
  367. #####################################################################
  368. # LED Control
  369. #####################################################################
  370.  
  371. #[output_pin caselight]
  372. # Chamber Lighting - HE2 Connector (Optional)
  373. #pin: PB10
  374. #pwm:true
  375. #shutdown_value: 0
  376. #value:1
  377. #cycle_time: 0.01
  378.  
  379. #####################################################################
  380. # Homing and Gantry Adjustment Routines
  381. #####################################################################
  382.  
  383. [idle_timeout]
  384. timeout: 1800
  385.  
  386. #[safe_z_home]
  387. ## XY Location of the Z Endstop Switch
  388. ## Update -10,-10 to the XY coordinates of your endstop pin
  389. ## (such as 157,305) after going through Z Endstop Pin
  390. ## Location Definition step.
  391. #home_xy_position:193.019 , 350.000
  392. #speed: 100
  393. #z_hop:10
  394.  
  395. [z_tilt]
  396. ## Use Z_TILT_ADJUST to level the bed .
  397. ## z_positions: Location of toolhead
  398.  
  399. ##--------------------------------------------------------------------
  400. ## Uncomment below for 250mm build
  401. #z_positions:
  402. # -50, 18
  403. # 125, 298
  404. # 300, 18
  405. #points:
  406. # 30, 5
  407. # 125, 195
  408. # 220, 5
  409.  
  410. ## Uncomment below for 300mm build
  411. #z_positions:
  412. # -50, 18
  413. # 150, 348
  414. # 350, 18
  415. #points:
  416. # 30, 5
  417. # 150, 245
  418. # 270, 5
  419.  
  420. ## Uncomment below for 350mm build
  421. z_positions:
  422. -50, 18
  423. 175, 398
  424. 400, 18
  425. points:
  426. 30, 5
  427. 175, 295
  428. 320, 5
  429.  
  430.  
  431. ##--------------------------------------------------------------------
  432.  
  433. speed: 200
  434. horizontal_move_z: 10
  435. retries: 5
  436. retry_tolerance: 0.0075
  437.  
  438. ########################################
  439. # EXP1 / EXP2 (display) pins
  440. ########################################
  441.  
  442. [board_pins]
  443. aliases:
  444. EXP1 header
  445. EXP1_1=PE8, EXP1_2=PE7,
  446. EXP1_3=PE9, EXP1_4=PE10,
  447. EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
  448. EXP1_7=PE14, EXP1_8=PE15,
  449. EXP1_9=<GND>, EXP1_10=<5V>,
  450.  
  451. EXP2 header
  452. EXP2_1=PA6, EXP2_2=PA5,
  453. EXP2_3=PB1, EXP2_4=PA4,
  454. EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
  455. EXP2_7=PC15, EXP2_8=<RST>,
  456. EXP2_9=<GND>, EXP2_10=<5V>
  457.  
  458. #####################################################################
  459. # Displays
  460. #####################################################################
  461.  
  462. ## Uncomment the display that you have
  463. #--------------------------------------------------------------------
  464.  
  465. #[display]
  466. ## RepRapDiscount 128x64 Full Graphic Smart Controller
  467. #lcd_type: st7920
  468. #cs_pin: EXP1_4
  469. #sclk_pin: EXP1_5
  470. #sid_pin: EXP1_3
  471. #menu_timeout: 40
  472. #encoder_pins: ^EXP2_5, ^EXP2_3
  473. #click_pin: ^!EXP1_2
  474.  
  475. #[output_pin beeper]
  476. #pin: EXP1_1
  477.  
  478. #--------------------------------------------------------------------
  479.  
  480. #[display]
  481. ## mini12864 LCD Display
  482. #lcd_type: uc1701
  483. #cs_pin: EXP1_3
  484. #a0_pin: EXP1_4
  485. #rst_pin: EXP1_5
  486. #encoder_pins: ^EXP2_5, ^EXP2_3
  487. #click_pin: ^!EXP1_2
  488. #contrast: 63
  489. #spi_software_miso_pin: EXP2_1
  490. #spi_software_mosi_pin: EXP2_6
  491. #spi_software_sclk_pin: EXP2_2
  492.  
  493. [neopixel btt_mini12864]
  494. ## To control Neopixel RGB in mini12864 display
  495. pin: EXP1_6
  496. chain_count: 3
  497. initial_RED: 0.1
  498. initial_GREEN: 0.5
  499. initial_BLUE: 0.0
  500. color_order: RGB
  501.  
  502. ## Set RGB values on boot up for each Neopixel.
  503. ## Index 1 = display, Index 2 and 3 = Knob
  504. #[delayed_gcode setdisplayneopixel]
  505. #initial_duration: 1
  506. #gcode:
  507. # SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0
  508. # SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
  509. # SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3
  510.  
  511. #--------------------------------------------------------------------
  512.  
  513.  
  514. #####################################################################
  515. # Macros
  516. #####################################################################
  517.  
  518. [gcode_macro PRINT_START]
  519. # Use PRINT_START for the slicer starting script - PLEASE CUSTOMISE THE SCRIPT
  520. gcode:
  521. M117 Homing... ; display message
  522. G28
  523. Z_TILT_ADJUST
  524. G28
  525.  
  526. ## Uncomment for for your size printer:
  527. #--------------------------------------------------------------------
  528. ## Uncomment for 250mm build
  529. #G0 X125 Y125 Z30 F3600
  530.  
  531. ## Uncomment for 300 build
  532. #G0 X150 Y150 Z30 F3600
  533.  
  534. ## Uncomment for 350mm build
  535. #G0 X175 Y175 Z30 F3600
  536. #--------------------------------------------------------------------
  537.  
  538.  
  539.  
  540. [gcode_macro PRINT_END]
  541. # Use PRINT_END for the slicer ending script - please customise for your slicer of choice
  542. gcode:
  543. # safe anti-stringing move coords
  544. {% set th = printer.toolhead %}
  545. {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
  546. {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
  547. {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
  548.  
  549. SAVE_GCODE_STATE NAME=STATE_PRINT_END
  550.  
  551. M400 ; wait for buffer to clear
  552. G92 E0 ; zero the extruder
  553. G1 E-2.0 F3600 ; retract filament
  554.  
  555. TURN_OFF_HEATERS
  556.  
  557. G90 ; absolute positioning
  558. G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
  559. G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
  560. M107 ; turn off fan
  561.  
  562. BED_MESH_CLEAR
  563. RESTORE_GCODE_STATE NAME=STATE_PRINT_END
  564.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement