Source: https://mokxi.com/parts/stepper28byj
Updated: 2026-09-27

Part

# Stepper motor, 28BYJ-48 with ULN2003

Four coils and a 1:64 gearbox: 4096 half-steps to a turn, and a stall if the sequence jumps.

or see every part

- 6 pins
- 1 property

Drawn live by the editor's own code, at the size you see it.

Reference

## Every one of its 6 pins

Pin

Role

What it does

IN1

Input

IN2

Input

IN3

Input

IN4

Input

VCC

Input or output

GND

Input or output

This part

## What it does

The 28BYJ-48 is a small geared stepper motor, sold with a ULN2003 driver board, and Mokxi models the pair as one part because nobody buys either alone. It is unipolar: four coils share a common wire on 5 volts, and each driver channel pulls one coil to ground. Switching the coils in order walks the rotor round, and stopping leaves it exactly where it was. The part is not told whether a sketch uses wave drive, full steps or half steps. It works out where the field points from the four inputs and moves the rotor there, so every sequence works for the same reason it works on a desk. The rotor makes 5.625 degrees a half-step and the gearbox divides by 64, so a turn is 4096 half-steps. Steps faster than about one a millisecond are missed, as a real one misses them, and the rotor never reports where it is.

How to use it

## How to use the 28BYJ-48 stepper with an Arduino

The ULN2003 board takes four inputs, IN1 to IN4, from four digital pins, and power from 5 V and GND. The sketch switches the coils in order, one step at a time, with a short delay between steps; a full turn of the output shaft is 4096 half-steps. Leave at least a millisecond between steps, or the motor misses them.

Nothing reports where the shaft is. The sketch counts the steps it sent, which is why real machines home against a limit switch at start-up.

Part pin

Board pin

IN1, IN2, IN3, IN4

Pins 8, 9, 10, 11

VCC

5 V

GND

GND

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Reference

## The one property you can set

Property

Default

What it means

angle

0

How it is modeled

## What is true about the Stepper motor, 28BYJ-48 with ULN2003, here

### Not modeled

The load on the supply. Four coils at 80 mA each is 320 mA in half-step, and
this part does not draw it from the rail, so the "never run a stepper off the
board's 5 V pin" lesson cannot be taught here. Mokxi's rail is ideal and would
not sag anyway.

Coil inductance, so there is no current rise time and no reason for the torque
to fall off with speed beyond the flat rate ceiling above. Detent and holding
torque, and any mechanical load: nothing can be hung on the shaft.
Microstepping, which a ULN2003 cannot do at all: it is a switch, not a current
source. And the gearbox's backlash, which on a real one is a degree or so and is
why these are no good for anything that has to come back to a mark from both
directions.

From A stepper is four coils and a table, in full.

Projects

## See the Stepper motor, 28BYJ-48 with ULN2003 in a project

Shown here on: Arduino Uno R3

Learn

## Where it turns up in a lesson

### In a learn article

- Arduino Stepper Motor: 28BYJ-48 and ULN2003

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio, no real internet), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

STM32F411 Black Pill

The Black Pill on our own Cortex-M4 core. Pick a program and press Run.

BBC micro:bit V2

The nRF52833 board with its 5x5 LED matrix, buttons A and B and a speaker. Wire the rings to a breadboard.

See every part

## Wire up the Stepper motor, 28BYJ-48 with ULN2003

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building Open the editor
