Guest User

Untitled

a guest
Oct 3rd, 2026
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.69 KB | None | 0 0
  1. # This file contains common pin mappings for Sovol Sv01 printer. To
  2. # use this config, the firmware should be compiled for the AVR
  3. # atmega2560.
  4.  
  5. # See docs/Config_Reference.md for a description of parameters.
  6.  
  7. [virtual_sdcard]
  8. path: ~/printer_data/gcodes
  9. on_error_gcode:
  10. CANCEL_PRINT
  11. [pause_resume]
  12.  
  13. [gcode_macro CANCEL_PRINT]
  14. description: Cancel the actual running print
  15. rename_existing: CANCEL_PRINT_BASE
  16. gcode:
  17. TURN_OFF_HEATERS
  18. CANCEL_PRINT_BASE
  19.  
  20. [stepper_x]
  21. step_pin: PF0
  22. dir_pin: PF1
  23. enable_pin: !PD7
  24. microsteps: 16
  25. rotation_distance: 40
  26. endstop_pin: ^PE5
  27. position_endstop: 0
  28. position_max: 300
  29. homing_speed: 50
  30.  
  31. [stepper_y]
  32. step_pin: PF6
  33. dir_pin: PF7
  34. enable_pin: !PF2
  35. microsteps: 16
  36. rotation_distance: 40
  37. endstop_pin: ^PJ1
  38. position_endstop: 0
  39. position_max: 255
  40. homing_speed: 50
  41.  
  42. [stepper_z]
  43. step_pin: rpi:gpio23
  44. dir_pin: rpi:gpio25
  45. enable_pin: !rpi:gpio18
  46. microsteps: 16
  47. rotation_distance: 8
  48. endstop_pin: probe:z_virtual_endstop
  49. #position_endstop: 0
  50. position_max: 310
  51. Position_min:0 # -5 #(USED FOR INITIAL SETUPONLY FOR PROBE OFFSET)
  52.  
  53. [stepper_z1]
  54. step_pin: rpi:gpio27
  55. dir_pin: rpi:gpio22
  56. enable_pin: !rpi:gpio17
  57. microsteps: 16
  58. rotation_distance: 8
  59.  
  60. [safe_z_home]
  61. home_xy_position: 178,123 #Bedsize: 300 x 255 x 310 (need to also include bltouch offset)
  62. speed: 50
  63. z_hop: 10 #move up 10mm
  64. z_hop_speed: 5
  65.  
  66. [extruder]
  67. step_pin: PA4
  68. dir_pin: !PA6
  69. enable_pin: !PA2
  70. microsteps: 16
  71. rotation_distance: 7.680 #7.797676
  72. nozzle_diameter: 0.400
  73. filament_diameter: 1.750
  74. heater_pin: PB4
  75. sensor_type: EPCOS 100K B57560G104F
  76. sensor_pin: PK5
  77. control = pid
  78. pid_kp = 25.741
  79. pid_ki = 1.532
  80. pid_kd = 108.113
  81. min_temp: 0
  82. max_temp: 265
  83. pressure_advance =.04
  84. max_extrude_only_distance: 105.0
  85.  
  86. [heater_bed]
  87. heater_pin: PH5
  88. sensor_type: EPCOS 100K B57560G104F
  89. sensor_pin: PK6
  90. control: pid
  91. pid_Kp: 72.698
  92. pid_Ki: 2.244
  93. pid_Kd: 588.853
  94. min_temp: 0
  95. max_temp: 110
  96.  
  97. #[filament_switch_sensor my_sensor]
  98. #switch_pin: PE4
  99. #pause_on_runout: True
  100.  
  101. [fan]
  102. pin: PH6
  103.  
  104. [mcu]
  105. serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AB0K5FSK-if00-port0
  106.  
  107. [printer]
  108. kinematics: cartesian
  109. #Bedsize: 300 x 255 x 310
  110. max_velocity: 300
  111. max_accel: 3000
  112. max_z_velocity: 5
  113. max_z_accel: 100
  114.  
  115. [display]
  116. lcd_type: st7920
  117. cs_pin: PH1
  118. sclk_pin: PA1
  119. sid_pin: PH0
  120. encoder_pins: ^PC4, ^PC6
  121. click_pin: ^!PC2
  122.  
  123. [z_tilt]
  124. z_positions:
  125. -35, 127.5
  126. 335, 127.5
  127. points:
  128. 65, 124
  129. 240, 124
  130. speed: 100
  131. horizontal_move_z: 10
  132. retries: 5
  133. retry_tolerance: 0.02
  134.  
  135. #[bed_screws]
  136. #screw1: 38,35
  137. #screw2: 242,35
  138. #screw3: 242,214
  139. #screw4: 38,214
  140.  
  141. [screws_tilt_adjust]
  142. screw1: 69,43
  143. screw1_name: front left screw
  144. screw2: 276,43
  145. screw2_name: front right screw
  146. screw3: 276,217
  147. screw3_name: rear right screw
  148. screw4: 69,217
  149. screw4_name: rear left screw
  150. horizontal_move_z: 10.
  151. speed: 50.
  152. screw_thread: CW-M4
  153.  
  154. [bltouch]
  155. sensor_pin: ^rpi:gpio24
  156. control_pin: rpi:gpio5
  157. x_offset: -35
  158. y_offset: -1
  159. z_offset: 1.572 # 1.486 #1.475 #1.426 #1.294 #1.374 #1.174
  160. speed: 3.0 # Slower, steady probing speed (mm/s)
  161. lift_speed: 7.0 # Faster lift speed between probes
  162. samples: 3 # Probes 3 times per point
  163. samples_result: median # Uses the median of the 3 readings to throw out outliers
  164. samples_tolerance: 0.01 # Re-probes if samples vary by more than 0.01mm
  165. samples_tolerance_retries: 3 # Allows up to 3 retries if a sample is out of tolerance
  166. #pin_up_touch_mode_reports_triggered: False
  167. #stow_on_each_sample: False
  168. #probe_with_touch_mode: True # <--- Forces BLTouch to keep pin state active during probe
  169. #pin_up_touch_mode_reports_triggered: False
  170. #https://www.klipper3d.org/BLTouch.html
  171.  
  172. [bed_mesh]
  173. speed: 120
  174. horizontal_move_z: 5
  175. mesh_min: 32,35
  176. mesh_max: 240,212
  177. probe_count: 3,3
  178. mesh_pps: 2,3
  179. algorithm: bicubic
  180. bicubic_tension: 0.2
  181. fade_start: 1
  182. fade_end: 10
  183. fade_target: 0
  184.  
  185. [bed_mesh default]
  186. version = 1
  187. points =
  188. 0.105594, 0.002437, -0.160015
  189. 0.072291, 0.003249, -0.123463
  190. -0.064981, -0.057670, -0.168950
  191. x_count = 3
  192. y_count = 3
  193. mesh_x_pps = 2
  194. mesh_y_pps = 3
  195. algo = bicubic
  196. tension = 0.2
  197. min_x = 32.0
  198. max_x = 240.0
  199. min_y = 35.0
  200. max_y = 212.0
  201.  
  202.  
  203. [skew_correction]
  204. #SET_SKEW XY=141.51, 141.57, 100.1 XZ=143.40, 142.92, 100 YZ=143.34, 142.94, 100
  205. [skew_correction my_skew_profile]
  206. xy_skew = -0.000423908476775625
  207. xz_skew = 0.0033538790509834502
  208. yz_skew = 0.0027952689512573984
  209.  
  210. # Arduino aliases for atmega2560/1280 (Arduino mega) boards
  211. [board_pins arduino-mega]
  212. aliases:
  213. ar0=PE0, ar1=PE1, ar2=PE4, ar3=PE5, ar4=PG5,
  214. ar5=PE3, ar6=PH3, ar7=PH4, ar8=PH5, ar9=PH6,
  215. ar10=PB4, ar11=PB5, ar12=PB6, ar13=PB7, ar14=PJ1,
  216. ar15=PJ0, ar16=PH1, ar17=PH0, ar18=PD3, ar19=PD2,
  217. ar20=PD1, ar21=PD0, ar22=PA0, ar23=PA1, ar24=PA2,
  218. ar25=PA3, ar26=PA4, ar27=PA5, ar28=PA6, ar29=PA7,
  219. ar30=PC7, ar31=PC6, ar32=PC5, ar33=PC4, ar34=PC3,
  220. ar35=PC2, ar36=PC1, ar37=PC0, ar38=PD7, ar39=PG2,
  221. ar40=PG1, ar41=PG0, ar42=PL7, ar43=PL6, ar44=PL5,
  222. ar45=PL4, ar46=PL3, ar47=PL2, ar48=PL1, ar49=PL0,
  223. ar50=PB3, ar51=PB2, ar52=PB1, ar53=PB0, ar54=PF0,
  224. ar55=PF1, ar56=PF2, ar57=PF3, ar58=PF4, ar59=PF5,
  225. ar60=PF6, ar61=PF7, ar62=PK0, ar63=PK1, ar64=PK2,
  226. ar65=PK3, ar66=PK4, ar67=PK5, ar68=PK6, ar69=PK7,
  227. analog0=PF0, analog1=PF1, analog2=PF2, analog3=PF3, analog4=PF4,
  228. analog5=PF5, analog6=PF6, analog7=PF7, analog8=PK0, analog9=PK1,
  229. analog10=PK2, analog11=PK3, analog12=PK4, analog13=PK5, analog14=PK6,
  230. analog15=PK7,
  231. # Marlin adds these additional aliases
  232. ml70=PG4, ml71=PG3, ml72=PJ2, ml73=PJ3, ml74=PJ7,
  233. ml75=PJ4, ml76=PJ5, ml77=PJ6, ml78=PE2, ml79=PE6,
  234. ml80=PE7, ml81=PD4, ml82=PD5, ml83=PD6, ml84=PH2,
  235. ml85=PH7
  236.  
  237. #*# <------------------MACROS---------------------->
  238.  
  239. [gcode_macro START_PRINT]
  240. gcode:
  241. {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  242. {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
  243. # Heat bed for probing
  244. M190 S{BED_TEMP}
  245. # Use absolute coordinates
  246. G90
  247. # Home the printer
  248. G28
  249. #Reset BLtouchstate
  250. BLTOUCH_DEBUG COMMAND=reset
  251. # If you are using Z-Tilt:
  252. Z_TILT_ADJUST
  253. # If you are generating a new bed mesh:
  254. BED_MESH_CALIBRATE
  255. # If you are loading an existing mesh:
  256. #BED_MESH_PROFILE LOAD=default
  257. # Move the nozzle near the bed
  258. G1 Z5 F3000
  259. # Set and wait for nozzle to reach printing temperature
  260. M109 S{EXTRUDER_TEMP}
  261. #PRIME_LINE
  262. SKEW_PROFILE LOAD=my_skew_profile
  263. # Start printing!
  264.  
  265. [gcode_macro PRIME_LINE]
  266. gcode:
  267.  
  268. G92 E0 ; Reset Extruder
  269. G1 Z2.0 F3000 ; Move Z Axis up
  270. G1 X10.1 Y20 Z0.2 F5000.0 ; Move to start position
  271. G1 X10.1 Y150.0 Z0.28 F1500.0 E15 ; Draw the first line
  272. G1 X10.4 Y150.0 Z0.28 F5000.0 ; Move to side a little
  273. G1 X10.4 Y20 Z0.28 F1500.0 E30 ; Draw the second line
  274. #G1 E-.2 F300 ; retract a little bit
  275. #G1 E.2 F300; reprime
  276. G92 E0 ; Reset Extruder
  277. G1 Z2.0 F3000 ; Move Z Axis up
  278.  
  279.  
  280.  
  281. [gcode_macro END_PRINT]
  282. gcode:
  283.  
  284. # Move nozzle away from print while retracting
  285. SET_SKEW CLEAR=1
  286. G91
  287. G1 X-2 Y-2 E-6 F300
  288. # Raise nozzle by 10mm
  289. G1 Z10 F3000
  290. G90
  291. G1 X{printer.toolhead.axis_minimum.x + 5} Y{printer.toolhead.axis_maximum.y - 5} ; Present print
  292. # Turn off bed, extruder, and fan
  293. M140 S0
  294. M104 S0
  295. M106 S0
  296. # Disable steppers
  297. M84
  298.  
  299. [gcode_macro LOAD_FILAMENT]
  300. gcode:
  301. {% set speed = params.SPEED|default(300) %}
  302. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
  303. SAVE_GCODE_STATE NAME=load_state
  304. M83
  305. G91
  306. G92 E0
  307. G1 E50 F{max_velocity} # fast-load
  308. G1 E25 F{speed} # purge
  309. G92 E0
  310. M82
  311. RESTORE_GCODE_STATE NAME=load_state
  312.  
  313. [gcode_macro UNLOAD_FILAMENT]
  314. gcode:
  315. {% set speed = params.SPEED|default(300) %}
  316. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
  317. SAVE_GCODE_STATE NAME=unload_state
  318. G91
  319. G92 E0
  320. G1 E50 F{speed} # purge
  321. G1 E-100 F{max_velocity} # fast-unload
  322.  
  323. RESTORE_GCODE_STATE NAME=unload_state
  324.  
  325. [mcu rpi]
  326. serial: /tmp/klipper_host_mcu
  327.  
  328. [adxl345]
  329. cs_pin: rpi:None
  330.  
  331. [resonance_tester]
  332. accel_chip: adxl345
  333. probe_points:
  334. 100, 100, 20 # an example
  335.  
  336. [input_shaper]
  337. shaper_freq_x: 59.2
  338. shaper_type_x: mzv
  339. shaper_freq_y: 35.4
  340. shaper_type_y: mzv
  341.  
  342. [printer]
  343. max_accel: 3700 # should not exceed the estimated max_accel for X and Y axes
  344.  
  345.  
  346.  
Advertisement
Add Comment
Please, Sign In to add comment