This is a library for the Arduino IDE that helps interface with a Pololu High-Power Stepper Motor Driver 36v4 or Pololu High-Power Stepper Motor Driver 36v8. It uses the Arduino SPI library to communicate with the SPI interface (SCS, SCLK, SDATI, and SDATO) of the driver.
This library is designed to work with the Arduino IDE versions 1.8.x or later; we have not tested it with earlier versions. This library should support any Arduino-compatible board, including the Pololu A-Star controllers.
The HighPowerStepperDriver library supports Pololu's High-Power Stepper Motor Driver 36v4. Before continuing, careful reading of its product page is recommended.
You will need to connect your motor, motor power, and IOREF as described on the product page. You should also make the following connections between the Arduino and the driver:
Arduino | High-Power Stepper Motor Driver |
---|---|
Digital pin 2 | DIR |
Digital pin 3 | STEP |
Digital pin 4 | SCS |
SCK | SCLK |
MOSI | SDATI |
MISO | SDATO |
GND | GND |
The SDATO pin is only needed if you want to read information back from the stepper driver. Since the motor can be stepped and its direction changed using the SPI interface, it is possible to use the driver without connecting the STEP and DIR pins, and they are not used in every example.
The SPI pins (MOSI, MISO, and SCK) on Arduino-compatible boards are sometimes not labeled. You should refer to the documentation for your particular board to find the locations of these pins.
You can use the Library Manager to install this library:
- In the Arduino IDE, open the "Sketch" menu, select "Include Library", then "Manage Libraries...".
- Search for "HighPowerStepperDriver".
- Click the HighPowerStepperDriver entry in the list.
- Click "Install".
If this does not work, you can manually install the library:
- Download the latest release archive from GitHub and decompress it.
- Rename the folder "high-power-stepper-driver-arduino-arduino-xxxx" to "HighPowerStepperDriver".
- Drag the "HighPowerStepperDriver" folder into the "libraries" directory inside your Arduino sketchbook directory. You can view your sketchbook location by opening the "File" menu and selecting "Preferences" in the Arduino IDE. If there is not already a "libraries" folder in that location, you should make the folder yourself.
- After installing the library, restart the Arduino IDE.
Several example sketches are available that show how to use the library. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "HighPowerStepperDriver". If you cannot find the examples, the library was probably installed incorrectly and you should retry the installation instructions above.
For complete documentation of this library, including many features that were not mentioned here, see the high-power-stepper-driver-arduino documentation. If you are already on that page, see the HighPowerStepperDriver class reference.
- 1.1.1 (2024-12-09): Fix the
setCurrentMilliamps36v8
function, which was setting current limits 2x higher than intended. - 1.1.0 (2024-12-06): Added support for the Pololu High-Power Stepper Motor Driver 36v8.
- 1.0.0 (2019-06-04): Original release.