Initial AON3D M2+ dual MCU configuration

- Octopus Pro: Motors (MOTOR0-7), bed heater (PA1), chamber heater (PB10)
- Azteeg X3: Thermistors, endstops, probe, fan, hotend heaters
- IDEX setup with external DM542T drivers
- Includes wiring documentation and swap guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 20:52:58 -05:00
commit ef868e7953
26 changed files with 3973 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
[board_pins arduino-mega]
aliases:
ar0=PE0, ar1=PE1, ar2=PE4, ar3=PE5, ar4=PG5,
ar5=PE3, ar6=PH3, ar7=PH4, ar8=PH5, ar9=PH6,
ar10=PB4, ar11=PB5, ar12=PB6, ar13=PB7, ar14=PJ1,
ar15=PJ0, ar16=PH1, ar17=PH0, ar18=PD3, ar19=PD2,
ar20=PD1, ar21=PD0, ar22=PA0, ar23=PA1, ar24=PA2,
ar25=PA3, ar26=PA4, ar27=PA5, ar28=PA6, ar29=PA7,
ar30=PC7, ar31=PC6, ar32=PC5, ar33=PC4, ar34=PC3,
ar35=PC2, ar36=PC1, ar37=PC0, ar38=PD7, ar39=PG2,
ar40=PG1, ar41=PG0, ar42=PL7, ar43=PL6, ar44=PL5,
ar45=PL4, ar46=PL3, ar47=PL2, ar48=PL1, ar49=PL0,
ar50=PB3, ar51=PB2, ar52=PB1, ar53=PB0, ar54=PF0,
ar55=PF1, ar56=PF2, ar57=PF3, ar58=PF4, ar59=PF5,
ar60=PF6, ar61=PF7, ar62=PK0, ar63=PK1, ar64=PK2,
ar65=PK3, ar66=PK4, ar67=PK5, ar68=PK6, ar69=PK7,
analog0=PF0, analog1=PF1, analog2=PF2, analog3=PF3, analog4=PF4,
analog5=PF5, analog6=PF6, analog7=PF7, analog8=PK0, analog9=PK1,
analog10=PK2, analog11=PK3, analog12=PK4, analog13=PK5, analog14=PK6,
analog15=PK7,
# Marlin adds these additional aliases
ml70=PG4, ml71=PG3, ml72=PJ2, ml73=PJ3, ml74=PJ7,
ml75=PJ4, ml76=PJ5, ml77=PJ6, ml78=PE2, ml79=PE6,
ml80=PE7, ml81=PD4, ml82=PD5, ml83=PD6, ml84=PH2,
ml85=PH7

BIN
klipper/firmware.bin Normal file

Binary file not shown.

276
klipper/macros.cfg Normal file
View File

@@ -0,0 +1,276 @@
# AON3D M2+ Macros
# For BTT Octopus Pro with IDEX configuration
# ================================================================================
# Cancel Print
# ================================================================================
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
PARK_{printer.toolhead.extruder}
CANCEL_PRINT_BASE
# ================================================================================
# Pause / Resume
# ================================================================================
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
{% set Z = params.Z|default(10)|float %}
{% set E = params.E|default(1)|float %}
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
PARK_{printer.toolhead.extruder}
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% set E = params.E|default(1)|float %}
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
# ================================================================================
# End Print
# ================================================================================
[gcode_macro END_PRINT]
gcode:
{% set Z = params.Z|default(10)|float %}
{% set E = params.E|default(5)|float %}
# Turn off heaters and fan
M106 S0
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0
SET_HEATER_TEMPERATURE HEATER=extruder1 TARGET=0
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0
SET_HEATER_TEMPERATURE HEATER=chamber TARGET=0
G91
G1 E-{E} F2100
G1 Z{Z}
PARK_{printer.toolhead.extruder}
# Disable steppers
M84
# ================================================================================
# Homing Override
# ================================================================================
[homing_override]
set_position_z: 10
gcode:
SAVE_GCODE_STATE NAME=home_z_state
G91
G1 Z10 F480
G28 X0 Y0
G28 Z0
G90
G1 Z3 F600
RESTORE_GCODE_STATE NAME=home_z_state
axes: z
# ================================================================================
# Idle Timeout
# ================================================================================
[idle_timeout]
timeout: 86400 # 24 hours
# ================================================================================
# IDEX Toolhead Macros
# ================================================================================
# Primary toolhead (T0) park position
[gcode_macro PARK_extruder]
gcode:
SAVE_GCODE_STATE NAME=park0
G90
G1 X-85 F12000
RESTORE_GCODE_STATE NAME=park0
# Activate primary extruder
[gcode_macro T0]
gcode:
PARK_{printer.toolhead.extruder}
ACTIVATE_EXTRUDER EXTRUDER=extruder
SET_DUAL_CARRIAGE CARRIAGE=0
SET_GCODE_OFFSET Z=0
# Input shaper for carriage 0 (calibrate these values for your machine)
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
# Secondary toolhead (T1) park position
[gcode_macro PARK_extruder1]
gcode:
SAVE_GCODE_STATE NAME=park1
G90
G1 X518 F12000
RESTORE_GCODE_STATE NAME=park1
# Activate secondary extruder
[gcode_macro T1]
gcode:
PARK_{printer.toolhead.extruder}
ACTIVATE_EXTRUDER EXTRUDER=extruder1
SET_DUAL_CARRIAGE CARRIAGE=1
SET_GCODE_OFFSET Z=-0.45
# Input shaper for carriage 1 (calibrate these values separately)
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
# ================================================================================
# Calibration Macro
# ================================================================================
[gcode_macro CALIBRATE_M2]
description: Calibrate the current tool with a mesh centered at Z=0
gcode:
G28
G1 Z15 F600
G1 X200 Y200 F6000
Z_ENDSTOP_CALIBRATE
PROBE
TESTZ Z=-.001
G4 P500
M400
ACCEPT
SET_KINEMATIC_POSITION Z=0
BED_MESH_CALIBRATE
[gcode_macro Calibrate_Tool_Offset]
gcode:
z_endstop_calibrate
# ================================================================================
# Temperature Command Overrides (for chamber heater compatibility)
# ================================================================================
[gcode_macro M140]
rename_existing: M140.1
gcode:
{% if params.S is defined %}
SAVE_VARIABLE VARIABLE=bedtemp VALUE={params.S}
{% endif %}
M140.1 { rawparams }
[gcode_macro M190]
rename_existing: M190.1
gcode:
{% if params.S is defined %}
SAVE_VARIABLE VARIABLE=bedtemp VALUE={params.S}
{% endif %}
M190.1 { rawparams }
[gcode_macro M104]
rename_existing: M104.1
gcode:
{% if params.T is defined and params.T == "3"%}
SET_HEATER_TEMPERATURE HEATER=chamber TARGET={params.S if params.S is defined else "0"}
{% else %}
{% if params.S is defined %}
{% set varname = "t1temp" if params.T is defined and params.T == "1" else "t0temp" %}
SAVE_VARIABLE VARIABLE={varname} VALUE={params.S}
{% endif %}
M104.1 { rawparams }
{% endif %}
[gcode_macro M109]
rename_existing: M109.1
gcode:
{% if params.T is defined and params.T == "3"%}
SET_HEATER_TEMPERATURE HEATER=chamber TARGET={params.S if params.S is defined else "0"}
TEMPERATURE_WAIT SENSOR=chamber MINIMUM={params.S} MAXIMUM={params.S}
{% else %}
{% if params.S is defined %}
{% set varname = "t1temp" if params.T is defined and params.T == "1" else "t0temp" %}
SAVE_VARIABLE VARIABLE={varname} VALUE={params.S}
{% endif %}
M109.1 { rawparams }
{% endif %}
# ================================================================================
# G-code Offset Management
# ================================================================================
[gcode_macro SET_GCODE_OFFSET]
rename_existing: _SET_GCODE_OFFSET
gcode:
{% if printer.save_variables.variables.gcode_offsets %}
{% set offsets = printer.save_variables.variables.gcode_offsets %}
{% else %}
{% set offsets = {'x': None,'y': None,'z': None} %}
{% endif %}
{% set ns = namespace(offsets={'x': offsets.x,'y': offsets.y,'z': offsets.z}) %}
_SET_GCODE_OFFSET {% for p in params %}{'%s=%s '% (p, params[p])}{% endfor %}
{%if 'X' in params %}{% set null = ns.offsets.update({'x': params.X}) %}{% endif %}
{%if 'Y' in params %}{% set null = ns.offsets.update({'y': params.Y}) %}{% endif %}
{%if 'Z' in params %}{% set null = ns.offsets.update({'z': params.Z}) %}{% endif %}
SAVE_VARIABLE VARIABLE=gcode_offsets VALUE="{ns.offsets}"
[delayed_gcode LOAD_GCODE_OFFSETS]
initial_duration: 2
gcode:
{% if printer.save_variables.variables.gcode_offsets %}
{% set offsets = printer.save_variables.variables.gcode_offsets %}
_SET_GCODE_OFFSET {% for axis, offset in offsets.items()
if offsets[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
{ action_respond_info("Loaded gcode offsets from saved variables [%s]" % (offsets)) }
{% endif %}
# Initialize input shaper on startup (for dual_carriage compatibility)
[delayed_gcode INIT_INPUT_SHAPER]
initial_duration: 3
gcode:
# Set default input shaper for carriage 0 (T0)
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
{ action_respond_info("Input shaper initialized for dual carriage") }
# ================================================================================
# Utility Macros
# ================================================================================
[gcode_macro LOAD_FILAMENT]
description: Load filament into current extruder
gcode:
{% set TEMP = params.TEMP|default(220)|float %}
{% set LENGTH = params.LENGTH|default(100)|float %}
M109 S{TEMP}
G91
G1 E{LENGTH} F300
G90
[gcode_macro UNLOAD_FILAMENT]
description: Unload filament from current extruder
gcode:
{% set TEMP = params.TEMP|default(220)|float %}
{% set LENGTH = params.LENGTH|default(100)|float %}
M109 S{TEMP}
G91
G1 E10 F300
G1 E-{LENGTH} F1000
G90
[gcode_macro PID_EXTRUDER]
description: PID tune the current extruder
gcode:
{% set TEMP = params.TEMP|default(240)|float %}
PID_CALIBRATE HEATER=extruder TARGET={TEMP}
[gcode_macro PID_EXTRUDER1]
description: PID tune extruder 1
gcode:
{% set TEMP = params.TEMP|default(240)|float %}
PID_CALIBRATE HEATER=extruder1 TARGET={TEMP}
[gcode_macro PID_BED]
description: PID tune the heated bed
gcode:
{% set TEMP = params.TEMP|default(100)|float %}
PID_CALIBRATE HEATER=heater_bed TARGET={TEMP}
[gcode_macro PID_CHAMBER]
description: PID tune the heated chamber
gcode:
{% set TEMP = params.TEMP|default(70)|float %}
PID_CALIBRATE HEATER=chamber TARGET={TEMP}

285
klipper/printer.cfg Normal file
View File

@@ -0,0 +1,285 @@
# AON3D M2+ - Dual MCU Configuration
# Azteeg X3: Sensors, Endstops, Probe, Fan, Hotend Heaters
# Octopus Pro: Motors + Bed/Chamber Heaters
# IDEX setup with heated chamber, external DM542T drivers
# ================================================================================
# Requirements
# ================================================================================
[pause_resume]
[display_status]
[virtual_sdcard]
path: ~/gcode_files
[include macros.cfg]
[include Controllino_aliases.cfg]
# ================================================================================
# MCU Configuration
# ================================================================================
# Main MCU - Azteeg X3
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT231X_USB_UART_DN05SBA9-if00-port0
restart_method: command
# Secondary MCU - Octopus Pro (motors + heaters only)
[mcu octopus]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_32000A000E50315939343520-if00
restart_method: command
# ================================================================================
# Printer Definition
# ================================================================================
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 3000
max_z_velocity: 12
max_z_accel: 30
# ================================================================================
# Stepper Configuration - Motors on Octopus, Endstops on Azteeg
# ================================================================================
# --- X Axis T0 (MOTOR0) ---
[stepper_x]
step_pin: octopus:PF13
dir_pin: !octopus:PF12
enable_pin: !octopus:PF14
microsteps: 16
rotation_distance: 80
endstop_pin: ar3 # Azteeg
position_endstop: -90
position_min: -90
position_max: 450
homing_speed: 100
step_pulse_duration: 0.000006
# --- Y Axis Left (MOTOR1) ---
[stepper_y]
step_pin: octopus:PG0
dir_pin: !octopus:PG1
enable_pin: !octopus:PF15
microsteps: 16
rotation_distance: 80
endstop_pin: ar14 # Azteeg
position_endstop: -44
position_min: -44
position_max: 450
homing_speed: 80
step_pulse_duration: 0.000006
# --- Z Axis Left (MOTOR2) ---
[stepper_z]
step_pin: octopus:PF11
dir_pin: octopus:PG3
enable_pin: !octopus:PG5
microsteps: 4
rotation_distance: 2
endstop_pin: ar18 # Azteeg
position_min: -11
position_max: 600
homing_retract_dist: 2
homing_speed: 5
step_pulse_duration: 0.000006
# --- Dual Carriage / X T1 (MOTOR5) ---
[dual_carriage]
axis: x
step_pin: octopus:PC13
dir_pin: !octopus:PF0
enable_pin: !octopus:PF1
microsteps: 16
rotation_distance: 80
endstop_pin: ar2 # Azteeg
position_endstop: 518.5
position_max: 518.5
homing_speed: 100
step_pulse_duration: 0.000006
# --- Y1 Axis Right (MOTOR6) ---
[stepper_y1]
step_pin: octopus:PE2
dir_pin: octopus:PE3
enable_pin: !octopus:PD4
microsteps: 16
rotation_distance: 80
endstop_pin: ar15 # Azteeg
step_pulse_duration: 0.000006
# --- Z1 Axis Right (MOTOR7) ---
[stepper_z1]
step_pin: octopus:PE6
dir_pin: octopus:PA14
enable_pin: !octopus:PE0
microsteps: 4
rotation_distance: 2
endstop_pin: ar19 # Azteeg
step_pulse_duration: 0.000006
# ================================================================================
# Extruder Configuration - Motors on Octopus, Heaters+Sensors on Azteeg
# ================================================================================
# --- Extruder 0 (MOTOR3) - Motor on Octopus, Heater on Azteeg ---
[extruder]
step_pin: octopus:PG4
dir_pin: octopus:PC1
enable_pin: !octopus:PA0
microsteps: 16
rotation_distance: 4.961
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10 # Azteeg
sensor_type: thermistor20
sensor_pin: analog3 # Azteeg
min_temp: 0
max_temp: 500
pressure_advance: 0.06
pressure_advance_smooth_time: 0.12
max_extrude_cross_section: 10
control: pid
pid_kp: 17.123
pid_ki: 0.660
pid_kd: 111.088
# --- Extruder 1 (MOTOR4) - Motor on Octopus, Heater on Azteeg ---
[extruder1]
step_pin: octopus:PF9
dir_pin: octopus:PF10
enable_pin: !octopus:PG2
microsteps: 16
rotation_distance: 4.961
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar9 # Azteeg
sensor_type: thermistor20
sensor_pin: analog9 # Azteeg
min_temp: 0
max_temp: 400
pressure_advance: 0.06
pressure_advance_smooth_time: 0.12
control: pid
pid_kp: 15.157
pid_ki: 0.529
pid_kd: 108.559
# ================================================================================
# Custom Thermistor Definitions
# ================================================================================
[adc_temperature thermistor86]
temperature1: 20
voltage1: 4.8239
temperature2: 90
voltage2: 3.3005
temperature3: 180
voltage3: 0.7913
[adc_temperature thermistor20]
temperature1: 20
voltage1: 1.1926
temperature2: 200
voltage2: 1.921
temperature3: 600
voltage3: 3.328
[adc_temperature thermistor5]
temperature1: 20
voltage1: 4.817
temperature2: 150
voltage2: 1.122
temperature3: 300
voltage3: 0.0876
# ================================================================================
# Heated Bed - on Octopus (both SSRs wired to PA1)
# ================================================================================
[heater_bed]
heater_pin: octopus:PA1 # Octopus HB
sensor_type: thermistor5
sensor_pin: analog14 # Azteeg
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: -20
max_temp: 230
# ================================================================================
# Heated Chamber - on Octopus
# ================================================================================
[heater_generic chamber]
gcode_id: T2
heater_pin: octopus:PB10 # Octopus HE2
sensor_type: thermistor86
sensor_pin: analog13 # Azteeg
max_power: 1.0
pwm_cycle_time: 0.3
control: pid
pid_Kp: 100
pid_Ki: 1.8
pid_Kd: 300
min_temp: -20
max_temp: 175
[verify_heater chamber]
check_gain_time: 900
max_error: 200
[heater_fan Enclosure_fan]
pin: ar5 # Azteeg
fan_speed: 1.0
heater: chamber
kick_start_time: 10000
shutdown_speed: 0
# ================================================================================
# Probe and Bed Mesh - on Azteeg
# ================================================================================
[probe]
pin: ^ar22 # Azteeg
lift_speed: 10
speed: 6.0
[bed_mesh]
speed: 200
horizontal_move_z: 2
mesh_min: 60, 60
mesh_max: 380, 380
probe_count: 6, 6
# ================================================================================
# Additional Configuration
# ================================================================================
[force_move]
enable_force_move: True
[idle_timeout]
timeout: 14400
[save_variables]
filename: ~/savedVariables.cfg
# ================================================================================
# Temperature Monitoring
# ================================================================================
[temperature_sensor octopus_temp]
sensor_type: temperature_mcu
sensor_mcu: octopus
min_temp: 0
max_temp: 100
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [probe]
#*# z_offset = 0.500
#*#
#*# [stepper_z]
#*# position_endstop = -1.590