Function: what the 28BYJ-48 does in a circuit
A motor that turns in exact small steps, 2048 for one full turn, so a sketch can set its angle without any position sensor.
- Turns in exact steps, 2048 per turn
- Holds its position without a sensor
- Moves printers, plotters, dials and camera sliders
28BYJ-48 key facts
| Supply | 5 V |
|---|---|
| Steps per turn | 2048 (32 steps × 64:1 gearbox) |
| Step angle | about 0.18° |
| Current | about 160 mA per coil |
| Top speed | about 15 revolutions per minute |
| Driver | ULN2003, inputs IN1 to IN4 |
| Library | Stepper |
28BYJ-48 pinout
The legs from left to right, as the part is drawn in the simulator:
| No. | Name |
|---|---|
| 1 | IN1 |
| 2 | IN2 |
| 3 | IN3 |
| 4 | IN4 |
| 5 | − (GND) |
| 6 | + (5 V) |
How it works
Inside are four coils (A, B, C, D) around a magnet rotor. Switching the coils on in order, two neighbours at a time, pulls the rotor round one step each time: 32 steps per turn of the rotor, and a 64:1 gearbox makes that 2048 steps per turn of the shaft. A pin cannot supply the 160 mA or so that the coils need, so the ULN2003 driver board switches them: its inputs IN1 to IN4 go to four pins, and its LEDs A to D show which coils are on. With the Stepper library the pins are given in the order IN1, IN3, IN2, IN4, because the library switches its first and third pins as a pair.
What it is made of
- Coils: Enamelled copper wire Cu
- Rotor: Permanent magnet (ferrite) FeOSr
- Gears: Plastic and brass gear train CHCuZn
- Driver chip: Silicon: seven Darlington transistor pairs (ULN2003) Si
Where the materials come from: Copper from ores such as chalcopyrite (Chile, Peru); iron oxide and strontium carbonate for ferrite magnets; zinc from sphalerite; silicon from quartz sand.
The chemistry
A ferrite magnet is a ceramic of iron oxide with strontium or barium. It keeps its magnetism because the magnetic regions in its crystals are locked in one direction when it is made.
Biology connection
A muscle also moves in tiny repeated steps: myosin heads pull along actin filaments again and again, and millions of them add up to a smooth movement. Muscle contraction →
Safety and the environment
Power the driver from 5V, never from a pin. Keep the speed at 15 revolutions per minute or less: faster, the motor buzzes and skips steps. The coils stay on and warm when the motor is still, so set the four pins LOW to rest it.
Did you know? This little motor was designed to move the flaps in air conditioners, which is why it is so cheap and so common in starter kits.
Momentum simulatorWave simulator Elements inside: CuFeOSrCHZnSi
Try it in the simulator
Build and code a circuit with a Stepper motor in these practice projects:
Questions students ask
What does the 28BYJ-48 do?
A motor that turns in exact small steps, 2048 for one full turn, so a sketch can set its angle without any position sensor. Main functions: turns in exact steps, 2048 per turn; holds its position without a sensor; moves printers, plotters, dials and camera sliders.
Why does my 28BYJ-48 stepper motor buzz but not turn?
The pin order is the usual cause. With the Stepper library write Stepper motor(2048, IN1, IN3, IN2, IN4), for example Stepper motor(2048, 8, 10, 9, 11). Also keep setSpeed() at 15 or less and power the driver board from 5V.
What are the connections of the 28BYJ-48?
In order: IN1, IN2, IN3, IN4, − (GND), + (5 V).
How does the 28BYJ-48 work?
Inside are four coils (A, B, C, D) around a magnet rotor. Switching the coils on in order, two neighbours at a time, pulls the rotor round one step each time: 32 steps per turn of the rotor, and a 64:1 gearbox makes that 2048 steps per turn of the shaft. A pin cannot supply the 160 mA or so that the coils need, so the ULN2003 driver board switches them: its inputs IN1 to IN4 go to four pins, and its LEDs A to D show which coils are on. With the Stepper library the pins are given in the order IN1, IN3, IN2, IN4, because the library switches its first and third pins as a pair.
What is the 28BYJ-48 made of?
Coils: Enamelled copper wire. Rotor: Permanent magnet (ferrite). Gears: Plastic and brass gear train. Driver chip: Silicon: seven Darlington transistor pairs (ULN2003).
Is the 28BYJ-48 safe? How should it be recycled?
Power the driver from 5V, never from a pin. Keep the speed at 15 revolutions per minute or less: faster, the motor buzzes and skips steps. The coils stay on and warm when the motor is still, so set the four pins LOW to rest it.
More motion
Connected tools
The same idea from another angle, across the site.