Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Controlled Dual Stepper Motor System with Ultrasonic Sensing

Image of Arduino UNO Controlled Dual Stepper Motor System with Ultrasonic Sensing

Circuit Documentation

Summary

This circuit involves an Arduino UNO microcontroller, two ULN 2003 motor drivers, two 28BYJ-48 stepper motors, and an HC-SR04 ultrasonic sensor. The Arduino UNO controls the stepper motors through the ULN 2003 drivers and reads distance measurements from the ultrasonic sensor.

Component List

28BYJ-48 Stepper Motor

  • Description: A small, inexpensive stepper motor commonly used in various applications.
  • Pins: BLUE, PINK, YELLOW, ORANGE, RED

HC-SR04 Ultrasonic Sensor

  • Description: A sensor used to measure distance by using ultrasonic waves.
  • Pins: VCC, TRIG, ECHO, GND

ULN 2003

  • Description: A Darlington transistor array used to drive the stepper motors.
  • Pins: IN1, IN2, IN3, IN4, IN5, IN6, IN7, GND, +, COIL1, COIL2, COIL3, COIL4, COIL5

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P, used to control the circuit.
  • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0

Wiring Details

28BYJ-48 Stepper Motor 1

  • BLUE: Connected to ULN 2003 (COIL1)
  • PINK: Connected to ULN 2003 (COIL2)
  • YELLOW: Connected to ULN 2003 (COIL3)
  • ORANGE: Connected to ULN 2003 (COIL4)
  • RED: Connected to ULN 2003 (COIL5)

28BYJ-48 Stepper Motor 2

  • BLUE: Connected to ULN 2003 (COIL1)
  • PINK: Connected to ULN 2003 (COIL2)
  • YELLOW: Connected to ULN 2003 (COIL3)
  • ORANGE: Connected to ULN 2003 (COIL4)
  • RED: Connected to ULN 2003 (COIL5)

HC-SR04 Ultrasonic Sensor

  • VCC: Connected to Arduino UNO (5V)
  • TRIG: Connected to Arduino UNO (D7)
  • ECHO: Connected to Arduino UNO (D6)
  • GND: Connected to Arduino UNO (GND)

ULN 2003 Driver 1

  • IN1: Connected to Arduino UNO (D9)
  • IN2: Connected to Arduino UNO (D10)
  • IN3: Connected to Arduino UNO (D11)
  • IN4: Connected to Arduino UNO (D12)
  • GND: Connected to Arduino UNO (GND)
  • +: Connected to Arduino UNO (5V)
  • COIL1: Connected to 28BYJ-48 Stepper Motor 1 (BLUE)
  • COIL2: Connected to 28BYJ-48 Stepper Motor 1 (PINK)
  • COIL3: Connected to 28BYJ-48 Stepper Motor 1 (YELLOW)
  • COIL4: Connected to 28BYJ-48 Stepper Motor 1 (ORANGE)
  • COIL5: Connected to 28BYJ-48 Stepper Motor 1 (RED)

ULN 2003 Driver 2

  • IN1: Connected to Arduino UNO (D5)
  • IN2: Connected to Arduino UNO (D4)
  • IN3: Connected to Arduino UNO (D3)
  • IN4: Connected to Arduino UNO (D2)
  • GND: Connected to Arduino UNO (GND)
  • +: Connected to Arduino UNO (5V)
  • COIL1: Connected to 28BYJ-48 Stepper Motor 2 (BLUE)
  • COIL2: Connected to 28BYJ-48 Stepper Motor 2 (PINK)
  • COIL3: Connected to 28BYJ-48 Stepper Motor 2 (YELLOW)
  • COIL4: Connected to 28BYJ-48 Stepper Motor 2 (ORANGE)
  • COIL5: Connected to 28BYJ-48 Stepper Motor 2 (RED)

Arduino UNO

  • 5V: Connected to ULN 2003 Driver 1 (+), ULN 2003 Driver 2 (+), HC-SR04 Ultrasonic Sensor (VCC)
  • GND: Connected to ULN 2003 Driver 1 (GND), ULN 2003 Driver 2 (GND), HC-SR04 Ultrasonic Sensor (GND)
  • D9: Connected to ULN 2003 Driver 1 (IN1)
  • D10: Connected to ULN 2003 Driver 1 (IN2)
  • D11: Connected to ULN 2003 Driver 1 (IN3)
  • D12: Connected to ULN 2003 Driver 1 (IN4)
  • D7: Connected to HC-SR04 Ultrasonic Sensor (TRIG)
  • D6: Connected to HC-SR04 Ultrasonic Sensor (ECHO)
  • D5: Connected to ULN 2003 Driver 2 (IN1)
  • D4: Connected to ULN 2003 Driver 2 (IN2)
  • D3: Connected to ULN 2003 Driver 2 (IN3)
  • D2: Connected to ULN 2003 Driver 2 (IN4)

Documented Code

Arduino UNO Code (sketch.ino)

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

}

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

}

Additional Documentation (documentation.txt)