The Sparkfun EasyDriver
Driving a stepper motor with your Arduino can be a risky business, since the stepper motor can easily overdraw the rated maximum current and fry your circuit. Thanks to Sparkfun’s EasyDriver stepper motor driver it’s become a real breeze. The EasyDriver offers multiple configurable settings as for how you wish to control your motors (ex. step resolution, explaind later in this article).
Setting the resolution
Setting the resolution of the EasyStepper has been made very easy using the MS1 and MS2 pins on the module. It has four settings to choose from:
- Full step
- Half step
- Quarter step
- Eigth step
How many degrees this results in depend on the specifications of your stepper motor. You can see how to connect the MS1 and MS2 pins for setting the resolution in the table below:
To hook up your arduino to a stepper motor you’ll need the following:
|Stepper motor, 4 pin/cable interface||1|
You should never attempt to drive the motor directly from the arduino pins since it could damage the arduino. Also, be sure not to disconnect or reconnect the stepper motor while everything is powered up to avoid spikes that could damage the driver and arduino.
We’ve created an Arduino sketch which you can download below to test the your EasyStepper. To change the stepper speed, simply change the variable steptime (in milliseconds) to what you want.