Advertisement
Guest User

Klipper cfg1

a guest
Aug 13th, 2021
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.43 KB | None | 0 0
  1. #####################################################################################
  2. # Klipper Printer.cfg
  3. # This file contains common pin mappings for the BigTreeTech Octopus.
  4. # To use this config, the firmware should be compiled for the
  5. # STM32F446 with a "32KiB bootloader" and a "12MHz crystal" clock reference.
  6. #
  7. # Author: Luke Quinn
  8. # Date: 8/12/2021
  9. # Version: 2.0
  10. # Ender3 Pro, BTT Octopus v1.1, TMC2209 v1.2, BLTouch v3, Microswiss DD Linear ver, Stock Display
  11. #####################################################################################
  12.  
  13. #####################################################################################
  14. # Printer Configuration
  15. #####################################################################################
  16. ## [X in MOTOR0]
  17. ## [Y in MOTOR1]
  18. ## [Z_0 in MOTOR2]
  19. ## [Z_1 in MOTOR3]
  20. ## [E in MOTOR4]
  21. ## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
  22.  
  23. [mcu]
  24. #Primary MCU BTT Octopus V1.1 in usb mode
  25. serial: /dev/serial/by-id/usb-Klipper_lpc1769_0C500015871C4AAFD8577C5DC12000F5-if00
  26.  
  27. [mcu rpi]
  28. #Secondary MCU to run ADXL345
  29. serial: /tmp/klipper_host_mcu
  30.  
  31. [printer]
  32. #Ender 3 Pro with Linear Rails and MicroSwiss DD kit
  33. kinematics: cartesian
  34. max_velocity: 3000
  35. #max_accel: 7000 ;Normally commented out. Uncomment for resonance testing/calibrating.
  36. #max_accel_to_decel: 7000 ;Normally commented out. Uncomment for resonance testing/calibrating.
  37. max_accel: 2000
  38. max_z_velocity: 25
  39. max_z_accel: 100
  40.  
  41. [force_move]
  42. enable_force_move: True
  43.  
  44. [respond]
  45. default_type: echo
  46.  
  47. [pause_resume]
  48.  
  49. [gcode_arcs]
  50. resolution: 1.0
  51.  
  52. #####################################################################################
  53. # Fan Configuration
  54. #####################################################################################
  55.  
  56. [fan]
  57. pin: PA8
  58.  
  59. #[heater_fan fan1]
  60. #pin: PE5
  61.  
  62. #[heater_fan fan2]
  63. #pin: PD12
  64.  
  65. #[heater_fan fan3]
  66. #pin: PD13
  67.  
  68. #[heater_fan fan4]
  69. #pin: PD14
  70.  
  71. #[controller_fan fan5]
  72. #pin: PD15
  73.  
  74. #####################################################################################
  75. # Heated Bed Configuration
  76. #####################################################################################
  77.  
  78. [heater_bed]
  79. heater_pin: PA1
  80. sensor_type: ATC Semitec 104GT-2
  81. sensor_pin: PF3
  82. min_temp: 0
  83. max_temp: 130
  84.  
  85. #####################################################################################
  86. # BedMesh-ZProbe Configuration
  87. #####################################################################################
  88.  
  89. [bltouch]
  90. sensor_pin: PB7 ;Now uses BlTouch header instead of Z endstop header.
  91. control_pin: PB6
  92. pin_up_reports_not_triggered: True
  93. pin_up_touch_mode_reports_triggered: True
  94. x_offset: -67
  95. y_offset: -28.5
  96. pin_move_time: 1
  97.  
  98. [safe_z_home]
  99. home_xy_position: 184.5,117.5
  100. speed: 150.0
  101. z_hop: 10.0
  102. z_hop_speed: 60.0
  103.  
  104. [bed_mesh]
  105. speed: 150
  106. horizontal_move_z: 5
  107. mesh_min: 30, 30
  108. mesh_max: 180, 180
  109. probe_count: 5,5
  110. #fade_start: 1.0
  111. mesh_pps: 0,0
  112.  
  113. [screws_tilt_adjust]
  114. screw1: 31,37
  115. screw1_name: Front left screw
  116. screw2: 31,208
  117. screw2_name: Rear left screw
  118. screw3: 201,208
  119. screw3_name: Rear right screw
  120. screw4: 201,37
  121. screw4_name: Front right screw
  122. horizontal_move_z: 10
  123. speed: 250
  124. screw_thread: CW-M3
  125.  
  126. #####################################################################################
  127. # Stepper Motor Configuration
  128. #####################################################################################
  129.  
  130. [stepper_x]
  131. step_pin: PF13
  132. dir_pin: PF12
  133. enable_pin: !PF14
  134. step_distance: .0125
  135. endstop_pin: PG6
  136. position_min: -6
  137. position_endstop: -5
  138. position_max: 250
  139. homing_speed: 50
  140.  
  141. [stepper_y]
  142. step_pin: PG0
  143. dir_pin: PG1
  144. enable_pin: !PF15
  145. step_distance: .0125
  146. endstop_pin: PG9
  147. position_min: -11
  148. position_endstop: -10
  149. position_max: 250
  150. homing_speed: 50
  151.  
  152. [stepper_z]
  153. step_pin: PF11
  154. dir_pin: PG3
  155. enable_pin: !PG5
  156. step_distance: .0025
  157. endstop_pin: probe:z_virtual_endstop
  158. #position_endstop: 0
  159. position_max: 250
  160. position_min: -10
  161.  
  162. #[stepper_Z1]
  163. #step_pin: PG4
  164. #dir_pin: PC1
  165. #enable_pin: !PA0
  166. #endstop_pin: PG11
  167. #step_distance: .0025
  168. #endstop_pin: probe:z_virtual_endstop
  169. #position_endstop: 0
  170. #position_max: 250
  171. #position_min: -10
  172.  
  173. #####################################################################################
  174. # Extruder
  175. #####################################################################################
  176.  
  177. [extruder]
  178. step_pin: PF9
  179. dir_pin: PF10
  180. enable_pin: !PG2
  181. step_distance: 0.007213
  182. nozzle_diameter: 0.400
  183. filament_diameter: 1.750
  184. heater_pin: PA2
  185. sensor_type: EPCOS 100K B57560G104F
  186. sensor_pin: PF4
  187. pressure_advance: 0.13906125
  188. pressure_advance_smooth_time: 0.010
  189. #pressure_advance: 0 ;Use for Testing/Calibrating
  190. min_temp: 0
  191. max_temp: 300
  192.  
  193. #####################################################################################
  194. # TMC2209 configuration
  195. #####################################################################################
  196.  
  197. [tmc2209 stepper_x]
  198. uart_pin: PC4
  199. microsteps: 16
  200. interpolate: True
  201. run_current: 0.52
  202. hold_current: 0.500
  203. stealthchop_threshold: 250
  204.  
  205. [tmc2209 stepper_y]
  206. uart_pin: PD11
  207. microsteps: 16
  208. interpolate: True
  209. run_current: 0.52
  210. hold_current: 0.500
  211. stealthchop_threshold: 250
  212.  
  213. [tmc2209 stepper_z]
  214. uart_pin: PC6
  215. microsteps: 16
  216. interpolate: True
  217. run_current: 1.1
  218. hold_current: 0.500
  219. stealthchop_threshold: 50
  220.  
  221. #[tmc2209 stepper_Z1]
  222. #uart_pin: PC7
  223. ##diag_pin: PG11
  224. #run_current: 0.650
  225. #hold_current: 0.450
  226. #stealthchop_threshold: 50
  227.  
  228. [tmc2209 extruder]
  229. uart_pin: PF2
  230. microsteps: 16
  231. interpolate: False
  232. run_current: 0.800
  233. hold_current: 0.500
  234. stealthchop_threshold: 5
  235.  
  236. #####################################################################################
  237. # Resonance Testing Configurartion
  238. #####################################################################################
  239.  
  240. [adxl345 hotend]
  241. # Assuming `hotend` chip is connected to an RPi
  242. cs_pin: rpi:None
  243.  
  244. [adxl345 bed]
  245. # Assuming `bed` chip is connected to a printer MCU board
  246. cs_pin: PA15 ; Printer board SPI chip select (CS) pin
  247. spi_software_sclk_pin: PB3
  248. spi_software_mosi_pin: PB5
  249. spi_software_miso_pin: PB4
  250.  
  251. [resonance_tester]
  252. # Assuming the typical setup of the bed slinger printer
  253. accel_chip_x: adxl345 hotend
  254. accel_chip_y: adxl345 bed
  255. probe_points: 184.5,117.5,20
  256.  
  257. [input_shaper]
  258. shaper_freq_x: 64.6
  259. shaper_type_x: ei
  260. #shaper_freq_y: 34.6
  261. #shaper_type_y: mzv
  262.  
  263. #####################################################################################
  264. # EXP1 / EXP2 (display) pins
  265. #####################################################################################
  266.  
  267. [board_pins]
  268. aliases:
  269. # EXP1 header
  270. EXP1_1=PE8, EXP1_2=PE7,
  271. EXP1_3=PE9, EXP1_4=PE10,
  272. EXP1_5=PE12, EXP1_6=PE13, ; Slot in the socket on this side
  273. EXP1_7=PE14, EXP1_8=PE15,
  274. EXP1_9=<GND>, EXP1_10=<5V>,
  275.  
  276. # EXP2 header
  277. EXP2_1=PA6, EXP2_2=PA5,
  278. EXP2_3=PB1, EXP2_4=PA4,
  279. EXP2_5=PB2, EXP2_6=PA7, ; Slot in the socket on this side
  280. EXP2_7=PC15, EXP2_8=<RST>,
  281. EXP2_9=<GND>, EXP2_10=<5V>
  282.  
  283.  
  284. [display]
  285. lcd_type: st7920
  286. cs_pin: EXP1_7
  287. sclk_pin: EXP1_6
  288. sid_pin: EXP1_8
  289. encoder_pins: ^EXP1_5, ^EXP1_3
  290. click_pin: ^!EXP1_2
  291. #kill_pin: ^!EXP2_8
  292.  
  293. [output_pin beeper]
  294. pin: EXP1_1
  295. pwm: True
  296. value: 0
  297. shutdown_value: 0
  298. cycle_time: 0.001
  299. scale: 1000
  300.  
  301. #####################################################################################
  302. # LED configuration
  303. #####################################################################################
  304.  
  305. [neopixel my_neopixel]
  306. pin: PB0
  307. chain_count: 8
  308. color_order: GRB
  309. initial_RED: 1.0
  310. initial_GREEN: 1.0
  311. initial_BLUE: 1.0
  312.  
  313. #[output_pin caselight]
  314. # Chamber Lighting - HE1 Connector (Optional)
  315. #pin: PA3
  316. #pwm:true
  317. #shutdown_value: 0
  318. #value:1
  319. #cycle_time: 0.01
  320.  
  321. #####################################################################################
  322. # Saved Macros
  323. #####################################################################################
  324.  
  325. [gcode_macro PRINT_START]
  326. # Use PRINT_START for the slicer starting script - please customise for your slicer of choice
  327. gcode:
  328. ; Ender 3 Custom Start G-code
  329. G92 E0 ; Reset Extruder
  330. BED_MESH_PROFILE LOAD=Ender3Pro1; Load Bed Mesh from EEPROM location 1
  331. G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
  332. G1 X5 Y20 Z0.3 F5000.0 ; Move to start position
  333. G1 X5 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
  334. G1 X5.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
  335. G1 X5.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
  336. G92 E0 ; Reset Extruder
  337. G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
  338. G1 X10 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
  339.  
  340. [gcode_macro PRINT_END]
  341. # Use PRINT_END for the slicer ending script - please customise for your slicer of choice
  342. gcode:
  343. M400 ; wait for buffer to clear
  344. G92 E0 ; zero the extruder
  345. G1 E-10.0 F3600 ; retract filament
  346. G91 ; relative positioning
  347. G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
  348. TURN_OFF_HEATERS
  349. M107 ; turn off fan
  350. G1 Z2 F3000 ; move nozzle up 2mm
  351. G90 ; absolute positioning
  352. G0 X125 Y250 F3600 ; park nozzle at rear
  353. #BED_MESH_CLEAR
  354.  
  355. [gcode_macro G29]
  356. gcode:
  357. G28
  358. BED_MESH_CALIBRATE
  359. BED_MESH_PROFILE SAVE=Ender3Pro1
  360. @BEDLEVELVISUALIZER ; instruct plugin to start recording responses from printer.
  361. BED_MESH_OUTPUT ; output calibration Data
  362. SAVE_CONFIG
  363.  
  364. [gcode_macro M420]
  365. gcode:
  366. BED_MESH_PROFILE LOAD=Ender3Pro1
  367.  
  368. [gcode_macro M600]
  369. gcode:
  370. PAUSE
  371. CHANGE_FILAMENT_START
  372.  
  373. [gcode_macro CHANGE_FILAMENT_START]
  374. gcode:
  375. SAVE_GCODE_STATE NAME=M600_state
  376. G91
  377. G1 E-.8 F2700
  378. G1 Z10
  379. G90
  380. G1 X50 Y0 F3000
  381. G91
  382. G1 E-5 F300
  383.  
  384. [gcode_macro CHANGE_FILAMENT_END]
  385. gcode:
  386. G91
  387. RESTORE_GCODE_STATE NAME=M600_state
  388. RESUME
  389.  
  390. [gcode_macro M300]
  391. default_parameter_S: 1000
  392. default_parameter_P: 100
  393. gcode:
  394. SET_PIN PIN=beeper VALUE={S}
  395. G4 P{P}
  396. SET_PIN PIN=beeper VALUE=0
  397.  
  398. [gcode_macro M108]
  399. gcode:
  400. TURN_OFF_HEATERS
  401.  
  402. [gcode_macro REPORT_FILAMENT_WIDTH]
  403. variable_last_width: 0
  404. gcode:
  405. {% set current_width = printer['hall_filament_width_sensor'].Diameter|float|round(2) %}
  406. {% if current_width != last_width|float|round(2) %}
  407. RESPOND TYPE=command MSG={"FlowMultiply:%d" % (printer['gcode_move'].extrude_factor * 100.0,)}
  408. M117 {"Filament:%4.2fmm" % (printer['hall_filament_width_sensor'].Diameter,)}
  409. {% endif %}
  410. SET_GCODE_VARIABLE MACRO=REPORT_FILAMENT_WIDTH VARIABLE=last_width VALUE={current_width}
  411.  
  412. [delayed_gcode PERIODIC_FILAMENT_WIDTH]
  413. gcode:
  414. REPORT_FILAMENT_WIDTH
  415. UPDATE_DELAYED_GCODE ID=PERIODIC_FILAMENT_WIDTH DURATION=2
  416.  
  417. #####################################################################################
  418. # Customize Menu
  419. #####################################################################################
  420.  
  421. #Removed customized menus until I can dive deaper on the new format for menu.cfg. 12/20/2020 LQ
  422.  
  423. #*# <---------------------- SAVE_CONFIG ---------------------->
  424. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  425. #*#
  426. #*# [bed_mesh default]
  427. #*# version = 1
  428. #*# points =
  429. #*# 0.045000, 0.042500, 0.032500, 0.022500, 0.032500
  430. #*# 0.035000, 0.030000, 0.020000, 0.005000, 0.022500
  431. #*# -0.012500, -0.010000, -0.002500, 0.005000, 0.025000
  432. #*# -0.090000, -0.072500, -0.052500, -0.037500, -0.012500
  433. #*# -0.172500, -0.132500, -0.090000, -0.057500, -0.025000
  434. #*# tension = 0.2
  435. #*# min_x = 30.0
  436. #*# algo = lagrange
  437. #*# y_count = 5
  438. #*# mesh_y_pps = 0
  439. #*# min_y = 30.0
  440. #*# x_count = 5
  441. #*# max_y = 180.0
  442. #*# mesh_x_pps = 0
  443. #*# max_x = 180.0
  444. #*#
  445. #*# [extruder]
  446. #*# control = pid
  447. #*# pid_kp = 31.276
  448. #*# pid_ki = 2.317
  449. #*# pid_kd = 105.558
  450. #*#
  451. #*# [heater_bed]
  452. #*# control = pid
  453. #*# pid_kp = 73.076
  454. #*# pid_ki = 1.572
  455. #*# pid_kd = 849.504
  456. #*#
  457. #*# [bltouch]
  458. #*# z_offset = 4.715
  459. #*#
  460. #*# [bed_mesh Ender3Pro1]
  461. #*# version = 1
  462. #*# points =
  463. #*# 0.045000, 0.042500, 0.032500, 0.022500, 0.032500
  464. #*# 0.035000, 0.030000, 0.020000, 0.005000, 0.022500
  465. #*# -0.012500, -0.010000, -0.002500, 0.005000, 0.025000
  466. #*# -0.090000, -0.072500, -0.052500, -0.037500, -0.012500
  467. #*# -0.172500, -0.132500, -0.090000, -0.057500, -0.025000
  468. #*# tension = 0.2
  469. #*# min_x = 30.0
  470. #*# algo = lagrange
  471. #*# y_count = 5
  472. #*# mesh_y_pps = 0
  473. #*# min_y = 30.0
  474. #*# x_count = 5
  475. #*# max_y = 180.0
  476. #*# mesh_x_pps = 0
  477. #*# max_x = 180.0
  478.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement