The A4988 driver
The A4988 IC (datasheet) by Allegro MicroSystems is a driver for bipolar stepper motors. The maximum supply voltage for motors is 35V, while the maximum output current is 2A.
The IC has a QFN package, hard to be soldered by hand. This is why on Internet you can find several breakout boards; the most famous is the Pololu one, which I chose for this tutorial:
S&D control
This IC offers an S&D (step & direction) control:
- with a pulse on the STEP PIN, the motor goes a step ahead;
- the direction is determined by the logical state (LOW or HIGH) of the DIR PIN.
You therefore need only two Arduino’s digital PINs to interface with this driver, following the simple wiring published on Pololu’s website:
Microstepping
A stepper motor has a fixed number of steps to make a full rotation; for example most of the motors used for 3d printers make a full rotation every 200 steps.
You can increase the number of steps for a full rotation with the microstepping technique: simultaneously energizing different motor coils, it can set the motor to intermediate positions.
The A4988 IC can drive the motor at half, quarter, eighth or sixteenth microstepping. Microstepping is configured changing the logical state of MS1, MS2 and MS3 PINs, as explained in the following table:
The three PINs have internal pull-down resistors: if you leave them unconnected the driver operates in full step mode.
Current regulator
You learned that every motor has a maximum current per phase and a corresponding rated voltage. You may need to supply the motor with a higher voltage, for example to increase step’s speed: Pololu driver has a trimmer you can use to set the output current. Here’s a short video about this regulation:
In the next post, you’ll start writing an Arduino sketch to move the stepper motor…