From 5abb5a5978420fac0731c0ac71ba623e6c7e1759 Mon Sep 17 00:00:00 2001 From: Olivier Schwander Date: Wed, 17 Apr 2024 17:30:00 +0200 Subject: [PATCH] first commit --- macros.cfg | 33 +++++++++ moonraker.conf | 43 +++++++++++ printer.cfg | 191 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 267 insertions(+) create mode 100644 macros.cfg create mode 100644 moonraker.conf create mode 100644 printer.cfg diff --git a/macros.cfg b/macros.cfg new file mode 100644 index 0000000..fad7106 --- /dev/null +++ b/macros.cfg @@ -0,0 +1,33 @@ +# From https://github.com/Klipper3d/klipper/blob/master/config/sample-macros.cfg +###################################################################### +# Filament Change +###################################################################### + +# M600: Filament Change. This macro will pause the printer, move the +# tool to the change position, and retract the filament 50mm. Adjust +# the retraction settings for your own extruder. After filament has +# been changed, the print can be resumed from its previous position +# with the "RESUME" gcode. + +[pause_resume] + +[gcode_macro M600] +gcode: + {% set X = params.X|default(50)|float %} + {% set Y = params.Y|default(0)|float %} + {% set Z = params.Z|default(10)|float %} + SAVE_GCODE_STATE NAME=M600_state + PAUSE + G91 + G1 E-.8 F2700 + G1 Z{Z} + G90 + G1 X{X} Y{Y} F3000 + G91 + G1 E-50 F1000 + RESTORE_GCODE_STATE NAME=M600_state + +[gcode_macro CALIBRATE] +gcode: + G28 + DELTA_CALIBRATE METHOD=manual diff --git a/moonraker.conf b/moonraker.conf new file mode 100644 index 0000000..658ff0f --- /dev/null +++ b/moonraker.conf @@ -0,0 +1,43 @@ +[server] +host: 0.0.0.0 +port: 7125 +klippy_uds_address: /home/klipper/printer_data/comms/klippy.sock + +[authorization] +trusted_clients: + 10.101.0.0/16 + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 +cors_domains: + *.lan + *.local + *://localhost + *://localhost:* + *://my.mainsail.xyz + *://app.fluidd.xyz + +[octoprint_compat] + +[history] + +[update_manager] +channel: dev +refresh_interval: 168 + +[update_manager mainsail-config] +type: git_repo +primary_branch: master +path: ~/mainsail-config +origin: https://github.com/mainsail-crew/mainsail-config.git +managed_services: klipper + +[update_manager mainsail] +type: web +channel: stable +repo: mainsail-crew/mainsail +path: ~/mainsail diff --git a/printer.cfg b/printer.cfg new file mode 100644 index 0000000..14b4d57 --- /dev/null +++ b/printer.cfg @@ -0,0 +1,191 @@ +# This file contains common configurations and pin mappings +# for the Flsun Q5 using the MKS Robin Nano board. + +# To use this config, the firmware should be compiled for the +# STM32F103. When running "make menuconfig", enable "extra low-level +# configuration setup", select the 28KiB bootloader, and serial (on +# USART3 PB11/PB10) communication. + +# Note that the "make flash" command does not work with MKS Robin +# boards. After running "make", run the following command: +# ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin +# Copy the file out/Robin_nano.bin to an SD card and then restart the +# printer with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +[mcu] +serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 +restart_method: command + +[printer] +kinematics: delta +max_velocity: 250 +max_accel: 3000 +max_z_velocity: 100 +#delta_radius: 107.5 +print_radius: 100 +minimum_z_position: -5 + +[stepper_a] +step_pin: PE3 +dir_pin: PE2 +enable_pin: !PE4 +microsteps: 16 +rotation_distance: 40 +endstop_pin: PA15 +homing_speed: 20 +homing_retract_dist: 5 +homing_retract_speed: 10 +second_homing_speed: 2 +#position_endstop: 220 +#arm_length: 215 +#angle: 210 + +[stepper_b] +step_pin: PE0 +dir_pin: PB9 +enable_pin: !PE1 +microsteps: 16 +rotation_distance: 40 +endstop_pin: PA12 +#angle: 330 + +[stepper_c] +step_pin: PB5 +dir_pin: PB4 +enable_pin: !PB8 +microsteps: 16 +rotation_distance: 40 +endstop_pin: PC4 +#angle: 90 + +[probe] +pin: !PA11 +x_offset: 0 +y_offset: 0 +z_offset: 20.26 +speed: 5.0 +samples: 5 +samples_result: average +sample_retract_dist: 3 +samples_tolerance: 0.02 +samples_tolerance_retries: 5 + +[delta_calibrate] +radius: 95 +horizontal_move_z: 25 +Speed: 10 + +[extruder] +step_pin: PD6 +dir_pin: !PD3 +enable_pin: !PB3 +microsteps: 16 +rotation_distance: 24.61 # For Microswiss Bowden Dual Gear Extruder +nozzle_diameter: 0.400 +filament_diameter: 1.750 +heater_pin: PC3 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC1 +control: pid +pid_kp: 14.529 +pid_ki: 0.557 +pid_kd: 94.802 +min_temp: 0 +max_temp: 250 +max_extrude_only_distance: 110.0 + +[heater_bed] +heater_pin: PA0 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC0 +control: pid +pid_Kp: 325.10 +pid_Ki: 63.35 +pid_Kd: 417.10 +min_temp: 0 +max_temp: 130 + +[fan] +pin: PB1 + +# Useful for the initial cleaning arc made by Cura +[gcode_arcs] + +[include macros.cfg] + +[include mainsail.cfg] + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [printer] +#*# delta_radius = 105.884940 +#*# +#*# [stepper_a] +#*# angle = 209.565161 +#*# arm_length = 212.926201 +#*# position_endstop = 218.701905 +#*# +#*# [stepper_b] +#*# angle = 329.444186 +#*# arm_length = 214.827629 +#*# position_endstop = 217.691922 +#*# +#*# [stepper_c] +#*# angle = 90.000000 +#*# arm_length = 213.745767 +#*# position_endstop = 217.028558 +#*# +#*# [delta_calibrate] +#*# height0 = 0.0 +#*# height0_pos = 17493.000,17416.000,17358.000 +#*# height1 = 0.0 +#*# height1_pos = 22003.000,21912.000,15165.000 +#*# height2 = 0.0 +#*# height2_pos = 17094.000,24531.000,16974.000 +#*# height3 = 0.0 +#*# height3_pos = 15369.000,21070.000,21080.000 +#*# height4 = 0.0 +#*# height4_pos = 16948.000,16846.000,22100.000 +#*# height5 = 0.0 +#*# height5_pos = 20551.000,15403.000,20381.000 +#*# height6 = 0.0 +#*# height6_pos = 23420.000,16973.000,16887.000 +#*# distance0 = 65.0 +#*# distance0_pos1 = 17252.289,17580.627,17467.386 +#*# distance0_pos2 = 15446.560,20356.501,20264.867 +#*# distance1 = 65.2 +#*# distance1_pos1 = 17352.823,17374.992,17571.291 +#*# distance1_pos2 = 16890.714,16913.753,22430.807 +#*# distance2 = 65.3 +#*# distance2_pos1 = 17558.457,17274.394,17467.386 +#*# distance2_pos2 = 20333.186,15468.659,20264.867 +#*# distance3 = 65.19999999999999 +#*# distance3_pos1 = 17663.620,17377.353,17261.730 +#*# distance3_pos2 = 22523.023,16949.170,16816.977 +#*# distance4 = 65.1 +#*# distance4_pos1 = 17560.978,17583.021,17159.950 +#*# distance4_pos2 = 20381.166,20402.069,15354.157 +#*# distance5 = 65.3 +#*# distance5_pos1 = 17355.309,17685.727,17261.730 +#*# distance5_pos2 = 16928.007,22545.141,16816.977 +#*# distance6 = 64.3 +#*# distance6_pos1 = 15551.911,19757.770,20033.690 +#*# distance6_pos2 = 17029.073,16756.223,22183.393 +#*# distance7 = 64.9 +#*# distance7_pos1 = 17008.383,16735.863,21705.892 +#*# distance7_pos2 = 20384.561,15505.122,19936.320 +#*# distance8 = 65.3 +#*# distance8_pos1 = 20105.504,15576.175,19663.641 +#*# distance8_pos2 = 22277.463,17087.858,16658.132 +#*# distance9 = 65.0 +#*# distance9_pos1 = 21799.891,17064.744,16636.619 +#*# distance9_pos2 = 20051.987,20450.598,15389.571 +#*# distance10 = 64.7 +#*# distance10_pos1 = 19777.325,20167.562,15460.624 +#*# distance10_pos2 = 16767.778,22295.977,16955.509 +#*# distance11 = 65.3 +#*# distance11_pos1 = 16745.044,21818.566,16933.579 +#*# distance11_pos2 = 15480.867,20028.565,20314.788