TMC5160_Arduino icon indicating copy to clipboard operation
TMC5160_Arduino copied to clipboard

How do I set the stepper micro-steps?

Open UnexpectedMaker opened this issue 1 year ago • 1 comments

Seems like a silly question, but I see _uStepCount = 256 and no methods to change it?

I want to set my stepper to 8 microsteps, not 256.

All position calculations are done against _uStepCount.

Was this an oversight? or am I missing something?

Thanks :)

UnexpectedMaker avatar Feb 12 '24 00:02 UnexpectedMaker

Hello,

I haven't looked a lot into it but it seems that 256 microsteps is the standard way of using this driver. As it has an internal motion controller there aren't really any drawbacks to having 256 usteps, AFAIK it emulates a sine wave which makes the motor behave more like a permanent magnet synchronous motor.

You can have a look at the CHOPCONF register if you really want a lower microstep setting. And feel free to submit a PR if it doesn't break anything else ;)

tommag avatar Feb 12 '24 10:02 tommag