StepperDriver gives one Arduino API to A4988, DRV8825, DRV8834 and DRV8880 boards
Arduino library for A4988, DRV8825, DRV8834, DRV8880 and generic two-pin (DIR/STEP) stepper motor drivers
At a glance
- What is it?
- StepperDriver is an Arduino C++ library for driving common stepper motor boards over DIR and STEP pins, with microstepping setup, ramped speed profiles and a non-blocking mode. It also covers the A4988, DRV8825, DRV8834, DRV8880, TMC2100 and TB6600 boards directly.
- Who is it for?
- StepperDriver suits a maker or an engineer who already owns an A4988, DRV8825, DRV8834, DRV8880, TMC2100 or TB6600 board and wants one API instead of board specific timing code. It does not suit a design that needs a step rate beyond what the microcontroller can pulse, because the project warns that high RPM combined with high microstepping fails on slower MCUs.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 97 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
One API across four named driver chips and any DIR/STEP board
StepperDriver is an Arduino library for stepper motor driver boards, and its scope is wider than a single chip. It covers the A4988, the DRV8825, the DRV8834 and the DRV8880, plus the TMC2100, the Toshiba TB6600 and any generic two pin driver that takes a DIR and a STEP line. The generic case matters as much as the named ones, because most small boards present the same interface. The library also handles microstepping, which means it can set the microstep configuration signals and generate the step pulses that match it, rather than leaving you to toggle MS1, MS2 and MS3 by hand for every board you switch between. Supported hardware and its limits are listed per board: the DRV8834 up to 1:32, the A4988 up to 1:16, the DRV8825 up to 1:32, the DRV8880 up to 1:16 with current and torque control, the TMC2100 up to 1:16 natively and 1:256 interpolated, the TB6600 up to 1:16 with microstepping set by DIP switches, and a generic two pin driver up to 1:128 with the microstepping set externally.
Constant speed, ramped speed and a non-blocking pulse mode
The feature list is short and each item answers a different complaint about stepper code. Constant speed mode covers the low rpm case, where a motor turns slowly and steadily. Linear speed mode adds acceleration, and it is worth noting that acceleration and deceleration have separate settings, so a machine can ramp up gently and coast down faster. The third feature is the one that changes how the library is used from a sketch. In non-blocking mode the library yields back to the caller after each pulse, which means your loop keeps running and the step timing does not block everything else on the microcontroller. The fourth feature interacts with that mode: early brake, or an increase in runtime, is how the library handles a move that is asked to finish earlier than the ramp profile would allow. The public API is documented separately in the API reference under docs, so the exact method names for these behaviours live there rather than in the README.
A seconds hand in a dozen lines of setup
The ClockStepper example is the clearest illustration, because it moves a motor like the seconds hand of a watch. The example is written for an A4988 board, and it declares the motor step count, the pins and the microstep pins before creating the driver object.
#include <Arduino.h>
#include "A4988.h"
// using a 200-step motor (most common)
#define MOTOR_STEPS 200
// configure the pins connected
#define DIR 8
#define STEP 9
#define MS1 10
#define MS2 11
#define MS3 12
A4988 stepper(MOTOR_STEPS, DIR, STEP, MS1, MS2, MS3);The construction takes the motor step count first and then the pins, which is how the library knows how far a rotation of 360 degrees actually is. The remaining lines are the motion itself.
void setup() {
// Set target motor RPM to 1RPM and microstepping to 1 (full step mode)
stepper.begin(1, 1);
}
void loop() {
// Tell motor to rotate 360 degrees. That's it.
stepper.rotate(360);
}The two arguments to begin are the target speed in RPM and the microstepping factor, and the example starts at one revolution per minute in full step mode, which is what makes the movement look like a watch hand.
Wiring the microstep pins and setting the current limit
The wiring diagram in the README is a suggestion, and it says outright that all the pins can be changed. The Arduino side of it is small, and the microstep control lines differ by board family, which is why the library needs to know which board it is driving.
- DIR - D8
- STEP - D9
- GND - Arduino GND
- GND - Motor power GND
- VMOT - Motor power (check driver-specific voltage range)
- ~SLEEP (optional) D13The microstep control pins change name and count from board to board. The A4988 and DRV8825 use MS1, MS2 and MS3, the DRV8834 and DRV8880 use M0 and M1, and the TMC2100 uses CFG1 and CFG2, and the wiring diagram shows the first two of each mapped onto D10 and D11. The 100uF capacitor between ground and VMOT and a motor supply that can deliver the set current are both called out separately, since a driver that browns out mid move is a confusing failure.
The speed ceiling you will hit first is the microcontroller
The honest limitation is written into the documentation rather than hidden. The project warns that high RPM combined with high microstepping may not work correctly on slower microcontrollers, and that there is a maximum achievable speed for each board, especially with acceleration on multiple motors at the same time. That constraint has two parts. The board itself has a limit, and the CPU generating the pulses has another, and the second one is the one that catches people out when a sketch that worked on one board fails on another. The same section says the library can set microstepping and generate the signals for each supported driver board, so the microstep table above is a ceiling set by the hardware rather than a setting the library refuses to reach. On the motor side, the supported list is a 4 wire bipolar stepper, some 6 wire unipolar motors rewired into a 4 wire configuration with the centre taps left out, and the 28BYJ-48, which needs a small modification that the project describes as a search for a conversion guide. The hardware list is a 100uF capacitor between ground and VMOT, a motor power supply sized for the current, and the driver board's current limit set to the motor limit.
The repository builds its own examples with arduino-cli
The repository is set up for continuous integration rather than for a single developer, and the Makefile is where that shows. The default board is an Arduino Uno, the Arduino CLI is downloaded into a local directory, and the targets cover installing the core, building every example, and running the unit tests on a simulated ATmega328P with simavr.
TARGET ?= arduino:avr:uno
# Build all the examples: make all TARGET=adafruit:samd:adafruit_feather_m0
# Run the UnitTest sketch on a simulated ATmega328P (simavr): make sim-test
# Regenerate the simavr golden baseline: make sim-test-updateChanging the target is a one line override, which is how the same examples are compiled for a different board such as the Adafruit Feather M0 mentioned in the Makefile comments, and running the sketch on a simulated processor means the timing behaviour of the library can be checked without hardware on the bench. The repository also carries arduino-cli.yaml, platformio.ini and a CMakeLists.txt, so the same library can be consumed through the Arduino IDE, PlatformIO or CMake.
MIT licensed, with releases through the middle of 2026
The library is MIT licensed, and the release record shows steady work: 1.5.0 on 2026-01-03, 1.5.1 on 2026-07-07 and 1.6.0 on 2026-07-18, with the last push on 2026-07-18. The project supports both the Arduino and PlatformIO workflows, which is visible in library.properties, library.json and platformio.ini at the top of the repository, and it also carries a CMakeLists.txt, a .devcontainer directory and an AGENTS.md file. The examples directory doubles as the feature catalogue: AccelTest for the ramp behaviour, BasicStepperDriver for a generic board, ClockStepper, MicroStepping for a DRV8834, MultiAxis, NonBlocking, SpeedProfile, plus dedicated TB6600 and TMC2100 examples and a UnitTest sketch. For a hardware library, the cost of adoption is mostly the board and the motor, and the cost of keeping it current is a git pull.
Editorial conclusion
StepperDriver suits a maker or an engineer who already owns an A4988, DRV8825, DRV8834, DRV8880, TMC2100 or TB6600 board and wants one API instead of board specific timing code. It does not suit a design that needs a step rate beyond what the microcontroller can pulse, because the project warns that high RPM combined with high microstepping fails on slower MCUs. Before you wire it up, set the board current limit with the formula V = I*5*R for the resistor on your board, and pick a TARGET in the Makefile that matches the board you will flash.
Frequently asked questions
Which stepper driver boards does StepperDriver support?
The A4988, DRV8825, DRV8834 and DRV8880 are supported directly, and the documentation also lists the TMC2100, the Toshiba TB6600 and any generic two pin driver using DIR and STEP. Microstepping is set by the library, up to 1:32 on the DRV8834 and DRV8825 and up to 1:16 on the A4988 and DRV8880.
How do I set the maximum current on the driver board?
The current is set with the potentiometer on the board, measured at the passthrough next to it, using the formula V = I*5*R where R is the current sense resistor on the board. For the Pololu DRV8834 and DRV8825 boards R is 0.1, so V equals 0.5 times the maximum current in amps, for example 0.5V for 1A.
What does non-blocking mode do in StepperDriver?
In non-blocking mode the library yields back to the caller after each pulse, so the rest of your sketch keeps running while the motor moves. The project also describes an early brake option, which increases the runtime when a move needs to finish sooner than the planned profile.
How do I build and test the StepperDriver examples?
The Makefile drives arduino-cli, with the default target set to arduino:avr:uno, and it can build all example sketches, install the required core, and run the UnitTest sketch on a simulated ATmega328P with simavr. The golden baseline for that simulation can be regenerated with the sim-test-update target.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/laurb9-stepperdriver)Was this useful?