Have you programmed a TMC stepper driver?

I am about to put TMC2160 stepper drivers on my MPCNC X,Y, Rot axes (except Z, which has the closed-loop one described elsewhere on the V1E forum). These are on the Makerbase MKS TMC2160 boards. I want to have fewer microsteps than the DIP switches allow (8 is the lowest), so I am delving into programming the firmware on these TMC2160 chips. If you have ever tuned up a Trinamic stepper driver (Trinamic, I recently learned, is now Analog Devices), what tools did you use? It has an SPI interface. I have an SPI-USB adapter coming soon. I got the TMCL-IDE tool for Windows, but I thought I might ask here if there is something better for this sort of thing. I also want to be sure that Coolstep is tuned for CNC work, not 3D printers which I suspect these driver boards were made for. I also want to implement lost-step-detection to trigger a DOOR alarm and stop and pull up the spindle. Not sure if that is the same as Stallguard.

So if any of this is old hat to you, please speak up!

3 Likes

Mostly watching and following along to learn… Didn’t know you could update firmware on the TMC chips :astonished:

Recently implemented lost step/stall detection (Stallguard based) when making my power weeder tools, UART TMC2209 though. Encountered lots of caveats, e.g. velocity or rpm has to be high enough (60rpm+) that back EMF is reliably detectable by stall guard when steps are lost. So, for precise position control at slow speeds, seems like adding encoders is the way. I vaguely recall you shared info on optical encoders that work well for you before. You’re using SPI and different drivers, but are welcome to DM me if more details about UART stallguard could help your project.