# 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. #Versie van 16-8-2026 # MCU sectie stond er dubbel in, de niet-werkende verwijderd # rotation distance van Z 40 klopte niet, beweegt ongeveer factor 2.5 te korte afstand. 16 dan? # X en Y en Z afstanden (rot dist) gecontroleerd en geloofwaardig bevonden # Z0 afgesteld # PID tune en save config gedaan # extruder motor draaide de verkeerde kant op, DIR pin inverted # extrusion rotation distance 8.58 geeft de gevraagde hoeveelheid filament # Y min vanwege clips aangepast, max gaat niet # Bed is level # Input shaper tune : X 60.5 Hz, Y 53.7 Hz # acceleration ingesteld # start/end macro's en filament load/unload macro's # Pressure advance op 0,025 gezet, want het lijkt niet te verbeteren OF te verslechteren - Kan altijd later nog # Z aceleratie en max speed verhoogd, want stond te laag (blob bij laagwisseling) # TODO: # Pressure advance tunen [mcu] serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_558383230363512121D1-if00 #That is the MSL Ultimaker 2+ extended [include mainsail.cfg] [input_shaper] shaper_freq_x: 60.5 shaper_freq_y: 53.7 shaper_type: mzv [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: 50.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 # cannot reduce from 225, endstop location needs to be between min and max position_min: 9 # because clips homing_speed: 50.0 [stepper_z] step_pin: PC2 dir_pin: !PC1 enable_pin: !PC3 microsteps: 16 rotation_distance: 16 # was 40 but that is too short, about 2.5 endstop_pin: ^!PA7 position_endstop: 314.2 #be darn carefull, this is absulote max / hit bed at Z0 position_max: 314.2 homing_speed: 20.0 [extruder] step_pin: PL7 dir_pin: !PL6 #inverted, because extrude retracted and vice versa enable_pin: !PC0 microsteps: 16 rotation_distance: 8.58 nozzle_diameter: 0.400 filament_diameter: 2.850 max_extrude_only_distance: 800.0 #default is 50, but then filament unload does not work. heater_pin: PE4 sensor_type: PT100 INA826 sensor_pin: PK0 #control: pid -- disabled because auto-tune config below! #pid_Kp: 22.2 #pid_Ki: 1.08 #pid_Kd: 114 min_temp: 0 max_temp: 275 pressure_advance = 0.025 #sort of temp placeholder. test print varied it from 0 to 1 but it all looks the same... # Dual extruder support. #[extruder1] #step_pin: PL0 #dir_pin: PL2 #enable_pin: !PL1 #microsteps: 16 #rotation_distance: 33.500 #nozzle_diameter: 0.400 #filament_diameter: 2.850 #heater_pin: PE5 #sensor_type: PT100 INA826 #sensor_pin: PK1 #control: pid #pid_Kp: 22.2 #pid_Ki: 1.08 #pid_Kd: 114 #min_temp: 0 #max_temp: 275 [heater_bed] heater_pin: PG5 sensor_type: PT100 INA826 sensor_pin: PK2 control: watermark min_temp: 0 max_temp: 100 [fan] pin: PH4 [printer] kinematics: cartesian max_velocity: 500 max_accel: 6500 max_z_velocity: 180 max_z_accel: 2500 [output_pin case_light] pin: PH5 value: 1.0 # Motor current settings. [output_pin stepper_xy_current] pin: PL5 pwm: True scale: 2.000 # Max power setting. cycle_time: .000030 hardware_pwm: True value: 1.200 # Power adjustment setting. [output_pin stepper_z_current] pin: PL4 pwm: True scale: 2.000 cycle_time: .000030 hardware_pwm: True value: 1.200 [output_pin stepper_e_current] pin: PL3 pwm: True scale: 2.000 cycle_time: .000030 hardware_pwm: True value: 1.250 # Replace the slicer's custom start and end g-code scripts with # START_PRINT and END_PRINT. See docs/Slicers.md for more information on using these macros. [gcode_macro START_PRINT] gcode: {% set BED_TEMP = params.BED_TEMP|default(50)|float %} {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %} # Start bed heating M140 S{BED_TEMP} # Use absolute coordinates G90 # Reset the G-Code Z offset (adjust Z offset if needed) SET_GCODE_OFFSET Z=0.0 # Home the printer G28 # Move the nozzle near the bed, but not on it G1 Z5 F3000 #DO NOT LOAD BED MESH: #BED_MESH_PROFILE LOAD='default' # Wait for bed to reach temperature M190 S{BED_TEMP} # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} # Move the nozzle very close to the bed G1 Z0.2 F300 # Add a prime line G92 E0 G1 X0 Y9 Z0.2 F3000 G1 X150 Y9 Z0.2 E8 F2000 G1 X150 Y9.5 E8 G1 X0 Y9.5 E15 G92 E0 [gcode_macro END_PRINT] gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 G90 #use absolute coordinates (original had relative, but that confused me) G28 X # homing works wherever, this moves the head of the print {% set zmax = printer.toolhead.axis_maximum.z %} {% set ymax = printer.toolhead.axis_maximum.y %} G1 Z{zmax} F600 # move to Zmax (Lower the bed completely / raise nozzle completely) #send nozzle to edge of bed G1 X14 Y{ymax} F3000 # Disable steppers M84 BED_MESH_CLEAR #unload BED_MESH [gcode_macro LOAD_FILAMENT] variable_load_distance: 650 #bowden tube lengt, approx variable_purge_distance: 50 gcode: {% set speed = params.SPEED|default(300) %} {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %} SAVE_GCODE_STATE NAME=load_state G91 G92 E0 G1 E{load_distance} F{max_velocity} # fast-load G1 E{purge_distance} F{speed} # purge RESTORE_GCODE_STATE NAME=load_state [gcode_macro PURGE_FILAMENT] variable_purge_distance: 35 gcode: {% set speed = params.SPEED|default(300) %} SAVE_GCODE_STATE NAME=load_state G91 G92 E0 G1 E{purge_distance} F{speed} # purge RESTORE_GCODE_STATE NAME=load_state [gcode_macro UNLOAD_FILAMENT] variable_unload_distance: 750 variable_purge_distance: 5 gcode: {% set speed = params.SPEED|default(300) %} {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %} SAVE_GCODE_STATE NAME=unload_state G91 G92 E0 G1 E{purge_distance} F{speed} # purge G1 E-{unload_distance} F{max_velocity} # fast-unload RESTORE_GCODE_STATE NAME=unload_state #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [extruder] #*# control = pid #*# pid_kp = 13.662 #*# pid_ki = 0.632 #*# pid_kd = 73.773