Advertisement
Guest User

Printer.cfg

a guest
Aug 6th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.21 KB | Source Code | 0 0
  1. [include mainsail.cfg]
  2. [pause_resume]
  3.  
  4. [virtual_sdcard]
  5. path: ~/printer_data/gcodes
  6. on_error_gcode: CANCEL_PRINT
  7.  
  8. [display_status]
  9.  
  10. [gcode_arcs]
  11.  
  12. [exclude_object]
  13.  
  14. [mcu]
  15. #serial: /dev/serial/by-id/usb-Klipper_stmblahblahblah
  16. serial: /dev/ttyACM0
  17.  
  18. [mcu OrbitoolO2]
  19. serial:/dev/serial/by-id/usb-Klipper_stm32f042x6_OrbitoolO2-if00
  20. restart_method: command
  21.  
  22. [output_pin O2run_led]
  23. pin = OrbitoolO2:PB8
  24. value: 1
  25. shutdown_value: 0
  26.  
  27. [lis2dw]
  28. cs_pin: OrbitoolO2:PA4
  29. spi_bus: spi1
  30. axes_map: y, z, x
  31.  
  32. [resonance_tester]
  33. accel_chip: lis2dw
  34. probe_points: 175,175,30
  35. min_freq: 10
  36. max_freq: 200
  37.  
  38. [printer]
  39. kinematics: cartesian
  40. max_velocity: 1500
  41. max_accel: 2500
  42. max_z_velocity: 10
  43. max_z_accel: 100
  44. square_corner_velocity: 20
  45.  
  46. #-------------------------------------
  47. # Bed Leveling
  48. #-------------------------------------
  49. [bltouch]
  50. sensor_pin: ^OrbitoolO2:PB3
  51. control_pin: OrbitoolO2:PA15
  52. pin_move_time: 0.675
  53. stow_on_each_sample: true
  54. probe_with_touch_mode: true
  55. pin_up_touch_mode_reports_triggered: true
  56. speed: 100
  57. lift_speed: 200
  58. samples: 3
  59. sample_retract_dist: 10
  60. samples_tolerance_retries: 4
  61. x_offset: -43.00
  62. y_offset: -5.00
  63. #z_offset: 0.00
  64. [bed_mesh]
  65. speed: 100
  66. horizontal_move_z: 10
  67. probe_count: 5, 5
  68. algorithm: bicubic
  69. mesh_min: 40,40
  70. mesh_max: 290,290
  71. [screws_tilt_adjust]
  72. screw1: 58,50
  73. screw1_name: front_left
  74. screw2: 355,50
  75. screw2_name: front_right
  76. screw3: 58,315
  77. screw3_name: back_left
  78. screw4: 355,315
  79. screw4_name: back_right
  80. [safe_z_home]
  81. speed: 100
  82. z_hop: 10
  83. z_hop_speed: 100
  84. home_xy_position: 175,175
  85. [fan]
  86. pin: PB15
  87. max_power: 1.0
  88. cycle_time: 0.0001
  89. hardware_pwm: false
  90. kick_start_time: 0.333
  91. off_below: 0.05
  92. [heater_fan hotend_fan]
  93. pin: OrbitoolO2:PB1
  94. max_power: 1.0
  95. fan_speed: 1.0
  96. heater: extruder
  97. heater_temp: 50.0
  98.  
  99. [fan_generic part_Fan]
  100. pin: OrbitoolO2:PA10
  101. max_power: 0.995
  102. shutdown_speed: 0.0
  103. cycle_time: 0.02
  104. kick_start_time: 0.2
  105. hardware_pwm: False
  106.  
  107. [temperature_sensor raspberry_pi]
  108. sensor_type: temperature_host
  109. max_temp: 100
  110. [temperature_sensor mcu_temp]
  111. sensor_type: temperature_mcu
  112. max_temp: 100
  113. [temperature_sensor OrbitoolO2]
  114. sensor_type: temperature_mcu
  115. sensor_mcu: OrbitoolO2
  116. min_temp: 0
  117. max_temp: 100
  118.  
  119. [heater_bed]
  120. heater_pin: PC9
  121. sensor_type: EPCOS 100K B57560G104F # Creality bed thermistor
  122. sensor_pin: PC4
  123. min_temp: 0
  124. max_temp: 125
  125. #control: pid # These settings are pretty accurate for me, try them first
  126. #pid_Kp: 131.06
  127. #pid_Ki: 11.79
  128. #pid_Kd: 971.23
  129. [stepper_x]
  130. step_pin: PB13
  131. dir_pin: !PB12
  132. enable_pin: !PB14
  133. endstop_pin: tmc2209_stepper_x:virtual_endstop
  134. rotation_distance: 40 # pitch 2mm, teeth 20
  135. full_steps_per_rotation: 200
  136. microsteps: 16
  137. homing_speed: 50
  138. position_min: 0
  139. position_max: 350
  140. position_endstop: 350
  141.  
  142. [stepper_y]
  143. step_pin: PB10
  144. dir_pin: !PB2
  145. enable_pin: !PB11
  146. endstop_pin: tmc2209_stepper_y:virtual_endstop
  147. homing_retract_dist: 0
  148. rotation_distance: 40 # pitch 2mm, teeth 20?
  149. full_steps_per_rotation: 200
  150. microsteps: 16
  151. homing_speed: 50
  152. position_min: 0
  153. position_max: 365
  154. position_endstop: 365
  155.  
  156. [stepper_z]
  157. step_pin: PB0
  158. dir_pin: !PC5
  159. enable_pin: !PB1
  160. endstop_pin: probe:z_virtual_endstop
  161. rotation_distance: 4 # pitch 2mm, threads 2
  162. full_steps_per_rotation: 200
  163. microsteps: 16
  164. position_min: -6.0
  165. position_max: 420
  166. #-------------------------------------
  167. # Extruder: Orbiter 2.0
  168. #-------------------------------------
  169. [extruder]
  170. step_pin: OrbitoolO2:PB7
  171. dir_pin: OrbitoolO2:PB6
  172. enable_pin: !OrbitoolO2:PB4
  173. microsteps: 32
  174. full_steps_per_rotation: 200
  175. rotation_distance: 4.69
  176. nozzle_diameter: 0.400
  177. filament_diameter: 1.750
  178. max_extrude_only_distance: 500
  179. max_extrude_cross_section: 20
  180. max_extrude_only_velocity: 120
  181. pressure_advance: 0.015
  182. pressure_advance_smooth_time: 0.2
  183. heater_pin: OrbitoolO2:PA0
  184. sensor_type: EPCOS 100K B57560G104F
  185. sensor_pin: OrbitoolO2:PA3
  186. pullup_resistor: 2200
  187. #control: pid
  188. #pid_Kp: 22.2
  189. #pid_Ki: 1.08
  190. #pid_Kd: 114
  191. min_temp: 0
  192. max_temp: 300
  193. min_extrude_temp: 180
  194. max_power: 0.995
  195. pwm_cycle_time: 0.0100
  196.  
  197. [firmware_retraction]
  198. retract_length: 1.2
  199. # The length of filament (in mm) to retract when G10 is activated,
  200. # and to unretract when G11 is activated (but see
  201. # unretract_extra_length below). The default is 0 mm.
  202. retract_speed: 120
  203. # The speed of retraction, in mm/s. The default is 20 mm/s.
  204. unretract_extra_length: 0.0
  205. # The length (in mm) of *additional* filament to add when
  206. # unretracting.
  207. unretract_speed: 120
  208. # The speed of unretraction, in mm/s. The default is 10 mm/s.
  209.  
  210. # ---------- X Stepper ----------
  211. # Creality 42-34, 0.8A peak RMS (per phase)
  212. # -------------------------------
  213. [tmc2209 stepper_x]
  214. uart_pin: PC11
  215. tx_pin: PC10
  216. diag_pin: PC0
  217. driver_SGTHRS: 100
  218. uart_address: 0
  219. interpolate: true
  220. sense_resistor: 0.110
  221. run_current: 0.45
  222. stealthchop_threshold: 999999
  223. # ---------- Y Stepper ----------
  224. # Creality 42-48, 1.0A peak RMS (per phase)
  225. # -------------------------------
  226. [tmc2209 stepper_y]
  227. uart_pin: PC11
  228. tx_pin: PC10
  229. diag_pin: PC1
  230. driver_SGTHRS: 110
  231. uart_address: 2
  232. interpolate: true
  233. sense_resistor: 0.110
  234. run_current: 0.57
  235. stealthchop_threshold: 999999
  236. # ---------- Z Stepper ----------
  237. # Creality 42-34, 0.8A peak RMS (per phase)
  238. # -------------------------------
  239. [tmc2209 stepper_z]
  240. uart_pin: PC11
  241. tx_pin: PC10
  242. uart_address: 1
  243. interpolate: true
  244. sense_resistor: 0.110
  245. run_current: 0.48
  246. stealthchop_threshold: 999999
  247. # ---------- E Stepper ----------
  248. # Creality 42-40
  249. # -------------------------------
  250. [tmc2209 extruder]
  251. uart_pin: OrbitoolO2:PB5
  252. interpolate: false
  253. run_current: 0.75 # 0.75
  254. sense_resistor = 0.11
  255. stealthchop_threshold: 0
  256. #-------------------------------------
  257. # Board screen
  258. #-------------------------------------
  259. [board_pins]
  260. aliases:
  261. # EXP1 header
  262. EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
  263. EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PD6, EXP1_10=<5V>
  264. [display]
  265. lcd_type: emulated_st7920
  266. en_pin: EXP1_7
  267. spi_software_sclk_pin: EXP1_6
  268. spi_software_mosi_pin: EXP1_8
  269. spi_software_miso_pin: PA3
  270. encoder_pins: ^EXP1_5, ^EXP1_3
  271. click_pin: ^!EXP1_2
  272. #-------------------------------------
  273. # Additional Macros
  274. #-------------------------------------
  275. [gcode_macro G29]
  276. gcode:
  277. BED_MESH_CALIBRATE
  278. [gcode_macro PRINT_START]
  279. gcode:
  280. {% set intro_x = printer.configfile.config["stepper_x"]["position_max"]|float * 0.66 %}
  281. {% set min_x = printer.configfile.config["stepper_x"]["position_min"]|float * 0.1 %}
  282. {% set min_y = printer.configfile.config["stepper_y"]["position_min"]|float %}
  283. {% set BED = params.BED|default(60)|float %}
  284. {% set EXTRUDER = params.EXTRUDER|default(205)|float %}
  285. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED} ; final bed temp
  286. M190 S{BED} ; Wait to heat bed
  287. SET_HEATER_TEMPERATURE HEATER=extruder TARGET=160 ; initial ext temp to avoid oozing
  288. G21 ; set to mm
  289. M220 S100 ; print speed 100%
  290. M221 S100 ; flow rate 100%
  291. M107 ; disable fans
  292. G90 ; use absolute positioning
  293. G28 ; home
  294. # BED_MESH_CALIBRATE
  295. G1 X{min_x} Y{min_y} F5000 ; zero x,y
  296. G1 Z5 F240
  297. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER} ; final extruder temp
  298. M109 S{EXTRUDER} ; Wait to heat extruder
  299. PRIME_NOZZLE
  300. [gcode_macro PRINT_END]
  301. gcode:
  302. {% set intro_x = printer.configfile.config["stepper_x"]["position_max"]|float * 0.66 %}
  303. {% set min_x = printer.configfile.config["stepper_x"]["position_min"]|float * 0.1 %}
  304. {% set min_y = printer.configfile.config["stepper_y"]["position_min"]|float %}
  305. G1 X{min_x} Y{min_y} F5000 ; move to min
  306. TURN_OFF_HEATERS
  307. M107 ; disable fans
  308. M84 X Y E ; disable motors x,y,e
  309. [gcode_macro CANCEL_PRINT]
  310. rename_existing: CANCEL_PRINT_BASE
  311. gcode:
  312. TURN_OFF_HEATERS
  313. M107 ; disable fans
  314. M84 X Y E ; disable motors x,y,e
  315. [gcode_macro PRIME_NOZZLE]
  316. gcode:
  317. {% set intro_x = printer.configfile.config["stepper_x"]["position_max"]|float * 0.66 %}
  318. {% set min_x = printer.configfile.config["stepper_x"]["position_min"]|float * 0.1 %}
  319. {% set min_y = printer.configfile.config["stepper_y"]["position_min"]|float %}
  320. M83 ; extruder relative mode
  321. G92 E0
  322. G1 X{min_x} Y{min_y} Z0.3 F5000 ; move to start position
  323. G1 X{intro_x} Y{min_y} Z0.3 F1500.0 E15 ; draw first line
  324. G92 E0
  325. G1 X{intro_x} Y{min_y + 0.3} Z0.3 F5000 ; move over
  326. G1 X{min_x / 2} Y{min_y + 0.3} Z0.3 F1500 E35 ; draw second line
  327. G91 E0
  328. [gcode_macro m205]
  329. gcode:
  330. G4
  331.  
  332. #*# <---------------------- SAVE_CONFIG ---------------------->
  333. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  334. #*#
  335. #*# [bltouch]
  336. #*# z_offset = 3.735
  337. #*#
  338. #*# [bed_mesh default]
  339. #*# version = 1
  340. #*# points =
  341. #*# 0.341667, 0.033750, -0.215417, -0.472917, -0.681250
  342. #*# 0.482917, 0.127500, -0.159583, -0.422083, -0.624167
  343. #*# 0.489167, 0.216667, -0.081250, -0.342500, -0.579167
  344. #*# 0.509167, 0.225417, -0.050417, -0.331667, -0.572917
  345. #*# 0.478750, 0.217500, -0.052083, -0.337500, -0.599167
  346. #*# x_count = 5
  347. #*# y_count = 5
  348. #*# mesh_x_pps = 2
  349. #*# mesh_y_pps = 2
  350. #*# algo = bicubic
  351. #*# tension = 0.2
  352. #*# min_x = 40.0
  353. #*# max_x = 290.0
  354. #*# min_y = 40.0
  355. #*# max_y = 290.0
  356. #*#
  357. #*# [extruder]
  358. #*# control = pid
  359. #*# pid_kp = 25.757
  360. #*# pid_ki = 1.419
  361. #*# pid_kd = 116.873
  362. #*#
  363. #*# [heater_bed]
  364. #*# control = pid
  365. #*# pid_kp = 63.946
  366. #*# pid_ki = 0.563
  367. #*# pid_kd = 1815.255
  368.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement