Skip to content

PyTmcStepper

  • Software
  • Microcontrollers and firmware tools
  • Library

A pure-Python library for driving stepper motors through Trinamic stepper drivers from a single board computer such as a Raspberry Pi. It is experimental and intended mainly for test setups.

Source on GitHub: github.com/Chr157i4n/PyTmcStepper (opens in a new tab). Facts read at commit 6b871f7 (opens in a new tab).

Licenses

Code
GPL-3.0-only (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (GPL-3.0-only) at commit 6b871f7 (opens in a new tab), on 22 Oct 2026.

Commercial use
Yes

Copyleft: Modified source must be published.

What it does

  • Drives stepper motors via Trinamic TMC drivers, configuring driver registers over UART, SPI, or SPI through an FT232H.
  • Supports several motion control methods including STEP/DIR, STEP/REG, VACTUAL, STEP_PWM/DIR, and a ramp generator for TMC5160.
  • Lists supported drivers: TMC2208, TMC2209, TMC2240, and TMC5160.
  • Works with GPIO libraries for Raspberry Pi, Raspberry Pi 5, Jetson, Luckfox Pico, Orange Pi, and FTDI, and also runs under MicroPython.
  • Includes demo scripts for UART connection, pin checks, basic movement, StallGuard, VACTUAL, multiple drivers, threads, and file logging.
  • Python is not fast enough for high speeds, so the motor loses steps when moved quickly.

Written by Robotheca from the project's README (opens in a new tab) at commit 6b871f7.

Getting started

Difficulty
Intermediate
Hardware it needs, as the project states it
Raspberry Pi (Pi 3, Pi 4, or Pi 5, or another listed board such as Jetson, Luckfox Pico, or Orange Pi) with a Trinamic stepper driver, tested on the Bigtreetech TMC2209 V1.2 and V1.3, plus a motor power supply and wiring to the driver's UART or SPI pins.

Maintenance

Status
Active: a commit in the last 90 days
Newest commit
15 Aug 2026 on main
Latest release
v0.21.3 (15 Aug 2026)

Checked on GitHub on 22 Oct 2026.

Robots that can run it

No robot on Robotheca is linked to it yet. Links come from a robot's robot.yaml, from its dependency files read as text, or from Robotheca's editors.

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.