SENSORLESS homing of stepper motor| Micropython, Raspberry Pi Pico, PIO, TMC 2209, StallGuard @andreafavero71
SENSORLESS homing of stepper motor| Micropython, Raspberry Pi Pico, PIO, TMC 2209, StallGuard  @andreafavero71
Uploaded February 2025 | Updated September 2026, 1 week ago
Short demo showcasing MicroPython-based SENSORLESS homing & centering of a stepper motor. The control uses RP2040-Zero and PIO (Programmable Input/Output) combined with Trinamic TMC2209 driver.
The StallGuard feature is used for homing detection, while the PIO's are used for steps counting and for stepper centering: The stepper is stopped in the middle of the 2 detected homes.

Setup:
- 1 NEMA 17 stepper motors.
- 1 RP2040-Zero board.
- 1 Trinamic TMC2209 driver.
- the stepper is 200 pulses/rev, set to 1/8 microstep, therefore 1600 pulses/rev.
- the stepper is controlled by the RP2040-Zero board, running MicroPython.
- the range in between the hard-stops (homes) is varied along the video.
- each time the push button is pressed, a new homing & centering cycle is started.
- the stepper speed is alternated between 400Hz and 1200Hz.
- UART comunication between RP2040 and TMC2209.

This control method is part of a larger project (youtu.be/ORftNl7bZG4), but it can be adapted for other applications requiring sensorless homing.
Code & Examples: github.com/AndreaFavero71/stepper_sensorless_homing
Code tested on RP2040-Zero, and it's expected to also work on RP2350-Zero (both having the RGB led onboard).

Demo with fixture and board from Lewis (DIY Machines): youtu.be/fMuNHKNTSt8
Lewis tutorial: youtu.be/TEkM0uLlkHU
SENSORLESS homing of stepper motor| Micropython, Raspberry Pi Pico, PIO, TMC 2209, StallGuardWorlds smallest Rubiks cube solver robot, DIY, 3D printed, fully autonomous20170930 U12 Groningen Zoetermeer (only lines with Luca)20180106 U12 Groningen EindhovenMirrorBallBot, a different ball balancing robotpi approximation (Raspberry Pi and Monte Carlo method)20180210 U12 Gijs Groningen Heerenven20180421 U12 Chiefs Trophy match5 Chiefs Yang - GIJSInverted pendulumSalire con oppone ...Ball balancing robot, a new approach: MirrorBallBot [Raspberry Pi, RP2040, TMC2209, stepper motors]20180324 U12 Eindhoven Groningen
Andrea Favero |

SENSORLESS homing of stepper motor| Micropython, Raspberry Pi Pico, PIO, TMC 2209, StallGuard

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER