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

Arduino UNO Stepper Motor Controller with Pushbutton Interface

View and Edit Project In Cirkit DesignerImage of Arduino UNO Stepper Motor Controller with Pushbutton Interface

Circuit Documentation

Summary

This circuit involves an Arduino UNO microcontroller, a 9V battery, a 28BYJ-48 stepper motor, two pushbuttons, and a ULN2003A breakout board. The Arduino UNO controls the stepper motor through the ULN2003A breakout board, and the pushbuttons are used to provide input to the Arduino. The 9V battery powers the circuit.

Component List

Arduino UNO

9V Battery

28BYJ-48 Stepper Motor

Pushbutton

ULN2003A Breakout Board

Wiring Details

Arduino UNO

9V Battery

28BYJ-48 Stepper Motor

Pushbutton (First)

Pushbutton (Second)

ULN2003A Breakout Board

Documented Code

Arduino UNO Code

// Arduino stepper motor control code
#include <Stepper.h> // Include the header file

// change this to the number of steps on your motor 
#define STEPS 32

// create an instance of the stepper class using the steps and pins 
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); //for debugging
    }
}

28BYJ-48 Stepper Motor Code

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontrollers.