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 small Adafruit gear-reduced stepper motor using an Arduino UNO microcontroller and a ULN2003A breakout board. The Arduino UNO sends control signals to the ULN2003A, which in turn drives the stepper motor. The circuit is powered by the Arduino's 5V output, and the ground is shared across the components. The stepper motor's steps are controlled by digital pins D8 to D11 on the Arduino UNO, which are interfaced with the input pins of the ULN2003A breakout board.

Component List

Adafruit Gear-Reduced Stepper Motor (small)

ULN2003A Breakout Board

Arduino UNO

Wiring Details

Adafruit Gear-Reduced Stepper Motor (small)

ULN2003A Breakout Board

Arduino UNO

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 the stepper motor via the ULN2003A breakout board. It initializes the stepper motor with a predefined number of steps and sets its speed. The loop function listens for serial input, which determines the number of steps the motor should take. The received value is then used to control the stepper motor's movement, and the value is echoed back to the serial monitor for confirmation.