Loading... Please wait...

Stepper One Revolution

Stepper One Revolution

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. The example code will control both kinds of motors.  The bipolar (4 wirestepper motor provided iwth the Pro and Pro Plus kits is outlined here:

 

450px-stepper-motor.jpg

Stepper motor 28BYJ-48 Parameters

  • Model : 28BYJ-48
  • Rated voltage : 5VDC
  • Number of Phase : 4
  • Speed Variation Ratio : 1/64
  • Stride Angle : 5.625° /64
  • Frequency : 100Hz
  • DC resistance : 50Ω±7%(25℃)
  • Idle In-traction Frequency : > 600Hz
  • Idle Out-traction Frequency : > 1000Hz
  • In-traction Torque >34.3mN.m(120Hz)
  • Self-positioning Torque >34.3mN.m
  • Friction torque : 600-1200 gf.cm
  • Pull in torque : 300 gf.cm
  • Insulated resistance >10MΩ(500V)
  • Insulated electricity power :600VAC/1mA/1s
  • Insulation grade :A
  • Rise in Temperature <40K(120Hz)
  • Noise <35dB(120Hz,No load,10cm)

 

In this example, the shaft does a full rotation clockwise, doing the number of stepper motor using the Arduino Stepper Library. The stepper is controlled by with digital pins 8, 9, 10, and 11 for either unipolar or bipolar motors.

For more information about the differences of the two types, please take a look at Tom Igoe's page on stepper motors.

Hardware Required

  • Arduino or Genuino Board 
  • Stepper motor
  • ULN2003 Motor Driver Board

Circuits

The stepper motor plus into the ULN2003 driver board and then four pins are used to control the ULN2003 from the Arduino.

700px-stepper-schematic.jpg

Code

 /*
 Stepper Motor Control - one revolution

 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor should revolve one revolution in one direction, then
 one revolution in the other direction.


 Created 11 Mar. 2007
 Modified 30 Nov. 2009
 by Tom Igoe

 */


#include

const int stepsPerRevolution = 64;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  // set the speed at 60 rpm:
  myStepper.setSpeed(60);
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one revolution  in one direction:
  Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(500);

  // step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(500);
}

 

What's News

newsletter

Copyright 2019 oddWires. All Rights Reserved.
 Sitemap | oddWires