Advertisement
BirkB

printer.cfg

Feb 8th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.05 KB | None | 0 0
  1. # This file contains common pin mappings for the SuperRacer with the BIGTREETECH SKR V1.3
  2. # board. To use this config, the firmware must be compiled for the LPC1768.
  3. # The hotend PID values are for a Triangle Labs CMC Pro hotend
  4.  
  5. # See docs/Config_Reference.md for a description of parameters.
  6.  
  7. [include mainsail.cfg]
  8.  
  9. [mcu]
  10. serial: /dev/serial/by-id/usb-Klipper_lpc1768_15FB05055B1652539111C54C010000F5-if00 ### BTT Pad 7
  11.  
  12. restart_method: command
  13.  
  14. ###Flsun Super Racer printer config####
  15.  
  16. [printer]
  17. kinematics: delta
  18. max_velocity: 300
  19. max_accel: 10000
  20. max_accel_to_decel: 5000
  21. square_corner_velocity: 5
  22. max_z_velocity: 300
  23. print_radius: 132
  24. #delta_radius: 132
  25. minimum_z_position=-55 #-25
  26.  
  27.  
  28. [input_shaper]
  29. shaper_freq_x: 25.00 # frequency for the X mark of the test model
  30. shaper_freq_y: 23.29 # frequency for the Y mark of the test model
  31.  
  32. ###Stepper X config###
  33. [stepper_a]
  34. step_pin: P2.2
  35. dir_pin: P2.6
  36. enable_pin: !P2.1
  37. microsteps: 16
  38. rotation_distance: 40
  39. endstop_pin: P1.28 # P1.28 for X-max
  40. homing_speed: 50
  41. #position_endstop: 320
  42. #arm_length: 315.0
  43.  
  44. ###Stepper Y config###
  45. [stepper_b]
  46. step_pin: P0.19
  47. dir_pin: P0.20
  48. enable_pin: !P2.8
  49. microsteps: 16
  50. rotation_distance: 40
  51. endstop_pin: P1.26 # P1.26 for Y-max
  52.  
  53. ###Stepper Z config###
  54. [stepper_c]
  55. step_pin: P0.22
  56. dir_pin: P2.11
  57. enable_pin: !P0.21
  58. microsteps: 16
  59. rotation_distance: 40
  60. endstop_pin: P1.24 # P1.24 for Z-max
  61.  
  62. ###Stepper E config####
  63. [extruder]
  64. step_pin: P2.13
  65. dir_pin: P0.11
  66. enable_pin: !P2.12
  67. rotation_distance: 5.694 # 200*16/562
  68. microsteps: 16
  69. full_steps_per_rotation: 200
  70. nozzle_diameter: 0.400
  71. filament_diameter: 1.75
  72. heater_pin: P2.7
  73. sensor_type: EPCOS 100K B57560G104F
  74. sensor_pin: P0.24
  75. min_temp: -5
  76. max_temp: 275
  77. #pressure_advance: 0.033
  78. #control = pid
  79. #pid_kp = 18.240
  80. #pid_ki = 0.558
  81. #pid_kd = 149.109
  82. max_extrude_cross_section: 110
  83. max_extrude_only_distance: 1100
  84.  
  85.  
  86. ###Stepper driver config###
  87. [tmc2209 stepper_a]
  88. uart_pin: P1.17
  89. run_current: 1.138
  90. hold_current: .500
  91. stealthchop_threshold: 999999
  92.  
  93. [tmc2209 stepper_b]
  94. uart_pin: P1.15
  95. run_current: 1.138
  96. hold_current: .500
  97. stealthchop_threshold: 999999
  98.  
  99. [tmc2209 stepper_c]
  100. uart_pin: P1.10
  101. run_current: 1.138
  102. hold_current: .500
  103. stealthchop_threshold: 999999
  104.  
  105. [tmc2209 extruder]
  106. uart_pin: P1.8
  107. run_current: 0.55 #0.75 # 0.55
  108. hold_current: .500
  109. stealthchop_threshold: 999999
  110.  
  111. ###Bed config###
  112. [heater_bed]
  113. heater_pin: P2.5
  114. sensor_type: EPCOS 100K B57560G104F #ATC Semitec 104GT-2
  115. sensor_pin: P0.23
  116. min_temp: 0
  117. max_temp: 130
  118. control = pid
  119. pid_kp = 71.041
  120. pid_ki = 1.422
  121. pid_kd = 887.123
  122.  
  123.  
  124. ###Fan config###
  125. [fan]
  126. pin: P2.3
  127.  
  128. [heater_fan nozzle_fan]
  129. pin: P2.4
  130. heater: extruder
  131. heater_temp: 50.0
  132. fan_speed: 1.0
  133.  
  134. ###Filament Sensor Config###
  135. [filament_switch_sensor filament_sensor]
  136. pause_on_runout: True
  137. runout_gcode: PAUSE
  138. switch_pin: P1.29
  139.  
  140. ###Probe config###
  141. [probe]
  142. pin: !P1.25
  143. x_offset: 0
  144. y_offset: 0
  145. #z_offset: 13.0 #-14.50 #10 #-18.18 <=========================
  146. speed: 10
  147. samples: 3
  148. samples_result: average
  149. sample_retract_dist: 3
  150. samples_tolerance: 0.02
  151. samples_tolerance_retries: 5
  152.  
  153. ###Delta Calibration config###
  154.  
  155. [delta_calibrate]
  156. radius: 127.5 #120
  157. horizontal_move_z: 30 #25
  158. speed: 20 #10
  159.  
  160. [bed_mesh]
  161. speed: 50
  162. horizontal_move_z: 30 #25 #MUST BE THE SAME AS DELTA_CALIBRATE.
  163. mesh_radius: 127.5 #120
  164. mesh_origin: 0,0
  165. round_probe_count: 13
  166. algorithm: bicubic
  167.  
  168. ###Fluidd config###
  169. [temperature_sensor raspberry_pi]
  170. sensor_type: temperature_host
  171. min_temp: 10
  172. max_temp: 220
  173.  
  174. [virtual_sdcard]
  175. #path: ~/gcode_files
  176. #path: /home/biqu/printer_data/gcodes
  177. path = ~/printer_data/gcodes
  178.  
  179. [display_status]
  180.  
  181. [pause_resume]
  182.  
  183. # Enable object exclusion
  184. [exclude_object]
  185.  
  186. # Enable arcs support
  187. [gcode_arcs]
  188. resolution: 0.1
  189.  
  190. ###Macros###
  191. [gcode_macro PAUSE]
  192. description: Pause the actual running print
  193. rename_existing: PAUSE_BASE
  194. gcode:
  195. ##### set defaults #####
  196. {% set x = params.X|default(0) %} #edit to your park position
  197. {% set y = params.Y|default(-120) %} #edit to your park position
  198. {% set z = params.Z|default(10)|float %} #edit to your park position
  199. {% set e = params.E|default(1) %} #edit to your retract length
  200. ##### calculate save lift position #####
  201. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  202. {% set act_z = printer.toolhead.position.z|float %}
  203. {% set lift_z = z|abs %}
  204. {% if act_z < (max_z - lift_z) %}
  205. {% set z_safe = lift_z %}
  206. {% else %}
  207. {% set z_safe = max_z - act_z %}
  208. {% endif %}
  209. ##### end of definitions #####
  210. PAUSE_BASE
  211. G91
  212. {% if printer.extruder.can_extrude|lower == 'true' %}
  213. G1 E-{e} F2100
  214. {% else %}
  215. {action_respond_info("Extruder not hot enough")}
  216. {% endif %}
  217. {% if "xyz" in printer.toolhead.homed_axes %}
  218. G1 Z{z_safe}
  219. G90
  220. G1 X{x} Y{y} F6000
  221. {% else %}
  222. {action_respond_info("Printer not homed")}
  223. {% endif %}
  224.  
  225. [gcode_macro RESUME]
  226. description: Resume the actual running print
  227. rename_existing: RESUME_BASE
  228. gcode:
  229. ##### set defaults #####
  230. {% if printer["filament_switch_sensor filament_sensor"].filament_detected == True %}
  231. {% set e = params.E|default(1) %} #edit to your retract length
  232. #### get VELOCITY parameter if specified ####
  233. {% if 'VELOCITY' in params|upper %}
  234. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  235. {%else %}
  236. {% set get_params = "" %}
  237. {% endif %}
  238. ##### end of definitions #####
  239. G91
  240. {% if printer.extruder.can_extrude|lower == 'true' %}
  241. G1 E{e} F2100
  242. {% else %}
  243. {action_respond_info("Extruder not hot enough")}
  244. {% endif %}
  245. RESUME_BASE {get_params}
  246. {% endif %}
  247.  
  248. [gcode_macro CANCEL_PRINT]
  249. description: Cancel the actual running print
  250. rename_existing: CANCEL_PRINT_BASE
  251. gcode:
  252. TURN_OFF_HEATERS
  253. CANCEL_PRINT_BASE
  254. G28
  255.  
  256.  
  257. [gcode_macro ZUP]
  258. gcode:
  259. SET_GCODE_OFFSET Z_ADJUST=0.025 MOVE=1
  260.  
  261. [gcode_macro ZDOWN]
  262. gcode:
  263. SET_GCODE_OFFSET Z_ADJUST=-0.025 MOVE=1
  264.  
  265. [gcode_macro UNLOAD_FILAMENT] #unload filament
  266. gcode:
  267. G91
  268. G1 E20 F800
  269. G1 E-1000 F800
  270. G90
  271.  
  272.  
  273. [gcode_macro LOAD_FILAMENT] #load filament
  274.  
  275.  
  276. gcode:
  277. G91
  278. G1 E950 F800
  279. G1 E50 F300
  280. G90
  281.  
  282.  
  283.  
  284. [save_variables]
  285. filename: ~/savedVariables1.cfg
  286.  
  287. [gcode_macro SET_GCODE_OFFSET]
  288. rename_existing: _SET_GCODE_OFFSET
  289. gcode:
  290. {% if printer.save_variables.variables.gcode_offsets %}
  291. {% set offsets = printer.save_variables.variables.gcode_offsets %}
  292. {% else %}
  293. {% set offsets = {'x': None,'y': None,'z': None} %}
  294. {% endif %}
  295.  
  296. {% set ns = namespace(offsets={'x': offsets.x,'y': offsets.y,'z': offsets.z}) %}
  297.  
  298. _SET_GCODE_OFFSET {% for p in params %}{'%s=%s '% (p, params[p])}{% endfor %}
  299.  
  300. {%if 'X' in params %}{% set null = ns.offsets.update({'x': params.X}) %}{% endif %}
  301. {%if 'Y' in params %}{% set null = ns.offsets.update({'y': params.Y}) %}{% endif %}
  302. {%if 'Z' in params %}{% set null = ns.offsets.update({'z': params.Z}) %}{% endif %}
  303. {%if 'Z_ADJUST' in params %}
  304. {%if ns.offsets.z == None %}{% set null = ns.offsets.update({'z': 0}) %}{% endif %}
  305. {% set null = ns.offsets.update({'z': (ns.offsets.z | float) + (params.Z_ADJUST | float)}) %}
  306. {% endif %}
  307. SAVE_VARIABLE VARIABLE=gcode_offsets VALUE="{ns.offsets}"
  308.  
  309. [delayed_gcode LOAD_GCODE_OFFSETS]
  310. initial_duration: 2
  311. gcode:
  312. {% if printer.save_variables.variables.gcode_offsets %}
  313. {% set offsets = printer.save_variables.variables.gcode_offsets %}
  314.  
  315. _SET_GCODE_OFFSET {% for axis, offset in offsets.items() if offsets[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
  316.  
  317. { action_respond_info("Loaded gcode offsets from saved variables [%s]" % (offsets)) }
  318. {% endif %}|
  319.  
  320. [gcode_arcs]
  321.  
  322. [gcode_macro bed_level_1]
  323. gcode:
  324. SET_GCODE_OFFSET Z=0
  325. G28
  326. delta_calibrate
  327. G1 X0 Y0 Z50 F4200
  328. G28
  329. save_config
  330.  
  331. [gcode_macro bed_level_2]
  332. gcode:
  333. G28
  334. G1 X0 Y0 Z50 F4200
  335. bed_mesh_calibrate
  336. G1 X0 Y0 Z50 F4200
  337. G28
  338. save_config
  339.  
  340. ########################################
  341. # EXP1 / EXP2 (display) pins
  342. ########################################
  343.  
  344. [board_pins]
  345. aliases:
  346. # EXP1 header
  347. EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
  348. EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
  349. # EXP2 header
  350. EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
  351. EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>
  352. # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp0"
  353.  
  354. # See the sample-lcd.cfg file for definitions of common LCD displays.
  355.  
  356. #*# <---------------------- SAVE_CONFIG ---------------------->
  357. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  358. #*#
  359. #*# [probe]
  360. #*# z_offset = 0.010
  361. #*#
  362. #*# [printer]
  363. #*# delta_radius = 148.144631
  364. #*#
  365. #*# [stepper_a]
  366. #*# angle = 209.839292
  367. #*# arm_length = 315.000000
  368. #*# position_endstop = 331.241
  369. #*#
  370. #*# [stepper_b]
  371. #*# angle = 329.899137
  372. #*# arm_length = 315.000000
  373. #*# position_endstop = 331.313
  374. #*#
  375. #*# [stepper_c]
  376. #*# angle = 90.000000
  377. #*# arm_length = 315.000000
  378. #*# position_endstop = 331.168
  379. #*#
  380. #*# [extruder]
  381. #*# control = pid
  382. #*# pid_kp = 14.056
  383. #*# pid_ki = 0.876
  384. #*# pid_kd = 56.401
  385. #*#
  386. #*# [bed_mesh default]
  387. #*# version = 1
  388. #*# points =
  389. #*# 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391, 25.681391
  390. #*# 25.956063, 25.956063, 25.956063, 25.956063, 25.875043, 25.824967, 25.731784, 25.720195, 25.657385, 25.636184, 25.636184, 25.636184, 25.636184
  391. #*# 25.954746, 25.954746, 25.954746, 25.946114, 25.881453, 25.805642, 25.766598, 25.791830, 25.744162, 25.679487, 25.746253, 25.746253, 25.746253
  392. #*# 25.926710, 25.926710, 25.888723, 25.963543, 25.905104, 25.929626, 25.919988, 25.965516, 25.957755, 25.855392, 25.841834, 26.144752, 26.144752
  393. #*# 25.860417, 25.860417, 25.847475, 25.953998, 26.035273, 26.176178, 26.270358, 26.384459, 26.362514, 26.133141, 26.024630, 26.127954, 26.127954
  394. #*# 25.838024, 25.838024, 25.863865, 26.011673, 26.242483, 26.469631, 26.609724, 26.734411, 26.700357, 26.325096, 26.074960, 26.025780, 26.025780
  395. #*# 25.853477, 25.807754, 25.881205, 26.108965, 26.484153, 26.691831, 26.815162, 26.825507, 26.705302, 26.339379, 26.052816, 25.924928, 26.001637
  396. #*# 25.816526, 25.816526, 25.842131, 26.117390, 26.451250, 26.691944, 26.689500, 26.627690, 26.451901, 26.171242, 25.950059, 25.941684, 25.941684
  397. #*# 25.831039, 25.831039, 25.860002, 25.961986, 26.178506, 26.351400, 26.304531, 26.197718, 26.064115, 25.954140, 25.892870, 25.894186, 25.894186
  398. #*# 25.878884, 25.878884, 25.881174, 25.878515, 25.948748, 25.993637, 25.945475, 25.876671, 25.807022, 25.784099, 25.809525, 25.833704, 25.833704
  399. #*# 25.886120, 25.886120, 25.886120, 25.892813, 25.910233, 25.855282, 25.858298, 25.804815, 25.767825, 25.733908, 25.735152, 25.735152, 25.735152
  400. #*# 25.958258, 25.958258, 25.958258, 25.958258, 25.917971, 25.846075, 25.799889, 25.783405, 25.780787, 25.737810, 25.737810, 25.737810, 25.737810
  401. #*# 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778, 25.875778
  402. #*# x_count = 13
  403. #*# y_count = 13
  404. #*# mesh_x_pps = 2
  405. #*# mesh_y_pps = 2
  406. #*# algo = bicubic
  407. #*# tension = 0.2
  408. #*# min_x = -127.5
  409. #*# max_x = 127.5
  410. #*# min_y = -127.5
  411. #*# max_y = 127.5
  412. #*#
  413. #*# [delta_calibrate]
  414. #*# height0 = 13.0
  415. #*# height0_pos = 25203.000,25202.000,25190.000
  416. #*# height1 = 13.0
  417. #*# height1_pos = 30528.333,30573.000,22320.000
  418. #*# height2 = 13.0
  419. #*# height2_pos = 24651.667,33597.667,24656.667
  420. #*# height3 = 13.0
  421. #*# height3_pos = 22434.667,29638.333,29642.667
  422. #*# height4 = 13.0
  423. #*# height4_pos = 24481.333,24456.333,30892.333
  424. #*# height5 = 13.0
  425. #*# height5_pos = 28884.000,22587.000,28853.000
  426. #*# height6 = 13.0
  427. #*# height6_pos = 32157.000,24556.000,24532.000
  428.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement