diff --git a/.moonraker.conf.bkp b/.moonraker.conf.bkp new file mode 100644 index 0000000..ca1c45f --- /dev/null +++ b/.moonraker.conf.bkp @@ -0,0 +1,58 @@ +[server] +host = 0.0.0.0 +port = 7125 +max_upload_size = 1024 + +[file_manager] +enable_object_processing = True + +[data_store] +temperature_store_size = 600 +gcode_store_size = 1000 + +[authorization] +force_logins = True +cors_domains = + *.local + *.lan + *://app.fluidd.xyz +trusted_clients = + 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 + +[octoprint_compat] + +[history] + +[announcements] +subscriptions = + fluidd + +[update_manager] +enable_auto_refresh = True + +[update_manager client fluidd] +type = web +repo = fluidd-core/fluidd +path = ~/fluidd + +[update_manager client z_calibration] +type = git_repo +path = ~/klipper_z_calibration +origin = https://github.com/protoloft/klipper_z_calibration.git +install_script = install.sh +managed_services = klipper + +[update_manager Klipper-Adaptive-Meshing-Purging] +type = git_repo +channel = dev +path = ~/Klipper-Adaptive-Meshing-Purging +origin = https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git +managed_services = klipper +primary_branch = main + diff --git a/KAMP b/KAMP new file mode 120000 index 0000000..d58a04d --- /dev/null +++ b/KAMP @@ -0,0 +1 @@ +/home/pi/Klipper-Adaptive-Meshing-Purging/Configuration \ No newline at end of file diff --git a/KAMP_Settings.cfg b/KAMP_Settings.cfg new file mode 100644 index 0000000..e6a356e --- /dev/null +++ b/KAMP_Settings.cfg @@ -0,0 +1,36 @@ +# Below you can include specific configuration files depending on what you want KAMP to do: + +[include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration. +[include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration. +#[include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration. +[include ./KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating. + +[gcode_macro _KAMP_Settings] +description: This macro contains all adjustable settings for KAMP + +# The following variables are settings for KAMP as a whole. +variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging. + +# The following variables are for adjusting adaptive mesh settings for KAMP. +variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable. +variable_fuzz_amount: 2 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable. + +# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro +variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # --------------------------------------------- +variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe' +variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe' + # Legacy Gcode: 'M401' | 'M402' + +# The following variables are for adjusting adaptive purge settings for KAMP. +variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8. +variable_tip_distance: 4 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount. +variable_purge_margin: 25 # Distance the purge will be in front of the print area, default is 10. +variable_purge_amount: 30 # Amount of filament to be purged prior to printing. +variable_flow_rate: 20 # Flow rate of purge in mm3/s. Default is 12. + +# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. +variable_smart_park_height: 5 # Z position for Smart Park, default is 10. + +gcode: # Gcode section left intentionally blank. Do not disturb. + + {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} diff --git a/adxl.cfg b/adxl.cfg new file mode 100644 index 0000000..0060c7f --- /dev/null +++ b/adxl.cfg @@ -0,0 +1,12 @@ +[mcu adxl] +serial: /dev/serial/by-id/usb-Klipper_rp2040_E6609CB2D38B4E2A-if00 + +[adxl345] +cs_pin: adxl:gpio1 +spi_bus: spi0a +#axes_map: x,z,y + +[resonance_tester] +accel_chip: adxl345 +probe_points: + 150,150, 20 # middle of bed as an example \ No newline at end of file diff --git a/autocommit.sh b/autocommit.sh new file mode 100755 index 0000000..7602d7b --- /dev/null +++ b/autocommit.sh @@ -0,0 +1,102 @@ +#!/bin/bash + +####################################################################### +## NOTE: This script originates from here but I tweaked the pull ## +## command, changed default location for backup, and added a comment ## +## for reference later. ## +####################################################################### + +##################################################################### +### Please set the paths accordingly. In case you don't have all ### +### the listed folders, just keep that line commented out. ### +##################################################################### +### Path to your config folder you want to backup +config_folder=~/printer_data/config + +# NOTE: The above should work for just about everyone, but a somewhat +# recent update to moonraker changed paths, etc. You can run the +# provided moonraker script 'data-path-fix.sh' to fix/update +# older installs + +### Path to your Klipper folder, by default that is '~/klipper' +klipper_folder=~/klipper + +### Path to your Moonraker folder, by default that is '~/moonraker' +moonraker_folder=~/moonraker + +### Path to your Mainsail folder, by default that is '~/mainsail' +#mainsail_folder=~/mainsail + +### Path to your Fluidd folder, by default that is '~/fluidd' +fluidd_folder=~/fluidd + +### The branch of the repository that you want to save your config +### By default that is 'main' +branch=main + +### Set this to true if you want ONLY the history table to be dumped +### from data.mdb. +history_only=false + +##################################################################### +##################################################################### + + +##################################################################### +################ !!! DO NOT EDIT BELOW THIS LINE !!! ################ +##################################################################### +grab_version(){ + if [ ! -z "$klipper_folder" ]; then + klipper_commit=$(git -C $klipper_folder describe --always --tags --long | awk '{gsub(/^ +| +$/,"")} {print $0}') + m1="Klipper version: $klipper_commit" + fi + if [ ! -z "$moonraker_folder" ]; then + moonraker_commit=$(git -C $moonraker_folder describe --always --tags --long | awk '{gsub(/^ +| +$/,"")} {print $0}') + m2="Moonraker version: $moonraker_commit" + fi + if [ ! -z "$mainsail_folder" ]; then + mainsail_ver=$(head -n 1 $mainsail_folder/.version) + m3="Mainsail version: $mainsail_ver" + fi + if [ ! -z "$fluidd_folder" ]; then + fluidd_ver=$(head -n 1 $fluidd_folder/.version) + m4="Fluidd version: $fluidd_ver" + fi +} + +# Here we dump stats database to text format for backup, IF the right software is found +# To RESTORE the database, use the following command: +# mdb_load -f ~/printer_data/config/data.mdb.backup -s -T ~/printer_data/database/ + +if command -v /usr/bin/mdb_dump &> /dev/null +then + if $history_only + then + echo "mdb_dump found! Exporting history table from data.mdb to ~/printer_data/config/data.mdb.backup" + mdb_dump -s history -n ~/printer_data/database/data.mdb -f ~/printer_data/config/data.mdb.backup + else + echo "mdb_dump found! Exporting ALL tables data.mdb to ~/printer_data/config/data.mdb.backup" + mdb_dump -a -n ~/printer_data/database/data.mdb -f ~/printer_data/config/data.mdb.backup + fi +else + echo "mdb_dump not found! Consider installing it via 'sudo apt install lmdb-utils' if you want to back up your statistics database!" +fi + +# To fully automate this and not have to deal with auth issues, generate a legacy token on Github +# then update the command below to use the token. Run the command in your base directory and it will +# handle auth. This should just be executed in your shell and not committed to any files or +# Github will revoke the token. =) +# git remote set-url origin https://XXXXXXXXXXX@github.com/EricZimmerman/Voron24Configs.git/ +# Note that that format is for changing things after the repository is in use, vs initially + +push_config(){ + cd $config_folder + git pull origin $branch --no-rebase + git add . + current_date=$(date +"%Y-%m-%d %T") + git commit -m "Autocommit from $current_date" -m "$m1" -m "$m2" -m "$m3" -m "$m4" + git push origin $branch +} + +grab_version +push_config diff --git a/autoz.cfg b/autoz.cfg new file mode 100644 index 0000000..79e6f2f --- /dev/null +++ b/autoz.cfg @@ -0,0 +1,72 @@ +[z_calibration] +nozzle_xy_position: 252,308 +# A X, Y coordinate (e.g. 100,100) of the nozzle, clicking on the Z endstop. +switch_xy_position: 247,290 +# A X, Y coordinate (e.g. 100,100) of the probe's switch body, clicking on +# the Z endstop. +bed_xy_position: 150,150 #default from relative_reference_index of bed_mesh +# a X, Y coordinate (e.g. 100,100) where the print surface (e.g. the center +# point) is probed. These coordinates will be adapted by the +# probe's X and Y offsets. The default is the relative_reference_index +# of the configured bed_mesh, if configured. It's possible to change the relative +# reference index at runtime or use the GCode argument BED_POSITION of CALIBRATE_Z. +switch_offset: 0.49 +# The trigger point offset of the used mag-probe switch. +# Larger values will position the nozzle closer to the bed. +# This needs to be find out manually. More on this later +# in this section.. +#max_deviation: 3.0 +# The maximum allowed deviation of the calculated offset. +# If the offset exceeds this value, it will stop! +# The default is 1.0 mm. +#samples: default from "probe:samples" section +# The number of times to probe each point. The probed z-values +# will be averaged. The default is from the probe's configuration. +#samples_tolerance: default from "probe:samples_tolerance" section +# The maximum Z distance (in mm) that a sample may differ from other +# samples. The default is from the probe's configuration. +#samples_tolerance_retries: default from "probe:samples_tolerance_retries" section +# The number of times to retry if a sample is found that exceeds +# samples_tolerance. The default is from the probe's configuration. +#samples_result: default from "probe:samples_result" section +# The calculation method when sampling more than once - either +# "median" or "average". The default is from the probe's configuration. +#clearance: 2 * z_offset from the "probe:z_offset" section +# The distance in mm to move up before moving to the next +# position. The default is two times the z_offset from the probe's +# configuration. +#position_min: default from "stepper_z:position_min" section. +# Minimum valid distance (in mm) used for probing move. The +# default is from the Z rail configuration. +speed: 50 +# The moving speed in X and Y. The default is 50 mm/s. +#lift_speed: default from "probe:lift_speed" section +# Speed (in mm/s) of the Z axis when lifting the probe between +# samples and clearance moves. The default is from the probe's +# configuration. +#probing_speed: default from "stepper_z:homing_speed" section. +# The fast probing speed (in mm/s) used, when probing_first_fast +# is activated. The default is from the Z rail configuration. +#probing_second_speed: default from "stepper_z:second_homing_speed" section. +# The slower speed (in mm/s) for probing the recorded samples. +# The default is second_homing_speed of the Z rail configuration. +#probing_retract_dist: default from "stepper_z:homing_retract_dist" section. +# Distance to retract (in mm) before probing the next sample. +# The default is homing_retract_dist from the Z rail configuration. +probing_first_fast: false +# If true, the first probing is done faster by the probing speed. +# This is to get faster down and the result is not recorded as a +# probing sample. The default is false. +start_gcode: ATTACH_PROBE +# A list of G-Code commands to execute prior to each calibration command. +# See docs/Command_Templates.md for G-Code format. This can be used to +# attach the probe. +#before_switch_gcode: +# A list of G-Code commands to execute prior to each probing on the +# mag-probe. See docs/Command_Templates.md for G-Code format. This can be +# used to attach the probe after probing on the nozzle and before probing +# on the mag-probe. +end_gcode: DOCK_PROBE +# A list of G-Code commands to execute after each calibration command. +# See docs/Command_Templates.md for G-Code format. This can be used to +# detach the probe afterwards. \ No newline at end of file diff --git a/fluidd.cfg b/fluidd.cfg new file mode 100644 index 0000000..eee2dd9 --- /dev/null +++ b/fluidd.cfg @@ -0,0 +1,70 @@ +[virtual_sdcard] +path: /home/pi/gcode_files + +[pause_resume] + +[display_status] + +[gcode_macro CANCEL_PRINT] +description: Cancel the actual running print +rename_existing: CANCEL_PRINT_BASE +gcode: + TURN_OFF_HEATERS + CANCEL_PRINT_BASE + +[gcode_macro PAUSE] +description: Pause the actual running print +rename_existing: PAUSE_BASE +# change this if you need more or less extrusion +variable_extrude: 1.0 +gcode: + ##### read E from pause macro ##### + {% set E = printer["gcode_macro PAUSE"].extrude|float %} + ##### set park positon for x and y ##### + # default is your max posion from your printer.cfg + {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} + {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} + ##### calculate save lift position ##### + {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set act_z = printer.toolhead.position.z|float %} + {% if act_z < (max_z - 2.0) %} + {% set z_safe = 2.0 %} + {% else %} + {% set z_safe = max_z - act_z %} + {% endif %} + ##### end of definitions ##### + PAUSE_BASE + G91 + {% if printer.extruder.can_extrude|lower == 'true' %} + G1 E-{E} F2100 + {% else %} + {action_respond_info("Extruder not hot enough")} + {% endif %} + {% if "xyz" in printer.toolhead.homed_axes %} + G1 Z{z_safe} F900 + G90 + G1 X{x_park} Y{y_park} F6000 + {% else %} + {action_respond_info("Printer not homed")} + {% endif %} + +[gcode_macro RESUME] +description: Resume the actual running print +rename_existing: RESUME_BASE +gcode: + ##### read E from pause macro ##### + {% set E = printer["gcode_macro PAUSE"].extrude|float %} + #### get VELOCITY parameter if specified #### + {% if 'VELOCITY' in params|upper %} + {% set get_params = ('VELOCITY=' + params.VELOCITY) %} + {%else %} + {% set get_params = "" %} + {% endif %} + ##### end of definitions ##### + {% if printer.extruder.can_extrude|lower == 'true' %} + G91 + G1 E{E} F2100 + {% else %} + {action_respond_info("Extruder not hot enough")} + {% endif %} + RESUME_BASE {get_params} \ No newline at end of file diff --git a/klicky-bed-mesh-calibrate.cfg b/klicky-bed-mesh-calibrate.cfg new file mode 100644 index 0000000..92423e1 --- /dev/null +++ b/klicky-bed-mesh-calibrate.cfg @@ -0,0 +1,32 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions, thanks a lot +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe + +################### +# Bed mesh calibrate +[gcode_macro BED_MESH_CALIBRATE] +rename_existing: _BED_MESH_CALIBRATE +description: Perform Mesh Bed Leveling with klicky automount +gcode: + {% set V = printer["gcode_macro _User_Variables"].verbose %} + {% if V %} + { action_respond_info("Bed Mesh Calibrate") } + {% endif %} + + _CheckProbe action=query + G90 + Attach_Probe + _KLICKY_STATUS_MESHING + + _BED_MESH_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + Dock_Probe \ No newline at end of file diff --git a/klicky-macros.cfg b/klicky-macros.cfg new file mode 100644 index 0000000..f063122 --- /dev/null +++ b/klicky-macros.cfg @@ -0,0 +1,946 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions +# User sporkus added led status notifications +# Thanks to all who helped, +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe + +[respond] + +[gcode_macro _Probe_Variables] +variable_probe_attached: False +variable_probe_state: False +variable_probe_lock: False +variable_z_endstop_x: 0 +variable_z_endstop_y: 0 +gcode: + + +#checks if the variable definitions are up to date +[gcode_macro _klicky_check_variables_version] +gcode: + {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} + + {% if version != 1 %} + { action_raise_error("Please update your klicky variables, there are some functionality changes") } + {% endif %} + +[gcode_macro _KlickyDebug] +gcode: + {% set message = params.MSG %} + {% set debug = printer["gcode_macro _User_Variables"].debug|default(False) %} + + {% if debug %} + { action_respond_info(message) } + {% endif %} + + +[gcode_macro _exit_point] +gcode: + {% set function = 'pre_' ~ params.FUNCTION %} + {% set move = params.MOVE|default(0) %} + {% set speed = printer["gcode_macro _User_Variables"].travel_speed %} + + # mandatory to save the new safe position + M400 + SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} + SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} + RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} + + +[gcode_macro _entry_point] +gcode: + {% set function = 'pre_' ~ params.FUNCTION %} + {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} + # mandatory to save the new safe position + M400 + SAVE_GCODE_STATE NAME={function} + # removes the Z offset for better bed based docking + SET_GCODE_OFFSET Z=0 + # all the macros initially assume absolute positioning + G90 + # set a safe(sane) Acceleration + SET_VELOCITY_LIMIT ACCEL={move_accel} + +[gcode_macro _Homing_Variables] +gcode: + {% set reset = params.RESET|default(0) %} + {% if reset %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } + {% endif %} + +########################## +# Attach probe and lock it +[gcode_macro Attach_Probe_Lock] +description: Attaches Klicky Probe, can only be docked after unlocking +gcode: + Attach_Probe + _Probe_Lock + +######################## +# Dock probe and lock it +[gcode_macro Dock_Probe_Unlock] +description: Docks Klicky Probe even if it was locked +gcode: + _Probe_Unlock + Dock_Probe + +############## +# Unlock Probe +[gcode_macro _Probe_Unlock] +description: Unlocks Klicky Probe state +gcode: + _KlickyDebug msg="_Probe_Lock setting probe_lock variable to False" + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } + +############ +# Lock Probe +[gcode_macro _Probe_Lock] +description: Locks Klicky Probe state +gcode: + _KlickyDebug msg="_Probe_Lock setting probe_lock variable to True" + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } + +################### +# Klicky Dock Servo Deploy + +[gcode_macro _DeployKlickyDock] +description: Deploys Klicky servo-controlled dock +gcode: + {% set enable_dock_servo = printer["gcode_macro _User_Variables"].enable_dock_servo|default(False) %} + {% set servo_delay = printer["gcode_macro _User_Variables"].servo_delay|default(1000) %} + {% set servo_name = printer["gcode_macro _User_Variables"].servo_name %} + {% set servo_deploy = printer["gcode_macro _User_Variables"].servo_deploy|default(360) %} + + #wait for all the moves to complete + M400 + {% if enable_dock_servo != False %} + _KlickyDebug msg="_DeployKlickyDock Klicky servo configuration enabled" + {% if servo_deploy == 360 %} + { action_raise_error("Klicky: servo active on klicky-variables, but no servo deploy angle specified") } + {% endif %} + _KlickyDebug msg="_DeployKlickyDock SET_SERVO SERVO={servo_name|string} ANGLE={servo_deploy|int}" + SET_SERVO SERVO={servo_name|string} ANGLE={servo_deploy|int} + M400 + G4 P{servo_delay|int} + _KlickyDebug msg="_DeployKlickyDock SET_SERVO SERVO={servo_name|string} WIDTH=0" + SET_SERVO SERVO={servo_name|string} WIDTH=0 + {% elif printer["gcode_macro _DeployDock"] is defined %} + _KlickyDebug msg="_DeployKlickyDock calling _DeployDock" + _DeployDock + {% endif %} + +#################### +# Dock Servo Retract + +[gcode_macro _RetractKlickyDock] +description: Retracts Klicky servo-controlled dock +gcode: + {% set enable_dock_servo = printer["gcode_macro _User_Variables"].enable_dock_servo|default(False) %} + {% set servo_delay = printer["gcode_macro _User_Variables"].servo_delay|default(1000) %} + {% set servo_name = printer["gcode_macro _User_Variables"].servo_name %} + {% set servo_retract = printer["gcode_macro _User_Variables"].servo_retract|default(360) %} + + #wait for all the moves to complete + M400 + {% if enable_dock_servo != False %} + _KlickyDebug msg="_RetractKlickyDock Klicky servo configuration enabled" + {% if servo_retract == 360 %} + { action_raise_error("Klicky: servo active on klicky-variables, but no servo retract angle specified") } + {% endif %} + _KlickyDebug msg="_RetractKlickyDock SET_SERVO SERVO={servo_name|string} ANGLE={servo_retract|int}" + SET_SERVO SERVO={servo_name|string} ANGLE={servo_retract|int} + M400 + G4 P{servo_delay|int} + _KlickyDebug msg="_RetractKlickyDock SET_SERVO SERVO={servo_name|string} WIDTH=0" + SET_SERVO SERVO={servo_name|string} WIDTH=0 + {% elif printer["gcode_macro _RetractDock"] is defined %} + _KlickyDebug msg="_RetractKlickyDock calling _RetractDock" + _RetractDock + {% endif %} + + +###################### +# Attach Probe Routine +[gcode_macro Attach_Probe] +description: Attaches Klicky Probe +gcode: + # See if the position should be restored after the attach + {% set goback = params.BACK|default(0) %} + # Get probe attach status + {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} + {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + # Get Docking location + {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} + {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} + {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} + {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} + {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} + {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + {% set attachmove2_x = printer["gcode_macro _User_Variables"].attachmove2_x|default(0) %} + {% set attachmove2_y = printer["gcode_macro _User_Variables"].attachmove2_y|default(0) %} + {% set attachmove2_z = printer["gcode_macro _User_Variables"].attachmove2_z|default(0) %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} + {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} + # Set feedrates + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} + {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + + _entry_point function=Attach_Probe + + # If x and y are not homed + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + _KlickyDebug msg="Attach_Probe Axis homed" + + # If probe not attached and locked + {% elif not probe_attached and not probe_lock %} + _KlickyDebug msg="Attach_Probe going to attach probe" + {% if verbose %} + { action_respond_info("Attaching Probe") } + {% endif %} + _KLICKY_STATUS_BUSY + + {% if not 'z' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + _KlickyDebug msg="Attach_Probe Z not homed, setting position as X=Y=Z=0" + SET_KINEMATIC_POSITION Z=0 + {% if not enable_z_hop %} # Disables safe_z + _KlickyDebug msg="Attach_Probe z_hop disabled" + {% set safe_z = 0 %} + {% endif %} + {% endif %} + + # Prior to saving actual position, check if its necessary to move to a safe Z + # that has enought overhead for the attached probe + {% if printer.toolhead.position.z < safe_z %} + _KlickyDebug msg="Attach_Probe toolhead too low, raising it by {safe_z}mm" + {% if verbose %} + { action_respond_info("moving to a safe Z distance") } + {% endif %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + {% if not 'z' in printer.toolhead.homed_axes %} #duplicate?? + {% if verbose %} + { action_respond_info("Resetting Z position to zero, duplicate?") } + {% endif %} + _KlickyDebug msg="Attach_Probe Z not homed, setting position as X=Y=Z=0" + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + {% if printer.toolhead.position.z < safe_z %} #duplicate?? + _KlickyDebug msg="Attach_Probe toolhead too low, raising it by {safe_z}mm, duplicate?" + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Umbilical_Path + + _entry_point function=Attach_Probe_intern + + # Probe entry location + _KlickyDebug msg="Attach_Probe moving near the dock with G0 X{docklocation_x|int - attachmove_x|int - attachmove2_x|int} Y{docklocation_y|int - attachmove_y|int - attachmove2_y} F{travel_feedrate}" + G0 X{docklocation_x|int - attachmove_x|int - attachmove2_x|int} Y{docklocation_y|int - attachmove_y|int - attachmove2_y} F{travel_feedrate} + {% if docklocation_z != -128 %} + _KlickyDebug msg="Attach_Probe moving near the dock with G0 Z{docklocation_z|int - attachmove_z|int - attachmove2_z|int} F{dock_feedrate}" + G0 Z{docklocation_z|int - attachmove_z|int - attachmove2_z|int} F{dock_feedrate} + _KlickyDebug msg="Attach_Probe moving near the dock with G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}" + G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} + {% endif %} + + # if necessary do some actions before moving the toolhead to dock + _DeployKlickyDock + + + # Drop Probe to Probe location + {% if docklocation_z != -128 %} + _KlickyDebug msg="Attach_Probe moving to the dock with G0 Z{docklocation_z} F{dock_feedrate}" + G0 Z{docklocation_z} F{dock_feedrate} + {% endif %} + _KlickyDebug msg="Attach_Probe moving to the dock with G0 X{docklocation_x|int - attachmove2_x|int} Y{docklocation_y|int - attachmove2_y} F{dock_feedrate}" + G0 X{docklocation_x|int - attachmove2_x|int} Y{docklocation_y|int - attachmove2_y} F{dock_feedrate} + _KlickyDebug msg="Attach_Probe moving to the dock with G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}" + G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} + + # Probe Attached + {% if docklocation_z != -128 %} + _KlickyDebug msg="Attach_Probe moving from the dock to G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate}" + G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} + {% endif %} + _KlickyDebug msg="Attach_Probe moving from the dock to G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate}" + G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} + + # if necessary do some actions after attaching the probe + _RetractKlickyDock + + ## Go to Z safe distance + {% if ((printer.toolhead.position.z < safe_z) or (docklocation_z != -128 and docklocation_z < safe_z ))%} + _KlickyDebug msg="Attach_Probe moving to a safe Z position: G0 Z{safe_z} F{z_drop_feedrate} from {printer.toolhead.position.z}" + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Park_Toolhead + + _CheckProbe action=attach + + _exit_point function=Attach_Probe_intern move={goback} + _KLICKY_STATUS_READY + + {% elif probe_lock %} + {% if verbose %} + { action_respond_info("Probe locked!") } + {% endif %} + + # Probe attached, do nothing + _KlickyDebug msg="Attach_Probe probe locked not attaching probe" + _CheckProbe action=query + + {% else %} + {% if verbose %} + { action_respond_info("Probe already attached!") } + {% endif %} + + # Probe attached, do nothing + _KlickyDebug msg="Attach_Probe probe already attached, doing nothing" + _CheckProbe action=query + + {% endif %} + + _exit_point function=Attach_Probe + + +#################### +# Dock Probe Routine +[gcode_macro Dock_Probe] +description: Docks Klicky Probe +gcode: + # See if the position should be restored after the dock + {% set goback = params.back|default(0) %} + # Get probe attach status + {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} + {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + # Get Docking location + {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} + {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} + {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} + {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} + {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} + {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + # Set feedrates + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} + {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + + # If axis aren't homed, fail + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + _KlickyDebug msg="Dock_Probe Axis homed" + + _entry_point function=Dock_Probe + + # If probe not attached and not locked + {% if probe_attached and not probe_lock %} + _KlickyDebug msg="Dock_Probe going to dock probe" + {% if verbose %} + { action_respond_info("Docking Probe") } + {% endif %} + _KLICKY_STATUS_BUSY + + {% if printer.toolhead.position.z < safe_z %} + _KlickyDebug msg="Dock_Probe toolhead too low, raising it to {safe_z}mm" + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Umbilical_Path + + # Probe entry location + _KlickyDebug msg="Dock_Probe moving near the dock with G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}" + G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} + {% if docklocation_z != -128 %} + _KlickyDebug msg="Dock_Probe moving near the dock with G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}" + G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} + {% endif %} + + # if necessary do some actions before moving the toolhead to dock + _DeployKlickyDock + + # Drop Probe to Probe location + _KlickyDebug msg="Dock_Probe moving to the dock with G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}" + G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} + {% if docklocation_z != -128 %} + _KlickyDebug msg="Attach_Probe moving to the dock with G0 Z{docklocation_z} F{dock_feedrate}" + G0 Z{docklocation_z} F{dock_feedrate} + {% endif %} + + # Probe decoupling + {% if docklocation_z != -128 %} + _KlickyDebug msg="Dock_Probe moving from the dock to G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate}" + G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} + {% endif %} + _KlickyDebug msg="Dock_Probe moving from the dock to G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}" + G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} + + # if necessary do some actions after attaching the probe + _RetractKlickyDock + + #Do an extra move away + _KlickyDebug msg="Dock_Probe moving away from the dock to G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate}" + G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} + + ## Go to Z safe distance + {% if ((printer.toolhead.position.z < safe_z) or (docklocation_z != -128 and docklocation_z < safe_z ))%} + _KlickyDebug msg="Dock_Probe moving to a safe Z position: G0 Z{safe_z} F{z_drop_feedrate} from {printer.toolhead.position.z}" + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Park_Toolhead + + G4 P1000 + _CheckProbe action=dock + _KLICKY_STATUS_READY + + {% elif probe_lock %} + {% if verbose %} + { action_respond_info("Probe locked") } + {% endif %} + + # Probe docked, do nothing + _KlickyDebug msg="Dock_Probe probe locked not docking probe" + _CheckProbe action=query + + {% else %} + {% if verbose %} + { action_respond_info("Probe already docked") } + {% endif %} + + # Probe docked, do nothing + _KlickyDebug msg="Dock_Probe probe already docked, doing nothing" + _CheckProbe action=query + + {% endif %} + + _exit_point function=Dock_Probe move={goback} + +################# +# Probe Calibrate +[gcode_macro PROBE_CALIBRATE] +rename_existing: _PROBE_CALIBRATE +description:Calibrate the probes z_offset with klicky automount +gcode: + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x|float %} + {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y|float %} + {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} + + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + _KlickyDebug msg="probe_calibrate Axis homed" + _KlickyDebug msg="probe_calibrate Variables max_x={max_x},max_y={max_y},probe_offset_x={probe_offset_x},probe_offset_y={probe_offset_y}" + + # Protect against PROBE CALIBRATE performed from outside the bed + {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) + or printer['gcode_move'].position.y < - probe_offset_y + or printer['gcode_move'].position.x > (max_x - probe_offset_x) + or printer['gcode_move'].position.x < - probe_offset_x %} + { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED, check klicky_variables bed size!") } + {% endif%} + + _CheckProbe action=query + G90 + Attach_Probe back=1 + _KLICKY_STATUS_CALIBRATING_Z + + _KlickyDebug msg="probe_calibrate calling klipper probe_calibrate" + _PROBE_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + M118 moving the toolhead 20 mm from the bed + _KlickyDebug msg="probe_calibrate Moving Z up by 20mm" + TESTZ Z=20 + M118 remove manually the probe and continue calibration + _KLICKY_STATUS_READY + +################ +# Probe Accuracy +[gcode_macro PROBE_ACCURACY] +rename_existing: _PROBE_ACCURACY +description:Probe Z-height accuracy at current XY position with klicky automount +gcode: + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x|float %} + {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y|float %} + {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} + + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + _KlickyDebug msg="probe_accuracy Axis homed" + _KlickyDebug msg="probe_accuracy Variables max_x={max_x},max_y={max_y},probe_offset_x={probe_offset_x},probe_offset_y={probe_offset_y}" + + _entry_point function=PROBE_ACCURACY + + # Protect against PROBE_ACCURACY performed from outside the bed + {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) + or printer['gcode_move'].position.y < - probe_offset_y + or printer['gcode_move'].position.x > (max_x - probe_offset_x) + or printer['gcode_move'].position.x < - probe_offset_x %} + { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED, check klicky_variables bed size!") } + {% endif%} + + _CheckProbe action=query + Attach_Probe back=1 + + _KlickyDebug msg="probe_accuracy calling klipper probe accuracy" + _PROBE_ACCURACY {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + Dock_Probe back=1 + + _exit_point function=PROBE_ACCURACY move=1 + +############################################# +# Enable to SET_KINEMATIC_POSITION for Z hop +[force_move] +enable_force_move: True + +################# +# Homing Override +[homing_override] +axes: xyz +gcode: + # collect user state variables + _User_Variables + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} + {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} + {% set kinematic_z = 0 %} + {% set dock_on_zhome = printer["gcode_macro _User_Variables"].dock_on_zhome|default(True) %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set home_backoff_x = printer["gcode_macro _User_Variables"].home_backoff_x|default(0) %} + {% set home_backoff_y = printer["gcode_macro _User_Variables"].home_backoff_y|default(0) %} + {% set override_homing = printer["gcode_macro _User_Variables"].override_homing|default('') %} + + #checks if the variable definitions are up to date + _klicky_check_variables_version + + _CheckProbe action=query + + # reset parameters + {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} + + {% if 'PROBE_LOCK' in params%} + {% if verbose %} + { action_respond_info("PROBE_LOCK = True") } + {% endif %} + {% set leave_probe_attached = True %} + {% endif %} + + # which axes have been requested for homing + {% if not 'X' in params + and not 'Y' in params + and not 'Z' in params %} + + {% set home_x, home_y, home_z = True, True, True %} + _KlickyDebug msg="homing_override goint to home all axes" + + {% else %} + {% if 'X' in params %} + {% set home_x = True %} + _KlickyDebug msg="homing_override goint to home X" + + {% endif %} + + {% if 'Y' in params %} + {% set home_y = True %} + _KlickyDebug msg="homing_override goint to home Y" + {% endif %} + + {% if 'Z' in params %} + {% set home_z = True %} + _KlickyDebug msg="homing_override goint to home Z" + {% endif %} + + {% if 'X' in params + and 'Y' in params + and 'Z' in params %} + # reset homing state variables + # if homing all axes + _Homing_Variables reset=1 + _KlickyDebug msg="homing_override goint to home all axes" + {% endif %} + + {% endif %} + + _entry_point function=homing_override + _KLICKY_STATUS_HOMING + + # if Z is not homed, do not move the bed if it goes down + {% if 'z' not in printer.toolhead.homed_axes %} + {% if not enable_z_hop %} # Disables safe_z + _KlickyDebug msg="homing_override z_hop disabled" + #preserve safe_z to use as the SET KINEMATIC Z position, so that the toolhead does not move to pick up the probe + {% set kinematic_z = safe_z %} + {% set safe_z = 0 %} + {% endif %} + {% endif %} + + {% if home_z %} + {% if 'z' in printer.toolhead.homed_axes %} + {% if printer.toolhead.position.z < safe_z %} + _KlickyDebug msg="homing_override toolhead too low, with homed axes, raising it to {safe_z}mm" + {% if verbose %} + { action_respond_info("moving to a safe Z distance") } + {% endif %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + {% else %} + {% if verbose %} + { action_respond_info("Z not homed, forcing full G28") } + {% endif %} + _KlickyDebug msg="homing_override Z not homed, setting position as X=Y=0 Z={kinematic_z}" + SET_KINEMATIC_POSITION X=0 Y=0 Z={kinematic_z} + {% if printer.toolhead.position.z < safe_z %} + _KlickyDebug msg="homing_override toolhead too low, raising it to {safe_z}mm" + {% if verbose %} + { action_respond_info("moving to a safe Z distance") } + {% endif %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + {% set home_x, home_y, home_z = True, True, True %} + {% endif %} + {% endif %} + + # if the dock is oriented on the Y, first do Y endstop + {% if ((attachmove_y == 0 and override_homing == '' ) or (override_homing == 'Y'))%} + # Home y + {% if home_y %} + {% if override_homing == 'Y' %} + _KlickyDebug msg="homing_override Y homing first override, due to override_homing = Y" + {% else %} + _KlickyDebug msg="homing_override Y homing first override, due to attachmove_y = 0" + {% endif %} + {% if verbose %} + { action_respond_info("Homing Y") } + {% endif %} + {% if printer["gcode_macro _HOME_Y"] is defined %} + _KlickyDebug msg="homing_override calling _HOME_Y external script to handle the Y homing" + _HOME_Y + {% else %} + _KlickyDebug msg="homing_override Homing Y G28 Y0" + G28 Y0 + # does it need to back away from the home position + {% if home_backoff_y != 0 %} + {% if (printer.configfile.settings.stepper_y.position_endstop > (printer.configfile.settings.stepper_y.position_min|default(0) + printer.configfile.settings.stepper_y.position_max)/2) %} + _KlickyDebug msg="homing_override backing off Y endstop, G0 Y{printer.configfile.settings.stepper_y.position_endstop-home_backoff_y|int} F{travel_feedrate}" + G0 Y{printer.configfile.settings.stepper_y.position_endstop - home_backoff_y|int} F{travel_feedrate} + {% else %} + _KlickyDebug msg="homing_override backing off Y endstop, G0 Y{printer.configfile.settings.stepper_y.position_endstop + home_backoff_y|int} F{travel_feedrate}" + G0 Y{printer.configfile.settings.stepper_y.position_endstop + home_backoff_y|int} F{travel_feedrate} + {%endif %} + {%endif %} + {% endif %} + {% endif %} + {% set home_y = False %} + {% endif %} + + + # Home x + {% if home_x %} + {% if verbose %} + { action_respond_info("Homing X") } + {% endif %} + {% if printer["gcode_macro _HOME_X"] is defined %} + _KlickyDebug msg="homing_override calling _HOME_X external script to handle the X homing" + _HOME_X + {% else %} + _KlickyDebug msg="homing_override Homing X, G28 X0" + G28 X0 + # does it need to back away from the home position + {% if home_backoff_x != 0 %} + {% if (printer.configfile.settings.stepper_x.position_endstop > (printer.configfile.settings.stepper_x.position_min|default(0) + printer.configfile.settings.stepper_x.position_max)/2) %} + _KlickyDebug msg="homing_override backing off X endstop, G0 X{printer.configfile.settings.stepper_x.position_endstop - home_backoff_x|int} F{travel_feedrate}" + G0 X{printer.configfile.settings.stepper_x.position_endstop - home_backoff_x|int} F{travel_feedrate} + {% else %} + _KlickyDebug msg="homing_override backing off X endstop, G0 X{printer.configfile.settings.stepper_x.position_endstop + home_backoff_x|int} F{travel_feedrate}" + G0 X{printer.configfile.settings.stepper_x.position_endstop + home_backoff_x|int} F{travel_feedrate} + {%endif %} + {%endif %} + {% endif %} + {% endif %} + + # Home y + {% if home_y %} + {% if verbose %} + { action_respond_info("Homing Y") } + {% endif %} + {% if printer["gcode_macro _HOME_Y"] is defined %} + _KlickyDebug msg="homing_override calling _HOME_Y external script to handle the Y homing" + _HOME_Y + {% else %} + _KlickyDebug msg="homing_override Homing Y, G28 Y0" + G28 Y0 + {% if home_backoff_y != 0 %} + {% if (printer.configfile.settings.stepper_y.position_endstop > (printer.configfile.settings.stepper_y.position_min|default(0) + printer.configfile.settings.stepper_y.position_max)/2) %} + _KlickyDebug msg="homing_override backing off Y endstop, G0 Y{printer.configfile.settings.stepper_y.position_endstop - home_backoff_y|int} F{travel_feedrate}" + G0 Y{printer.configfile.settings.stepper_y.position_endstop - home_backoff_y|int} F{travel_feedrate} + {% else %} + _KlickyDebug msg="homing_override backing off Y endstop, G0 Y{printer.configfile.settings.stepper_y.position_endstop + home_backoff_y|int} F{travel_feedrate}" + G0 Y{printer.configfile.settings.stepper_y.position_endstop + home_backoff_y|int} F{travel_feedrate} + {%endif %} + {%endif %} + {% endif %} + {% endif %} + # Home z + {% if home_z %} + {% if verbose %} + { action_respond_info("Homing Z") } + {% endif %} + + # if probe is configured as endstop, attach it, else check if the probe needs to be docked if attached + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + _KlickyDebug msg="homing_override probe configured as a virtual Z endstop attaching probe" + Attach_Probe + # if PROBE_LOCK parameter is given, Attach Probe and lock until it´s unlocked + {% if leave_probe_attached %} + _Probe_Lock + {% endif %} + {% elif dock_on_zhome == True %} + Dock_Probe + {% endif %} + + _Home_Z + + # if probe is configured as endstop, dock it + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + _KlickyDebug msg="homing_override probe no longer required, docking probe" + Dock_Probe + {% elif dock_on_zhome == False %} + Dock_Probe + {% endif %} + {% endif %} + _CheckProbe action=query + + # park the toolhead + _Park_Toolhead + + _exit_point function=homing_override + _KLICKY_STATUS_READY + +# Umbilical path setup +[gcode_macro _Umbilical_Path] +gcode: + {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} + {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} + {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + + {% if umbilical %} + # Used to give the umbilical a better path to follow and coil properly if dock is tight in space + _entry_point function=Umbilical_Path + + _KlickyDebug msg="_Umbilical_Path moving to G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate}" + G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} + + _exit_point function=Umbilical_Path + {% endif %} + +# Home Z Routine +[gcode_macro _Home_Z] +gcode: + {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} + {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + + _entry_point function=Home_Z + + # if x and y are not homed yet, raise error + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + {% else %} + _KlickyDebug msg="_Home_Z XY Axis homed" + {% if not 'z' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + _KlickyDebug msg="_Home_Z Z not homed, setting position as X=Y=Z=0" + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + # Move tool to safe homing position and home Z axis + # location of z endstop + _KlickyDebug msg="_Home_Z moving to Z endstop position G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate}" + G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} + _KlickyDebug msg="_Home_Z Homing Z G28 Z" + G28 Z0 + _KlickyDebug msg="_Home_Z toolhead too low, raising it to {safe_z}mm" + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _exit_point function=Home_Z + +# Check to see if probe is where it is supposed to be after +# attaching/docking maneuver and set homing error or shutdown +[gcode_macro _CheckProbe] +variable_probe_state: 0 +gcode: + Query_Probe + _SetProbeState action={ params.ACTION } + +# Due to how templates are evaluated, we have query endstops in one +# macro and call another macro to make decisions based on the result +[gcode_macro _SetProbeState] +gcode: + {% set query_probe_triggered = printer.probe.last_query %} + {% set action = params.ACTION|default('') %} + + # If triggered (true), probe not attached + {% if query_probe_triggered %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } + {% else %} + # If not triggered (false), probe attached + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } + {% endif %} + + {% if action == 'query' %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } + {% endif %} + + # If probe fails to attach/detach + + # If not docked + {% if not query_probe_triggered and action == 'dock' %} + { action_raise_error("Probe dock failed!") } + {% endif %} + + # If not attached + {% if query_probe_triggered and action == 'attach' %} + { action_raise_error("Probe attach failed!") } + {% endif %} + +# Park Toolhead Routine +[gcode_macro _Park_Toolhead] +gcode: + {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} + {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} + {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} + {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + + _entry_point function=Park_Toolhead + + {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Parking Toolhead") } + {% endif %} + {% if parkposition_z == -128 %} + _KlickyDebug msg="_Park_Toolhead moving to G0 X{parkposition_x} Y{parkposition_y} F{travel_feedrate}" + G0 X{parkposition_x} Y{parkposition_y} F{travel_feedrate} + + {% else %} + + _KlickyDebug msg="_Park_Toolhead moving to G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate}" + G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} + + {% endif %} + + {% endif %} + _exit_point function=Park_Toolhead + + + +################# +# Status LEDs +# This enables stealthburner-led status macros to be used in klicky macros if they exist. +# https://github.com/VoronDesign/Voron-Afterburner/blob/sb-beta/Klipper_Macros/stealthburner_leds.cfg +[gcode_macro _klicky_status_ready] +gcode: + {% if printer['gcode_macro status_ready'] is defined %} + _KlickyDebug msg="_klicky_status_ready activating the LED STATUS_READY" + STATUS_READY + {% endif %} + +[gcode_macro _klicky_status_busy] +gcode: + {% if printer['gcode_macro status_busy'] is defined %} + _KlickyDebug msg="_klicky_status_busy activating the LED STATUS_BUSY" + STATUS_BUSY + {% endif %} + +[gcode_macro _klicky_status_leveling] +gcode: + {% if printer['gcode_macro status_leveling'] is defined %} + _KlickyDebug msg="_klicky_status_leveling activating the LED STATUS_LEVELING" + STATUS_LEVELING + {% endif %} + +[gcode_macro _klicky_status_homing] +gcode: + {% if printer['gcode_macro status_homing'] is defined %} + _KlickyDebug msg="_klicky_status_homing activating the LED STATUS_HOMING" + STATUS_HOMING + {% endif %} + +[gcode_macro _klicky_status_cleaning] +gcode: + {% if printer['gcode_macro status_cleaning'] is defined %} + _KlickyDebug msg="_klicky_status_cleaning activating the LED STATUS_CLEANING" + STATUS_CLEANING + {% endif %} + +[gcode_macro _klicky_status_meshing] +gcode: + {% if printer['gcode_macro status_meshing'] is defined %} + _KlickyDebug msg="_klicky_status_meshing activating the LED STATUS_MESHING" + STATUS_MESHING + {% endif %} + +[gcode_macro _klicky_status_calibrating_z] +gcode: + {% if printer['gcode_macro status_calibrating_z'] is defined %} + _KlickyDebug msg="_klicky_status_calibrating_z activating the LED STATUS_CALIBRATING_Z" + STATUS_CALIBRATING_Z + {% endif %} + + + diff --git a/klicky-probe.cfg b/klicky-probe.cfg new file mode 100644 index 0000000..f7d2d38 --- /dev/null +++ b/klicky-probe.cfg @@ -0,0 +1,10 @@ +#Simple way to include all the various klicky macros and configurations +# the current home for this configuration is https://github.com/jlas1/Klicky-Probe, please check it + +#[include ./klicky-specific.cfg] #place to put other configurations specific to your printer +[include ./klicky-variables.cfg] #Required +[include ./klicky-macros.cfg] #Required +#[include ./klicky-bed-mesh-calibrate.cfg] #bed mesh, requires klipper configuration +#[include ./klicky-screws-tilt-calculate.cfg] #help adjust bed screws automatically +[include ./klicky-quad-gantry-level.cfg] #level 4 Z motors +#[include ./klicky-z-tilt-adjust.cfg] #level 2 or 3 Z motors diff --git a/klicky-quad-gantry-level.cfg b/klicky-quad-gantry-level.cfg new file mode 100644 index 0000000..4a0a50c --- /dev/null +++ b/klicky-quad-gantry-level.cfg @@ -0,0 +1,31 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# +# this macro is based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, modified for better use on K-series printers by RyanG and Trails" +# that macro as since evolved into a klipper plugin that currently is pending inclusion in klipper +# more information here https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# +# by standing on the shoulders of giants, lets see if we can see further +# User richardjm revised the macro variables and added some functions, thanks a lot +# This macro home is https://github.com/jlas1/Klicky-Probe + +################### +# Quad Gantry Level +[gcode_macro QUAD_GANTRY_LEVEL] +rename_existing: _QUAD_GANTRY_LEVEL +description: Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount +gcode: + {% set V = printer["gcode_macro _User_Variables"].verbose %} + {% if V %} + { action_respond_info("QG Level") } + {% endif %} + + _CheckProbe action=query + G90 + Attach_Probe + _KLICKY_STATUS_LEVELING + + _QUAD_GANTRY_LEVEL {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + Dock_Probe diff --git a/klicky-variables.cfg b/klicky-variables.cfg new file mode 100644 index 0000000..5a16417 --- /dev/null +++ b/klicky-variables.cfg @@ -0,0 +1,107 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions, thanks a lot +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe +# the 1000 values below is to give an error instead of doing something wrong, hopefully, this won't be used is a printer larger than 1 meter + +[gcode_macro _User_Variables] +variable_verbose: True # Enable verbose output +variable_debug: False # Enable Debug output +variable_travel_speed: 200 # how fast all other travel moves will be performed when running these macros +variable_move_accel: 1000 # how fast should the toolhead accelerate when moving +variable_dock_speed: 50 # how fast should the toolhead move when docking the probe for the final movement +variable_release_speed: 75 # how fast should the toolhead move to release the hold of the magnets after docking +variable_z_drop_speed: 20 # how fast the z will lower when moving to the z location to clear the probe + +variable_safe_z: 25 # Minimum Z for attach/dock and homing functions +# if true it will move the bed away from the nozzle when Z is not homed +variable_enable_z_hop: True # set this to false for beds that fall significantly under gravity (almost to Z max) + +variable_max_bed_y: 300 # maximum Bed size avoids doing a probe_accuracy outside the bed +variable_max_bed_x: 298 # maximum Bed size avoids doing a probe_accuracy outside the bed + +# if a separate Z endstop switch is in +# use, specify the coordinates of the switch here (Voron). +# Set to 0 to have the probe move to center of bed +variable_z_endstop_x: 252 +variable_z_endstop_y: 308 + +#Check the printer specific documentation on klipper Dock/Undock configuration, these are dummy values +#dock location +variable_docklocation_x: 48 # X Dock position +variable_docklocation_y: 308 # Y Dock position +variable_docklocation_z: -128 # Z dock position (-128 for a gantry/frame mount) + +#The following variables are used if the dock is deployed and retracted via a servo motor +variable_enable_dock_servo: False # Set to true if your klicky dock is servo-controlled +variable_servo_name: 'NAME' # The name of the dock servo defined in printer.cfg under [servo] +variable_servo_deploy: 10 # This EXAMPLE is the value used to deploy the servo fully +variable_servo_retract: 11 # This EXAMPLE is the value used to retract the servo fully (initial_angle in [servo] config) +variable_servo_delay: 250 # This is a delay to wait the servo to reach the requested position, be carefull with high values + +#Dock move, final toolhead movement to release the probe on the dock +#it's a relative move +Variable_dockmove_x: 40 +Variable_dockmove_y: 0 +Variable_dockmove_z: 0 + +#Attach move. final toolhead movement to attach the probe on the mount +#it's a relative move +Variable_attachmove_x: 0 +Variable_attachmove_y: 30 +Variable_attachmove_z: 0 + +#Umbilical to help untangle the umbilical in difficult situations +variable_umbilical: False # should we untangle the umbilical +variable_umbilical_x: 15 # X umbilical position +variable_umbilical_y: 15 # Y umbilical position + +# location to park the toolhead +variable_park_toolhead: False # Enable toolhead parking +variable_parkposition_x: 125 +variable_parkposition_y: 125 +variable_parkposition_z: 30 # -128 excludes Z - Park only on X-Y + +variable_version: 1 # Helps users to update the necessary variables, do not update if the variables above are not updated + +#Below this remark, you normally do not need to configure +#Attach move2 +Variable_attachmove2_x: 0 # intermediate toolhead movement to attach +Variable_attachmove2_y: 0 # the probe on the dock +Variable_attachmove2_z: 0 # (can be negative) + +variable_home_backoff_x: 10 # how many mm to move away from the X endstop after homing X + # this is useful for the voron v0 to enable the toolhead to move out of the way to allow an unstricted Y homing +variable_home_backoff_y: 10 # how many mm to move away from the Y endstop after homing Y + +variable_override_homing: '' # configures what axis to home first + # '' = default klicky behavior (tries to avoid the hitting the dock) + # 'X' = forces X to home first + # 'Y' = forces Y to home first + +variable_dock_on_zhome: True # docks the probe on Z Homing if not necessary (avoids hitting the bed on some printers + +# Do not modify below +gcode: + {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} + {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} + {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} + {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} + + # If x, y coordinates are set for z endstop, assign them + {% if z_endstop_x != 0 or z_endstop_y != 0 %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } + + # if no x, y coordinates for z endstop, assume probe is endstop and move toolhead to center of bed + {% else %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } + {% endif %} diff --git a/moonraker.conf b/moonraker.conf new file mode 100644 index 0000000..13dca3e --- /dev/null +++ b/moonraker.conf @@ -0,0 +1,64 @@ +[server] +host: 0.0.0.0 +port: 7125 +max_upload_size: 1024 + +[file_manager] +# cancel object preprocessing - set to True to enable; leave disabled when running on a low-powered device (e.g. Pi Zero) +enable_object_processing: True + +[data_store] +temperature_store_size: 600 +gcode_store_size: 1000 + +[authorization] +force_logins: True +cors_domains: + *.local + *.lan + *://app.fluidd.xyz + +trusted_clients: + 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 + +# enables partial support of Octoprint API +[octoprint_compat] + +# enables moonraker to track and store print history. +[history] + +# this enables moonraker announcements for fluidd +[announcements] +subscriptions: + fluidd + +# this enables moonraker's update manager +[update_manager] +enable_auto_refresh: True + +# this enabled fluidd updates +[update_manager client fluidd] +type: web +repo: fluidd-core/fluidd +path: ~/fluidd + +[update_manager client z_calibration] +type: git_repo +path: ~/klipper_z_calibration +origin: https://github.com/protoloft/klipper_z_calibration.git +install_script: install.sh +managed_services: klipper + +[update_manager Klipper-Adaptive-Meshing-Purging] +type: git_repo +channel: dev +path: ~/Klipper-Adaptive-Meshing-Purging +origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git +managed_services: klipper +primary_branch: main \ No newline at end of file diff --git a/print_macros.cfg b/print_macros.cfg new file mode 100644 index 0000000..43f48a8 --- /dev/null +++ b/print_macros.cfg @@ -0,0 +1,411 @@ +# PRINT_START Macro +# Make sure to replace Printer Settings > Custom G-code > Start G-cocde with the following (for PrusaSlicer/SuperSlicer): +# M104 S0 ; Stops PS/SS from sending temp waits separately +# M140 S0 +# PRINT_START BED=[first_layer_bed_temperature] EXTRUDER={first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} CHAMBER=[chamber_temperature] + +#[gcode_macro PRINT_START] +#gcode: +# {% set BED = params.BED|default(65)|float %} +# {% set BED_TEMP = params.BED_TEMP|default(0)|float %} +# {% set EXTRUDER = params.EXTRUDER|default(210)|float %} +# {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(0)|float %} +# +# {% if (EXTRUDER_TEMP > 0) %}# +# {% set EXTRUDER = EXTRUDER_TEMP %} +# {% endif %} +# +# {% if (BED_TEMP > 0) %} +# {% set BED = BED_TEMP %} +# {% endif %} +# +# WAKEUP +# {% set intro_x = printer.configfile.config["stepper_x"]["position_max"]|float * 0.66 %} +# {% set min_x = printer.configfile.config["stepper_x"]["position_min"]|float * 0.1 %} +# {% set min_y = printer.configfile.config["stepper_y"]["position_min"]|float %} +# +# STATUS_BUSY +# SET_HEATER_TEMPERATURE HEATER=extruder TARGET=160 ; set extruder temp to 160 for QGL w/o oozing +# SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED} ; set bed temp +# #SET_FILAMENT_SENSOR SENSOR=filament_presence ENABLE=0 +# #UNDERGLOW_SET RED=255 GREEN=0 BLUE=0 +# M117 Start up... +# SET_CASELIGHT_ON +# G21 ; set to mm +# M220 S100 ; set print speed to 100% +# M221 S100 ; set flow rate to 100% +# M107 ; disable fans +# G90 ; absolute positioning +# M117 Pre-print park +# G28 +# G0 X150 Y10 Z120 F10000 +# M117 Preheating +# STATUS_HEATING +# TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={BED} ; wait for bed temp +# STATUS_READY +# M117 Homing & QGL +# G32 ; home +# +# M117 Calibrate Z +# CALIBRATE_Z +# +# M117 Getting mesh +# BED_MESH_CALIBRATE +# #BED_MESH_PROFILE LOAD=default ; load default mesh +# +# STATUS_HEATING +# SMART_PARK +# #G0 Z2.0 F4000.0 ; move to minimum position +# M117 Heating to {EXTRUDER}C +# SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER} +# TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER} ; wait for extruder temp +# STATUS_PRINTING +# M117 Purge Line +# # G92 E0.0 ; reset extruder to 0 +# # G1 Z0.2 X{intro_x} E20 F1000.0 ; intro line +# # G92 E0.0 ; reset extruder to 0 +# M83 ; extruder to relative mode +# G92 E0 ; Reset extruder +# G1 Y{min_y} X{min_x} Z0.3 F5000 ; move to start position +# G1 Y{min_y} X{intro_x} Z0.3 F1500.0 E15 ; draw first line +# G1 Y{min_y + 0.3} X{intro_x} Z0.3 F5000 ; move over +# G1 Y{min_y + 0.3} X{min_x / 2} Z0.3 F1500 E35 ; draw second line +# G92 E0 +# M400 ; clear buffer +# #UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=10 +# M117 Printing +# #SET_FILAMENT_SENSOR SENSOR=filament_presence ENABLE=1 + +##################################################################### +# print_start macro +##################################################################### + +## *** THINGS TO UNCOMMENT: *** +## Bed mesh (2 lines at 2 locations) +## Z_TILT_ADJUST if your printer is a Trident +## Quad gantry level if your printer is a V2 +## Nevermore - if you have one + +[gcode_macro PRINT_START] +gcode: + # This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer. + {% set target_bed = params.BED|int %} + {% set target_extruder = params.EXTRUDER|int %} + {% set target_chamber = params.CHAMBER|default("40")|int %} + {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %} + {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %} + + #Wake up Printer + WAKEUP + + # Homes the printer, sets absolute positioning and updates the Stealthburner leds. + STATUS_HOMING # Sets SB-leds to homing-mode + G28 # Full home (XYZ) + G90 # Absolut position + + ## Uncomment for bed mesh (1 of 2) + BED_MESH_CLEAR # Clears old saved bed mesh (if any) + + # Checks if the bed temp is higher than 90c - if so then trigger a heatsoak. + {% if params.BED|int > 90 %} + SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info + STATUS_HEATING # Sets SB-leds to heating-mode + M106 S255 # Turns on the PT-fan + + ## Uncomment if you have a Nevermore. + SET_PIN PIN=nevermore VALUE=1 # Turns on the nevermore + + G1 X{x_wait} Y{y_wait} Z60 F9000 # Goes to center of the bed + M190 S{target_bed} # Sets the target temp for the bed + SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info + TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber} # Waits for chamber to reach desired temp + + # If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak + {% else %} + SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info + STATUS_HEATING # Sets SB-leds to heating-mode + G1 X{x_wait} Y{y_wait} Z60 F9000 # Goes to center of the bed + M190 S{target_bed} # Sets the target temp for the bed + SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info + G4 P300000 # Waits 5 min for the bedtemp to stabilize + {% endif %} + + # Heating nozzle to 150 degrees. This helps with getting a correct Z-home + SET_DISPLAY_TEXT MSG="Hotend: 150c" # Displays info + M109 S150 # Heats the nozzle to 150c + + ## Uncomment for Trident (Z_TILT_ADJUST) + #SET_DISPLAY_TEXT MSG="Z-tilt adjust" # Displays info + #STATUS_LEVELING # Sets SB-leds to leveling-mode + #Z_TILT_ADJUST # Levels the buildplate via z_tilt_adjust + #G28 Z # Homes Z again after z_tilt_adjust + + ## Uncomment for V2 (Quad gantry level AKA QGL) + SET_DISPLAY_TEXT MSG="QGL" # Displays info + STATUS_LEVELING # Sets SB-leds to leveling-mode + quad_gantry_level # Levels the buildplate via QGL + G28 Z # Homes Z again after QGL + + ## Uncomment for Klicky auto-z + #CALIBRATE_Z # Calibrates Z-offset with klicky + #SET_DISPLAY_TEXT MSG="Z-offset" # Displays info + + ## Uncomment for bed mesh (2 of 2) + SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info + STATUS_MESHING # Sets SB-leds to bed mesh-mode + bed_mesh_calibrate # Starts bed mesh + + # Heats up the nozzle up to target via data from slicer + SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info + STATUS_HEATING # Sets SB-leds to heating-mode + #G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed + SMART_PARK + M107 # Turns off partcooling fan + M109 S{target_extruder} # Heats the nozzle to printing temp + + # Gets ready to print by doing a purge line and updating the SB-leds + SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info + STATUS_PRINTING # Sets SB-leds to printing-mode + LINE_PURGE + #G0 X{x_wait - 50} Y4 F10000 # Moves to starting point + #G0 Z0.4 # Raises Z to 0.4 + #G91 # Incremental positioning + #G1 X100 E20 F1000 # Purge line + #G90 # Absolut position + +[gcode_macro PRINT_END] +# +# PRINT_END +# +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +# +description: End print and tidy up (retract filament, move toolhead, turn off heaters) +gcode: + STATUS_BUSY + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-5.0 F3600 ; retract filament + G91 ; relative positioning + + # Get Boundaries + {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} + {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} + {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %} + + # Check end position to determine safe direction to move + {% if printer.toolhead.position.x < (max_x - 20) %} + {% set x_safe = 20.0 %} + {% else %} + {% set x_safe = -20.0 %} + {% endif %} + + {% if printer.toolhead.position.y < (max_y - 20) %} + {% set y_safe = 20.0 %} + {% else %} + {% set y_safe = -20.0 %} + {% endif %} + + {% if printer.toolhead.position.z < (max_z - 40) %} + {% set z_safe = 40.0 %} + {% else %} + {% set z_safe = max_z - printer.toolhead.position.z %} + {% endif %} + + G0 Z{z_safe} F3600 ; move nozzle up + G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing + TURN_OFF_HEATERS + M107 ; turn off fan + G90 ; absolute positioning + G0 X{max_x / 2} Y{max_y} F3600 ; park nozzle at rear + M84 ; disable steppers + M117 Print Complete. + + {% if printer.configfile.config["bed_mesh"] %} + BED_MESH_CLEAR + {% endif %} + + SET_PIN PIN=nevermore VALUE=0 + + + #{% if printer['fan_generic exhaust_fan'] %} + #STOP_TEMP_MONITOR + #SET_FAN_SPEED FAN=exhaust_fan SPEED=1.0 + #UPDATE_DELAYED_GCODE ID=_DISABLE_EXHAUST DURATION=300 + #{% else %} + # M118 No exhaust fan configured + #{% endif %} + + #{% if printer['fan_generic cooling_fan'] %} + #SET_FAN_SPEED FAN=cooling_fan SPEED=1.0 + #UPDATE_DELAYED_GCODE ID=_DISABLE_COOLING DURATION=300 + #{% else %} + # M118 No cooling fan configured + #{% endif %} + + STATUS_READY + UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=60 + + +[gcode_macro WAKEUP] +gcode: + SET_CASELIGHT_ON + STATUS_READY + +#[delayed_gcode _SET_CASELIGHT_OFF] +#gcode: +# SET_CASELIGHT_OFF + +[gcode_macro SET_CASELIGHT_ON] +description: Turn on the caselight LEDs +gcode: + SET_PIN PIN=caselight VALUE=1 + +[gcode_macro SET_CASELIGHT_OFF] +description: Turn off the caselight LEDs +gcode: + SET_PIN PIN=caselight VALUE=0 + +[gcode_macro TOGGLE_CASELIGHT] +description: Switch caselight on/off +gcode: + {% set status = printer['output_pin caselight'].value | float %} + {% if status == 0 %} + SET_CASELIGHT_ON + {% else %} + SET_CASELIGHT_OFF + {% endif %} + +[delayed_gcode _CLEAR_DISPLAY] +# +# _CLEAR_DISPLAY helper macro +# +# Clear the last message from the printer display +# +# Usage: UPDATE_DELAYED_GCODE TARGET=_CLEAR_DISPLAY ID={time in seconds to wait before clearing display} +gcode: + M117 + +# Home, get position, throw around toolhead, home again. +# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured. +# We only measure to a full step to accomodate for endstop variance. +# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10 + +[gcode_macro TEST_SPEED] +gcode: + # Speed + {% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %} + # Iterations + {% set iterations = params.ITERATIONS|default(5)|int %} + # Acceleration + {% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %} + # Bounding inset for large pattern (helps prevent slamming the toolhead into the sides after small skips, and helps to account for machines with imperfectly set dimensions) + {% set bound = params.BOUND|default(20)|int %} + # Size for small pattern box + {% set smallpatternsize = SMALLPATTERNSIZE|default(20)|int %} + + # Large pattern + # Max positions, inset by BOUND + {% set x_min = printer.toolhead.axis_minimum.x + bound %} + {% set x_max = printer.toolhead.axis_maximum.x - bound %} + {% set y_min = printer.toolhead.axis_minimum.y + bound %} + {% set y_max = printer.toolhead.axis_maximum.y - bound %} + + # Small pattern at center + # Find X/Y center point + {% set x_center = (printer.toolhead.axis_minimum.x|float + printer.toolhead.axis_maximum.x|float ) / 2 %} + {% set y_center = (printer.toolhead.axis_minimum.y|float + printer.toolhead.axis_maximum.y|float ) / 2 %} + + # Set small pattern box around center point + {% set x_center_min = x_center - (smallpatternsize/2) %} + {% set x_center_max = x_center + (smallpatternsize/2) %} + {% set y_center_min = y_center - (smallpatternsize/2) %} + {% set y_center_max = y_center + (smallpatternsize/2) %} + + # Save current gcode state (absolute/relative, etc) + SAVE_GCODE_STATE NAME=TEST_SPEED + + # Output parameters to g-code terminal + { action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) } + + # Home and get position for comparison later: + G28 + # QGL if not already QGLd (only if QGL section exists in config) + {% if printer.configfile.settings.quad_gantry_level %} + {% if printer.quad_gantry_level.applied == False %} + QUAD_GANTRY_LEVEL + G28 Z + {% endif %} + {% endif %} + # Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24) + G90 + G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60} + G28 X Y + G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60} + G4 P1000 + GET_POSITION + + # Go to starting position + G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60} + + # Set new limits + SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2} + + {% for i in range(iterations) %} + # Large pattern + # Diagonals + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_max} Y{y_max} F{speed*60} + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + G0 X{x_min} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + + # Box + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_min} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + + # Small pattern + # Small diagonals + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_max} Y{y_center_max} F{speed*60} + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + G0 X{x_center_min} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + + # Small box + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_min} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + {% endfor %} + + # Restore max speed/accel/accel_to_decel to their configured values + SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} + + # Re-home and get position again for comparison: + G28 X Y + # Go to XY home positions (in case your homing override leaves it elsewhere) + G90 + G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60} + G4 P1000 + GET_POSITION + + # Restore previous gcode state (absolute/relative, etc) + RESTORE_GCODE_STATE NAME=TEST_SPEED + +[gcode_macro LOAD_FILAMENT] +gcode: + M83 ; set extruder to relative + G1 E60 F300 ; load + G1 E15 F150 ; prime nozzle with filament + M82 ; set extruder to absolute + +[gcode_macro UNLOAD_FILAMENT] +gcode: + M83 ; set extruder to relative + G1 E10 F300 ; extrude a little to soften tip + G1 E-60 F1800 ; retract some, but not too much or it will jam + M82 ; set extruder to absolute \ No newline at end of file diff --git a/printer-20221004_223958.cfg b/printer-20221004_223958.cfg new file mode 100644 index 0000000..9dc3dc2 --- /dev/null +++ b/printer-20221004_223958.cfg @@ -0,0 +1,640 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +restart_method: command +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 300 +max_accel: 3000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 25 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 25 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +position_endstop: -0.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 270 +max_power: 1.0 +min_extrude_temp: 170 +control = pid +pid_kp = 26.213 +pid_ki = 1.304 +pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +#pressure_advance: 0.05 +## Default is 0.040, leave stock +#pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +control: pid +pid_kp: 58.437 +pid_ki: 2.347 +pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +heater: heater_bed + +## Exhaust fan - FAN3 +#[heater_fan exhaust_fan] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 5.0 +#heater: heater_bed +#heater_temp: 60 +#fan_speed: 1.0 + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 1800 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 100 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z30 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +[gcode_macro PRINT_START] +gcode: + G32 ; home all axes + G90 ; absolute positioning + G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +[gcode_macro PRINT_END] +gcode: + # safe anti-stringing move coords + {% set th = printer.toolhead %} + {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} + {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} + {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} + + SAVE_GCODE_STATE NAME=STATE_PRINT_END + + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-5.0 F1800 ; retract filament + + TURN_OFF_HEATERS + + G90 ; absolute positioning + G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing + G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear + M107 ; turn off fan + + BED_MESH_CLEAR + RESTORE_GCODE_STATE NAME=STATE_PRINT_END \ No newline at end of file diff --git a/printer-20221004_224840.cfg b/printer-20221004_224840.cfg new file mode 100644 index 0000000..2163dc4 --- /dev/null +++ b/printer-20221004_224840.cfg @@ -0,0 +1,668 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +restart_method: command +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 300 +max_accel: 3000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 25 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 25 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +position_endstop: -0.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 270 +max_power: 1.0 +min_extrude_temp: 170 +control = pid +pid_kp = 26.213 +pid_ki = 1.304 +pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +#pressure_advance: 0.05 +## Default is 0.040, leave stock +#pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +heater: heater_bed + +## Exhaust fan - FAN3 +#[heater_fan exhaust_fan] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 5.0 +#heater: heater_bed +#heater_temp: 60 +#fan_speed: 1.0 + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 1800 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 100 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z30 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +[gcode_macro PRINT_START] +gcode: + G32 ; home all axes + G90 ; absolute positioning + G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +[gcode_macro PRINT_END] +gcode: + # safe anti-stringing move coords + {% set th = printer.toolhead %} + {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} + {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} + {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} + + SAVE_GCODE_STATE NAME=STATE_PRINT_END + + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-5.0 F1800 ; retract filament + + TURN_OFF_HEATERS + + G90 ; absolute positioning + G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing + G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear + M107 ; turn off fan + + BED_MESH_CLEAR + RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.037500, 0.013750, 0.075000, 0.027500, 0.023750 +#*# 0.045000, -0.000000, 0.023750, 0.006250, -0.021250 +#*# 0.006250, 0.003750, 0.000000, 0.000000, -0.013750 +#*# 0.002500, 0.003750, 0.025000, 0.032500, 0.001250 +#*# 0.040000, 0.052500, 0.070000, 0.073750, 0.023750 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 diff --git a/printer-20221105_225514.cfg b/printer-20221105_225514.cfg new file mode 100644 index 0000000..98cf7e6 --- /dev/null +++ b/printer-20221105_225514.cfg @@ -0,0 +1,686 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +[include adxl.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +shaper_freq_x: 55.4 +shaper_type_x: mzv +shaper_freq_y: 40.2 +shaper_type_y: mzv + + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 50 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 50 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 100.0 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.055 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[fan_generic nevermore] +pin: PD13 +max_power: 1.0 +shutdown_speed: 0.0 +kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 60 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +heater: heater_bed +stepper: extruder +fan_speed: 0.5 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 1800 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 100 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z30 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.037500, 0.013750, 0.075000, 0.027500, 0.023750 +#*# 0.045000, -0.000000, 0.023750, 0.006250, -0.021250 +#*# 0.006250, 0.003750, 0.000000, 0.000000, -0.013750 +#*# 0.002500, 0.003750, 0.025000, 0.032500, 0.001250 +#*# 0.040000, 0.052500, 0.070000, 0.073750, 0.023750 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 diff --git a/printer-20231105_013955.cfg b/printer-20231105_013955.cfg new file mode 100644 index 0000000..3eb4b5d --- /dev/null +++ b/printer-20231105_013955.cfg @@ -0,0 +1,693 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[heater_fan nevermore] +pin: PD13 +max_power: 1.0 +#shutdown_speed: 0.0 +kick_start_time: 1.0 +heater: heater_bed +heater_temp: 80 +fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.037500, 0.013750, 0.075000, 0.027500, 0.023750 +#*# 0.045000, -0.000000, 0.023750, 0.006250, -0.021250 +#*# 0.006250, 0.003750, 0.000000, 0.000000, -0.013750 +#*# 0.002500, 0.003750, 0.025000, 0.032500, 0.001250 +#*# 0.040000, 0.052500, 0.070000, 0.073750, 0.023750 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 diff --git a/printer-20231105_022758.cfg b/printer-20231105_022758.cfg new file mode 100644 index 0000000..ce01e7a --- /dev/null +++ b/printer-20231105_022758.cfg @@ -0,0 +1,696 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[heater_fan nevermore] +pin: PD13 +max_power: 1.0 +#shutdown_speed: 0.0 +kick_start_time: 1.0 +heater: heater_bed +heater_temp: 80 +fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.735000, 0.726250, 0.800000, 0.751250, 0.733750 +#*# 0.706250, 0.711250, 0.718750, 0.693750, 0.712500 +#*# 0.701250, 0.681250, 0.697500, 0.718750, 0.693750 +#*# 0.701250, 0.722500, 0.740000, 0.711250, 0.696250 +#*# 0.727500, 0.732500, 0.752500, 0.740000, 0.745000 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 diff --git a/printer-20231105_100715.cfg b/printer-20231105_100715.cfg new file mode 100644 index 0000000..0077ac2 --- /dev/null +++ b/printer-20231105_100715.cfg @@ -0,0 +1,699 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[heater_fan nevermore] +pin: PD13 +max_power: 1.0 +#shutdown_speed: 0.0 +kick_start_time: 1.0 +heater: heater_bed +heater_temp: 80 +fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.562500, 0.551250, 0.618750, 0.571250, 0.575000 +#*# 0.541250, 0.547500, 0.542500, 0.530000, 0.543750 +#*# 0.536250, 0.523750, 0.533750, 0.546250, 0.533750 +#*# 0.531250, 0.566250, 0.581250, 0.546250, 0.533750 +#*# 0.557500, 0.551250, 0.588750, 0.567500, 0.576250 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 2.150 diff --git a/printer-20231105_101440.cfg b/printer-20231105_101440.cfg new file mode 100644 index 0000000..b4f521f --- /dev/null +++ b/printer-20231105_101440.cfg @@ -0,0 +1,699 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[heater_fan nevermore] +pin: PD13 +max_power: 1.0 +#shutdown_speed: 0.0 +kick_start_time: 1.0 +heater: heater_bed +heater_temp: 80 +fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.562500, 0.551250, 0.618750, 0.571250, 0.575000 +#*# 0.541250, 0.547500, 0.542500, 0.530000, 0.543750 +#*# 0.536250, 0.523750, 0.533750, 0.546250, 0.533750 +#*# 0.531250, 0.566250, 0.581250, 0.546250, 0.533750 +#*# 0.557500, 0.551250, 0.588750, 0.567500, 0.576250 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 1.895 diff --git a/printer-20231216_213643.cfg b/printer-20231216_213643.cfg new file mode 100644 index 0000000..2389acb --- /dev/null +++ b/printer-20231216_213643.cfg @@ -0,0 +1,702 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +## Exhaust fan - FAN3 +[heater_fan nevermore] +pin: PD13 +max_power: 1.0 +#shutdown_speed: 0.0 +kick_start_time: 1.0 +heater: heater_bed +heater_temp: 80 +fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2 +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber_temp] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.562500, 0.551250, 0.618750, 0.571250, 0.575000 +#*# 0.541250, 0.547500, 0.542500, 0.530000, 0.543750 +#*# 0.536250, 0.523750, 0.533750, 0.546250, 0.533750 +#*# 0.531250, 0.566250, 0.581250, 0.546250, 0.533750 +#*# 0.557500, 0.551250, 0.588750, 0.567500, 0.576250 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 1.920 diff --git a/printer-20240122_131025.cfg b/printer-20240122_131025.cfg new file mode 100644 index 0000000..36fc6ad --- /dev/null +++ b/printer-20240122_131025.cfg @@ -0,0 +1,707 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.140000, 0.136250, 0.163750, 0.151250, 0.158750 +#*# 0.105000, 0.108750, 0.127500, 0.115000, 0.110000 +#*# 0.090000, 0.091250, 0.103750, 0.097500, 0.097500 +#*# 0.110000, 0.107500, 0.128750, 0.116250, 0.118750 +#*# 0.145000, 0.146250, 0.165000, 0.161250, 0.150000 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 29.732 +#*# pid_ki = 2.227 +#*# pid_kd = 99.230 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 1.920 diff --git a/printer-20240122_142130.cfg b/printer-20240122_142130.cfg new file mode 100644 index 0000000..1f139e4 --- /dev/null +++ b/printer-20240122_142130.cfg @@ -0,0 +1,707 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.140000, 0.136250, 0.163750, 0.151250, 0.158750 +#*# 0.105000, 0.108750, 0.127500, 0.115000, 0.110000 +#*# 0.090000, 0.091250, 0.103750, 0.097500, 0.097500 +#*# 0.110000, 0.107500, 0.128750, 0.116250, 0.118750 +#*# 0.145000, 0.146250, 0.165000, 0.161250, 0.150000 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 260.0 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 1.920 diff --git a/printer-20240122_221420.cfg b/printer-20240122_221420.cfg new file mode 100644 index 0000000..68fb684 --- /dev/null +++ b/printer-20240122_221420.cfg @@ -0,0 +1,705 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.231250, 0.258750, 0.255000 +#*# 0.246250, 0.257500, 0.248750 +#*# 0.237500, 0.257500, 0.247500 +#*# tension = 0.2 +#*# min_x = 101.6 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 122.73 +#*# x_count = 3 +#*# max_y = 177.27 +#*# mesh_x_pps = 2 +#*# max_x = 188.4 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 6.500 +#*# +#*# [stepper_z] +#*# position_endstop = 1.955 diff --git a/printer-20240123_153318.cfg b/printer-20240123_153318.cfg new file mode 100644 index 0000000..c3fa0d4 --- /dev/null +++ b/printer-20240123_153318.cfg @@ -0,0 +1,705 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.231250, 0.258750, 0.255000 +#*# 0.246250, 0.257500, 0.248750 +#*# 0.237500, 0.257500, 0.247500 +#*# tension = 0.2 +#*# min_x = 101.6 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 122.73 +#*# x_count = 3 +#*# max_y = 177.27 +#*# mesh_x_pps = 2 +#*# max_x = 188.4 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 7.290 +#*# +#*# [stepper_z] +#*# position_endstop = 1.955 diff --git a/printer-20240123_235332.cfg b/printer-20240123_235332.cfg new file mode 100644 index 0000000..e74c16a --- /dev/null +++ b/printer-20240123_235332.cfg @@ -0,0 +1,705 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: PG10 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 19.75 +#z_offset: 6.42 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:252,308 +#speed:100 +#z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.023750, -0.017500, -0.003750, -0.008750 +#*# -0.023750, -0.013750, -0.008750, -0.012500 +#*# -0.022500, -0.017500, 0.003750, -0.002500 +#*# tension = 0.2 +#*# min_x = 85.17 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 110.18 +#*# x_count = 4 +#*# max_y = 189.8 +#*# mesh_x_pps = 2 +#*# max_x = 204.81 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = 7.290 +#*# +#*# [stepper_z] +#*# position_endstop = 1.954 diff --git a/printer-20240129_224156.cfg b/printer-20240129_224156.cfg new file mode 100644 index 0000000..c2a67a0 --- /dev/null +++ b/printer-20240129_224156.cfg @@ -0,0 +1,727 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.023750, -0.017500, -0.003750, -0.008750 +#*# -0.023750, -0.013750, -0.008750, -0.012500 +#*# -0.022500, -0.017500, 0.003750, -0.002500 +#*# tension = 0.2 +#*# min_x = 85.17 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 110.18 +#*# x_count = 4 +#*# max_y = 189.8 +#*# mesh_x_pps = 2 +#*# max_x = 204.81 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 diff --git a/printer-20240217_140835.cfg b/printer-20240217_140835.cfg new file mode 100644 index 0000000..310fb68 --- /dev/null +++ b/printer-20240217_140835.cfg @@ -0,0 +1,731 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.023750, -0.017500, -0.003750, -0.008750 +#*# -0.023750, -0.013750, -0.008750, -0.012500 +#*# -0.022500, -0.017500, 0.003750, -0.002500 +#*# tension = 0.2 +#*# min_x = 85.17 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 110.18 +#*# x_count = 4 +#*# max_y = 189.8 +#*# mesh_x_pps = 2 +#*# max_x = 204.81 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.990 diff --git a/printer-20240315_083911.cfg b/printer-20240315_083911.cfg new file mode 100644 index 0000000..27cb4d3 --- /dev/null +++ b/printer-20240315_083911.cfg @@ -0,0 +1,733 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.000000, 0.002500, 0.037500, 0.056250, 0.033750 +#*# -0.026250, -0.005000, -0.006250, 0.001250, -0.016250 +#*# -0.027500, -0.033750, -0.002500, -0.023750, -0.016250 +#*# -0.035000, -0.031250, -0.007500, 0.003750, -0.020000 +#*# 0.017500, 0.020000, 0.037500, 0.013750, 0.016250 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = lagrange +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 59.53 +#*# x_count = 5 +#*# max_y = 240.29 +#*# mesh_x_pps = 2 +#*# max_x = 260.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 28.729 +#*# pid_ki = 1.954 +#*# pid_kd = 105.580 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.840 diff --git a/printer-20240323_165009.cfg b/printer-20240323_165009.cfg new file mode 100644 index 0000000..807077c --- /dev/null +++ b/printer-20240323_165009.cfg @@ -0,0 +1,733 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 10 +max_temp: 290 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +sensor_type: CMFB103F3950FANT +sensor_pin: PF5 +min_temp: 0 +max_temp: 100 +#gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + +[gcode_arcs] +resolution: 0.8 + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.052500, -0.042500, -0.017500 +#*# -0.048750, -0.045000, -0.047500 +#*# -0.043750, -0.043750, -0.011250 +#*# tension = 0.2 +#*# min_x = 133.48 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 137.47 +#*# x_count = 3 +#*# max_y = 161.19 +#*# mesh_x_pps = 2 +#*# max_x = 156.34 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 27.522 +#*# pid_ki = 1.799 +#*# pid_kd = 105.272 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.840 diff --git a/printer-20240329_103920.cfg b/printer-20240329_103920.cfg new file mode 100644 index 0000000..456875a --- /dev/null +++ b/printer-20240329_103920.cfg @@ -0,0 +1,735 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 0 +max_temp: 300 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.8 +min_temp: -273 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +#sensor_type: CMFB103F3950FANT +#sensor_pin: PF5 +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF6 +min_temp: -273.15 +max_temp: 500 +gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + +[gcode_arcs] +resolution: 0.8 + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.027500, 0.026250, 0.017500 +#*# 0.015000, 0.008750, -0.003750 +#*# 0.007500, 0.018750, 0.017500 +#*# tension = 0.2 +#*# min_x = 131.32 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 128.75 +#*# x_count = 3 +#*# max_y = 145.93 +#*# mesh_x_pps = 2 +#*# max_x = 148.2 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.075 +#*# pid_ki = 1.397 +#*# pid_kd = 301.901 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 27.522 +#*# pid_ki = 1.799 +#*# pid_kd = 105.272 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.840 diff --git a/printer-20240402_001645.cfg b/printer-20240402_001645.cfg new file mode 100644 index 0000000..c87c40b --- /dev/null +++ b/printer-20240402_001645.cfg @@ -0,0 +1,735 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 0 +max_temp: 300 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.8 +min_temp: -273 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +#sensor_type: CMFB103F3950FANT +#sensor_pin: PF5 +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF6 +min_temp: -273.15 +max_temp: 500 +gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + +[gcode_arcs] +resolution: 0.8 + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.027500, 0.026250, 0.017500 +#*# 0.015000, 0.008750, -0.003750 +#*# 0.007500, 0.018750, 0.017500 +#*# tension = 0.2 +#*# min_x = 131.32 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 128.75 +#*# x_count = 3 +#*# max_y = 145.93 +#*# mesh_x_pps = 2 +#*# max_x = 148.2 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 51.569 +#*# pid_ki = 1.942 +#*# pid_kd = 342.288 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 27.522 +#*# pid_ki = 1.799 +#*# pid_kd = 105.272 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.840 diff --git a/printer-20240409_165912.cfg b/printer-20240409_165912.cfg new file mode 100644 index 0000000..3e0205c --- /dev/null +++ b/printer-20240409_165912.cfg @@ -0,0 +1,735 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 0 +max_temp: 300 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.8 +min_temp: -273 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +#sensor_type: CMFB103F3950FANT +#sensor_pin: PF5 +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF6 +min_temp: -273.15 +max_temp: 500 +gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + +[gcode_arcs] +resolution: 0.8 + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.007500, 0.002500, 0.007500, -0.005000, 0.002500 +#*# -0.007500, 0.035000, 0.008750, 0.001250, 0.011250 +#*# 0.030000, 0.018750, 0.021250, 0.016250, 0.026250 +#*# tension = 0.2 +#*# min_x = 60.71 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 105.33 +#*# x_count = 5 +#*# max_y = 193.45 +#*# mesh_x_pps = 2 +#*# max_x = 229.55 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 51.569 +#*# pid_ki = 1.942 +#*# pid_kd = 342.288 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 27.522 +#*# pid_ki = 1.799 +#*# pid_kd = 105.272 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.860 diff --git a/printer.cfg b/printer.cfg new file mode 100644 index 0000000..b655af8 --- /dev/null +++ b/printer.cfg @@ -0,0 +1,735 @@ +# This file contains common pin mappings for the BigTreeTech Octopus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Probe pin [probe] section +## Fine tune E steps [extruder] section + +[include fluidd.cfg] +[include stealthburner_leds.cfg] +#[include autoz.cfg] +#[include adxl.cfg] +[include KAMP_Settings.cfg] + +[mcu] +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_17003D000650314D35323820-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 +restart_method: command +##-------------------------------------------------------------------- + +[input_shaper] +#shaper_freq_x: 55.4 +#shaper_type_x: mzv +#shaper_freq_y: 40.2 +#shaper_type_y: mzv + +[exclude_object] + +[printer] +kinematics: corexy +max_velocity: 450 +max_accel: 5000 #Max 4000 +max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## B Stepper - Left +## Connected to MOTOR_0 +## Endstop connected to DIAG_0 +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG6 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 298 +position_max: 298 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## A Stepper - Right +## Connected to MOTOR_1 +## Endstop connected to DIAG_1 +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation:400 #set to 400 for 0.9 degree stepper +endstop_pin: PG9 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +position_endstop: 308 +position_max: 308 + +## Uncomment for 350mm build +#position_endstop: 350 +#position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 30 #Max 100 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left +## Connected to MOTOR_2 +## Endstop connected to DIAG_2 +[stepper_z] +step_pin: PF11 +dir_pin: PG3 +enable_pin: !PG5 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 +endstop_pin: probe:z_virtual_endstop +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: 2.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +position_max: 260 + +## Uncomment below for 350mm build +#position_max: 310 + +##-------------------------------------------------------------------- +position_min: -5 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PC6 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left +## Connected to MOTOR_3 +[stepper_z1] +step_pin: PG4 +dir_pin: !PC1 +enable_pin: !PA0 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: PC7 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right +## Connected to MOTOR_4 +[stepper_z2] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: PF2 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right +## Connected to MOTOR_5 +[stepper_z3] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: PE4 +interpolate: false +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +## Connected to MOTOR_6 +## Heater - HE0 +## Thermistor - T0 +[extruder] +step_pin: PE2 +dir_pin: !PE3 +enable_pin: !PD4 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +## rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +rotation_distance: 22.6629397605 +gear_ratio: 50:8 #BMG Gear Ratio +microsteps: 32 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: PA2 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF4 +min_temp: 0 +max_temp: 300 +max_power: 1.0 +min_extrude_temp: 170 +max_extrude_only_distance: 150.0 +max_extrude_cross_section: 5 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.0325 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MOTOR6 +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: PE1 +interpolate: false +run_current: 0.5 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - HE1 +## Thermistor - TB +[heater_bed] +## Uncomment the following line if using the default SSR wiring from the docs site +#heater_pin: PA3 +## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases +heater_pin: PA1 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . +max_power: 0.8 +min_temp: -273 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +[probe] + +#-------------------------------------------------------------------- + +## Select the probe port by type: +## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. +#pin: ~!PB7 +## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. +pin: PG15 +## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper +#pin: ~!PC5 + +#-------------------------------------------------------------------- + +x_offset: 0 +y_offset: 0 +#z_offset: 0 +speed: 5 +samples: 3 +samples_result: median +sample_retract_dist: 2.0 +samples_tolerance: 0.01 +samples_tolerance_retries: 3 + +activate_gcode: + {% set PROBE_TEMP = 150 %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{ PROBE_TEMP } + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } + {% endif %} + {% endif %} + + +##################################################################### +# Fan Control +##################################################################### + +## Print Cooling Fan - FAN0 +[fan] +pin: PA8 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[output_pin nevermore] +pin: PD13 +value: 0 +shutdown_value: 0 + +## Exhaust fan - FAN3 +#[heater_fan nevermore] +#pin: PD13 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 1.0 +#heater: heater_bed +#heater_temp: 80 +#fan_speed: 1.0 + +## Hotend Fan - FAN1 +[heater_fan hotend_fan] +pin: PE5 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Controller fan - FAN2r +[controller_fan controller_fan] +pin: PD12 +kick_start_time: 0.5 +#heater: heater_bed +stepper: extruder +fan_speed: 0.35 + + +##################################################################### +# LED Control +##################################################################### + +## Chamber Lighting - HE2 Connector (Optional) +#[output_pin caselight] +#pin: PB10 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# LED Control +##################################################################### + +[output_pin caselight] +## Chamber Lighting - CNC_FAN5 +pin: PD15 +pwm:true +shutdown_value: 0 +value:0 +cycle_time: 0.01 + +##################################################################### +# Additional Sensors +##################################################################### + +[thermistor CMFB103F3950FANT] +temperature1: 0.0 +resistance1: 32116.0 +temperature2: 40.0 +resistance2: 5309.0 +temperature3: 80.0 +resistance3: 1228.0 + +[temperature_sensor chamber] +## Chamber Temperature - T1 +#sensor_type: CMFB103F3950FANT +#sensor_pin: PF5 +sensor_type: ATC Semitec 104NT-4-R025H42G +sensor_pin: PF6 +min_temp: -273.15 +max_temp: 500 +gcode_id: chamber_th + +[temperature_sensor SKR_Pico] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor RPi_4B] +sensor_type: temperature_host +min_temp: 10 +max_temp: 100 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 18000 + +[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +home_xy_position:150,150 +speed:100 +z_hop:10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +gantry_corners: + -60,-10 + 360,370 +## Probe points +points: + 25,10 + 25,260 + 275,260 + 275,10 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +#gantry_corners: +# -60,-10 +# 410,420 +## Probe points +#points: +# 50,25 +# 50,275 +# 300,275 +# 300,25 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 10 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +mesh_min: 40, 40 +mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +######################################## +# EXP1 / EXP2 (display) pins +######################################## + +[board_pins] +aliases: + # EXP1 header + EXP1_1=PE8, EXP1_2=PE7, + EXP1_3=PE9, EXP1_4=PE10, + EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side + EXP1_7=PE14, EXP1_8=PE15, + EXP1_9=, EXP1_10=<5V>, + + # EXP2 header + EXP2_1=PA6, EXP2_2=PA5, + EXP2_3=PB1, EXP2_4=PA4, + EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side + EXP2_7=PC15, EXP2_8=, + EXP2_9=, EXP2_10=<5V> + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have +#-------------------------------------------------------------------- + + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: EXP1_4 +#sclk_pin: EXP1_5 +#sid_pin: EXP1_3 +#menu_timeout: 40 +#encoder_pins: ^EXP2_5, ^EXP2_3 +#click_pin: ^!EXP1_2 + +#[output_pin beeper] +#pin: EXP1_1 + +#-------------------------------------------------------------------- + + +## mini12864 LCD Display +[display] +lcd_type: uc1701 +cs_pin: EXP1_3 +a0_pin: EXP1_4 +rst_pin: EXP1_5 +encoder_pins: ^EXP2_5, ^EXP2_3 +click_pin: ^!EXP1_2 +contrast: 63 +spi_software_miso_pin: EXP2_1 +spi_software_mosi_pin: EXP2_6 +spi_software_sclk_pin: EXP2_2 + +## To control Neopixel RGB in mini12864 display +[neopixel btt_mini12864] +pin: EXP1_6 +chain_count: 3 +initial_RED: 0 +initial_GREEN: 1 +initial_BLUE: 0.47 +color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +[delayed_gcode setdisplayneopixel] +initial_duration: 1 +gcode: + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=1 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=2 TRANSMIT=0 + SET_LED LED=btt_mini12864 RED=0 GREEN=1 BLUE=0.47 INDEX=3 + +#-------------------------------------------------------------------- + +[gcode_arcs] +resolution: 0.8 + +##################################################################### +# Macros +##################################################################### + +#[include klicky-probe.cfg] +[include print_macros.cfg] + +[gcode_macro G32] +gcode: + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + ## Uncomment for for your size printer: + #-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + G0 X150 Y150 Z60 F3600 + + ## Uncomment for 350mm build + #G0 X175 Y175 Z30 F3600 + #-------------------------------------------------------------------- + RESTORE_GCODE_STATE NAME=STATE_G32 + + +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +#[gcode_macro PRINT_START] +#gcode: +# G32 ; home all axes +# G90 ; absolute positioning +# G1 Z20 F3000 ; move nozzle away from bed + + +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +#[gcode_macro PRINT_END] +#gcode: +# # safe anti-stringing move coords +# {% set th = printer.toolhead %} +# {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} +# {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} +# {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} +# +# SAVE_GCODE_STATE NAME=STATE_PRINT_END +# +# M400 ; wait for buffer to clear +# G92 E0 ; zero the extruder +# G1 E-5.0 F1800 ; retract filament +# +# TURN_OFF_HEATERS +# +# G90 ; absolute positioning +# G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing +# G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear +# M107 ; turn off fan +# +# BED_MESH_CLEAR +# RESTORE_GCODE_STATE NAME=STATE_PRINT_END + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.010000, 0.017500, 0.042500 +#*# 0.052500, 0.022500, 0.043750 +#*# 0.015000, 0.037500, 0.038750 +#*# tension = 0.2 +#*# min_x = 135.22 +#*# algo = lagrange +#*# y_count = 3 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 3 +#*# max_y = 69.0 +#*# mesh_x_pps = 2 +#*# max_x = 160.84 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 51.569 +#*# pid_ki = 1.942 +#*# pid_kd = 342.288 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 27.522 +#*# pid_ki = 1.799 +#*# pid_kd = 105.272 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 55.6 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 42.2 +#*# +#*# [probe] +#*# z_offset = -1.840 diff --git a/stealthburner_leds.cfg b/stealthburner_leds.cfg new file mode 100644 index 0000000..2d91ab5 --- /dev/null +++ b/stealthburner_leds.cfg @@ -0,0 +1,254 @@ +# Macros for setting the status leds on the Voron StealthBurner toolhead (or for any neopixel-type leds). +# +# You will need to configure a neopixel (or other addressable led, such as dotstar). See +# https://www.klipper3d.org/Config_Reference.html#neopixel for configuration details. + + +##################################### +# INSTRUCTIONS # +##################################### +# How to use all this stuff: +# +# 1. Copy this .cfg file into your Klipper config directory and then add [include stealthburner_leds.cfg] +# to the top of your printer.cfg in order to register the LEDs and macros with Klipper. +# 2. Define your LEDs by editing [neopixel sb_leds] below and entering the data pin from your control board +# as well as the color order. +# +# Note: RGB and RGBW are different and must be defined explicitly. RGB and RGBW are also not able to +# be mix-and-matched in the same chain. A separate data line would be needed for proper functioning. +# +# RGBW LEDs will have a visible yellow-ish phosphor section to the chip. If your LEDs do not have +# this yellow portion, you have RGB LEDs. +# +# 3. Save your config and restart Klipper. +# +# Note: We set RED and BLUE to 1.0 to make it easier for users and supporters to detect +# misconfigurations or miswiring. The default color format is for Neopixels with a dedicated +# white LED. On startup, all three SB LEDs should light up. +# +# If you get random colors across your LEDs, change the color_order to GRB and restart. Then +# omit the W for each suggested color_order in the next paragraph. +# +# If you get MAGENTA, your color order is correct. If you get CYAN, you need to use RGBW. If +# you get YELLOW, you need to use BRGW (note that BRG is only supported in the latest Klipper +# version). +# +# 4. Once you have confirmed that the LEDs are set up correctly, you must now decide where you want +# these macros called up...which means adding them to your existing gcode macros. NOTHING will happen +# unless you add the STATUS_????? macros to your existing gcode macros. +# +# Example: add STATUS_LEVELING to the beginning of your QGL gcode macro, and then add STATUS_READY +# to the end of it to set the logo LED and nozzle LEDs back to the `ready` state. +# +# Example: add STATUS_CLEANING to the beginning of your nozzle-cleaning macro, and then STATUS_READY +# to the end of it to return the LEDs back to `ready` state. +# +# 5. Feel free to change colors of each macro, create new ones if you have a need to. The macros provided below +# are just an example of what is possible. If you want to try some more complex animations, you will most +# likely have to use WLED with Moonraker and a small micro-controller +# +##################################### +# END INSTRUCTRUCTIONS # +##################################### + + +[neopixel sb_leds] +pin: PB0 +# The pin connected to the neopixel. This parameter must be provided. +chain_count: 3 +# The number of Neopixel chips that are "daisy chained" to the +# provided pin. The default is 1 (which indicates only a single +# Neopixel is connected to the pin). +color_order: GRBW +# Set the pixel order required by the LED hardware. Options are GRB, +# RGB, GRBW, or RGBW. The default is GRB. +initial_RED: 1.0 +initial_GREEN: 0.0 +initial_BLUE: 1.0 +initial_WHITE: 0.0 +# Sets the initial LED color of the Neopixel. Each value should be +# between 0.0 and 1.0. The WHITE option is only available on RGBW +# LEDs. The default for each color is 0.# + +# Most configuration for the macros can be done by modifying the variables in the _sb_vars macro +# at the start of this file. + +########## +# MACROS # +########## + +# The following status macros are available (these go inside of your macros): +# +# STATUS_READY +# STATUS_OFF +# STATUS_BUSY +# STATUS_HEATING +# STATUS_LEVELING +# STATUS_HOMING +# STATUS_CLEANING +# STATUS_MESHING +# STATUS_CALIBRATING_Z +# +# With additional macros for basic control: +# +# SET_NOZZLE_LEDS_ON +# SET_LOGO_LEDS_OFF +# SET_NOZZLE_LEDS_OFF +# +# Contributed by Voron discord users wile.e, Tetsunosuke, and etherwalker + + +[gcode_macro _sb_vars] +# User settings for the StealthBurner status leds. You can change the status colors and led +# configurations for the logo and nozzle here. +variable_colors: { + 'logo': { # Colors for logo states + 'busy': {'r': 0.4, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'cleaning': {'r': 0.0, 'g': 0.02, 'b': 0.5, 'w': 0.0}, + 'calibrating_z': {'r': 0.8, 'g': 0., 'b': 0.35, 'w': 0.0}, + 'heating': {'r': 0.3, 'g': 0.18, 'b': 0.0, 'w': 0.0}, + 'homing': {'r': 0.0, 'g': 0.6, 'b': 0.2, 'w': 0.0}, + 'leveling': {'r': 0.5, 'g': 0.1, 'b': 0.4, 'w': 0.0}, + 'meshing': {'r': 0.2, 'g': 1.0, 'b': 0.0, 'w': 0.0}, + 'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'printing': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'standby': {'r': 0.01, 'g': 0.01, 'b': 0.01, 'w': 0.1}, + }, + 'nozzle': { # Colors for nozzle states + 'heating': {'r': 0.8, 'g': 0.35, 'b': 0.0, 'w':0.0}, + 'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'on': {'r': 0.8, 'g': 0.8, 'b': 0.8, 'w':1.0}, + 'standby': {'r': 0.6, 'g': 0.0, 'b': 0.0, 'w':0.0}, + }, + 'thermal': { + 'hot': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'cold': {'r': 0.3, 'g': 0.0, 'b': 0.3, 'w': 0.0} + } + } +variable_logo_led_name: "sb_leds" +# The name of the addressable LED chain that contains the logo LED(s) +variable_logo_idx: "1" +# A comma-separated list of indexes LEDs in the logo +variable_nozzle_led_name: "sb_leds" +# The name of the addressable LED chain that contains the nozzle LED(s). This will +# typically be the same LED chain as the logo. +variable_nozzle_idx: "2,3" +# A comma-separated list of indexes of LEDs in the nozzle +gcode: + # This section is required. Do Not Delete. + + +[gcode_macro _set_sb_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = params.LED|string %} + {% set idx = (params.IDX|string).split(',') %} + {% set transmit_last = params.TRANSMIT|default(1) %} + + {% for led_index in idx %} + {% set transmit=transmit_last if loop.last else 0 %} + set_led led={led} red={red} green={green} blue={blue} white={white} index={led_index} transmit={transmit} + {% endfor %} + +[gcode_macro _set_sb_leds_by_name] +gcode: + {% set leds_name = params.LEDS %} + {% set color_name = params.COLOR %} + {% set color = printer["gcode_macro _sb_vars"].colors[leds_name][color_name] %} + {% set led = printer["gcode_macro _sb_vars"][leds_name + "_led_name"] %} + {% set idx = printer["gcode_macro _sb_vars"][leds_name + "_idx"] %} + {% set transmit = params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={color.r} green={color.g} blue={color.b} white={color.w} idx="{idx}" transmit={transmit} + +[gcode_macro _set_logo_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = printer["gcode_macro _sb_vars"].logo_led_name %} + {% set idx = printer["gcode_macro _sb_vars"].logo_idx %} + {% set transmit=params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit} + +[gcode_macro _set_nozzle_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = printer["gcode_macro _sb_vars"].nozzle_led_name %} + {% set idx = printer["gcode_macro _sb_vars"].nozzle_idx %} + {% set transmit=params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit} + +[gcode_macro set_logo_leds_off] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_logo_leds red=0 blue=0 green=0 white=0 transmit={transmit} + +[gcode_macro set_nozzle_leds_on] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_sb_leds_by_name leds="nozzle" color="on" transmit={transmit} + +[gcode_macro set_nozzle_leds_off] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_sb_leds_by_name leds="nozzle" color="off" transmit={transmit} + +[gcode_macro status_off] +gcode: + set_logo_leds_off transmit=0 + set_nozzle_leds_off + +[gcode_macro status_ready] +gcode: + _set_sb_leds_by_name leds="logo" color="standby" transmit=0 + _set_sb_leds_by_name leds="nozzle" color="standby" transmit=1 + +[gcode_macro status_busy] +gcode: + _set_sb_leds_by_name leds="logo" color="busy" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_heating] +gcode: + _set_sb_leds_by_name leds="logo" color="heating" transmit=0 + _set_sb_leds_by_name leds="nozzle" color="heating" transmit=1 + +[gcode_macro status_leveling] +gcode: + _set_sb_leds_by_name leds="logo" color="leveling" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_homing] +gcode: + _set_sb_leds_by_name leds="logo" color="homing" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_cleaning] +gcode: + _set_sb_leds_by_name leds="logo" color="cleaning" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_meshing] +gcode: + _set_sb_leds_by_name leds="logo" color="meshing" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_calibrating_z] +gcode: + _set_sb_leds_by_name leds="logo" color="calibrating_z" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_printing] +gcode: + _set_sb_leds_by_name leds="logo" color="printing" transmit=0 + set_nozzle_leds_on \ No newline at end of file diff --git a/webcam.txt b/webcam.txt new file mode 100644 index 0000000..8b7bb9c --- /dev/null +++ b/webcam.txt @@ -0,0 +1,79 @@ +### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText. +### Do not use Notepad or WordPad. + +### MacOSX users: If you use Textedit to edit this file make sure to use +### "plain text format" and "disable smart quotes" in "Textedit > Preferences" + +### Configure which camera to use +# +# Available options are: +# - auto: tries first usb webcam, if that's not available tries raspi cam +# - usb: only tries usb webcam +# - raspi: only tries raspi cam +# +# Defaults to auto +# +#camera="auto" + +### Additional options to supply to MJPG Streamer for the USB camera +# +# See https://faq.octoprint.org/mjpg-streamer-config for available options +# +# Defaults to a resolution of 640x480 px and a framerate of 10 fps +# +#camera_usb_options="-r 640x480 -f 10" + +### Additional webcam devices known to cause problems with -f +# +# Apparently there a some devices out there that with the current +# mjpg_streamer release do not support the -f parameter (for specifying +# the capturing framerate) and will just refuse to output an image if it +# is supplied. +# +# The webcam daemon will detect those devices by their USB Vendor and Product +# ID and remove the -f parameter from the options provided to mjpg_streamer. +# +# By default, this is done for the following devices: +# Logitech C170 (046d:082b) +# GEMBIRD (1908:2310) +# Genius F100 (0458:708c) +# Cubeternet GL-UPC822 UVC WebCam (1e4e:0102) +# +# Using the following option it is possible to add additional devices. If +# your webcam happens to show above symptoms, try determining your cam's +# vendor and product id via lsusb, activating the line below by removing # and +# adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff" +# +# additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff") +# +# +#additional_brokenfps_usb_devices=() + +### Additional options to supply to MJPG Streamer for the RasPi Cam +# +# See https://faq.octoprint.org/mjpg-streamer-config for available options +# +# Defaults to 10fps +# +#camera_raspi_options="-fps 10" + +### Configuration of camera HTTP output +# +# Usually you should NOT need to change this at all! Only touch if you +# know what you are doing and what the parameters mean. +# +# Below settings are used in the mjpg-streamer call like this: +# +# -o "output_http.so -w $camera_http_webroot $camera_http_options" +# +# Current working directory is the mjpg-streamer base directory. +# +#camera_http_webroot="./www-fluidd" +#camera_http_options="-n" + +### EXPERIMENTAL +# Support for different streamer types. +# +# Available options: +# mjpeg [default] - stable MJPG-streamer +#camera_streamer=mjpeg