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

Arduino-Controlled Stepper Motor with ULN2003A Driver

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Stepper Motor with ULN2003A Driver

Circuit Documentation

Summary

This circuit is designed to control a 28BYJ-48 Stepper Motor using an Arduino 101 microcontroller and a ULN2003A breakout board. The Arduino 101 sends control signals to the ULN2003A, which in turn drives the stepper motor. The circuit is powered by a 5V supply, and the ground connections are shared between the Arduino and the ULN2003A board.

Component List

ULN2003A Breakout Board

Arduino 101

28BYJ-48 Stepper Motor

Wiring Details

ULN2003A Breakout Board

Arduino 101

28BYJ-48 Stepper Motor

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

Code Description