5.625 per step
5.625 per step
48 steps per revolution
34 oz-in (24 Ncm)
5V
1.3A per coil
ULN2003 Driver Board
| The ULN2003 driver board is a high-voltage, high-current Darlington transistor array specifically designed to drive stepper motors. The board features |
50V
500mA per channel
1.5 ohms
5V TTL compatible
Key Features
Functionality
| The Stepper Motor (28YBJ-48) with ULN2003 Driver Board is designed to provide precise motor control and positioning in a wide range of IoT applications, including |
By combining the 28YBJ-48 stepper motor with the ULN2003 driver board, users can achieve precise motor control, high torque, and efficient operation in a wide range of IoT applications.
Component Documentation: Stepper Motor (28YBJ-48) with ULN2003 Driver BoardOverviewThe Stepper Motor (28YBJ-48) with ULN2003 Driver Board is a compact and versatile motor control solution for IoT applications. The 28YBJ-48 stepper motor is a 4-phase, 5-wire motor that provides precise rotation and positioning, while the ULN2003 driver board enables easy control and interfaces with various microcontrollers.Technical SpecificationsStepper Motor (28YBJ-48):
+ Type: 4-phase, 5-wire
+ Step Angle: 7.5
+ Holding Torque: 34 oz-in (24 Ncm)
+ Rated Voltage: 5V
+ Rated Current: 0.6A per coil
ULN2003 Driver Board:
+ Darlington Transistor Array
+ 7 inputs, 7 outputs
+ Input Voltage: 5V
+ Output Current: 1.5A per channelPinout and ConnectionsThe ULN2003 driver board has 7 input pins and 7 output pins. The input pins are connected to the microcontroller, while the output pins are connected to the stepper motor.| Input Pin | Function |
| --- | --- |
| IN1 | Coil 1A |
| IN2 | Coil 1B |
| IN3 | Coil 2A |
| IN4 | Coil 2B |
| IN5 | Coil 3A |
| IN6 | Coil 3B |
| IN7 | Coil 4A |Code Examples### Example 1: Basic Stepper Motor Control using ArduinoThis example demonstrates how to control the stepper motor using an Arduino board. The motor will rotate clockwise and counterclockwise in an infinite loop.```c++
#define IN1 2
#define IN2 3
#define IN3 4
#define IN4 5void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
}void loop() {
// Rotate clockwise
for (int i = 0; i < 100; i++) {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
delay(5);
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
delay(5);
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
delay(5);
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
delay(5);
}// Rotate counterclockwise
for (int i = 0; i < 100; i++) {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
delay(5);
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
delay(5);
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
delay(5);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
delay(5);
}
}
```### Example 2: Stepper Motor Control using Raspberry Pi (Python)This example demonstrates how to control the stepper motor using a Raspberry Pi board and Python programming language. The motor will rotate clockwise and counterclockwise in an infinite loop.```python
import RPi.GPIO as GPIO
import timeGPIO.setmode(GPIO.BCM)IN1 = 17
IN2 = 23
IN3 = 24
IN4 = 25GPIO.setup(IN1, GPIO.OUT)
GPIO.setup(IN2, GPIO.OUT)
GPIO.setup(IN3, GPIO.OUT)
GPIO.setup(IN4, GPIO.OUT)while True:
# Rotate clockwise
for i in range(100):
GPIO.output(IN1, GPIO.HIGH)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.HIGH)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.HIGH)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.HIGH)
time.sleep(0.005)# Rotate counterclockwise
for i in range(100):
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.HIGH)
time.sleep(0.005)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.HIGH)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.HIGH)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
GPIO.output(IN1, GPIO.HIGH)
GPIO.output(IN2, GPIO.LOW)
GPIO.output(IN3, GPIO.LOW)
GPIO.output(IN4, GPIO.LOW)
time.sleep(0.005)
```Note: Make sure to adjust the pin numbers according to your specific microcontroller and connection setup.### Example 3: Stepper Motor Control using ESP32 (MicroPython)This example demonstrates how to control the stepper motor using an ESP32 board and MicroPython programming language. The motor will rotate clockwise and counterclockwise in an infinite loop.```python
import machine
import utimeIN1 = machine.Pin(18, machine.Pin.OUT)
IN2 = machine.Pin(19, machine.Pin.OUT)
IN3 = machine.Pin(21, machine.Pin.OUT)
IN4 = machine.Pin(22, machine.Pin.OUT)while True:
# Rotate clockwise
for i in range(100):
IN1.value(1)
IN2.value(0)
IN3.value(0)
IN4.value(0)
utime.sleep(0.005)
IN1.value(0)
IN2.value(1)
IN3.value(0)
IN4.value(0)
utime.sleep(0.005)
IN1.value(0)
IN2.value(0)
IN3.value(1)
IN4.value(0)
utime.sleep(0.005)
IN1.value(0)
IN2.value(0)
IN3.value(0)
IN4.value(1)
utime.sleep(0.005)# Rotate counterclockwise
for i in range(100):
IN1.value(0)
IN2.value(0)
IN3.value(0)
IN4.value(1)
utime.sleep(0.005)
IN1.value(0)
IN2.value(0)
IN3.value(1)
IN4.value(0)
utime.sleep(0.005)
IN1.value(0)
IN2.value(1)
IN3.value(0)
IN4.value(0)
utime.sleep(0.005)
IN1.value(1)
IN2.value(0)
IN3.value(0)
IN4.value(0)
utime.sleep(0.005)
```Note: Make sure to adjust the pin numbers according to your specific microcontroller and connection setup.Remember to adjust the delay values and rotation steps according to your specific motor and application requirements.