New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home Engineering Mechanics Automation Control Engineering Lab To control the speed of Stepper Motor using Arduino
Automation Control Engineering Lab Lab Experiments

To control the speed of Stepper Motor using Arduino



Aim

To control the speed of Stepper Motor using Arduino

Tools and Components required:

  1. Arduino UNO board
  2. Stepper Motor
  3. 10k ohm potentiometer
  4. Bread board’
  5. Arduino software
  6. U2004 Darlington Array (in case of Unipolar stepper motor)
  7. SN754410ne H-Bridge (in case of Bipolar stepper motor)

Theory

Stepper motors, due to their unique design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely moving it forward or backward in small "steps". There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For each of the motors, there is a different circuit.

circuit
arduino

Unipolar Motor Schematic

unipolar-motor-schematic
bipolar-motor-schematic

Program:

#include

const int stepsPerRevolution = 200;

Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

int stepCount = 0; // number of steps the motor has taken

void setup() {

}

void loop() {

int sensorReading = analogRead(A0);

int motorSpeed = map(sensorReading, 0, 1023, 0, 100);

if (motorSpeed > 0) {

myStepper.setSpeed(motorSpeed);

myStepper.step(stepsPerRevolution / 100);

}

}

Result:The speed of the Uni and Bipolar Stepper motor is controlled using Arduino