Skip to content
Motor

28BYJ-48 Stepper Motor with ULN2003 Driver

Low-cost geared stepper for precise, low-speed positioning.

A cheap 5V geared stepper motor bundled with the ULN2003 driver board, common in camera sliders and small CNC-style projects.

Specifications

Motor type5-wire unipolar stepper with internal ~1:64 gear reduction
Step angle5.625°/64 per internal step — roughly 4096 half-steps per output-shaft revolution through the gearbox
Operating voltage5 V DC (matches the bundled ULN2003 driver board; a 12V-coil variant also exists)
Driver ICULN2003 Darlington transistor array, 4 inputs (IN1-IN4)
Current draw~240 mA per phase — low torque, not suited to driving loads heavier than light gears or small pointers

Pinout

PinNameDescription
1IN1Coil control input 1 — connect to a digital output pin
2IN2Coil control input 2 — connect to a digital output pin
3IN3Coil control input 3 — connect to a digital output pin
4IN4Coil control input 4 — connect to a digital output pin
5-Ground, on the driver board's power terminal
6+Power, 5V DC, on the driver board's power terminal — the motor's 5-pin JST plugs directly into the driver, no separate motor wiring needed

The motor connects to the driver board via its own keyed JST connector, not loose wires — only IN1-IN4 and the power terminal go to your microcontroller and supply.

Board Integration

Library

AccelStepper by Mike McCauley

Arduino IDE → Tools → Manage Libraries → search "AccelStepper"

Wiring

Component pinESP32 pinNote
IN1GPIO14
IN2GPIO27
IN3GPIO26
IN4GPIO25
+5V (external supply recommended)The ULN2003 board's onboard regulation is minimal -- an external 5V supply avoids brownouts on the ESP32 when the motor is under load
-GNDCommon ground with the ESP32 is required even with an external supply

Example code

C++

AccelStepper's HALF4WIRE mode expects pins in IN1-IN3-IN2-IN4 order, not IN1-IN2-IN3-IN4 -- get this wrong and the motor buzzes without turning. ~4096 half-steps make one full revolution on the standard 28BYJ-48 gearing.

View full ESP32 guide