# This file contains pin mappings for the Anycubic i3 Mega with # Ultrabase from 2017. (This config may work on an Anycubic i3 Mega v1 # prior to the Ultrabase if you comment out the definition of the # endstop_pin in the stepper_z1 section.) To use this config, the # firmware should be compiled for the AVR atmega2560. # See docs/Config_Reference.md for a description of parameters. [stepper_x] step_pin: PF0 dir_pin: PF1 enable_pin: !PD7 microsteps: 16 rotation_distance: 40 endstop_pin: ^!PE5 position_min: -5 position_endstop: -5 position_max: 210 homing_speed: 30.0 [stepper_y] step_pin: PF6 dir_pin: !PF7 enable_pin: !PF2 microsteps: 16 rotation_distance: 40 endstop_pin: ^!PL7 position_endstop: 0 position_max: 210 homing_speed: 30.0 [stepper_z] step_pin: PL3 dir_pin: !PL1 enable_pin: !PK0 microsteps: 16 rotation_distance: 8 endstop_pin: ^!PD3 position_endstop: 0.0 position_max: 205 homing_speed: 5.0 [stepper_z1] step_pin: PC1 dir_pin: !PC3 enable_pin: !PC7 microsteps: 16 rotation_distance: 8 endstop_pin: ^!PL6 [extruder] step_pin: PA4 dir_pin: !PA6 enable_pin: !PA2 microsteps: 16 rotation_distance: 34.557 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PB4 sensor_type: ATC Semitec 104GT-2 sensor_pin: PK5 #control: pid #pid_Kp: 15.717 #pid_Ki: 0.569 #pid_Kd: 108.451 min_temp: 0 max_temp: 245 [heater_fan extruder_fan] pin: PL5 [heater_bed] heater_pin: PH5 sensor_type: EPCOS 100K B57560G104F sensor_pin: PK6 #control: pid #pid_Kp: 74.883 #pid_Ki: 1.809 #pid_Kd: 775.038 min_temp: 0 max_temp: 110 [fan] pin: PH6 [mcu] serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 [printer] kinematics: cartesian max_velocity: 300 max_accel: 3000 max_z_velocity: 10 max_z_accel: 60 [heater_fan stepstick_fan] pin: PH4 # additional manual config # see https://docs.fluidd.xyz/configuration/initial_setup [virtual_sdcard] path:/home/pi/printer_data/gcodes [display_status] [pause_resume] [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} [gcode_macro CANCEL_PRINT] description: Cancel the actual running print rename_existing: CANCEL_PRINT_BASE gcode: TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro START_PRINT] gcode: G28 X0 Y0 ; move X/Y to min endstops G28 Z0 ; move Z to min endstops G1 Z20 Y5 F500 ; move nozzle away from bed G92 E0 ; zero the extruded length G1 E2 F2400 ; extrude 5mm of feed stock G92 E0 ; zero the extruded length again M117 Printing... [gcode_macro END_PRINT] gcode: M400 ; Clear Buffer M104 S0 ; turn off extruder M140 S0 ; turn off bed G10 ; retract G91 ; relative positioning G1 E-0.03 Z1.00 X20.0 Y20.0 ; move nozzle to remove stringing M106 S0 ; turn off fan G1 Z20 ; move nozzle up 20mm G90 ; absolute positioning G0 X0 Y175 ; park nozzle at rear M84 ; steppers off G4 P250 ; dwell _TIMELAPSE_NEW_FRAME M300 ; Beep #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [extruder] #*# control = pid #*# pid_kp = 20.315 #*# pid_ki = 0.748 #*# pid_kd = 137.890 #*# #*# [heater_bed] #*# control = pid #*# pid_kp = 73.517 #*# pid_ki = 1.696 #*# pid_kd = 796.738