Hardware · Stepper driver

The A4988 stepper driver.

What it is
The classic drop-in stepper driver carrier
Drives
One bipolar stepper, up to ~2 A cooled
Control
STEP and DIR, two pins

The A4988 is the stepper driver that made precise motion cheap. It is a small carrier board, about the size of a postage stamp, built around an Allegro A4988 chip, and it drives one bipolar stepper motor from two control pins. It is the part behind countless 3D printers and CNC machines, and for a grower it is the easy way to drive a dosing pump or a motorized valve to an exact, repeatable position.

An A4988 stepper motor driver carrier
Image: pololu.com

What it is.

One stepper driver on a tiny board, with a heatsink on top and a small brass screw (the current potentiometer) on the face. It takes a motor supply of 8 to 35 volts, a logic supply, and the two coils of a bipolar stepper. The board outline and pinout it introduced became a standard: the DRV8825 and the TMC2209 drop into the same socket, so you can start here and upgrade later without rewiring.

STEP, DIR, and microstepping.

Control is about as simple as motion gets. Each pulse on the STEP pin moves the motor one step; the DIR pin sets the direction. Send 200 pulses to a standard motor and it makes one full turn. Three mode pins (MS1, MS2, MS3) set microstepping, from full steps down to one sixteenth, which divides each physical step into smaller ones for smoother, quieter movement at the cost of a little torque. A small stepper library on the microcontroller turns “move this far” into the pulse train.

Setting Vref.

Do this before you run the motor hard. The A4988 limits the coil current, and you set the limit by turning the little potentiometer and measuring the reference voltage, Vref, between the pot and ground with a multimeter. The target comes from your motor’s rated current and the formula in the datasheet. Skip it and you either cook the driver and motor or get a weak motor that skips steps. It takes two minutes and a meter, and it is the difference between a driver that lasts and one that dies.

Key facts.

Where it fits, and where it doesn’t.

Where it fits

  • Light-duty precise motion on a budget.
  • Dosing pumps that dispense an exact volume.
  • A motorized valve set to a known angle.
  • Learning steppers before spending more.

Where it doesn’t

  • Motors past about 2 A; use a DRV8825.
  • Quiet running; reach for a TMC2209.
  • Just spinning a load; a DC driver is simpler.
  • Voltages over 35 V; check the supply.

Resources & where to buy.

Pololu A4988 Allegro A4988 datasheet DRV8825 (the step-up) Stepper drivers overview

Frequently asked questions.

What is the A4988 used for?

It drives one bipolar stepper motor from a microcontroller for precise, repeatable motion. You send STEP and DIR pulses and it handles the coils. In a grow setup it suits a dosing pump that dispenses an exact volume or a motorized valve set to a known angle, and it is the classic driver in 3D printers and small CNC machines.

How do I set the current limit on an A4988?

Turn the small potentiometer on the board and measure the reference voltage, Vref, between the pot and ground with a multimeter. Set it to the target from your motor’s rated current and the datasheet formula. Too high overheats the driver and motor; too low makes the motor weak and prone to skipping steps.

What is the difference between the A4988 and the DRV8825?

They share the same board outline and pinout, so they fit the same socket. The DRV8825 handles more current and voltage and offers finer microstepping; the A4988 is cheaper and the long-standing default. Start on an A4988 and swap up to a DRV8825 only if you need the extra headroom.

What is microstepping?

Microstepping divides each physical step of the motor into smaller electrical steps, up to one sixteenth on the A4988. It makes motion smoother and quieter and gives finer positioning, at the cost of a little torque. You set it with the three mode pins.