Any modern MCU can generate the PWM we need to drive a stepper. As before, we just need the right H-bridge for our power demands and at least 4 GPIO. I'd always prefer to use a hardware PWM and a little bit of counter/toggling code but in a pinch you could bit-bang with a software clock signal.
A better option are specialized stepper drivers. They usually require 2 pins (PWM & direction) and are awfully cheap thanks to 3D printers. The A4988 is at the heart of every RepRap and a single unit module with heatsink is a buck and change. In addition to price and pin count, these driver boards also usually have an output for current draw, something key to closed-loop system (a topic for another time.) Other popular chips include the DRV8824, DRV8834 (low-voltage) & A3967 - used in the OSH EasyDriver.
As a third option there exists drivers that can be controlled over the various communication protocols. Pick a vendor and you'll probably find a part with SPI or I2C. As a sample, the DRV8830 & PCA9629 can be controlled by I2C while something like the L6470 & A4980. Note that there are less options for these type of parts and are usually pricier than the step+dir driver.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.