Advertisement
r0n_dL

Voron V0 - Sherpa Mini DD - Pi MCU

Dec 5th, 2020
1,539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 13.17 KB | None | 0 0
  1. # This file contains common pin mappings for the BIGTREETECH SKR
  2. # MINI E3 v1.2. To use this config, the firmware should be compiled for the
  3. # STM32F103 with a "28KiB bootloader".
  4.  
  5. # The "make flash" command does not work on the SKR mini. Instead,
  6. # after running "make", copy the generated "out/klipper.bin" file to a
  7. # file named "firmware.bin" on an SD card and then restart the SKR
  8. # mini with that SD card.
  9.  
  10. # See the example.cfg file for a description of available parameters.
  11.  
  12. [mcu]
  13. serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_33FFDD053046593219511851-if00
  14.  
  15. [stepper_x]
  16. step_pin: PB13
  17. dir_pin: !PB12
  18. enable_pin: !PB14
  19. step_distance: .0125
  20. endstop_pin: PC0
  21. position_endstop: 120
  22. position_max: 120
  23. homing_speed: 50   #Max 100
  24. homing_retract_dist: 5
  25. homing_positive_dir: true
  26.  
  27. [tmc2209 stepper_x]
  28. uart_pin: PB15
  29. microsteps: 16
  30. interpolate: True
  31. run_current: .25
  32. hold_current: .25
  33. sense_resistor: 0.110
  34. stealthchop_threshold: 500
  35.  
  36. [stepper_y]
  37. step_pin: PB10
  38. dir_pin: !PB2
  39. enable_pin: !PB11
  40. step_distance: .0125
  41. endstop_pin: PC1
  42. position_endstop: 120
  43. position_max: 120
  44. homing_speed: 50   #Max 100
  45. homing_retract_dist: 5
  46. homing_positive_dir: true
  47.  
  48. [tmc2209 stepper_y]
  49. uart_pin: PC6
  50. microsteps: 16
  51. interpolate: True
  52. run_current: .25
  53. hold_current: .25
  54. sense_resistor: 0.110
  55. stealthchop_threshold: 500
  56.  
  57. [stepper_z]
  58. step_pin: PB0
  59. dir_pin: !PC5
  60. enable_pin: !PB1
  61. step_distance: .0025 #for T8x8 lead screw
  62. #step_distance: .000625 #for T8x2 lead screw
  63. endstop_pin: PC2
  64. position_endstop: -.10
  65. position_max: 120
  66. position_min: -1
  67. homing_speed: 20   #Max 100
  68. second_homing_speed: 3.0
  69. homing_retract_dist: 3.0
  70.  
  71. [tmc2209 stepper_z]
  72. uart_pin: PC10
  73. microsteps: 16
  74. interpolate: True
  75. run_current: .25
  76. hold_current: 0.25
  77. sense_resistor: 0.110
  78. stealthchop_threshold: 500
  79.  
  80.  
  81. [extruder]
  82. step_pin: PB3
  83. dir_pin: !PB4
  84. enable_pin: !PD2
  85. #step_distance: .0024 #calibrate this value for your individual printer!!
  86. #step_distance: 0.001818 #M4 calibrated
  87. step_distance: 0.001416344540292 #Sherpa Mini calibrated
  88. nozzle_diameter: 0.400
  89. filament_diameter: 1.750
  90. heater_pin: PC8
  91. sensor_type: SliceEngineering 450
  92. sensor_pin: PA0
  93. #control: pid
  94. #pid_Kp: 22.2
  95. #pid_Ki: 1.08
  96. #pid_Kd: 114
  97. min_temp: 0
  98. max_temp: 425
  99. min_extrude_temp: 170
  100. max_extrude_only_distance: 780.0
  101. max_extrude_cross_section: .8
  102.  
  103. # The pressure advance value is dependent on the extruder, the nozzle,
  104. # and the filament. It is common for filament from different manufactures
  105. # or with different pigments to require significantly different pressure
  106. # advance values. Therefore, one should calibrate pressure advance on each
  107. # printer and with each spool of filament.
  108.  
  109. # Pressure Advance OFF
  110. #Pressure_advance: 0.0
  111.  
  112. # eSun PLA+ Pressure Advance Setting - Sherpa Mini
  113. #Pressure_advance: 0.06735
  114.  
  115. # Sainsmart TPU Pressure Advance Setting
  116. #Pressure_advance: 0.0
  117.  
  118. # ABS Pressure Advance Setting - Sherpa Mini
  119. Pressure_advance: 0.07275
  120.  
  121. pressure_advance_smooth_time: 0.040
  122.  
  123. [tmc2209 extruder]
  124. uart_pin: PC11
  125. microsteps: 16
  126. interpolate: True
  127. run_current: 0.3
  128. hold_current: 0.3
  129. sense_resistor: 0.110
  130. stealthchop_threshold: 500
  131.  
  132. [heater_bed]
  133. heater_pin: PC12
  134. #sensor_type: NTC 100K beta 3950
  135. sensor_type: NTC 100K MGB18-104F39050L32
  136. sensor_pin: PC3
  137. smooth_time: 3.0
  138. max_power: 1.0
  139. #control: pid
  140. min_temp: 0
  141. max_temp: 120
  142. #pid_kp: 58.437
  143. #pid_ki: 2.347
  144. #pid_kd: 363.769
  145.  
  146. [printer]
  147. kinematics: corexy
  148. max_velocity: 250
  149. max_accel: 2000
  150. max_z_velocity: 10
  151. max_z_accel: 30
  152. square_corner_velocity: 5.0
  153.  
  154. [heater_fan hotend_fan]
  155. # Hotend Fan
  156. pin: PA8
  157. max_power: 1.0
  158. kick_start_time: 0.5
  159. heater: extruder
  160. heater_temp: 50.0
  161. #If you are experiencing back flow, you can reduce fan_speed
  162. #fan_speed: 1.0
  163.  
  164. [fan]
  165. # Print Cooling Fan - XYE board, Fan Pin
  166. pin: PC9
  167. kick_start_time: 0.5
  168. #depending on your fan, you may need to increase or reduce this value
  169. #if your fan will not start
  170. off_below: 0.13
  171. cycle_time: 0.010
  172.  
  173. # The rpi microcontroller is used as secondary.
  174. [mcu host]
  175. serial: /tmp/klipper_host_mcu
  176.  
  177. # Using the i2c bus of the RPi to read a sensor
  178. [temperature_sensor enclosure_temp]
  179. sensor_type: HTU21D
  180. i2c_mcu: host
  181. i2c_bus: i2c.1
  182. htu21d_hold_master: False
  183.  
  184. [gcode_macro QUERY_ENCLOSURE]
  185. default_parameter_SENSOR: htu21d enclosure_temp
  186. gcode:
  187.     {action_respond_info(
  188.         "Temperature: %.2f C\n"
  189.         "Humidity: %.2f%%" % (
  190.             printer[SENSOR].temperature,
  191.             printer[SENSOR].humidity))}
  192.  
  193.  
  194. [temperature_sensor Pi]
  195. sensor_type: rpi_temperature
  196. min_temp: 0
  197. max_temp: 90
  198.  
  199. [idle_timeout]
  200. timeout: 1800
  201.  
  202.  
  203. [homing_override]
  204. axes: z
  205. set_position_z: 0
  206. gcode:
  207.    G90
  208.    G0 Z5 F600
  209.    G28 X Y
  210.    G0 X30 Y0 F3600
  211.    
  212.    G28 Z
  213.    G0 Z10 F1800
  214.    G0 X60 Y60 Z20 F3600
  215.  
  216.    # Tool to help adjust bed leveling screws. One may define a
  217. # [bed_screws] config section to enable a BED_SCREWS_ADJUST g-code
  218. # command.
  219. [bed_screws]
  220. screw1: 60,5
  221. screw1_name: front screw
  222. screw2: 5,115
  223. screw2_name: back left
  224. screw3: 115,115
  225. screw3_name: back right
  226.  
  227. [gcode_macro PRINT_START]
  228. #   Use PRINT_START for the slicer starting script - please customise for your slicer of choice
  229. gcode:
  230.     G28                            ; home all axes
  231.     G1 Z20 F3000                   ; move nozzle away from bed
  232.    
  233.  
  234. [gcode_macro PRINT_END]
  235. #   Use PRINT_END for the slicer ending script - please customise for your slicer of choice
  236. gcode:
  237.     M400                           ; wait for buffer to clear
  238.     G92 E0                         ; zero the extruder
  239.     #G1 E-4.0 F3600                 ; retract filament
  240.     G1 E-2.0 F3600                 ; retract filament
  241.     G91                            ; relative positioning
  242.     #G0 Z1.00 X20.0 Y20.0 F20000    ; move nozzle to remove stringing
  243.  
  244.     #   Get Boundaries
  245.     {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
  246.     {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
  247.     {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
  248.  
  249.     #   Check end position to determine safe direction to move
  250.     {% if printer.toolhead.position.x < (max_x - 20) %}
  251.         {% set x_safe = 20.0 %}
  252.     {% else %}
  253.         {% set x_safe = -20.0 %}
  254.     {% endif %}
  255.  
  256.     {% if printer.toolhead.position.y < (max_y - 20) %}
  257.         {% set y_safe = 20.0 %}
  258.     {% else %}
  259.         {% set y_safe = -20.0 %}
  260.     {% endif %}
  261.  
  262.     {% if printer.toolhead.position.z < (max_z - 2) %}
  263.         {% set z_safe = 2.0 %}
  264.     {% else %}
  265.         {% set z_safe = max_z - printer.toolhead.position.z %}
  266.     {% endif %}
  267.  
  268.     G0 Z{z_safe} F3600    ; move nozzle up
  269.     G0 X{x_safe} Y{y_safe} F20000    ; move nozzle to remove stringing
  270.  
  271.     TURN_OFF_HEATERS
  272.     M107                           ; turn off fan
  273. #    G1 Z2 F3000                    ; move nozzle up 2mm
  274.     G90                            ; absolute positioning
  275. #    G0  X60 Y120 F3600            ; park nozzle at rear
  276.     G0 X60 Y{max_y} F3600          ; park nozzle at rear
  277.    
  278. [gcode_macro LOAD_FILAMENT]
  279. gcode:
  280.    M83                            ; set extruder to relative
  281.    #G1 E280 F1800                  ; quickly load filament to down bowden
  282.    G1 E20 F1800                   ; quickly load filament to down hotend (Sherpa Mini)
  283.    G1 E60 F300                    ; slower extrusion for hotend path
  284.    G1 E15 F150                    ; prime nozzle with filament
  285.    M82                            ; set extruder to absolute
  286.    
  287. [gcode_macro UNLOAD_FILAMENT]
  288. gcode:
  289.    M83                            ; set extruder to relative
  290.    G1 E10 F300                    ; extrude a little to soften tip
  291.    #G1 E-380 F1800                 ; retract filament completely
  292.    G1 E-80 F1800                  ; retract filament completely (Sherpa Mini)
  293.    M82                            ; set extruder to absolute
  294.    
  295.  
  296. ######################################################################
  297. # Filament Change
  298. ######################################################################
  299.  
  300.  
  301. # M600: Filament Change. This macro will pause the printer, move the
  302. # tool to the change position, and retract the filament 130mm. Adjust
  303. # the retraction settings for your own extruder. After filament has
  304. # been changed, the print can be resumed from its previous position
  305. # with the "RESUME" gcode.
  306.  
  307. [gcode_macro SWAP_FILAMENT]
  308. ########### Change this ############
  309. default_parameter_X: 0.1            #park position
  310. default_parameter_Y: 0.1                #park position
  311. default_parameter_Z: 120                #park position
  312. default_parameter_E: -50            #retract dist
  313. ########### Gcode ############
  314. gcode:
  315.         SAVE_GCODE_STATE NAME=M600_state
  316.         PAUSE
  317.         G91
  318.         G1 E-5 F4000
  319.         G1 Z{Z}
  320.         G90
  321.         G1 X{X} Y{Y} F3000        ;park position
  322.         G0 E10 F500                ;extrude filament to get better blob on end
  323.         G0 E{E} F600             ;retract additional filament to move out of melt zone
  324.         G92 E0
  325.  
  326. #    Use this command resume during a mid print filament swap (DONT USE OCTO/MAINSAIL/DWC RESUME)
  327. [gcode_macro SWAP_RESUME]
  328. gcode:
  329.     RESTORE_GCODE_STATE NAME=M600_state
  330.     resume
  331.  
  332.  
  333. [gcode_macro HEAT_SOAK]
  334. #uncomment HEAT_SOAK lines in PRINT_START to enable
  335. gcode:
  336.     G0 X60 Y60 Z10                                   ; move toolhead to centre
  337.     PAUSE
  338.     M106 S255                                        ; run cooling fans at full power
  339.     M117
  340.     UPDATE_DELAYED_GCODE ID=SOAK_TIME DURATION=600   ; resume after 300 seconds
  341.  
  342. [delayed_gcode SOAK_TIME]
  343. gcode:
  344.     RESUME
  345.     M107                                             ; turn off cooling fans
  346.  
  347. [gcode_macro SKIP_HEAT_SOAK]
  348. gcode:
  349.     RESUME
  350.     UPDATE_DELAYED_GCODE ID=SOAK_TIME DURATION=1
  351.  
  352. # Sensor Types
  353. #   "EPCOS 100K B57560G104F"
  354. #   "ATC Semitec 104GT-2"
  355. #   "NTC 100K beta 3950"
  356. #   "Honeywell 100K 135-104LAG-J01"
  357. #   "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad)
  358. #   "AD595"
  359. #   "PT100 INA826"
  360. #   "SliceEngineering 450"
  361.  
  362.  
  363. [virtual_sdcard]
  364. #path: ~/gcode_files
  365. path: ~/sdcard
  366.  
  367. [display_status]
  368.  
  369. [pause_resume]
  370. #recover_velocity: 50.
  371. #   When capture/restore is enabled, the speed at which to return to
  372. #   the captured position (in mm/s). Default is 50.0 mm/s.
  373.  
  374. [gcode_macro PAUSE]
  375. rename_existing: BASE_PAUSE
  376. default_parameter_X: 200    #edit to your park position
  377. default_parameter_Y: 200    #edit to your park position
  378. default_parameter_Z: 10     #edit to your park position
  379. default_parameter_E: 2.5      #edit to your retract length
  380. gcode:
  381.     SAVE_GCODE_STATE NAME=PAUSE_state
  382.     BASE_PAUSE
  383.     G91
  384.     G1 E-{E} F2100
  385.     G1 Z{Z}
  386.     G90
  387.     G1 X{X} Y{Y} F6000
  388.    
  389. [gcode_macro RESUME]
  390. rename_existing: BASE_RESUME
  391. default_parameter_E: 2.5      #edit to your retract length
  392. gcode:
  393.     G91
  394.     G1 E{E} F2100
  395.     G90
  396.     RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
  397.     BASE_RESUME
  398.    
  399. [gcode_macro CANCEL_PRINT]
  400. rename_existing: BASE_CANCEL_PRINT
  401. gcode:
  402.     TURN_OFF_HEATERS
  403.     CLEAR_PAUSE
  404.     SDCARD_RESET_FILE
  405.     BASE_CANCEL_PRINT
  406.  
  407. [mcu displayEncoder]
  408. serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_290020001043534137393720-if00
  409. restart_method: command
  410.  
  411. [display]
  412. lcd_type: sh1106
  413. i2c_mcu: displayEncoder
  414. i2c_bus: i2c1a
  415. encoder_pins: ^displayEncoder:PA4, ^displayEncoder:PA3
  416. click_pin: ^!displayEncoder:PA1
  417. kill_pin: ^!displayEncoder:PA5
  418. vcomh: 31
  419.  
  420. [neopixel displayStatus]
  421. pin: displayEncoder:PA0
  422. chain_count: 1
  423. color_order: GRB
  424. initial_RED: 0.2
  425. initial_GREEN: 0.05
  426. initial_BLUE: 0
  427.  
  428. [include bedScrewMenu.cfg]
  429.  
  430. #[filament_switch_sensor my_sensor]
  431. [filament_switch_sensor Runout]
  432.  
  433. pause_on_runout: True
  434. #   When set to True, a PAUSE will execute immediately after a runout
  435. #   is detected. Note that if pause_on_runout is False and the
  436. #   runout_gcode is omitted then runout detection is disabled. Default
  437. #   is True.
  438.  
  439. #runout_gcode:
  440. #   A list of G-Code commands to execute after a filament runout is
  441. #   detected. See docs/Command_Templates.md for G-Code format. If
  442. #   pause_on_runout is set to True this G-Code will run after the
  443. #   PAUSE is complete. The default is not to run any G-Code commands.
  444.  
  445. #insert_gcode:
  446. #   A list of G-Code commands to execute after a filament insert is
  447. #   detected. See docs/Command_Templates.md for G-Code format. The
  448. #   default is not to run any G-Code commands, which disables insert
  449. #   detection.
  450.  
  451. #event_delay: 3.0
  452. #   The minimum amount of time in seconds to delay between events.
  453. #   Events triggered during this time period will be silently
  454. #   ignored. The default is 3 seconds.
  455.  
  456. #pause_delay: 0.5
  457. #   The amount of time to delay, in seconds, between the pause command
  458. #   dispatch and execution of the runout_gcode. It may be useful to
  459. #   increase this delay if OctoPrint exhibits strange pause behavior.
  460. #   Default is 0.5 seconds.
  461.  
  462. switch_pin: ^!PC15
  463. #   The pin on which the switch is connected. This parameter must be
  464. #   provided.
  465.  
  466.  
  467. #*# <---------------------- SAVE_CONFIG ---------------------->
  468. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  469. #*#
  470. #*# [heater_bed]
  471. #*# control = pid
  472. #*# pid_kp = 53.265
  473. #*# pid_ki = 2.864
  474. #*# pid_kd = 247.681
  475. #*#
  476. #*# [extruder]
  477. #*# control = pid
  478. #*# pid_kp = 23.151
  479. #*# pid_ki = 1.416
  480. #*# pid_kd = 94.629
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement