diff --git a/martyn_macros.cfg b/martyn_macros.cfg index 755f630..0e6efbc 100644 --- a/martyn_macros.cfg +++ b/martyn_macros.cfg @@ -74,6 +74,7 @@ gcode: [delayed_gcode start_with_mmu_off] initial_duration: .01 gcode: + SET_LED_EFFECT EFFECT=MMU_PURPLE_SLOW MMU ENABLE=0 [gcode_macro G32] @@ -390,3 +391,7 @@ gcode: # G28 Y # _SAFE_Z_HOME # {% endif %} + + +[mmu_led_effect mmu_purple_slow] +layers: breathing 1.0 0 top (1,0,1) \ No newline at end of file diff --git a/mmu/base/mmu.cfg b/mmu/base/mmu.cfg index 4fa9313..3ff44dc 100644 --- a/mmu/base/mmu.cfg +++ b/mmu/base/mmu.cfg @@ -16,10 +16,10 @@ # # This contains aliases for pins for MCU type MMB11 # -[mcu mmu] -canbus_uuid: 214adf7db8eb # Change to `canbus_uuid: 1234567890` for CANbus setups +#[mcu oldmmu] +#canbus_uuid: 214adf7db8eb # Change to `canbus_uuid: 1234567890` for CANbus setups -[mcu mmuext] +[mcu mmu] canbus_uuid: 029f6dc0d75b # PIN ALIASES FOR MMU MCU BOARD ---------------------------------------------------------------------------------------- @@ -36,53 +36,101 @@ canbus_uuid: 029f6dc0d75b # Note: that aliases are not created for TOOLHEAD_SENSOR, EXTRUDER_SENSOR or SYNC_FEEDBACK_SENSORS because those are # most likely on the printer's main mcu. These should be set directly in mmu_hardware.cfg # +# [board_pins oldmmu] +# mcu: mmu # Assumes using an external / extra mcu dedicated to MMU +# aliases: +# MMU_GEAR_UART=PA10, +# MMU_GEAR_STEP=PB15, +# MMU_GEAR_DIR=PB14, +# MMU_GEAR_ENABLE=PB8, +# MMU_GEAR_DIAG=PA3, + +# MMU_GEAR_UART_1=, +# MMU_GEAR_STEP_1=, +# MMU_GEAR_DIR_1=, +# MMU_GEAR_ENABLE_1=, +# MMU_GEAR_DIAG_1=, + +# MMU_GEAR_UART_2=, +# MMU_GEAR_STEP_2=, +# MMU_GEAR_DIR_2=, +# MMU_GEAR_ENABLE_2=, +# MMU_GEAR_DIAG_2=, + +# MMU_GEAR_UART_3=, +# MMU_GEAR_STEP_3=, +# MMU_GEAR_DIR_3=, +# MMU_GEAR_ENABLE_3=, +# MMU_GEAR_DIAG_3=, + +# MMU_SEL_UART=PC7, +# MMU_SEL_STEP=PD2, +# MMU_SEL_DIR=PB13, +# MMU_SEL_ENABLE=PD1, +# MMU_SEL_DIAG=PA4, +# MMU_SEL_ENDSTOP=PB2, +# MMU_SEL_SERVO=PA0, + +# MMU_ENCODER=PA1, +# MMU_GATE_SENSOR=, +# MMU_NEOPIXEL=PA2, + +# MMU_PRE_GATE_0=, +# MMU_PRE_GATE_1=PA3, +# MMU_PRE_GATE_2=, +# MMU_PRE_GATE_3=, +# MMU_PRE_GATE_4=, +# MMU_PRE_GATE_5=, +# MMU_PRE_GATE_6=, +# MMU_PRE_GATE_7=, +# MMU_PRE_GATE_8=, +# MMU_PRE_GATE_9=, +# MMU_PRE_GATE_10=, +# MMU_PRE_GATE_11=, + +# MMU_POST_GEAR_0=, +# MMU_POST_GEAR_1=, +# MMU_POST_GEAR_2=, +# MMU_POST_GEAR_3=, +# MMU_POST_GEAR_4=, +# MMU_POST_GEAR_5=, +# MMU_POST_GEAR_6=, +# MMU_POST_GEAR_7=, +# MMU_POST_GEAR_8=, +# MMU_POST_GEAR_9=, +# MMU_POST_GEAR_10=, +# MMU_POST_GEAR_11=, + [board_pins mmu] mcu: mmu # Assumes using an external / extra mcu dedicated to MMU aliases: - MMU_GEAR_UART=PA10, - MMU_GEAR_STEP=PB15, - MMU_GEAR_DIR=PB14, - MMU_GEAR_ENABLE=PB8, - MMU_GEAR_DIAG=PA3, + MMU_GEAR_UART=gpio9, + MMU_GEAR_STEP=gpio7, + MMU_GEAR_DIR=gpio8, + MMU_GEAR_ENABLE=gpio6, + MMU_GEAR_DIAG=gpio23, - MMU_GEAR_UART_1=, - MMU_GEAR_STEP_1=, - MMU_GEAR_DIR_1=, - MMU_GEAR_ENABLE_1=, - MMU_GEAR_DIAG_1=, + MMU_SEL_UART=gpio0, + MMU_SEL_STEP=gpio2, + MMU_SEL_DIR=gpio1, + MMU_SEL_ENABLE=gpio3, + MMU_SEL_DIAG=gpio22, - MMU_GEAR_UART_2=, - MMU_GEAR_STEP_2=, - MMU_GEAR_DIR_2=, - MMU_GEAR_ENABLE_2=, - MMU_GEAR_DIAG_2=, + MMU_SEL_ENDSTOP=gpio20, + MMU_SEL_SERVO=gpio21, - MMU_GEAR_UART_3=, - MMU_GEAR_STEP_3=, - MMU_GEAR_DIR_3=, - MMU_GEAR_ENABLE_3=, - MMU_GEAR_DIAG_3=, - - MMU_SEL_UART=PC7, - MMU_SEL_STEP=PD2, - MMU_SEL_DIR=PB13, - MMU_SEL_ENABLE=PD1, - MMU_SEL_DIAG=PA4, - MMU_SEL_ENDSTOP=PB2, - MMU_SEL_SERVO=PA0, - - MMU_ENCODER=PA1, + MMU_ENCODER=gpio15, + MMU_NEOPIXEL=gpio14, MMU_GATE_SENSOR=, - MMU_NEOPIXEL=PA2, - MMU_PRE_GATE_0=, - MMU_PRE_GATE_1=PA3, - MMU_PRE_GATE_2=, - MMU_PRE_GATE_3=, - MMU_PRE_GATE_4=, - MMU_PRE_GATE_5=, - MMU_PRE_GATE_6=, - MMU_PRE_GATE_7=, + MMU_PRE_GATE_0=gpio10, + MMU_PRE_GATE_1=gpio11, + MMU_PRE_GATE_2=gpio12, + MMU_PRE_GATE_3=gpio24, + MMU_PRE_GATE_4=gpio13, + MMU_PRE_GATE_5=gpio26, + MMU_PRE_GATE_6=gpio27, + MMU_PRE_GATE_7=gpio28, MMU_PRE_GATE_8=, MMU_PRE_GATE_9=, MMU_PRE_GATE_10=, @@ -101,16 +149,6 @@ aliases: MMU_POST_GEAR_10=, MMU_POST_GEAR_11=, -[board_pins mmuext] -mcu: mmuext # Assumes using an external / extra mcu dedicated to MMU -aliases: - MMU_GEAR_UART=gpio0, - MMU_GEAR_STEP=gpio2, - MMU_GEAR_DIR=gpio1, - MMU_GEAR_ENABLE=gpio3, - MMU_GEAR_DIAG=gpio22, - MMU_SEL_SERVO=gpio21, - [temperature_sensor MMB] sensor_type: temperature_mcu sensor_mcu: mmu diff --git a/mmu/base/mmu_hardware.cfg b/mmu/base/mmu_hardware.cfg index 4ab77f0..fc44d73 100644 --- a/mmu/base/mmu_hardware.cfg +++ b/mmu/base/mmu_hardware.cfg @@ -139,9 +139,9 @@ homing_extruder: 1 # CAUTION: Normally this should be 1. 0 will disable the ho #driver_SGTHRS: 60 # 255 is most sensitive value, 0 is least sensitive [stepper_mmu_gear] -step_pin: mmuext:MMU_GEAR_STEP -dir_pin: mmuext:MMU_GEAR_DIR -enable_pin: !mmuext:MMU_GEAR_ENABLE +step_pin: mmu:MMU_GEAR_STEP +dir_pin: mmu:MMU_GEAR_DIR +enable_pin: !mmu:MMU_GEAR_ENABLE rotation_distance: 22.7316868 # Bondtech 5mm Drive Gears. Overridden by 'mmu_gear_rotation_distance' in mmu_vars.cfg #gear_ratio: 80:20 # ERCF v2.5 is direct drive microsteps: 16 # Recommend 16. Increase only if you "step compress" issues when syncing @@ -164,8 +164,8 @@ full_steps_per_rotation: 200 # 200 for 1.8 degree, 400 for 0.9 degree # [tmc2209 stepper_mmu_selector] uart_pin: mmu:MMU_SEL_UART -run_current: 0.6 # ERCF BOM NEMA17 motor -hold_current: 0.4 # Can be small if not using "touch" movement (TMC stallguard) +run_current: 0.8 # ERCF BOM NEMA17 motor +hold_current: 0.6 # Can be small if not using "touch" movement (TMC stallguard) interpolate: True sense_resistor: 0.110 stealthchop_threshold: 100 # Stallguard "touch" movement (slower speeds) best done with stealthchop @@ -176,7 +176,7 @@ stealthchop_threshold: 100 # Stallguard "touch" movement (slower speeds) best d [stepper_mmu_selector] step_pin: mmu:MMU_SEL_STEP -dir_pin: mmu:MMU_SEL_DIR +dir_pin: !mmu:MMU_SEL_DIR enable_pin: !mmu:MMU_SEL_ENABLE rotation_distance: 40 microsteps: 16 # Don't need high fidelity diff --git a/mmu/mmu_vars.cfg b/mmu/mmu_vars.cfg index 6c7b99e..dc19271 100644 --- a/mmu/mmu_vars.cfg +++ b/mmu/mmu_vars.cfg @@ -1,13 +1,13 @@ [Variables] -mmu__revision = 1514 +mmu__revision = 2190 mmu_calibration_bowden_home = 'encoder' mmu_calibration_bowden_lengths = [1425.1, 1425.1, 1425.1, 1425.1, 1425.1, 1425.1, 1425.1, 1425.1] mmu_calibration_clog_length = 17.4 mmu_encoder_resolution = 0.959616 mmu_gear_rotation_distances = [22.731687, 22.686238, 22.849841, 22.94982, 22.958909, 22.94982, 22.895286, 22.958909] -mmu_selector_bypass = 179.2 -mmu_selector_offsets = [2.0, 25.3, 48.5, 71.8, 95.0, 118.3, 141.5, 164.8] -mmu_servo_angles = {'down': 190, 'up': 117, 'move': 146} +mmu_selector_bypass = 179.7 +mmu_selector_offsets = [2.1, 25.2, 48.5, 71.7, 94.9, 118.9, 142.1, 164.5] +mmu_servo_angles = {'down': 90, 'up': 10, 'move': 35} mmu_state_enable_endless_spool = 1 mmu_state_endless_spool_groups = [0, 1, 2, 3, 4, 5, 6, 7] mmu_state_filament_pos = 10 @@ -16,15 +16,15 @@ mmu_state_filament_remaining_color = '' mmu_state_gate_color = ['', '', '', '', '', '', '', ''] mmu_state_gate_filament_name = ['', '', '', '', '', '', '', ''] mmu_state_gate_material = ['', '', '', '', '', '', '', ''] -mmu_state_gate_selected = 5 +mmu_state_gate_selected = -2 mmu_state_gate_speed_override = [100, 100, 100, 100, 100, 100, 100, 100] mmu_state_gate_spool_id = [-1, -1, -1, -1, -1, -1, -1, -1] -mmu_state_gate_status = [0, 0, 0, 0, 0, 0, 0, 0] +mmu_state_gate_status = [1, 1, -1, -1, -1, 0, -1, -1] mmu_state_gate_temperature = [200, 200, 200, 200, 200, 200, 200, 200] mmu_state_last_tool = 1 -mmu_state_tool_selected = 5 +mmu_state_tool_selected = -2 mmu_state_tool_to_gate_map = [0, 1, 2, 3, 4, 5, 6, 7] -mmu_statistics_counters = {'servo_down': {'count': 405, 'limit': 5000, 'warning': 'Inspect servo arm for wear/damage', 'pause': False}, 'mmu_restarts': {'count': 89, 'limit': -1, 'warning': ''}, 'cutter_blade': {'count': 43, 'limit': 3000, 'warning': 'Inspect/replace filament cutting blade', 'pause': False}} +mmu_statistics_counters = {'servo_down': {'count': 812, 'limit': 5000, 'warning': 'Inspect servo arm for wear/damage', 'pause': False}, 'mmu_restarts': {'count': 101, 'limit': -1, 'warning': ''}, 'cutter_blade': {'count': 44, 'limit': 3000, 'warning': 'Inspect/replace filament cutting blade', 'pause': False}} mmu_statistics_gate_0 = {'pauses': 12, 'loads': 28, 'load_distance': 38354.336, 'load_delta': 6896.202, 'unloads': 43, 'unload_distance': 31567.3, 'unload_delta': 1877.741, 'load_failures': 7, 'unload_failures': 16, 'quality': 0.9546537865318246} mmu_statistics_gate_1 = {'pauses': 2, 'loads': 22, 'load_distance': 28896.615, 'load_delta': 90.861, 'unloads': 25, 'unload_distance': 27502.0, 'unload_delta': 1483.93, 'load_failures': 1, 'unload_failures': 5, 'quality': 0.8375118313601163} mmu_statistics_gate_2 = {'pauses': 0, 'loads': 0, 'load_distance': 0.0, 'load_delta': 0.0, 'unloads': 0, 'unload_distance': 0.0, 'unload_delta': 0.0, 'load_failures': 0, 'unload_failures': 0, 'quality': -1.0} diff --git a/moonraker.conf b/moonraker.conf index 5318ca0..09cb1a6 100644 --- a/moonraker.conf +++ b/moonraker.conf @@ -104,3 +104,12 @@ enable_file_preprocessor: True enable_toolchange_next_pos: True update_spoolman_location: True + + +[update_manager led_effect] +type: git_repo +path: ~/klipper-led_effect +origin: https://github.com/julianschill/klipper-led_effect.git +is_system_service: False + + diff --git a/printer.cfg b/printer.cfg index ba3a4c4..338d21a 100644 --- a/printer.cfg +++ b/printer.cfg @@ -228,11 +228,15 @@ pid_kd: 363.769 ## Controller fan - FAN2 -[controller_fan controller_fan] +[temperature_fan controller_fan] pin: PD12 -kick_start_time: 0.5 -heater: heater_bed -fan_speed: 0.5 +sensor_type: temperature_host +control: watermark +max_delta: 3 +min_temp: 0 +max_temp: 100 +target_temp: 55 +max_speed: 0.5 ## Exhaust fan - FAN3 #[heater_fan exhaust_fan]