Quote Originally Posted by boldford View Post
I like Jonathan's DAC idea.
Depending on the required micro-stepping resolution and step frequency you may be able to use the microcontroller's own analogue outputs. Alternatively something like TLC7528CN is fine. I used an 8-bit one connected to a port since that gives enough resolution for microstepping or more fancy stuff later on . You can make the voltage reference to the DAC variable to enable different motors to be used, but make sure you use a stable reference - not just a simple voltage divider as the output of that will fluctuate too much.