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
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.
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

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.