
Sensorless Homing and StallGuard
Danielle A.
No Switches Required
Traditional 3D printers home each axis by moving until a physical microswitch triggers a simple, reliable approach that works well but requires endstop switches at each axis limit, wiring to the control board, and periodic maintenance. Sensorless homing uses a feature in Trinamic stepper drivers (TMC2209, TMC2226, TMC5160) called StallGuard to detect when an axis reaches its physical limit without any external switch. It does this by sensing the increase in motor back-EMF that occurs when the moving mass stalls against a mechanical stop.
Sensorless homing is particularly popular on Voron printers and other community designed machines where hiding endstop wiring simplifies the build aesthetic and reduces potential failure points. It's also useful for machines where endstop placement is mechanically awkward. However, it introduces new tuning requirements and sensitivities that make it less forgiving than physical switches for new users.
How StallGuard Works
Trinamic stepper drivers in SpreadCycle or StealthChop mode continuously monitor the back-EMF of the motor winding to estimate the load the motor is experiencing. When the toolhead or bed hits a mechanical stop, the motor stalls, it can no longer move, and the back-EMF changes characteristically. The SGTHRS (or STALLGUARD_THRESHOLD in Klipper's configuration) parameter sets how sensitive this detection is. Too sensitive (low SGTHRS), the driver triggers false positives during normal acceleration to the printer thinks it's hit a wall when it hasn't. Too insensitive (high SGTHRS) and it doesn't detect a real stall until significant force has been applied to the mechanical stop, potentially damaging the machine.
Configuration in Klipper
Klipper's sensorless homing configuration requires setting the appropriate SGTHRS value in the [tmc2209] or [tmc5160] configuration block and specifying the homing speed, slower homing (10–20 mm/s) gives more consistent stall detection than fast homing. The procedure: disable the physical endstops (or leave them unplugged; the virtual endstop from StallGuard replaces them in the homing sequence). Set an initial conservative SGTHRS value. Home the axis and verify that the printer stops before mechanical damage occurs. Adjust SGTHRS up (less sensitive) or down (more sensitive) until homing is reliable without false triggers. This requires hands on testing and iterative adjustment, budget an hour for initial setup on a new machine.
Limitations and When Not to Use It
Sensorless homing is less reliable than physical endstops in these situations: cold motors (before the first few homing cycles, motor characteristics aren't fully established), long Bowden tube setups (the tube can absorb some stall force), very lightweight axes (insufficient back-EMF change on stall), and environments with varying ambient temperatures. For Z homing, most Voron builds and other precision machines use physical probes or TAP (see our Voron TAP guide) instead of sensorless homing for the vertical axis, because the Z axis needs probe accuracy, not just stall detection. X and Y homing are the most successful sensorless homing applications. Use quality filament and keep your Klipper configuration current (see our firmware update guide) for the best results.


Leave a comment
This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.