Controllers: FluidNC & GRBL

CNC controller firmware for hot-wire foam cutters: ESP32 + FluidNC (USB and Wi-Fi, YAML config) vs Arduino GRBL, how they read G-code, and configuring extra axes.

The controller is the board + firmware that turns G-code into motor pulses and hot-wire control. Two families dominate the hobby world.

FluidNC (ESP32) — the reference

FluidNC runs on the inexpensive, powerful ESP32 and is the recommended controller for cncfoam.com. Why:

  • USB and Wi-Fi — stream over a cable or wirelessly (WebSocket). cncfoam.com talks to it directly over both.
  • YAML configuration — you describe your machine (pins, steps/mm, axes, limits) in a human-readable config.yaml file uploaded to the board, instead of recompiling firmware.
  • More axes — supports the multiple stepper outputs a 4/5-axis foam cutter needs.
  • Web UI — a built-in browser interface for jogging and config.

You flash FluidNC to the ESP32 once (via a web flasher), edit config.yaml for your machine, and connect your network. From there cncfoam.com's Wi-Fi transport can stream straight to it.

GRBL (Arduino/AVR) — the classic

GRBL is the lightweight CNC firmware that started it all, running on Arduino Uno/Nano (ATmega328). It is rock-solid and well documented, but limited to 3 axes on classic hardware and configured by $ settings over serial. GRBL variants (grblHAL, GRBL-Mega-5X) add axes. Fine for 2-axis foam cutters and simple builds; for 4/5-axis, FluidNC is the easier path.

Configuring extra axes

A foam cutter maps stepper outputs to X, Y, U, V (and A). In FluidNC you add axis blocks in the YAML with their pins and steps/mm; the number you can use depends on your board's driver count. Get one axis moving correctly first (direction, steps/mm) before adding the rest.

Calibration

The critical per-axis number is steps/mm — how many motor steps move the axis one millimetre. Command a known distance, measure the actual travel, and adjust until they match. cncfoam.com has a calibration wizard on its roadmap to push test moves and compute this for you.

Hot-wire power and temperature control belong on the machine side (a dedicated supply + MOSFET), separate from the controller's logic. The controller just toggles the wire (M8/M9) and optionally sets a PWM target. See Hot-wire power.