11 Min Read • Updated June 2026

How Stepper Motors Work: Steps, Microstepping & A4988 Driver Guide

3D printers, CNC routers, and camera sliders all rely on stepper motors to move with sub-millimeter precision without encoders. Learn how bipolar coils create rotation, how microstepping silences and smooths movement, and how to control NEMA 17 steppers with an Arduino and A4988 driver.

AY
Updated June 1, 2026
NEMA 17 stepper motor connected to an A4988 driver module on a breadboard with Arduino
Motor Type

Brushless, synchronous, open-loop

Step Angle

1.8° per full step (200 steps/revolution)

Microstepping

Up to 1/256 step (51,200 microsteps/rev)

Common Sizes

NEMA 17, NEMA 23, NEMA 34

Popular Drivers

A4988, DRV8825, TMC2209 (silent)

Applications

3D printers, CNC machines, camera sliders

How a Stepper Motor Steps

Direct Definition: A stepper motor is a brushless DC motor that divides a full rotation into equal discrete steps. It moves by energizing electromagnetic coils in a precise sequence, magnetically attracting the toothed rotor to align step by step.

Inside a typical NEMA 17 bipolar stepper motor are two coils (phases) wound around iron stator poles. The rotor is a permanent magnet with 50 teeth on each pole face. By alternating which coils are energized — and in which polarity — the driver creates a rotating magnetic field that the permanent magnet rotor locks onto and follows.

A standard 1.8° step motor completes 200 full steps per revolution. The sequence of coil energization for a full-step drive is:

StepCoil ACoil B
1+0
20+
30
40
Stepper motor coil sequence and magnetic field steps diagram

Fig 1: Stepper motor coil sequence — stepping through the 4-step excitation cycle

Microstepping: Smooth & Silent Motion

Instead of fully energizing one coil at a time, microstepping drives both coils simultaneously with sinusoidal current waveforms. The rotor is attracted to intermediate positions between full steps, producing:

Full Step
200/rev steps/rev
Driver: Any
Noise: High
1/2 Step
400/rev steps/rev
Driver: A4988
Noise: Medium
1/16 Step
3200/rev steps/rev
Driver: A4988
Noise: Low
1/32 Step
6400/rev steps/rev
Driver: DRV8825
Noise: Very Low
1/256 Step
51200/rev steps/rev
Driver: TMC2209
Noise: Near-Silent

Arduino + A4988: Control Code

// Arduino NEMA 17 stepper motor with A4988 driver
// A4988 MS1=HIGH, MS2=HIGH, MS3=HIGH → 1/16 microstepping

#include <AccelStepper.h>

#define STEP_PIN 3
#define DIR_PIN  4
#define ENABLE_PIN 8

// Mode: DRIVER = step/dir interface
AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
  pinMode(ENABLE_PIN, OUTPUT);
  digitalWrite(ENABLE_PIN, LOW); // Enable driver (active LOW)
  
  stepper.setMaxSpeed(1000);       // microsteps/sec
  stepper.setAcceleration(500);    // microsteps/sec²
  stepper.moveTo(3200);            // 1 full revolution at 1/16 step
}

void loop() {
  stepper.run(); // Call frequently - non-blocking
  
  if (stepper.distanceToGo() == 0) {
    stepper.moveTo(-stepper.currentPosition()); // Reverse
  }
}

NEMA Frame Sizes Compared

FrameFace SizeTypical TorqueBest For
NEMA 1128.2 × 28.2mm0.1 – 0.5 NmLight camera sliders, plotters
NEMA 1742.3 × 42.3mm0.4 – 0.9 Nm3D printers, CNC hobby machines
NEMA 2357.2 × 57.2mm1.0 – 3.0 NmCNC routers, laser cutters
NEMA 3486.4 × 86.4mm4.0 – 12.0 NmIndustrial CNC, large format printers

Frequently Asked Questions

How does a stepper motor work?

A stepper motor energizes coils in sequence, creating a rotating magnetic field that the permanent magnet rotor locks onto and follows step by step. Each 1.8° step equals one full electrical cycle through the coil sequence.

What is microstepping in stepper motors?

Microstepping drives both coils simultaneously with sinusoidal currents, positioning the rotor at intermediate angles between full steps. This produces smoother, quieter motion and more resolution — up to 1/256 microstepping with TMC2209 drivers.

What is the difference between bipolar and unipolar stepper motors?

Bipolar motors have 4 wires and require H-bridge drivers to reverse coil current. They deliver higher torque. Unipolar motors have 5-6 wires with center taps, needing simpler drive circuits but producing lower torque.

What is holding torque in a stepper motor?

Holding torque is the maximum resistive torque when coils are energized and the shaft is stationary. Stepper torque drops significantly with speed — high torque designs operate best at low-to-medium RPM.

How do I connect a stepper motor to Arduino with A4988?

Connect STEP to a digital pin, DIR to a digital pin, ENABLE to GND. Supply VMOT (8-35V) and VDD (5V). Connect motor coils to 1A/1B and 2A/2B. Set MS1/MS2/MS3 for microstepping. Use AccelStepper library.

📚 References & Sources

Was this article helpful?

Tap a star to rate — no account needed

Related Resources