No. 16 – Stepper

Task: A stepper should turn around back and forth.

Required equipment: Arduino / stepper with control board / 6 cables

This stepper is especially useful for small projects with the arduino board. The stepper can operate without any external power supply. It can get a quite high torque. This is possible because of a gear, which is installed inside of the metal case in front of the actual step motor. One full rotation of the drive shaft can be divided in 2048 separate steps. One little disadvantage of this can be the slow maximum rotation speed.

The stepper gets connected with a control board. This control board supplies the stepper with enough power, to prevent the digital pins of having to do this. There are two versions of the control board. One with the outer pins on the top and one with the outer pins on the bottom. The connection is the same on both versions.

 

Wiring

PIN2 on Arduino board to IN4 on control board !!! 2 with 4 !!!

PIN3 on Arduino board to IN2 on control board !!! 3 with 2 !!!

PIN4 on Arduino board to IN3 on control board !!! 4 with 3 !!!

PIN5 on Arduino board to IN1 on control board !!! 5 with 1 !!!

PIN “GND” on Arduino board to GND on control board

PIN “5V” on Arduino board to VCC on control board

Step2

 

 

 

 

 

 

 

 

The following Code is an example and lets the stepper do one rotation (2048 steps) back and forth.


#include <Stepper.h> //Load stepper library (already including the arduino software)

int SPMU = 32;

Stepper myStepper(SPMU, 2,3,4,5);

void setup()

{

myStepper.setSpeed(500);

}

void loop() {

myStepper.step(2048);

delay(500);

myStepper.step(-2048);

delay(500);

}