DRV8825 Stepper Microstepping Driver

Smoothly position a bipolar stepper down to 1/32 of a full step — the same driver chip behind every entry-level 3D printer and CNC mill.

Difficulty: Through-hole. Estimated build time: about 35 minutes. Estimated parts cost: about US$8.80. 7-line bill of materials. Compare supplier offers when available. A microcontroller-driven bipolar stepper motor with smooth microstepping all the way down to 1/32 of a full step.

Set the current limit before connecting the motor

This is the step most beginners skip and most beginners regret. Power the driver's logic side from 5 V (VDD and GND on the logic header) but do NOT connect a motor yet. Apply your motor supply to VMOT (8 to 45 V) with a 100 uF electrolytic across VMOT-GND right at the board to absorb back-EMF spikes. Now measure VREF: touch a multimeter probe to the trim pot's screw (the wiper) and the other to GND. Turn the pot until VREF = current_per_phase / 2. For a NEMA17 rated 1.5 A per phase, set VREF to 0.75 V. Going past the rated current overheats the motor in minutes.

Wire the motor and microstep pins

Power down. Connect the four motor wires in the right phase pairs: A1 and A2 to one coil, B1 and B2 to the other coil. If you don't know which pair is which, use a multimeter on continuity — wires that show resistance to each other are one coil. To set microstepping, tie M0, M1, M2 to 5 V or GND per the truth table on the breakout: all LOW = full step, all HIGH = 1/32 step. For most projects start at 1/16 (M0 LOW, M1 LOW, M2 HIGH on most boards — read your board's silkscreen). Power up the motor supply first, then the logic supply.

Pulse STEP from the MCU and move

From the MCU, set DIR HIGH or LOW to pick direction, then toggle STEP with a square wave. Each rising edge advances one microstep. On Arduino: digitalWrite(STEP, HIGH); delayMicroseconds(2); digitalWrite(STEP, LOW); delayMicroseconds(1000); — that gives 500 microsteps per second, or about 95 RPM at 1/16 microstepping on a 200-step-per-revolution motor. The AccelStepper library handles ramp-up and ramp-down for you so the motor doesn't lose steps at high speed. Tune your delay until the motor moves quietly and confidently; if it growls or skips, drop the current OR slow the step rate.