initial commit

This commit is contained in:
2022-11-13 22:49:29 +01:00
commit 054b2b429d
13 changed files with 725 additions and 0 deletions

66
.moonraker.conf.bkp Normal file
View File

@@ -0,0 +1,66 @@
[server]
host = 0.0.0.0
port = 7125
enable_debug_logging = False
max_upload_size = 1024
[file_manager]
config_path = ~/klipper_config
log_path = ~/klipper_logs
enable_object_processing = False
[authorization]
cors_domains =
https://my.mainsail.xyz
http://my.mainsail.xyz
http://*.local
http://*.lan
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 =
mainsail
[update_manager]
refresh_interval = 168
enable_auto_refresh = True
[update_manager mainsail]
type = web
channel = stable
repo = mainsail-crew/mainsail
path = ~/mainsail
[update_manager crowsnest]
type = git_repo
path = ~/crowsnest
origin = https://github.com/mainsail-crew/crowsnest.git
managed_services = crowsnest
[update_manager sonar]
type = git_repo
path = ~/sonar
origin = https://github.com/mainsail-crew/sonar.git
primary_branch = main
managed_services = sonar
[update_manager KlipperScreen]
type = git_repo
path = ~/KlipperScreen
origin = https://github.com/jordanruthe/KlipperScreen.git
env = ~/.KlipperScreen-env/bin/python
requirements = scripts/KlipperScreen-requirements.txt
install_script = scripts/KlipperScreen-install.sh
managed_services = KlipperScreen

12
KlipperScreen.conf Normal file
View File

@@ -0,0 +1,12 @@
#~# --- Do not edit below this line. This section is auto generated --- #~#
#~#
#~# [main]
#~# font_size = large
#~# confirm_estop = True
#~# move_speed_z = 20
#~#
#~# [graph Printer]
#~# temperature_sensor raspberry_pi = False
#~#

110
UM2_v2.1.cfg Normal file
View File

@@ -0,0 +1,110 @@
[heater_bed]
heater_pin: PG5
sensor_type: PT100 INA826
sensor_pin: PK2
control: pid
pid_Kp: 68.485
pid_Ki: 1.763
pid_Kd: 665.164
min_temp: 0
max_temp: 110
[verify_heater heater_bed]
check_gain_time: 80
[fan]
pin: PH4
[heater_fan Heater_fan]
pin: PJ6
heater: extruder
heater_temp: 50.0
[stepper_x]
step_pin: PA3
dir_pin: !PA1
enable_pin: !PA5
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PA0
position_endstop: 0
position_max: 230
homing_speed: 80.0
[stepper_y]
step_pin: PC5
dir_pin: PC4
enable_pin: !PC6
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PA4
position_endstop: 225
position_max: 225
homing_speed: 80.0
[stepper_z]
step_pin: PC2
dir_pin: !PC1
enable_pin: !PC3
microsteps: 16
rotation_distance: 16
endstop_pin: ^!PA7
#position_endstop: 225
position_min: -10
position_max: 232
homing_speed: 20.0
[extruder]
step_pin: PL7
dir_pin: !PL6
enable_pin: !PC0
microsteps: 16
rotation_distance: 10.07 #33.500
nozzle_diameter: 0.400
filament_diameter: 1.74
heater_pin: PE4
sensor_type: PT100 INA826
sensor_pin: PK0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 275
[led case_light]
white_pin: PH5
initial_WHITE: 0.8
hardware_pwm: true
cycle_time: 0.005
# Motor current settings.
[output_pin stepper_xy_current]
pin: PL5
pwm: True
scale: 2.000
# Max power setting.
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
# Power adjustment setting.
[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
[output_pin stepper_e_current]
pin: PL3
pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
static_value: 1.250

View File

@@ -0,0 +1,69 @@
# This file contains common pin mappings for the BIGTREETECH EBBCan
# Canbus board. To use this config, the firmware should be compiled for the
# STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)".
# The "EBB Can" micro-controller will be used to control the components on the nozzle.
# See docs/Config_Reference.md for a description of parameters.
[mcu EBBCan]
#serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_430057001150425539393020-if00
canbus_uuid: 82edf63bd1a9
[adxl345]
cs_pin: EBBCan: PB12
spi_software_sclk_pin: EBBCan: PB10
spi_software_mosi_pin: EBBCan: PB11
spi_software_miso_pin: EBBCan: PB2
axes_map: x,y,z
# [extruder]
# step_pin: EBBCan: PD0
# dir_pin: !EBBCan: PD1
# enable_pin: !EBBCan: PD2
# microsteps: 16
# rotation_distance: 33.500
# nozzle_diameter: 0.400
# filament_diameter: 1.750
# heater_pin: EBBCan: PB13
# sensor_type: EPCOS 100K B57560G104F
# sensor_pin: EBBCan: PA3
# control: pid
# pid_Kp: 21.527
# pid_Ki: 1.063
# pid_Kd: 108.982
# min_temp: 0
# max_temp: 250
sensor_type:MAX31865
sensor_pin: EBBCan: PA4
spi_bus: spi1
rtd_nominal_r: 100
rtd_reference_r: 430
rtd_num_of_wires: 2
# [tmc2209 extruder]
# uart_pin: EBBCan: PA15
# run_current: 0.650
# stealthchop_threshold: 999999
# [fan]
# pin: EBBCan: PA0
# [heater_fan hotend_fan]
# pin: EBBCan: PA1
# heater: extruder
# heater_temp: 50.0
#[neopixel hotend_rgb]
#pin: EBBCan:PD3
[bltouch]
sensor_pin: ^EBBCan:PB8
control_pin: EBBCan:PB9
#[filament_switch_sensor switch_sensor]
#switch_pin: EBBCan:PB4
#[filament_motion_sensor motion_sensor]
#switch_pin: ^EBBCan:PB3

34
crowsnest.conf Normal file
View File

@@ -0,0 +1,34 @@
#### crowsnest.conf
#### This is mainsail / MainsailOS default config.
#### See:
#### https://github.com/mainsail-crew/crowsnest/blob/master/README.md
#### for details to configure to your needs.
#####################################################################
#### #####
#### Information about ports and according URL's #####
#### #####
#####################################################################
#### #####
#### Port 8080 equals /webcam/?action=[stream/snapshot] #####
#### Port 8081 equals /webcam2/?action=[stream/snapshot] #####
#### Port 8082 equals /webcam3/?action=[stream/snapshot] #####
#### Port 8083 equals /webcam4/?action=[stream/snapshot] #####
#### #####
#####################################################################
[crowsnest]
log_path: ~/klipper_logs/crowsnest.log # Default logfile in ~/klipper_logs/crowsnest.log
log_level: verbose # Valid Options are quiet/verbose/debug
delete_log: false # Deletes log on every restart, if set to true
[cam 1]
mode: mjpg # mjpg/rtsp
port: 8080 # Port
device: /dev/video0 # See Log for available ...
resolution: 640x480 # widthxheight format
max_fps: 15 # If Hardware Supports this it will be forced, ohterwise ignored/coerced.
#custom_flags: # You can run the Stream Services with custom flags.
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.

19
macros.cfg Normal file
View File

@@ -0,0 +1,19 @@
[gcode_macro LOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
M300 # beep
G91
G92 E0
G1 E350 F{max_velocity}
G1 E25 F{speed} #purge
M300
M300
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(500) %}
G91
G1 E-400 F{speed}
G1 E-400 F{speed}
G92

105
mainsail.cfg Normal file
View File

@@ -0,0 +1,105 @@
# Mainsail klipper definitions
#
# Copyright (C) 2021 Alex Zellner <alexander.zellner@googlemail.com>
#
# This file may be distributed under the terms of the GNU GPLv3 license
#
# Version 1.11
# add [include mainsail.cfg] to your printer.cfg to include it to your printer.cfg
# modify x_park, y_park, z_park_delta and extrude value at the macro _TOOLHEAD_PARK_PAUSE_CANCEL if needed
# use variable_park: False at CANCEL_PRINT to disallow the parking move
[virtual_sdcard]
path: ~/printer_data/gcodes
on_error_gcode:
CANCEL_PRINT
[pause_resume]
[display_status]
[temperature_sensor Raspberry_Pi]
sensor_type: temperature_host
min_temp: 0
max_temp: 100
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
variable_park: True
gcode:
## Move head and retract only if not already in the pause state and park set to true
{% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
_TOOLHEAD_PARK_PAUSE_CANCEL
{% endif %}
TURN_OFF_HEATERS
M106 S0
CANCEL_PRINT_BASE
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
PAUSE_BASE
_TOOLHEAD_PARK_PAUSE_CANCEL
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
#### 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' %}
M83
G1 E{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
variable_extrude: 1.0
gcode:
##### 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 %}
{% set z_park_delta = 2.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 - z_park_delta) %}
{% set z_safe = z_park_delta %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
M83
G1 E-{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %}
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}

87
moonraker.conf Normal file
View File

@@ -0,0 +1,87 @@
[server]
host: 0.0.0.0
port: 7125
# Verbose logging used for debugging . Default False.
enable_debug_logging: False
# The maximum size allowed for a file upload (in MiB). Default 1024 MiB
max_upload_size: 1024
[file_manager]
#config_path: ~/klipper_config
#log_path: ~/klipper_logs
# post processing for object cancel. Not recommended for low resource SBCs such as a Pi Zero. Default False
enable_object_processing: False
[authorization]
cors_domains:
https://my.mainsail.xyz
http://my.mainsail.xyz
http://*.local
http://*.lan
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 mainsail
[announcements]
subscriptions:
mainsail
# this enables moonraker's update manager
[update_manager]
refresh_interval: 168
enable_auto_refresh: True
[update_manager mainsail]
type: web
channel: stable
repo: mainsail-crew/mainsail
path: ~/mainsail
### moonraker-timelapse
### Don't forget to include timelapse.cfg to your printer.cfg
### Uncomment to enable moonraker-timelapse
#[timelapse]
#[update_manager timelapse]
#type: git_repo
#primary_branch: main
#path: ~/moonraker-timelapse
#origin: https://github.com/mainsail-crew/moonraker-timelapse.git
#managed_services: klipper moonraker
# Crowsnest update_manager entry
[update_manager crowsnest]
type: git_repo
path: ~/crowsnest
origin: https://github.com/mainsail-crew/crowsnest.git
managed_services: crowsnest
# Sonar update_manager entry
[update_manager sonar]
type: git_repo
path: ~/sonar
origin: https://github.com/mainsail-crew/sonar.git
primary_branch: main
managed_services: sonar
[update_manager KlipperScreen]
type: git_repo
path: ~/KlipperScreen
origin: https://github.com/jordanruthe/KlipperScreen.git
env: ~/.KlipperScreen-env/bin/python
requirements: scripts/KlipperScreen-requirements.txt
install_script: scripts/KlipperScreen-install.sh
managed_services: KlipperScreen

View File

@@ -0,0 +1,69 @@
# This file contains common pin mappings for Ultimaker UltiMainboard v2
# boards. To use this config, the firmware should be compiled for the
# AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
[mcu]
serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_8543034383735181D1B1-if00
# [mcu can0]
# canbus_uuid: 82edf63bd1a9
[include UM2_v2.1.cfg]
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30
# [resonance_tester]
# accel_chip: adxl345
# probe_points:
# 175,175,20 # an example
# [bltouch]
# sensor_pin: ^can0:PB8
# control_pin: can0:PB9
# z_offset: 25
# [safe_z_home]
# home_xy_position: 100, 100 # Change coordinates to the center of your print bed
# speed: 50
# z_hop: 10 # Move up 10mm
# z_hop_speed: 5
[bed_screws]
screw1: 120, 185
screw1_name: "rear mid screw"
screw2: 20 ,20
screw2_name: "front left screw"
screw3: 220, 20
screw3_name: "front right screw"
horizontal_move_z: 5
# [adxl345]
# cs_pin: can0: PB12
# spi_software_sclk_pin: can0: PB10
# spi_software_mosi_pin: can0: PB11
# spi_software_miso_pin: can0: PB2
# axes_map: x,y,z
#[include bigtreetech-ebb-canbus-v1.2.cfg]
[include mainsail.cfg]
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [stepper_z]
#*# position_endstop = 206.220
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 16.216
#*# pid_ki = 1.030
#*# pid_kd = 63.851

View File

@@ -0,0 +1,65 @@
# This file contains common pin mappings for Ultimaker UltiMainboard v2
# boards. To use this config, the firmware should be compiled for the
# AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
[mcu]
serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_8543034383735181D1B1-if00
# [mcu can0]
# canbus_uuid: 82edf63bd1a9
[include UM2_v2.1.cfg]
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30
# [resonance_tester]
# accel_chip: adxl345
# probe_points:
# 175,175,20 # an example
# [bltouch]
# sensor_pin: ^can0:PB8
# control_pin: can0:PB9
# z_offset: 25
# [safe_z_home]
# home_xy_position: 100, 100 # Change coordinates to the center of your print bed
# speed: 50
# z_hop: 10 # Move up 10mm
# z_hop_speed: 5
[bed_screws]
screw1: 120, 185
screw1_name: "rear mid screw"
screw2: 20 ,20
screw2_name: "front left screw"
screw3: 220, 20
screw3_name: "front right screw"
horizontal_move_z: 5
# [adxl345]
# cs_pin: can0: PB12
# spi_software_sclk_pin: can0: PB10
# spi_software_mosi_pin: can0: PB11
# spi_software_miso_pin: can0: PB2
# axes_map: x,y,z
#[include bigtreetech-ebb-canbus-v1.2.cfg]
[include mainsail.cfg]
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [stepper_z]
#*# position_endstop = 207.280
#*#
#*# [extruder]

71
printer.cfg Normal file
View File

@@ -0,0 +1,71 @@
# This file contains common pin mappings for Ultimaker UltiMainboard v2
# boards. To use this config, the firmware should be compiled for the
# AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
[include macros.cfg]
[mcu]
serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_8543034383735181D1B1-if00
[include UM2_v2.1.cfg]
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30
# [safe_z_home]
# home_xy_position: 100, 100 # Change coordinates to the center of your print bed
# speed: 50
# z_hop: 10 # Move up 10mm
# z_hop_speed: 5
[bed_screws]
screw1: 120, 185
screw1_name: "rear mid screw"
screw2: 20 ,20
screw2_name: "front left screw"
screw3: 220, 20
screw3_name: "front right screw"
horizontal_move_z: 5
#[include bigtreetech-ebb-canbus-v1.2.cfg]
[filament_motion_sensor runout]
# The minimum length of filament pulled through the sensor to trigger
# a state change on the switch_pin
# Default is 7 mm.
detection_length: 14.0
extruder: extruder
pause_on_runout: FALSE
runout_gcode:
{action_respond_info("RUNOUT: Filament runout")}
PAUSE
insert_gcode: {action_respond_info("RUNOUT: Filament inserted")}
# The minimum amount of time in seconds to delay between events.
# Events triggered during this time period will be silently
# ignored. The default is 3 seconds.
#event_delay: 3.0
# The amount of time to delay, in seconds, between the pause command
# dispatch and execution of the runout_gcode. It may be useful to
# increase this delay if OctoPrint exhibits strange pause behavior.
# Default is 0.5 seconds.
#pause_delay: 0.5
## XYE mcu E0DET
switch_pin: ^!PB7
[include mainsail.cfg]
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [stepper_z]
#*# position_endstop = 207.280
#*#
#*# [extruder]

17
sonar.conf Normal file
View File

@@ -0,0 +1,17 @@
#### Sonar - A WiFi Keepalive daemon
####
#### Written by Stephan Wendel aka KwadFan <me@stephanwe.de>
#### Copyright 2022
#### https://github.com/mainsail-crew/sonar
####
#### This File is distributed under GPLv3
####
[sonar]
enable: false # false to disable till next reboot (will stop again if not set to true)
debug_log: false # if set to true, sonar will log ever ping with triptime and date/time
persistant_log: false # If true logs in /var/log/sonar.log, false logs to systemd
target: auto # IP Address, URL or auto as ping target
count: 3 # How often should be pinged?
interval: 60 # Ping again after X seconds
restart_treshold: 10 # If failed, restart WiFi after X seconds

1
timelapse.cfg Symbolic link
View File

@@ -0,0 +1 @@
/home/willem/moonraker-timelapse/klipper_macro/timelapse.cfg