I don’t know if it’s actually possible to drive a stepper motor directly from an Arduino, but certainly all the projects I’ve seen use a separate driver chip on another board that can be connected to the microcontroller.
There are lots of different boards, based on different chips. So how do you choose?
1 Is the motor you selected unipolar or bipolar? Choose a stepper motor controller type accordingly, though a growing number are able to control both types. The number of leads is usually a dead give-away of the motor type: if the motor has 4 leads, then it is bipolar; should it have 6 or more leads, then it is unipolar. 2 Choose the motor controller voltage range to match your motor’s nominal voltage . 3 Find out how much current per coil your motor requires, and find out how much current (per coil) the stepper motor controller can provide.If you cannot find the current per coil, most manufacturers list the coil impedance, R . Using Ohms Law (V=IR), you can then calculate the current (I). 4 As with DC motor controllers, the control method is an important consideration.
Stepper motor controllers are more complex than DC motor controllers. Driving a bipolar motor with microstepping requires 2 complete H-bridges and 2 channels of PWM.
The versatile Adafruit Motor Shield V2 has 4 H-bridges and can drive as many as 2 steppers. What’s more, it is stackable to control dozens of motors.
Simple Dual H-Bridge Driver Driving a bipolar motor requires 2 full H-bridges so it can reverse the current to the phases. H-bridges can be tricky to build from scratch. But there are plenty of H-bridge chips available to simplify the task.> The L293D is one of the most popular and economical chips. These can be found at the heart of most first-generation motor shields, including the incredibly popular V1 Adafruit Motor Shield.
The motors I’m looking at are bipolar, with 4 leads, and run at 12 V and 0.33/0.35 A.
It looks like an Allegro 3967-based driver board should work. This chip is rated to ±750 mA, 30 V
- This is the basis of the Sparkfun Easy Driver ($15)
- SeeedStudio also have a similar board: Stepper Motor Driver V4.5 ($13)
This board design is open source (documented here), so I could, for version 2, fab my own using this chip. Perhaps with an integrated microcontroller. It also means there are numerous cheaper knock-offs available:
There is another Allegro chip, the A4988, which is rated to 35 V and 2 A.
- This is used in Sparkfun’s Big Easy Driver ($20)
- Pololu also have a much cheaper board: A4988 Stepper Motor Driver Carrier $6
Adafruit have a nice board, the Motor/Stepper/Servo Shield for Arduino v2 Kit - v2.3, based on the TB6612, which can drive up to two steppers at 1.2 A per channel. This is $20, so comparable to other brand-name boards that can only drive one stepper.
There are many others, including the STMicroelectronics L293D used in the Adafruit Arduino Motor Shield and Toshiba TB6600 used in the PiBot TB6600 Stepper Driver and also in the fab-able satstep6600.