open4neptune-new/calibration/calibration_macros.cfg
root 0c561e5054 Fix: Calibration macros now call actual print patterns
- CALIBRATE_PRESSURE_ADVANCE -> calls PA_TEST_PATTERN
- CALIBRATE_FLOW_RATE -> calls FLOW_TEST_CUBE
- CALIBRATE_TEMPERATURE -> calls TEMP_TOWER
- CALIBRATE_RETRACTION -> calls RETRACT_TEST_PATTERN

Previously these macros only printed instructions but didn't execute
the actual calibration prints. Now they properly delegate to the
real pattern macros in test_patterns.cfg.
2026-03-14 13:15:45 +00:00

254 lines
10 KiB
INI

# ============================================================================
# NEPTUNE 4 PLUS CALIBRATION SUITE
# Complete calibration macros for Cartographer 3D
# ============================================================================
# Installation: Add [include calibration/*.cfg] to printer.cfg
# Usage: Run CALIBRATION_MENU in console
# ============================================================================
# ----------------------------------------------------------------------------
# MAIN MENU - Shows all available calibration options
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATION_MENU]
description: Show calibration menu with all options
gcode:
RESPOND MSG="=============================================="
RESPOND MSG=" NEPTUNE 4 PLUS CALIBRATION SUITE"
RESPOND MSG="=============================================="
RESPOND MSG=""
RESPOND MSG="Run these macros INDIVIDUALLY (in order):"
RESPOND MSG=""
RESPOND MSG="SETUP (do once):"
RESPOND MSG=" CALIBRATE_Z_OFFSET - Z0 with Cartographer (MANUAL!)"
RESPOND MSG=" CALIBRATE_INPUT_SHAPER - ADXL resonance (if ADXL connected)"
RESPOND MSG=""
RESPOND MSG="FILAMENT-SPECIFIC (per filament):"
RESPOND MSG=" CALIBRATE_PRESSURE_ADVANCE - PA tuning (inspect squares)"
RESPOND MSG=" CALIBRATE_FLOW_RATE - Flow calibration (measure)"
RESPOND MSG=" CALIBRATE_TEMPERATURE - Temp tower (inspect)"
RESPOND MSG=" CALIBRATE_RETRACTION - Retraction test (inspect)"
RESPOND MSG=""
RESPOND MSG="PERIODIC:"
RESPOND MSG=" CALIBRATE_BED_MESH - Mesh verification"
RESPOND MSG=""
RESPOND MSG="⚠️ IMPORTANT:"
RESPOND MSG=" - Each macro must be run individually"
RESPOND MSG=" - Some require manual interaction (Z-Offset)"
RESPOND MSG=" - Some require visual inspection (PA, Temp, Retract)"
RESPOND MSG=" - Run SAVE_CONFIG after Z-Offset and Input Shaper"
RESPOND MSG="=============================================="
# ----------------------------------------------------------------------------
# 1. Z-OFFSET CALIBRATION with Cartographer
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_Z_OFFSET]
description: Calibrate Z-offset using Cartographer touch
gcode:
RESPOND MSG="Starting Z-Offset Calibration..."
RESPOND MSG=""
RESPOND MSG="Step 1: Heating up..."
# Heat up for calibration
M104 S50
M190 S60
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=45
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=55
RESPOND MSG="Step 2: Homing..."
G28
RESPOND MSG="Step 3: Cartographer Z0 calibration..."
RESPOND MSG=""
RESPOND MSG="⚠️ MANUAL INTERACTION REQUIRED!"
RESPOND MSG=""
RESPOND MSG="Cartographer will prompt for manual Z adjustment."
RESPOND MSG="In console, use these commands:"
RESPOND MSG=" TESTZ Z=0.01 - Move nozzle DOWN (closer to bed)"
RESPOND MSG=" TESTZ Z=-0.01 - Move nozzle UP (away from bed)"
RESPOND MSG=" TESTZ Z=0.005 - Fine adjustment"
RESPOND MSG=""
RESPOND MSG="When nozzle barely touches paper:"
RESPOND MSG=" ACCEPT - Finish calibration"
RESPOND MSG=" ABORT - Cancel"
RESPOND MSG=""
RESPOND MSG="Starting probe now - watch the console!"
# Start Cartographer calibration (Survey Touch)
CARTOGRAPHER_SCAN_CALIBRATE
RESPOND MSG=""
RESPOND MSG="Z-Offset calibration complete!"
RESPOND MSG="Don't forget to run SAVE_CONFIG"
# ----------------------------------------------------------------------------
# 2. INPUT SHAPER CALIBRATION
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_INPUT_SHAPER]
description: Measure resonance frequencies with ADXL345
gcode:
RESPOND MSG="Starting Input Shaper Calibration..."
RESPOND MSG=""
RESPOND MSG="Step 1: Homing..."
G28
RESPOND MSG="Step 2: Measuring X-axis resonance..."
MEASURE_AXES_NOISE axis=x
RESPOND MSG="Step 3: Measuring Y-axis resonance..."
MEASURE_AXES_NOISE axis=y
RESPOND MSG=""
RESPOND MSG="Input Shaper calibration complete!"
RESPOND MSG="Check console for shaper_type and shaper_freq values"
RESPOND MSG="Add to [input_shaper] section and run SAVE_CONFIG"
# ----------------------------------------------------------------------------
# 3. PRESSURE ADVANCE CALIBRATION
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_PRESSURE_ADVANCE]
description: Calibrate Pressure Advance for optimal corners
gcode:
{% set FILAMENT = params.FILAMENT|default("PLA")|upper %}
{% set START = params.START|default(0.01)|float %}
{% set END = params.END|default(0.05)|float %}
{% set STEPS = params.STEPS|default(10)|int %}
{% set TEMP = params.TEMP|default(205)|int %}
RESPOND MSG="Starting Pressure Advance Calibration..."
RESPOND MSG="Filament: {FILAMENT}"
RESPOND MSG="PA Range: {START} to {END} in {STEPS} steps"
RESPOND MSG=""
# Call the actual print pattern
PA_TEST_PATTERN START={START} END={END} STEPS={STEPS} TEMP={TEMP}
RESPOND MSG=""
RESPOND MSG="Pressure Advance calibration complete!"
RESPOND MSG="Examine squares and find best corner quality"
# ----------------------------------------------------------------------------
# 4. FLOW RATE CALIBRATION
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_FLOW_RATE]
description: Calibrate flow rate for exact wall dimensions
gcode:
{% set FILAMENT = params.FILAMENT|default("PLA")|upper %}
{% set START = params.START|default(0.90)|float %}
{% set END = params.END|default(1.10)|float %}
{% set STEPS = params.STEPS|default(5)|int %}
{% set TEMP = params.TEMP|default(205)|int %}
RESPOND MSG="Starting Flow Rate Calibration..."
RESPOND MSG="Filament: {FILAMENT}"
RESPOND MSG="Flow range: {START} to {END} in {STEPS} sections"
RESPOND MSG=""
# Call the actual print pattern
FLOW_TEST_CUBE START={START} END={END} STEPS={STEPS} TEMP={TEMP}
RESPOND MSG=""
RESPOND MSG="Flow Rate calibration pattern complete!"
RESPOND MSG="Measure walls with calipers and calculate optimal flow"
# ----------------------------------------------------------------------------
# 5. TEMPERATURE TOWER
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_TEMPERATURE]
description: Print temperature tower to find optimal temp
gcode:
{% set FILAMENT = params.FILAMENT|default("PLA")|upper %}
{% set START = params.START|default(195)|int %}
{% set END = params.END|default(225)|int %}
{% set STEP = params.STEP|default(5)|int %}
{% set BED = params.BED|default(60)|int %}
RESPOND MSG="Starting Temperature Tower..."
RESPOND MSG="Filament: {FILAMENT}"
RESPOND MSG="Temperature Range: {START}°C - {END}°C (step: {STEP}°C)"
RESPOND MSG=""
# Call the actual print pattern
TEMP_TOWER START={START} END={END} STEP={STEP} BED={BED}
RESPOND MSG=""
RESPOND MSG="Temperature Tower complete!"
RESPOND MSG="Examine sections for best quality"
# ----------------------------------------------------------------------------
# 6. RETRACTION TEST
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_RETRACTION]
description: Test retraction settings to minimize stringing
gcode:
{% set FILAMENT = params.FILAMENT|default("PLA")|upper %}
{% set START = params.START|default(1.5)|float %}
{% set END = params.END|default(3.5)|float %}
{% set STEPS = params.STEPS|default(8)|int %}
{% set TEMP = params.TEMP|default(205)|int %}
RESPOND MSG="Starting Retraction Test..."
RESPOND MSG="Filament: {FILAMENT}"
RESPOND MSG="Retraction range: {START}mm to {END}mm in {STEPS} towers"
RESPOND MSG=""
# Call the actual print pattern
RETRACT_TEST_PATTERN START={START} END={END} STEPS={STEPS} TEMP={TEMP}
RESPOND MSG=""
RESPOND MSG="Retraction Test complete!"
RESPOND MSG="Find tower with least stringing"
# ----------------------------------------------------------------------------
# 7. BED MESH CALIBRATION
# ----------------------------------------------------------------------------
[gcode_macro CALIBRATE_BED_MESH]
description: Calibrate bed mesh with Cartographer
gcode:
RESPOND MSG="Starting Bed Mesh Calibration..."
RESPOND MSG=""
RESPOND MSG="Step 1: Heating bed..."
M190 S60
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=55
RESPOND MSG="Step 2: Homing..."
G28
RESPOND MSG="Step 3: Clearing existing mesh..."
BED_MESH_CLEAR
RESPOND MSG="Step 4: Starting adaptive mesh calibration..."
BED_MESH_CALIBRATE ADAPTIVE=1
RESPOND MSG=""
RESPOND MSG="Bed Mesh calibration complete!"
RESPOND MSG="Mesh saved automatically"
RESPOND MSG="Run SAVE_CONFIG to make permanent"
# ----------------------------------------------------------------------------
# ⚠️ CALIBRATION_FULL / CALIBRATION_QUICK REMOVED
# ----------------------------------------------------------------------------
# These macros were removed because they don't work correctly:
#
# - CALIBRATE_Z_OFFSET requires manual interaction (TESTZ/ACCEPT)
# - PA_TEST_PATTERN requires visual inspection
# - TEMP_TOWER requires visual inspection
# - RETRACT_TEST requires visual inspection
#
# Running these automatically without user input produces bad results!
#
# ✅ CORRECT WORKFLOW:
# Run calibration macros INDIVIDUALLY from the menu:
# 1. CALIBRATE_Z_OFFSET - Do manually with paper test
# 2. CALIBRATE_INPUT_SHAPER - Automatic (if ADXL connected)
# 3. CALIBRATE_PRESSURE_ADVANCE - Inspect test pattern
# 4. CALIBRATE_FLOW_RATE - Measure with calipers
# 5. CALIBRATE_TEMPERATURE - Inspect temp tower
# 6. CALIBRATE_RETRACTION - Inspect stringing towers
# 7. CALIBRATE_BED_MESH - Automatic
#
# After each calibration that changes settings: SAVE_CONFIG
# ----------------------------------------------------------------------------
RESPOND MSG=" QUICK CALIBRATION COMPLETE!"
RESPOND MSG="=============================================="
RESPOND MSG=""
RESPOND MSG="Run SAVE_CONFIG to save settings!"