On Tue, Jan 25, 2022, 10:16 lkcl <luke.leighton@gmail.com> wrote:
Trinamic ICs have 1/256 phase interpolation and generate proper pure sine waves,

it may not be all that fancy, but i wrote some code many years ago that does 1:2048 micro-stepping with dithering so the output is pretty smooth (it's a set of 8 256-microstep ramps, with bitreverse-based dithering (kinda like class-D amplifier output)). it uses an ATTiny85 (8-pin AVR). Feel free to try it out if you like -- it just repeatedly slowly accelerates/decelerates to a pretty high speed (to the point where my motor couldn't keep up at like >500 rpm), so you'll have to adapt the code if you want a different drive pattern. you need to continuously rapidly call SetMotorPosition even if you aren't changing the motor position because it uses sw to do the dithering. i remember it being almost silent at low speeds thanks to the microstepping.

Contact me if you want a different foss license, GPLv2 was just whatever i had lying around at the moment.

https://github.com/programmerjake/stepper-motor

Jacob