OpenATC is experimental software. There is no guarantee that it will operate correctly, safely, or without causing machine, spindle, tooling, workpiece, or fixture damage.
OpenATC is an open source automatic tool changer concept for FluidNC-powered hobby CNC routers and mills. It is designed around a linear, bed-mounted tool magazine that sits along the machine X or Y axis and uses controlled spindle motion to pick up, return, tighten, and loosen tools.
This project is for builders who want a practical, inspectable tool changer stack instead of a closed black box. The current focus is a magazine-style changer for Cartesian X/Y/Z machines, with toolsetter probing for dynamic tool length offsets.
OpenATC is experimental. Automatic tool changing moves the spindle into fixed hardware, starts and stops the spindle intentionally, and can damage the machine if coordinates, directions, speeds, homing, or toolholding are wrong.
Before running an automatic change:
- Verify all machine coordinates with no cutter installed.
- Confirm homing, soft limits, safe Z, and emergency stop behavior.
- Confirm spindle CW and CCW behavior at low speed.
- Test one motion phase at a time before allowing a complete tool change.
- Keep hands clear of the machine whenever FluidNC is armed.
The native FluidNC patch set in this repository targets:
- FluidNC firmware.
- Cartesian X/Y/Z machines.
- Linear bed-mounted magazines along X or Y.
- Tool numbers
1..pocket_count. - Tool
0as an empty spindle. - Safe machine-coordinate moves with
G53. - Toolsetter probing with
G38.2. - Dynamic tool length offsets with
G43.1. - TLO clearing with
G49. - Optional tool-detection checks with one unload retry when configured.
The first native implementation does not target carousel, turret, multi-row, side-mounted, or random-pocket changers.
OpenATC treats the magazine as a measured row of pockets:
- FluidNC is homed and the current tool state is declared.
Tn M6requests a tool change.- The native ATC validates the requested tool, current tool, homing state, machine bounds, spindle direction support, and optional tool detection.
- The machine moves to safe Z.
- The spindle moves to the current pocket and unloads the current tool when needed.
- The spindle moves to the requested pocket and loads the new tool.
- The machine probes the toolsetter.
- FluidNC applies the dynamic Z tool length offset.
M61 Qn declares the current tool without motion. Use M61 Q0 when the
spindle is empty. After the machine is configured, homed, and verified, Tn M6
requests a change to tool n; T0 M6 returns the current tool and leaves the
spindle empty.
All OpenATC configuration distances are machine coordinates in millimeters. If FluidNC is in inch mode before a tool change, the native job temporarily switches to metric motion for the OpenATC sequence and restores inch mode afterward.
Optional tool detection uses FluidNC's logical pin state. Configure
normally-open or normally-closed wiring so logical true means the tool blocks
the beam while held in the spindle. After load, OpenATC expects the beam to be
blocked. After unload, it expects the beam to be clear because the tool was
dropped into the pocket. If a failed unload is detected, OpenATC retracts using
the load retract_between_passes_mm distance, tries one more unload pass, then
alarms if the sensor state is still wrong.
The current native implementation is provided as ordered FluidNC patches:
patches/fluidnc/
BASE_COMMIT.txt
0001-add-openatc-native-toolchanger.patch
0002-add-openatc-example-config.patch
0003-add-openatc-tests-and-fixtures.patch
0004-Allow-signed-OpenATC-pocket-pitch.patch
Apply them to the FluidNC commit they were prepared against:
git clone https://github.com/bdring/FluidNC.git
cd FluidNC
git checkout 4aa40185c861fe4abad17a592673c827e0298697
git am /path/to/OpenATC/patches/fluidnc/*.patchpatches/fluidnc/BASE_COMMIT.txt records the FluidNC base commit, patch
order, and verification commands used for this release.
Build the patched firmware with PlatformIO from the FluidNC checkout:
pio run -e wifiAfter applying the patches, configure a spindle with:
atc: openatcUse the included openatc_linear.yaml example from the patched FluidNC tree as
a starting point. Replace every machine coordinate with values measured on your
machine. Do not run a complete automatic change until each safe-Z, pocket,
engage-Z, and toolsetter position has been verified without a cutter installed.
Use a positive pocket_pitch_mm when pocket numbers increase toward machine
X+/Y+, or a negative value when they increase toward X-/Y-.
The OpenATC Config Wizard helps generate the openatc: YAML section and can
merge it into an existing FluidNC config in your browser:
https://darkslaayer.github.io/OpenATC/
The wizard is millimeters-only and does not upload your config anywhere.
- Back up your working FluidNC configuration.
- Apply and build the patched FluidNC firmware.
- Flash the firmware and confirm the machine homes correctly.
- Configure the
openatc:section with measured magazine and toolsetter coordinates. - Set optional tool detection to
NO_PINuntil the basic motion is proven. - Declare an empty spindle with
M61 Q0. - Test invalid tool handling before testing real motion.
- Test the first tool pickup with no cutter installed.
- Add one tool at a time and verify probing and offsets.
assets/
openatc-logo.png
docs/
GitHub Pages config wizard.
patches/fluidnc/
Native FluidNC OpenATC patch set and base-commit manifest.
The native FluidNC patch set is the supported path for new builds.
OpenATC is licensed under the GNU General Public License version 3 or later.
See LICENSE for the license notice and link to the full terms.
You are responsible for your machine, tooling, wiring, speeds, coordinates, and testing process. OpenATC can move into rigid hardware and can start the spindle as part of a tool change. Treat every configuration value as unsafe until you have verified it on your own machine.
