Turn a stepper with the ULN2003 board
Half-step a 5V 28BYJ-48 through a ULN2003 board. Use D8–D11 for IN1–IN4. Move 512 half-steps each way and release the coils at rest.
Half-step a 5V 28BYJ-48 through a ULN2003 board. Use D8–D11 for IN1–IN4. Move 512 half-steps each way and release the coils at rest.
Use the Uno R3 Learning Kit. Build with power disconnected, check the labelled connections, then upload the supplied sketch. Drag or zoom the 3D model to inspect it from any angle.
Also needed
Additional regulated 5V motor supply and compatible jumper leads are required.
Step 1 — Watch the complete build
Press Play for the narrated build. You can rotate and zoom the model while it plays, or follow the individual steps below.
Loading assembly…
Keep U S B disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around. Add the 28BYJ-48 stepper motor · 5 volts. Keep its terminals accessible for the connections that follow. Add the ULN2003 stepper driver board. Keep its terminals accessible for the connections that follow. Add the Regulated motor supply · 5 volts. Keep its terminals accessible for the connections that follow. Connect the Regulated motor supply · 5 volts’s positive 5 volts pin to the separate motor supply rail. Connect the Regulated motor supply · 5 volts’s ground pin to the lower ground rail. Connect Arduino ground to the lower ground rail. Align the motor’s five-way keyed plug with the matching driver socket. Press the housing straight in until seated. All five contacts connect together; do not add jumper wires inside this socket. Connect the stepper motor board’s positive 5 volts pin to the separate motor supply rail. Connect the stepper motor board’s ground pin to the lower ground rail. Connect Arduino digital pin 8 to the stepper motor board’s IN1 pin. Connect Arduino digital pin 9 to the stepper motor board’s IN2 pin. Connect Arduino digital pin 10 to the stepper motor board’s IN3 pin. Connect Arduino digital pin 11 to the stepper motor board’s IN4 pin. Check all wiring. Connect the square U S B-B plug to the Uno and the U S B-A plug to your computer. Use Verify and Upload in the code editor below.
Step 2 — Understand the breadboard
Keep USB disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around.
Loading assembly…
Keep U S B disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around.
Step 3 — Place 28BYJ-48 stepper motor · 5 V
Add the 28BYJ-48 stepper motor · 5 V. Keep its terminals accessible for the connections that follow.
Loading assembly…
Add the 28BYJ-48 stepper motor · 5 volts. Keep its terminals accessible for the connections that follow.
Step 4 — Place ULN2003 stepper driver board
Add the ULN2003 stepper driver board. Keep its terminals accessible for the connections that follow.
Loading assembly…
Add the ULN2003 stepper driver board. Keep its terminals accessible for the connections that follow.
Step 5 — Place Regulated motor supply · 5 V
Add the Regulated motor supply · 5 V. Keep its terminals accessible for the connections that follow.
Loading assembly…
Add the Regulated motor supply · 5 volts. Keep its terminals accessible for the connections that follow.
Step 6 — Connect Regulated motor supply · 5 V +5V → B+ rail 29
Connect the Regulated motor supply · 5 V’s +5V pin to the separate motor supply rail.
| Connect | To |
|---|---|
| Regulated motor supply · 5 V +5V | B+ rail 29 |
Loading assembly…
Connect the Regulated motor supply · 5 volts’s positive 5 volts pin to the separate motor supply rail.
Step 7 — Connect Regulated motor supply · 5 V GND → B- rail 29
Connect the Regulated motor supply · 5 V’s ground pin to the lower ground rail.
| Connect | To |
|---|---|
| Regulated motor supply · 5 V GND | B- rail 29 |
Loading assembly…
Connect the Regulated motor supply · 5 volts’s ground pin to the lower ground rail.
Step 8 — Connect Uno GND → B- rail 1
Connect Arduino ground to the lower ground rail.
| Connect | To |
|---|---|
| Uno GND | B- rail 1 |
Loading assembly…
Connect Arduino ground to the lower ground rail.
Step 9 — Connect the keyed motor plug
Align the motor’s five-way keyed plug with the matching driver socket. Press the housing straight in until seated. All five contacts connect together; do not add jumper wires inside this socket.
| Connect | To |
|---|---|
| 28BYJ-48 stepper motor · 5 V Five-way motor plug | ULN2003 stepper driver board Five-way motor socket |
Loading assembly…
Align the motor’s five-way keyed plug with the matching driver socket. Press the housing straight in until seated. All five contacts connect together; do not add jumper wires inside this socket.
Step 10 — Connect ULN2003 stepper driver board +5V → B+ rail 28
Connect the stepper motor board’s +5V pin to the separate motor supply rail.
| Connect | To |
|---|---|
| ULN2003 stepper driver board +5V | B+ rail 28 |
Loading assembly…
Connect the stepper motor board’s positive 5 volts pin to the separate motor supply rail.
Step 11 — Connect ULN2003 stepper driver board GND → B- rail 28
Connect the stepper motor board’s ground pin to the lower ground rail.
| Connect | To |
|---|---|
| ULN2003 stepper driver board GND | B- rail 28 |
Loading assembly…
Connect the stepper motor board’s ground pin to the lower ground rail.
Step 12 — Connect Uno D8 → ULN2003 stepper driver board IN1
Connect Arduino digital pin 8 to the stepper motor board’s IN1 pin.
| Connect | To |
|---|---|
| Uno D8 | ULN2003 stepper driver board IN1 |
Loading assembly…
Connect Arduino digital pin 8 to the stepper motor board’s IN1 pin.
Step 13 — Connect Uno D9 PWM → ULN2003 stepper driver board IN2
Connect Arduino digital pin 9 to the stepper motor board’s IN2 pin.
| Connect | To |
|---|---|
| Uno D9 PWM | ULN2003 stepper driver board IN2 |
Loading assembly…
Connect Arduino digital pin 9 to the stepper motor board’s IN2 pin.
Step 14 — Connect Uno D10 PWM/SS → ULN2003 stepper driver board IN3
Connect Arduino digital pin 10 to the stepper motor board’s IN3 pin.
| Connect | To |
|---|---|
| Uno D10 PWM/SS | ULN2003 stepper driver board IN3 |
Loading assembly…
Connect Arduino digital pin 10 to the stepper motor board’s IN3 pin.
Step 15 — Connect Uno D11 PWM/MOSI → ULN2003 stepper driver board IN4
Connect Arduino digital pin 11 to the stepper motor board’s IN4 pin.
| Connect | To |
|---|---|
| Uno D11 PWM/MOSI | ULN2003 stepper driver board IN4 |
Loading assembly…
Connect Arduino digital pin 11 to the stepper motor board’s IN4 pin.
Step 16 — Place USB-A to USB-B cable · Uno
Check all wiring. Connect the square USB-B plug to the Uno and the USB-A plug to your computer. Use Verify and Upload in the code editor below.
Loading assembly…
Check all wiring. Connect the square U S B-B plug to the Uno and the U S B-A plug to your computer. Use Verify and Upload in the code editor below.
Step 17 — Program your Uno
Choose Arduino Uno. Verify, pair the board and Upload this sketch. Keep USB connected. Half-step a 5V 28BYJ-48 through a ULN2003 board. Use D8–D11 for IN1–IN4. Move 512 half-steps each way and release the coils at rest.
Step 18 — Try it and troubleshoot
The shaft turns a small fraction of a revolution and returns. The gearbox ratio varies, so do not assume exactly 4096 steps equals a calibrated revolution.
If it does not work
If it vibrates, check input order and the five-way plug. If it stalls, reduce speed and verify the separate motor supply. Unpowered coils do not hold position.
Parts List
Required Parts (1)
Use the components named in this tutorial. A computer and any additional power supply are not included.
x1
$64.70
In stockProject Summary
1 part total
Unavailable items will be skipped