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.

See every part
  • 6 pins
  • 1 setting
  • In 4 projects
  • In 3 lessons
Drawn live by the editor's own code, at the size you see it.
At a glance

The Stepper motor, 28BYJ-48 with ULN2003 in brief

What it is, and every setting the properties panel gives it.

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.

Family
Outputs
Pins
6
angle
0
Pins

6 pins

Named as the editor names them, so a wire lands where you expect it.

Input4

  • IN1
  • IN2
  • IN3
  • IN4

Input or output2

  • VCC
  • GND
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
Arduino Uno: stepper diallive0.000 s 0.00x
Click to open it in the editor
This is the simulator itself, running here. Click anything to open it in the editor.
How it is modeled

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

In its help article’s own words: what the simulation gets right, and where it stops.

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

4 built-in projects use it. Each opens in the editor, already wired.

Boards

The boards it is shown on

This board has a built-in project with the Stepper motor, 28BYJ-48 with ULN2003 in it.

Boards

The Stepper motor, 28BYJ-48 with ULN2003 on each board

The pins, the voltage and the code change from board to board. Each page has that board’s wiring and a circuit you can run.

Libraries

Arduino libraries for the Stepper motor, 28BYJ-48 with ULN2003

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

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.