Advertisement
MDFPereira

RatOS on BTT M8P + CB1

Oct 4th, 2022
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.31 KB | Software | 0 0
  1. # Rat Rig V-core 3 Klipper Config
  2. # Documentation: https://os.ratrig.com
  3.  
  4. # The first thing you'll need to do is go through this file and comment out / uncomment
  5. # the files and/or settings you need.
  6. # You'll be able to print just fine with this config as it is, but it is recommended
  7. # that you follow these steps to properly calibrate your printer:
  8. # 0) Sanity check and PID Tuning: https://www.klipper3d.org/Config_checks.html
  9. # 1) Pressure Advance: https://www.klipper3d.org/Pressure_Advance.html
  10. # 2) Skew Correction: https://www.klipper3d.org/Skew_Correction.html
  11. # 3) Resonance Compensation: https://www.klipper3d.org/Resonance_Compensation.html
  12.  
  13. # Read more about klipper here: https://www.klipper3d.org/Overview.html
  14.  
  15. #############################################################################################################
  16. ### BASE SETUP
  17. #############################################################################################################
  18. [include config/printers/v-core-3/v-core-3.cfg]
  19.  
  20. #############################################################################################################
  21. ### STEPPER MOTORS, DRIVERS & SPEED LIMITS
  22. ### Pick the drivers and stepper motors you're using. See the RatOS documentation for custom combinations.
  23. #############################################################################################################
  24. [include config/printers/v-core-3/steppers.cfg]
  25.  
  26. # UNCOOLED TMC 2209 + LDO-42STH48-2504AC
  27. #[include config/printers/v-core-3/speed-limits-basic.cfg]
  28. #[include config/printers/v-core-3/tmc2209.cfg]
  29. #[include config/steppers/ldo/42sth48-2504ac/2209/24v-1.1a-*.cfg]
  30.  
  31. # COOLED TMC 2209 + LDO-42STH48-2504AC
  32. # This increases motor torque, positional accuracy and speed limits.
  33. # don't enable this before your printer is fully configured and you have a fan blowing on your stepper drivers.
  34. [include config/printers/v-core-3/speed-limits-performance.cfg]
  35. [include config/printers/v-core-3/tmc2209-performance.cfg]
  36. [include config/steppers/ldo/42sth48-2504ac/2209/24v-1.6a-*.cfg]
  37.  
  38. # STEALTH MODE (Enables stealthchop and limits velocity and acceleration)
  39. # NOTE: You still need to include one of the above stepper motor definitions.
  40. # NOTE: This will make your printer quiter but less accurate, it's an inherent side effect of stealthchop.
  41. #[include config/printers/v-core-3/speed-limits-stealth.cfg]
  42. #[include config/printers/v-core-3/tmc2209-stealth.cfg]
  43.  
  44. #############################################################################################################
  45. ### HOMING
  46. ### Pick your probe and endstops
  47. #############################################################################################################
  48. # BLTouch configuration
  49. #[bltouch]
  50. #sensor_pin: PB2
  51. #control_pin: PB1
  52. #z_offset: 0.0 # Adjust this to fit your setup
  53.  
  54. # Probe configuration
  55. [probe]
  56. pin: ^PB2 # For NPN NC probes such as the Super Pinda / Vinda / SupCR / Decoprobe probes.
  57. #pin: ^!PB2 # NPN NO (refer to the specs on your probe)
  58. #pin: PB2 # PNP NO (refer to the specs on your probe)
  59. #pin: !PB2 # PNP NC (refer to the specs on your probe)
  60. z_offset: 0.0 # Adjust this to fit your setup
  61.  
  62. # Physical endstops
  63. [include config/printers/v-core-3/physical-endstops.cfg]
  64. # Sensorless homing (Beware: this requires manual tinkering and does not work if your x/y stepper drivers
  65. # have clipped DIAG pins). It is strongly encouraged to use physical endstops if you're a beginner.
  66. # If you still wish to proceed, copy config/templates/sensorless-homing-tmc2209.cfg to the root directory and
  67. # remove the # from the line below.
  68. #[include sensorless-homing-tmc2209.cfg]
  69.  
  70.  
  71. #############################################################################################################
  72. ### PHYSICAL DIMENSIONS
  73. ### Pick your printer size
  74. #############################################################################################################
  75. # Remove the # from your printer size below.
  76. # Similarly add a # in front of [include config/printers/v-core-3/300.cfg] if you have a bigger machine.
  77. #[include config/printers/v-core-3/200.cfg]
  78. [include config/printers/v-core-3/300.cfg]
  79. #[include config/printers/v-core-3/400.cfg]
  80. #[include config/printers/v-core-3/500.cfg]
  81.  
  82. #############################################################################################################
  83. ### TOOLHEAD
  84. ### Pick your extruder and hotend
  85. #############################################################################################################
  86. # Extruder
  87. #[include config/extruders/bmg.cfg]
  88. [include config/extruders/lgx.cfg]
  89. #[include config/extruders/lgx-lite.cfg]
  90. #[include config/extruders/orbiter.cfg]
  91. #[include config/extruders/orbiter-1004.cfg] # Use this with the LDO-36STH20-1004AHG motor
  92. #[include config/extruders/hemera.cfg]
  93. #[include config/extruders/titan.cfg]
  94.  
  95. # Hotend
  96. #[include config/hotends/v6.cfg]
  97. #[include config/hotends/revo.cfg]
  98. #[include config/hotends/dragonfly.cfg]
  99. [include config/hotends/rapido.cfg]
  100. #[include config/hotends/copperhead.cfg]
  101. #[include config/hotends/mosquito.cfg]
  102. #[include config/hotends/mosquito-magnum.cfg]
  103. #[include config/hotends/dragon-standard-flow.cfg]
  104. #[include config/hotends/dragon-high-flow.cfg]
  105.  
  106.  
  107. #############################################################################################################
  108. ### MACROS
  109. #############################################################################################################
  110. [include config/macros.cfg]
  111. [include config/shell-macros.cfg]
  112. [include config/printers/v-core-3/macros.cfg]
  113.  
  114. #############################################################################################################
  115. ### MACRO CONFIGURATION
  116. ### Configure the behavior of RatOS macros
  117. #############################################################################################################
  118. [gcode_macro RatOS]
  119. # Use absolute extrusion mode
  120. # Set to True to use relative extrusion mode
  121. variable_relative_extrusion: False
  122. # Wait for extruder to reach 150 so an inductive probe (if present) is at a predictable temp.
  123. # Also allows the bed heat to spread a little, and softens any plastic that might be stuck to the nozzle.
  124. # Set to False to disable
  125. variable_preheat_extruder: True
  126. # Calibrate the bed mesh in the START_PRINT macro.
  127. # Set to false to skip BED_MESH_CALIBRATE, it will still load the BED_MESH
  128. # with the name "ratos", be sure to save your bed_mesh profile with that name.
  129. # or override the _START_PRINT_BED_MESH macro to implement your own mesh handling logic.
  130. variable_calibrate_bed_mesh: True
  131. # Print a prime line or blob at the end of the START_PRINT macro
  132. # set to "primeline" or "primeblob", or False to disable nozzle_priming.
  133. variable_nozzle_priming: "primeline"
  134. # Park in the back when waiting for the extruder to heat up
  135. # set to "front" to park in the front, or "center" to park in the center.
  136. variable_start_print_park_in: "back"
  137. # Height to park it when waiting for extruder to heat.
  138. variable_start_print_park_z_height: 50
  139. # Skew profile to load before starting the print
  140. # uncomment this to use your calibrated skew correction profile.
  141. #variable_skew_profile: "my_skew_profile"
  142. # Park in the back after the print has ended or was cancelled.
  143. # set to "front" to park in the front, or "center" to park in the center.
  144. variable_end_print_park_in: "back"
  145. # Park in the back when the print is paused.
  146. # set to "front" to park in the front, or "center" to park in the center.
  147. variable_pause_print_park_in: "back"
  148. # Set the speed for travel moves in RatOS Macros in mm/s.
  149. variable_macro_travel_speed: 300
  150.  
  151.  
  152. #############################################################################################################
  153. ### PRINTER CONFIGURATION
  154. ### Customize the defaults to your specific build
  155. #############################################################################################################
  156. [stepper_x]
  157. step_pin: PE2
  158. dir_pin: PB4
  159. enable_pin: !PC11
  160. endstop_pin: ^PF3
  161. rotation_distance: 40 # 40 for 20 tooth 2GT pulleys, 32 for 16 tooth 2GT pulleys
  162. position_endstop: 0 # Adjust this to your setup
  163.  
  164. [stepper_y]
  165. step_pin: PF12
  166. dir_pin: PF11
  167. enable_pin: !PB3
  168. endstop_pin: ^PF4
  169. rotation_distance: 40 # 40 for 20 tooth 2GT pulleys, 32 for 16 tooth 2GT pulleys
  170. #position_endstop: 200 # 200mm printer
  171. position_endstop: 300 # 300mm printer
  172. #position_endstop: 400 # 400mm printer
  173. #position_endstop: 500 # 500mm printer
  174.  
  175. [stepper_z]
  176. step_pin: PA10
  177. dir_pin: PD15
  178. enable_pin: !PA15
  179. rotation_distance: 4 # 4 for TR8*4 lead screws
  180.  
  181. [stepper_z1]
  182. step_pin: PD12
  183. dir_pin: PD11
  184. enable_pin: !PD14
  185. rotation_distance: 4 # 4 for TR8*4 lead screws
  186.  
  187. [stepper_z2]
  188. step_pin: PD10
  189. dir_pin: PD8
  190. enable_pin: !PD9
  191. rotation_distance: 4 # 4 for TR8*4 lead screws
  192.  
  193. # Safe Z Home (Physical endstops only)
  194. [safe_z_home]
  195. #home_xy_position: 100,100 # 300mm printer
  196. home_xy_position: 150,150 # 300mm printer
  197. #home_xy_position: 200,200 # 400mm printer
  198. #home_xy_position: 250,250 # 500mm printer
  199.  
  200. [extruder]
  201. # Check https://www.klipper3d.org/Pressure_Advance.html for pressure advance tuning.
  202. #pressure_advance: 0.05
  203. nozzle_diameter: 0.4 # Remember to change this if you change nozzle diameter.
  204. step_pin: PD7
  205. dir_pin: !PD6
  206. enable_pin: !PF10
  207. heater_pin: PE3 # HE0
  208. sensor_pin: PA1 # T0
  209. control: pid
  210. pid_kp: 28.413
  211. pid_ki: 1.334
  212. pid_kd: 151.300
  213. min_temp: -100
  214.  
  215. #############################################################################################################
  216. ### USER OVERRIDES
  217. ### Anything custom you want to add, or RatOS configuration you want to override, do it here.
  218. #############################################################################################################
  219.  
  220. [heater_bed]
  221. heater_pin: PB7
  222. sensor_pin: PA0 # TB
  223. sensor_type: ATC Semitec 104GT-2
  224. control: watermark
  225. min_temp: -100
  226. max_temp: 130
  227.  
  228. [fan] ## for single or dual 5015
  229. pin: PE6
  230.  
  231. #[fan] ## for 4028
  232. #pin = PE6
  233. #cycle_time: 0.00004
  234. #max_power: 0.8
  235. #shutdown_speed: 0
  236. #kick_start_time: 1.0
  237.  
  238. [heater_fan toolhead_cooling_fan]
  239. pin: PE0
  240. fan_speed: 1
  241.  
  242. [controller_fan controller_fan]
  243. pin: PC12
  244.  
  245. [mcu]
  246. serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_0600270011504B4633373520-if00 ## find yours with ls /dev/serial/by-id/
  247.  
  248. ########################################
  249. # TMC2209 configuration
  250. ########################################
  251.  
  252. [tmc2209 stepper_x]
  253. uart_pin: PC10
  254. ##diag_pin: PF3 ## uncomment for sensorless homing
  255.  
  256. [tmc2209 stepper_y]
  257. uart_pin: PF13
  258. ##diag_pin: PF4 ## uncomment for sensorless homing
  259.  
  260. [tmc2209 extruder]
  261. uart_pin: PF9
  262.  
  263. [tmc2209 stepper_z]
  264. uart_pin: PF8
  265.  
  266. [tmc2209 stepper_z1]
  267. uart_pin: PD13
  268.  
  269. [tmc2209 stepper_z2]
  270. uart_pin: PC7
  271.  
  272. ########################################
  273. # TMC2130 configuration
  274. ########################################
  275.  
  276. #[tmc2130 stepper_x]
  277. #cs_pin: PC10
  278. #spi_bus: spi1
  279. ##diag1_pin: PF3
  280.  
  281. #[tmc2130 stepper_y]
  282. #cs_pin: PF13
  283. #spi_bus: spi1
  284. ##diag1_pin: PF4
  285.  
  286. #[tmc2130 extruder]
  287. #cs_pin: PF9
  288. #spi_bus: spi1
  289.  
  290. #[tmc2130 stepper_z]
  291. #cs_pin: PF8
  292. #spi_bus: spi1
  293.  
  294. #[tmc2130 stepper_z1]
  295. #cs_pin: PD13
  296. #spi_bus: spi1
  297.  
  298. #[tmc2130 stepper_z2]
  299. #cs_pin: PC7
  300. #spi_bus: spi1
  301.  
  302. ########################################
  303. # TMC5160 HV configuration for X and Y (uncomment others)
  304. ########################################
  305.  
  306. #[tmc5160 stepper_x]
  307. #cs_pin: PC10
  308. #spi_bus: spi1
  309. ##diag1_pin: PF3
  310. #stealthchop_threshold: 0
  311. #interpolate: False
  312. #run_current: 1.768
  313. #driver_TBL: 0
  314. #driver_TOFF: 4
  315. #driver_HEND: 0
  316. #driver_HSTRT: 4
  317.  
  318. #[tmc5160 stepper_y]
  319. #cs_pin: PF13
  320. #spi_bus: spi1
  321. ##diag1_pin: PF4
  322. #stealthchop_threshold: 0
  323. #interpolate: False
  324. #run_current: 1.768
  325. #driver_TBL: 0
  326. #driver_TOFF: 4
  327. #driver_HEND: 0
  328. #driver_HSTRT: 4
  329.  
  330. ########################################
  331. # Other Macros
  332. ########################################
  333.  
  334. [gcode_macro PID_HOTEND]
  335. description: PID calibration of the hotend with set temp.
  336. gcode:
  337. M106
  338. {% set TARGET_TEMP = params.TARGET_TEMP|default(250)|float %}
  339. PID_CALIBRATE HEATER=extruder TARGET={TARGET_TEMP}
  340. SAVE_CONFIG
  341.  
  342. [gcode_macro PID_BED]
  343. description: PID calibration of the hotend with set temp.
  344. gcode:
  345. {% set TARGET_TEMP = params.TARGET_TEMP|default(100)|float %}
  346. PID_CALIBRATE HEATER=heater_bed TARGET={TARGET_TEMP}
  347. SAVE_CONFIG
  348.  
  349. [gcode_macro PA_CALIBRATION]
  350. gcode:
  351. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
  352. TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
Tags: RatOS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement