Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled 28BYJ-48 Stepper Motor with ULN2003 Driver

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled 28BYJ-48 Stepper Motor with ULN2003 Driver

Circuit Documentation

Summary

This circuit is designed to control a 28BYJ-48 Stepper Motor using an Arduino UNO microcontroller and a ULN2003A breakout board. The Arduino UNO is programmed to drive the stepper motor based on serial input commands, allowing for precise control of the motor's steps. The ULN2003A breakout board serves as an interface between the low-power Arduino output pins and the higher-power requirements of the stepper motor.

Component List

28BYJ-48 Stepper Motor

Arduino UNO

ULN2003A Breakout Board

Wiring Details

28BYJ-48 Stepper Motor

Arduino UNO

ULN2003A Breakout Board

Documented Code

#include <Stepper.h> 
#define STEPS 32

Stepper stepper(STEPS, 8, 9, 10, 11);

int val = 0;

void setup() {
    Serial.begin(9600);
    stepper.setSpeed(200);
}

void loop() {
    if (Serial.available() > 0) {
        val = Serial.parseInt();
        stepper.step(val);
        Serial.println(val);
    }
}

Filename: sketch.ino

Description: This Arduino sketch is designed to control a stepper motor via serial commands. It initializes the stepper motor with a predefined number of steps and sets its speed. In the main loop, it listens for serial input and moves the stepper motor a number of steps based on the parsed integer value from the serial input.