moo00se

config 71222

Jul 12th, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.61 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. [stepper_x]
  11. step_pin: PF13
  12. dir_pin: PF12
  13. enable_pin: !PF14
  14. microsteps: 16
  15. rotation_distance: 32
  16. endstop_pin: ^!PG6
  17. position_endstop: 230
  18. position_max: 235
  19. homing_speed: 70
  20.  
  21. [tmc2209 stepper_x]
  22. uart_pin: PC4
  23. run_current: 0.8
  24. stealthchop_threshold: 0
  25. interpolate: false
  26. sense_resistor: 0.110
  27. #diag_pin: PG6 # Set to MCU pin connected to TMC DIAG pin
  28. #driver_SGTHRS: 42 # 255 is most sensitive value, 0 is least sensitive
  29.  
  30. [stepper_y]
  31. step_pin: PG0
  32. dir_pin: !PG1
  33. enable_pin: !PF15
  34. microsteps: 16
  35. rotation_distance: 40
  36. endstop_pin: ^!PG9
  37. position_endstop: -15
  38. position_min: -15
  39. position_max: 220
  40. homing_speed: 50
  41.  
  42. [tmc2209 stepper_y]
  43. uart_pin: PD11
  44. run_current: 0.8
  45. stealthchop_threshold: 0
  46. interpolate: false
  47. sense_resistor: 0.110
  48. #diag_pin: PG9 # Set to MCU pin connected to TMC DIAG pin
  49. #driver_SGTHRS: 55 # 255 is most sensitive value, 0 is least sensitive
  50.  
  51. [stepper_z]
  52. step_pin: PF11
  53. dir_pin: PG3
  54. enable_pin: !PG5
  55. microsteps: 16
  56. rotation_distance: 32
  57. endstop_pin: probe:z_virtual_endstop
  58. #position_endstop: 0
  59. position_max: 200
  60. position_min: -3
  61. homing_speed: 8
  62. second_homing_speed: 1
  63.  
  64. [tmc2209 stepper_z]
  65. uart_pin: PC6
  66. interpolate: false
  67. run_current: 0.8
  68. sense_resistor: 0.110
  69. stealthchop_threshold: 0
  70.  
  71. [extruder]
  72. step_pin: PG4
  73. dir_pin: PC1
  74. enable_pin: !PA0
  75. heater_pin: PA2 # HE0
  76. sensor_pin: PF4
  77. microsteps: 32
  78. rotation_distance: 22.5
  79. full_steps_per_rotation: 200
  80. gear_ratio: 4:1
  81. nozzle_diameter: 0.400
  82. filament_diameter: 1.750
  83. sensor_type: EPCOS 100K B57560G104F
  84. #control: pid
  85. #pid_Kp: 22.2
  86. #pid_Ki: 1.08
  87. #pid_Kd: 114
  88. min_temp: 0
  89. max_temp: 290
  90. pressure_advance: 0.096
  91. pressure_advance_smooth_time: 0.040
  92. max_extrude_cross_section: 6.0
  93.  
  94. [tmc2209 extruder]
  95. uart_pin: PC7
  96. interpolate: false
  97. run_current: 0.5
  98. sense_resistor: 0.110
  99. stealthchop_threshold: 0
  100.  
  101. [extruder_stepper belted_extruder]
  102. extruder:
  103. step_pin = PF9
  104. dir_pin = PF10
  105. enable_pin = !PG2
  106. microsteps: 32
  107. rotation_distance: 22.5
  108. full_steps_per_rotation: 200
  109. gear_ratio: 4:1
  110.  
  111. [tmc2209 extruder]
  112. uart_pin: PF2
  113. interpolate: false
  114. run_current: 0.5
  115. sense_resistor: 0.110
  116. stealthchop_threshold: 0
  117.  
  118. #[extruder2]
  119. #step_pin: PC13
  120. #dir_pin: PF0
  121. #enable_pin: !PF1
  122. #heater_pin: PB10 # HE2
  123. #sensor_pin: PF6
  124. #...
  125.  
  126. #[extruder3]
  127. #step_pin: PE2
  128. #dir_pin: PE3
  129. #enable_pin: !PD4
  130. #heater_pin: PB11 # HE3
  131. #sensor_pin: PF7
  132. #...
  133.  
  134. #[extruder4]
  135. #step_pin: PE6
  136. #dir_pin: PA14
  137. #enable_pin: !PE0
  138. #...
  139.  
  140. [heater_bed]
  141. ## SSR Pin - HE1
  142. ## Thermistor - TB
  143. ## Uncomment the following line if using the default SSR wiring from the docs site
  144. heater_pin: PA1
  145. ## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases
  146. #heater_pin: PA1
  147. ## Validate the following thermistor type to make sure it is correct
  148. ## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
  149. sensor_type: EPCOS 100K B57560G104F
  150. sensor_pin: PF3
  151. ## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 .
  152. max_power: 0.6
  153. min_temp: 0
  154. max_temp: 110
  155. #control: pid
  156. #pid_kp: 58.437
  157. #pid_ki: 2.347
  158. #pid_kd: 363.769
  159.  
  160. [fan]
  161. ## Print Cooling Fan - CNC_FAN0
  162. pin: PA8
  163. kick_start_time: 0.5
  164. ## Depending on your fan, you may need to increase this value
  165. ## if your fan will not start. Can change cycle_time (increase)
  166. ## if your fan is not able to slow down effectively
  167. off_below: 0.10
  168.  
  169. [heater_fan hotend_fan]
  170. ## Hotend Fan - CNC_FAN1
  171. pin: PE5
  172. max_power: 1.0
  173. kick_start_time: 1.0
  174. heater: extruder
  175. heater_temp: 50.0
  176. ## If you are experiencing back flow, you can reduce fan_speed
  177. #fan_speed: 1.0
  178.  
  179. [heater_fan controller_fan]
  180. ## Controller fan - CNC_FAN2
  181. pin: PD12
  182. kick_start_time: 0.5
  183. heater: heater_bed
  184. heater_temp: 45.0
  185.  
  186. [heater_fan pi_fan]
  187. pin: PD13
  188. kick_start_time: 0.5
  189. heater: heater_bed
  190. heater_temp: 45.0
  191.  
  192. #[heater_fan fan4]
  193. #pin: PD14 # FAN4
  194.  
  195. #[heater_fan fan5]
  196. #pin: PD15 # FAN5
  197.  
  198. [temperature_sensor raspberry_pi]
  199. sensor_type: temperature_host
  200. min_temp: 10
  201. max_temp: 100
  202.  
  203. [temperature_sensor mcu_temp]
  204. sensor_type: temperature_mcu
  205.  
  206. [mcu]
  207. serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_2B000D00105053424E363620-if00
  208.  
  209. [printer]
  210. kinematics: corexz
  211. max_velocity: 200
  212. max_accel: 10000
  213. max_accel_to_decel: 10000
  214. max_z_velocity: 50
  215. max_z_accel: 1000
  216. square_corner_velocity: 4.0
  217.  
  218. ########################################
  219. # EXP1 / EXP2 (display) pins
  220. ########################################
  221.  
  222. [board_pins]
  223. aliases:
  224. # EXP1 header
  225. EXP1_1=PE8, EXP1_2=PE7,
  226. EXP1_3=PE9, EXP1_4=PE10,
  227. EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
  228. EXP1_7=PE14, EXP1_8=PE15,
  229. EXP1_9=<GND>, EXP1_10=<5V>,
  230.  
  231. # EXP2 header
  232. EXP2_1=PA6, EXP2_2=PA5,
  233. EXP2_3=PB1, EXP2_4=PA4,
  234. EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
  235. EXP2_7=PC15, EXP2_8=<RST>,
  236. EXP2_9=<GND>, EXP2_10=<5V>
  237.  
  238. # See the sample-lcd.cfg file for definitions of common LCD displays.
  239.  
  240. ######################################################################
  241. # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays
  242. ######################################################################
  243. [display]
  244. lcd_type: st7920
  245. cs_pin: EXP1_7
  246. sclk_pin: EXP1_6
  247. sid_pin: EXP1_8
  248. encoder_pins: ^EXP1_5, ^EXP1_3
  249. click_pin: ^!EXP1_2
  250.  
  251. [output_pin beeper]
  252. pin: EXP1_1
  253.  
  254. [include kiauh_macros.cfg]
  255.  
  256. [pause_resume]
  257.  
  258. [display_status]
  259.  
  260. [virtual_sdcard]
  261. path: ~/gcode_files
  262.  
  263. [probe]
  264. ## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO.
  265. pin: ~PG15
  266.  
  267. #--------------------------------------------------------------------
  268.  
  269. x_offset: 0
  270. y_offset: 25.0
  271. #z_offset: 10
  272. speed: 10.0
  273. samples: 3
  274. samples_result: median
  275. sample_retract_dist: 3.0
  276. samples_tolerance: 0.05
  277. samples_tolerance_retries: 3
  278.  
  279. [bed_mesh]
  280. speed: 150
  281. horizontal_move_z: 10
  282. mesh_min: 25,35.0
  283. mesh_max: 225.0,195
  284. probe_count: 6,6
  285. algorithm: bicubic
  286. fade_start: 1
  287. fade_end: 10
  288. fade_target: 0
  289.  
  290. [safe_z_home]
  291. home_xy_position: 117.5,92.5 # Change coordinates to the center of your print bed
  292. speed: 160
  293. z_hop: 10 # Move up 10mm
  294. z_hop_speed: 10
  295.  
  296. [screws_tilt_adjust]
  297. screw1: 30, 0
  298. screw1_name: front left screw
  299. screw2: 200, 0
  300. screw2_name: front right screw
  301. screw3: 200, 175
  302. screw3_name: rear right screw
  303. screw4: 30, 175
  304. screw4_name: rear left screw
  305. screw_thread: CW-M4
  306.  
  307. [z_tilt]
  308. z_positions:
  309. 10,117
  310. 220,117
  311. points:
  312. 60,117
  313. 180,117
  314. speed: 60
  315. horizontal_move_z: 5
  316. retries: 5
  317. retry_tolerance: 0.2
  318.  
  319. [mcu rpi]
  320. serial: /tmp/klipper_host_mcu
  321.  
  322. [adxl345]
  323. cs_pin: rpi:None
  324.  
  325. [resonance_tester]
  326. accel_chip: adxl345
  327. probe_points:
  328. 100, 100, 20 # an example
  329.  
  330. [input_shaper]
  331. shaper_freq_x: 42
  332. shaper_type_x: mzv
  333. shaper_freq_y: 34.8
  334. shaper_type_y: mzv
  335.  
  336. [gcode_macro T0]
  337. gcode:
  338. # Deactivate stepper in my_extruder_stepper
  339. SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=
  340. # Activate stepper in extruder
  341. SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
  342.  
  343. [gcode_macro T1]
  344. gcode:
  345. SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
  346. # Activate stepper in my_extruder_stepper
  347. SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=extruder
  348.  
  349. [gcode_macro ACTIVATE_EXTRUDER]
  350. description: Replaces built-in macro for a X-in, 1-out extruder configuration SuperSlicer fix
  351. rename_existing: ACTIVATE_EXTRUDER_BASE
  352. gcode:
  353. {% if 'EXTRUDER' in params %}
  354. {% set ext = params.EXTRUDER|default(EXTRUDER) %}
  355. {% if ext == "extruder"%}
  356. {action_respond_info("Switching to extruder.")}
  357. T0
  358. {% elif ext == "belted_extruder" %}
  359. {action_respond_info("Switching to belted_extruder.")}
  360. T1
  361. {% else %}
  362. {action_respond_info("EXTRUDER value being passed.")}
  363. ACTIVATE_EXTRUDER_BASE EXTRUDER={ext}
  364. {% endif %}
  365. {% endif %}
  366.  
  367. [delayed_gcode activate_default_extruder]
  368. initial_duration: 1
  369. gcode:
  370. ACTIVATE_EXTRUDER EXTRUDER=extruder
  371.  
  372. [gcode_macro PAUSE]
  373. description: Pause the actual running print
  374. rename_existing: PAUSE_BASE
  375. # change this if you need more or less extrusion
  376. variable_extrude: 1.0
  377. gcode:
  378. ##### read E from pause macro #####
  379. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  380. ##### set park positon for x and y #####
  381. # default is your max posion from your printer.cfg
  382. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  383. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  384. ##### calculate save lift position #####
  385. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  386. {% set act_z = printer.toolhead.position.z|float %}
  387. {% if act_z < (max_z - 2.0) %}
  388. {% set z_safe = 2.0 %}
  389. {% else %}
  390. {% set z_safe = max_z - act_z %}
  391. {% endif %}
  392. ##### end of definitions #####
  393. PAUSE_BASE
  394. G91
  395. {% if printer.extruder.can_extrude|lower == 'true' %}
  396. G1 E-{E} F2100
  397. {% else %}
  398. {action_respond_info("Extruder not hot enough")}
  399. {% endif %}
  400. {% if "xyz" in printer.toolhead.homed_axes %}
  401. G1 Z{z_safe} F900
  402. G90
  403. G1 X{x_park} Y{y_park} F6000
  404. {% else %}
  405. {action_respond_info("Printer not homed")}
  406. {% endif %}
  407.  
  408. [gcode_macro RESUME]
  409. description: Resume the actual running print
  410. rename_existing: RESUME_BASE
  411. gcode:
  412. ##### read E from pause macro #####
  413. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  414. #### get VELOCITY parameter if specified ####
  415. {% if 'VELOCITY' in params|upper %}
  416. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  417. {%else %}
  418. {% set get_params = "" %}
  419. {% endif %}
  420. ##### end of definitions #####
  421. {% if printer.extruder.can_extrude|lower == 'true' %}
  422. G91
  423. G1 E{E} F2100
  424. {% else %}
  425. {action_respond_info("Extruder not hot enough")}
  426. {% endif %}
  427. RESUME_BASE {get_params}
  428.  
  429. [gcode_macro CANCEL_PRINT]
  430. description: Cancel the actual running print
  431. rename_existing: CANCEL_PRINT_BASE
  432. gcode:
  433. TURN_OFF_HEATERS
  434. CANCEL_PRINT_BASE
  435.  
  436. [gcode_macro BED_MESH_CALIBRATE]
  437. rename_existing: BED_MESH_CALIBRATE_BASE
  438. ; gcode parameters
  439. variable_parameter_AREA_START : 0,0
  440. variable_parameter_AREA_END : 0,0
  441. ; the clearance between print area and probe area
  442. variable_mesh_area_offset : 5.0
  443. ; number of sample per probe point
  444. variable_probe_samples : 3
  445. ; minimum probe count
  446. variable_min_probe_count : 3
  447. ; scale up the probe count, should be 1.0 ~ < variable_max_probe_count/variable_min_probe_count
  448. variable_probe_count_scale_factor : 1.0
  449. gcode:
  450. {% if params.AREA_START and params.AREA_END %}
  451. {% set bedMeshConfig = printer["configfile"].config["bed_mesh"] %}
  452. {% set safe_min_x = bedMeshConfig.mesh_min.split(",")[0]|float %}
  453. {% set safe_min_y = bedMeshConfig.mesh_min.split(",")[1]|float %}
  454. {% set safe_max_x = bedMeshConfig.mesh_max.split(",")[0]|float %}
  455. {% set safe_max_y = bedMeshConfig.mesh_max.split(",")[1]|float %}
  456.  
  457. {% set area_min_x = params.AREA_START.split(",")[0]|float %}
  458. {% set area_min_y = params.AREA_START.split(",")[1]|float %}
  459. {% set area_max_x = params.AREA_END.split(",")[0]|float %}
  460. {% set area_max_y = params.AREA_END.split(",")[1]|float %}
  461.  
  462. {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
  463. {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|int %}
  464.  
  465. {% set meshMaxPointX = meshPointX %}
  466. {% set meshMaxPointY = meshPointY %}
  467.  
  468.  
  469. {% if (area_min_x < area_max_x) and (area_min_y < area_max_y) %}
  470. {% if area_min_x - mesh_area_offset >= safe_min_x %}
  471. {% set area_min_x = area_min_x - mesh_area_offset %}
  472. {% else %}
  473. {% set area_min_x = safe_min_x %}
  474. {% endif %}
  475.  
  476. {% if area_min_y - mesh_area_offset >= safe_min_y %}
  477. {% set area_min_y = area_min_y - mesh_area_offset %}
  478. {% else %}
  479. {% set area_min_y = safe_min_y %}
  480. {% endif %}
  481.  
  482. {% if area_max_x + mesh_area_offset <= safe_max_x %}
  483. {% set area_max_x = area_max_x + mesh_area_offset %}
  484. {% else %}
  485. {% set area_max_x = safe_max_x %}
  486. {% endif %}
  487.  
  488. {% if area_max_y + mesh_area_offset <= safe_max_y %}
  489. {% set area_max_y = area_max_y + mesh_area_offset %}
  490. {% else %}
  491. {% set area_max_y = safe_max_y %}
  492. {% endif %}
  493.  
  494. {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x) * probe_count_scale_factor)|round(0)|int %}
  495. {% if meshPointX < min_probe_count %}
  496. {% set meshPointX = min_probe_count %}
  497. {% endif %}
  498. {% if meshPointX > meshMaxPointX %}
  499. {% set meshPointX = meshMaxPointX %}
  500. {% endif %}
  501.  
  502. {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y) * probe_count_scale_factor )|round(0)|int %}
  503. {% if meshPointY < min_probe_count %}
  504. {% set meshPointY = min_probe_count %}
  505. {% endif %}
  506. {% if meshPointY > meshMaxPointY %}
  507. {% set meshPointY = meshMaxPointY %}
  508. {% endif %}
  509.  
  510. BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
  511. {% else %}
  512. BED_MESH_CALIBRATE_BASE
  513. {% endif %}
  514. {% else %}
  515. BED_MESH_CALIBRATE_BASE
  516. {% endif %}
  517.  
  518. #*# <---------------------- SAVE_CONFIG ---------------------->
  519. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  520. #*#
  521. #*# [extruder]
  522. #*# control = pid
  523. #*# pid_kp = 20.051
  524. #*# pid_ki = 0.704
  525. #*# pid_kd = 142.866
  526. #*#
  527. #*# [probe]
  528. #*# z_offset = 5.050
  529. #*#
  530. #*# [heater_bed]
  531. #*# control = pid
  532. #*# pid_kp = 45.536
  533. #*# pid_ki = 0.827
  534. #*# pid_kd = 626.685
  535. #*#
  536. #*# [bed_mesh default]
  537. #*# version = 1
  538. #*# points =
  539. #*# -0.425000, -0.395000, -0.375000
  540. #*# -0.455000, -0.435000, -0.405000
  541. #*# -0.465000, -0.445000, -0.435000
  542. #*# tension = 0.2
  543. #*# min_x = 96.05
  544. #*# algo = lagrange
  545. #*# y_count = 3
  546. #*# mesh_y_pps = 2
  547. #*# min_y = 81.04
  548. #*# x_count = 3
  549. #*# max_y = 118.94
  550. #*# mesh_x_pps = 2
  551. #*# max_x = 133.94
  552.  
Advertisement
Add Comment
Please, Sign In to add comment