LinuxCNC
When a machine has to move precisely and predictably, hobby firmware runs out of road. LinuxCNC is the open-source, hard-real-time controller that drives everything from converted mills to plasma tables and lathes.
LinuxCNC is the serious end of open-source machine control. It runs on a PC with a real-time kernel and a hardware interface (often a Mesa FPGA card), giving you deterministic step generation, closed-loop control, custom kinematics and a configurable HAL. If you are retrofitting a real machine rather than running a desktop router, this is the reference platform.
What it is
LinuxCNC is a software motion controller: it reads G-code, plans trajectories, and emits the step/direction or servo commands a machine needs — all under hard real-time timing so motion never stutters. Its defining feature is HAL (the Hardware Abstraction Layer), a signal-wiring system that lets you connect inputs, outputs, encoders, spindles and logic like a virtual breadboard. That flexibility is why it dominates ambitious retrofits.
Where it wins
- Real determinism. A real-time kernel means reliable timing for closed-loop servo and high step rates — beyond what an Arduino-class controller can guarantee.
- Configurable to any machine. Custom kinematics (including non-trivial geometries), up to 9 axes, and HAL wiring for arbitrary I/O.
- Mature and proven. Decades of development and a deep community; well documented and widely used in industry retrofits.
- Free and inspectable. GPL software on commodity hardware, often paired with Mesa interface cards.
Where it still hurts
- Setup complexity. Real-time kernel, interface hardware and HAL configuration are a meaningful project — this is not plug-and-play.
- Overkill for desktop machines. For a small hobby router, GRBL is far simpler and sufficient.
- Hardware-dependent. Best results need a proper interface card rather than a parallel port on modern PCs.
The AI angle
The interesting frontier here is adaptive control: ML models that tune feeds and speeds from spindle load, detect tool wear from vibration, or optimise toolpaths for a specific machine's dynamics. LinuxCNC's open HAL and Python interface make it an unusually good substrate for wiring those signals in.
Start here
- Get the live ISO and docs at linuxcnc.org.
- For a real retrofit, plan around a Mesa interface card.
- Generate toolpaths in FreeCAD Path or another CAM tool, then run them here.