Skip to content

Smoother, quieter motion for Klipper.

FOCI runs field-oriented control on a TMC4671, so a stepper motor with an encoder runs as a closed-loop servo. Klipper still plans the moves.

A standard stepper driver counts steps and hopes the rotor followed. FOCI reads the motor’s encoder and regulates the phase currents against the rotor’s actual position, many thousands of times per second, on the MCU itself. The result is smoother, quieter motion and an axis that knows where it is.

FOCI is firmware for the board plus a small Python module for Klipper and Kalico. Klipper’s planner, G-code and macros work as they always have.

Smooth and quiet

Each coil gets regulated current instead of open-loop microstep tables, so the motor runs smoothly and quietly.

Klipper and Kalico compatible

The board speaks Klipper’s MCU protocol. Steppers, kinematics and macros stay in your existing printer.cfg.

Commissions itself

FOCI_SELFTEST checks wiring and encoder, FOCI_SETUP identifies the motor’s resistance and inductance, and FOCI_AUTOTUNE measures each axis and computes its control gains. No hand-tuning.

Sensorless homing

Your printer homes by detecting a stall with the motor encoders. No endstop switches required.

Control runs on the board

The control loops run in the firmware, not across a USB link to the host. This allows higher sampling rates, tighter timing and more accurate control than a host alone can deliver.

Real-time by design

Written in Rust on the RTIC real-time operating system, with scheduling guarantees. Urgent work always preempts the rest, so timing stays predictable. Rust catches whole classes of memory and concurrency bugs at compile time, before they can reach a motor.

Ouroboros

Ouroboros drives two motors from one board, with up to 15 A peak per motor. An STM32H723 runs the firmware.

OpenFFBoard

OpenFFBoard is an open source motor controller with a TMC4671. It drives one motor, and an STM32F407 runs the firmware.

  1. Flash the firmware. Load Katapult once, then flash FOCI through it.
  2. Configure Klipper. Add the klipper-foci module and a [foci <stepper>] section with your run current and encoder resolution.
  3. Bring up and tune. Self-test the wiring, run FOCI_SETUP to identify the motor, then let FOCI_AUTOTUNE tune each axis.

FOCI is alpha software. The implementation, commands, features and API can change. Source and issues are on GitHub.