Advertisement
AwDuck

Untitled

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