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

Arduino-Controlled Bipolar Stepper Motor with Environmental Sensing

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Bipolar Stepper Motor with Environmental Sensing

Circuit Documentation

Summary

This circuit is designed to control a bipolar stepper motor using an Arduino 101 microcontroller and an L298N Motor Driver Controller Board Module. The circuit also includes a 12V battery to power the motor driver and the stepper motor, as well as two sensors: a Module LDR (Light Dependent Resistor) and a RAIN SENSOR, both interfaced with the Arduino for environmental input.

Component List

Arduino 101

Battery 12V

Stepper Motor (Bipolar)

L298N Motor Driver Controller Board Module

Module LDR

RAIN SENSOR

Wiring Details

Arduino 101

Battery 12V

Stepper Motor (Bipolar)

L298N Motor Driver Controller Board Module

Module LDR

RAIN SENSOR

Documented Code

#include <Stepper.h>

const int stepsPerPerRevotution = 200;
Stepper myStepper(stepsPerPerRevotution, 8, 9, 10, 11);

void setup() {
  myStepper.setSpeed(60);
  Serial.begin(9600);
}

void loop() {
  Serial.println("clockwise");
  myStepper.step(stepsPerPerRevotution);
  delay(500);

  Serial.println("counterclockwise");
  myStepper.step(-stepsPerPerRevotution);
  delay(500);
}

Code Description