EQ-21 · Stepper motor + driver · Full kit
Step the motor through its driver
A geared 5 V stepper motor and matching ULN2003 driver for controlled, incremental movement.

How to use it
You’ll need: ESP32-S3, 5 V 28BYJ-48, ULN2003 driver, jumper wires, and a suitable regulated 5 V supply.
Connections
This example uses one part at a time on the MoloWorks ESP32-S3. If a course uses different GPIO pins, follow that course’s wiring and code together. Disconnect USB and any external power before changing wires.
| On the part | Connect to |
|---|---|
| Motor’s keyed five-pin plug | ULN2003 motor socket |
| ULN2003 5 V and GND | Regulated 5 V supply + and −; connect supply − to ESP32 GND |
| ULN2003 IN1, IN2, IN3, IN4 | ESP32 GPIO4, GPIO5, GPIO6, GPIO7 respectively |
- With power off, seat the motor plug in the driver, then connect motor power and the ESP32 signals. Check the driver’s polarity markings. The driver powers the windings; GPIO pins only send control signals.
- Run the slow half-step example with the motor unloaded. The four lights on the driver show which outputs are active. Mark the shaft so a small rotation is easy to see.
- The script turns the coils off at the end. If the shaft only vibrates, turn off power and check IN1–IN4 order, the motor plug and the 5 V rail. Measure your own travel before counting on an exact angle.
MicroPython example
Run this on the board with your MicroPython editor. Set up the ESP32-S3 first if you don’t have a working connection.
from machine import Pin
from time import sleep_ms
pins = [Pin(n, Pin.OUT, value=0) for n in (4, 5, 6, 7)]
sequence = (1, 3, 2, 6, 4, 12, 8, 9)
try:
for step in range(128):
mask = sequence[step % len(sequence)]
for i, pin in enumerate(pins):
pin.value((mask >> i) & 1)
sleep_ms(10)
finally:
for pin in pins:
pin.off()What to look for: The driver lights advance and the shaft rotates smoothly by a small amount. The outputs turn off when the example ends.
AI prompt
Copy the prompt and replace any brackets with details from your kit. Check the suggested wiring against the labels on your parts before applying power.
Step the motor through its driver
I have the MoloWorks 5 V 28BYJ-48 and ULN2003 driver with separate regulated 5 V and common ground. On my MicroPython ESP32-S3, GPIO4, 5, 6 and 7 go to IN1–IN4. Give me a short unloaded half-step test with the coil sequence explained, slow timing, and coil outputs off on exit. Tell me how to diagnose vibration and measure actual travel rather than assuming exact gearing.