moo00se

2in1out_config

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