Stepper Motor: 28BYJ-48 (ULN2003) vs A4988

· 4 min read · Robotics Intermediate12+

Author: Tekko BD Team

How a stepper motor moves in exact steps, how the hobby 28BYJ-48 differs from the A4988 driver, the 2048-step math, wiring and Arduino code.

Clock hands, printer carriages, camera sliders: wherever the job is "rotate exactly this much", you want a stepper motor. A servo swings to an angle and holds. A stepper turns one step per pulse, so counting pulses tells you how far it has gone.

We stock both ends of this world. On the hobby side, the 28BYJ-48 with its ULN2003 driver board. On the serious side, the A4988 driver. Here is which one fits what.

What you need

  • 28BYJ-48 motor with ULN2003 board (1)
  • An Arduino Uno or any board
  • Six female–male jumper wires: IN1–IN4, + and −
  • For the A4988 only: a separate bipolar stepper (NEMA17 class) and an 8–35V supply
28BYJ-48 Stepper Motor with ULN2003 Driver28BYJ-48 Stepper Motor with ULN2003 DriverAsk for priceView details
A4988 StepStick Stepper Motor Driver ModuleA4988 StepStick Stepper Motor Driver Module৳170View details

Prices can change; check Tekko for the latest.

Two kinds of stepper motor

The 28BYJ-48 is a geared unipolar stepper. The inner motor takes 32 steps per turn and a gear train of about 64:1 sits behind it, so the output shaft needs 2048 steps for one full turn (32 × 64). The real ratio is closer to 63.7:1, which makes 2048 a good approximation, not an exact figure. It runs on 5V and is easy to drive. In exchange it is slow (under about 15 RPM) and light on torque. Clocks and curtain pullers are its home.

28BYJ-48 stepper and ULN2003 board pins
28BYJ-48 + ULN2003: IN1–IN4 face the Arduino, the motor plug sits on the board

The A4988 is not a motor at all. It is a driver board for bipolar steppers, the NEMA17 kind found inside printers. Microstepping up to 1/16 smooths the motion, a pot sets the current limit, and the supply runs 8–35V. Fast and strong, but it needs a separate motor and a careful current setup.

A4988 StepStick driver pins
A4988: STEP, DIR, EN, VMOT and the four motor wires

Side by side

Spec28BYJ-48 + ULN2003A4988 + bipolar motor
Typeunipolar, gearedbipolar driver
Supply5V8–35V
Steps/turn2048motor-dependent (e.g. 200 × microstep)
Speedslow (≈15 RPM ceiling)fast
Torquelow to mediumhigh
Learning curveeasiestneeds current-limit know-how
Home turfscience fairs, hobbyCNC, robot drives

Step — driving the 28BYJ-48 stepper motor

Start here. The motor plug already sits in the ULN2003 board. Arduino side: IN1–IN4 → digital pins 8–11, + → 5V, − → GND.

cpp
#include <Stepper.h>
const int STEPS = 2048;              // steps per full revolution
Stepper stepper(STEPS, 8, 10, 9, 11); // IN1, IN3, IN2, IN4 order — note it!

void setup() {
  stepper.setSpeed(10);              // RPM — above ~15 performance degrades
}

void loop() {
  stepper.step(STEPS);               // one turn
  delay(500);
  stepper.step(-STEPS);              // and back
  delay(500);
}

Note

The 8, 10, 9, 11 pin order is not a typo. The 28BYJ-48's coil layout needs that sequence in the standard Stepper library; give it 8, 9, 10, 11 and the motor will only twitch.

The same circuit lives in Tekko Sim. There a button reverses the direction, so you can see it work without touching the code.

Tekko Sim stepper-control circuit: Uno, ULN2003 and 28BYJ-48
stepper-control: Uno pins 8–11 into the ULN2003's IN1–IN4

Before you touch the A4988

Warning

Setting the A4988's current limit wrong cooks the motor and the driver. Set Vref to 80% of your motor's rated current (Vref = current × 8 × Rsense), fit the heatsink, and never power the board with the motor disconnected — drivers die permanently that way.

A4988 pins: STEP (one pulse = one microstep), DIR (direction), EN (leave open), VMOT (8–35V, with a 100 µF capacitor beside it), and 2B 2A 1A 1B to the motor's four wires.

Verify it works

  • 28BYJ-48: the shaft turns one full revolution, pauses, and turns back. A slightly pulsing, stepped motion is normal for a stepper.
  • Only twitching? The pin order is wrong. See the note above.
  • A4988: each STEP pulse advances exactly one microstep, and DIR flips the direction.

Common problems

  1. Motor hums but does not turn — wrong pin order, or a loose ULN2003 power wire.
  2. Stalls at higher RPM — the 28BYJ-48's gearing caps its speed. Stay at 10–15 RPM.
  3. The A4988 gets hot and smells — current limit too high or no heatsink. Cut the power immediately.
  4. Wrong direction — flip DIR, or swap one coil pair.
  5. The 28BYJ-48 stays warm at rest — a stepper draws current to hold its position. For long pauses, cut the power.

FAQ

Servo or stepper for my project? Go to an angle and hold it, or come back: servo. Keep turning and count the rotation: stepper. A door latch wants a servo, a clock hand wants a stepper.

Can the 28BYJ-48 drive a robot's wheels? On a toy-sized robot, yes. A real one runs short of both torque and speed. Use geared DC motors or a NEMA-class stepper there.

How many motors per A4988? One. Each motor gets its own driver. CNC shields carry four side by side.

More from Tekko

Sources

  • Arduino Stepper library reference — arduino.cc

Try it free before you buy

This project runs free in Tekko Sim, right in your browser — before you spend a taka.

Stepper motor 28BYJ-48: exact turns with the ULN2003 — Run in Sim

#stepper#motor#arduino#robotics