MyRoboPathOpen Robotics Lab
All cheatsheets
ActuatorsQUICK REFERENCE

Stepper Motor

Identify coil pairs and wire a bipolar stepper to a STEP/DIR driver.

Precise stepsMyRoboPath / Robotics field notes
Download PDF

01Coils & wiring

Identify
With power disconnected, measure resistance to find the two coil pairs of a 4-wire bipolar motor.
Connect
One pair to A1/A2, the other to B1/B2. Driver labels may be 1A/1B and 2A/2B.
Control
MCU STEP → STEP; DIR → DIR; common GND. Configure enable/sleep/reset as required.

02STEP / DIR

Motion
Each STEP pulse advances one configured microstep. DIR selects direction.
Rate
Step frequency sets speed; ramp frequency to avoid missed steps.
Position
steps = revolutions × full_steps_per_rev × microstep_factor. A 1.8° motor has 200 full steps/rev.

03Driver setup

Current limit
Set using the exact driver and sense-resistor formula before running the motor.
Supply
Use rated VMOT supply and local bulk capacitor; A4988 carriers can suffer damaging LC spikes.
Variants
5-wire 28BYJ-48 + ULN2003 uses a coil sequence, not STEP/DIR directly.

Datasheets & further reading

Pololu A4988 carrier guide