The TMC drivers are cable of stall detection without sensors using the M915 command inside of the G-codes on a 3D Printer. I was wondering if anyone knows if it is possible to do this with standard programming within the Arduino IDE.
Ex. Moving the stepper with a while loop condition that checks between steps if any stall has occurred. Has anyone ever done this before?
Here is a library specific to controlling a stepper with a TMC2160 driver
Stall detection of a stepper motor is sketchy at best - you cannot rely on it whatever the manufacturer says, and it doesn't generally work at all at low speeds! There's certainly no simple way to do this as it involves analyzing the back EMF and impedance of the windings with a smart algorithm that tries to infer the rotor movement indirectly.
Adding an encoder is a better way as you can use it to both detect and correct miss-stepping.