Close
0%
0%

Interfacing Stepper Motor with Arduino Uno

The project is about how to interface Stepper Motor with Arduino Uno.

Similar projects worth following
221 views
0 followers
In this project, we have designed a circuit which includes interfacing of stepper motor with Arduino Uno.

About Project

Stepper Motor (28-BYJ48) :

Not like a normal DC motor, this one has five wires of all superior colors coming out of it. Steppers motors do not rotate, they step and so they also understood as step motors. Which means, they will move only one step at a time.

These motors have an order of coils present in them and these coils need to be energized in a specific pattern to make the motor rotate. When each coil is being energized the motor takes a step and a sequence of energization will make the motor take constant steps, thus making it rotate, as shown below.

We know that this is a four-phase stepper motor after it had four coils in it. Now, the gear ratio is presented to be 1:64. This means the shaft that you notice outside will make one absolute rotation only if the motor inside rotates for 64 times. This is due to the gears that are connected in between the motor and output shaft, these gears serve in improving the torque.

Another important parameter is Stride Angle: 5.625°/64. This means that the motor when operates in an 8-step sequence will move 5.625 degrees for each step and it will take 64 steps (5.625*64=360) to finish one complete rotation.

Calculating the Steps per Revolution:

In Arduino, we will be exploring the motor in a 4-step sequence so the trail angle will be 11.25° since it is 5.625° for 8 step sequence it will be 11.25° (5.625*2=11.25).

Steps per revolution = 360/step angle

Here, 360/11.25 = 32 steps per revolution.

Why we need Driver modules for Stepper motors?

Most stepper motors will explore only with the guidance of a driver module. This is because the controller module will not be capable to give sufficient current from its I/O pins for the motor to work. So we will use an outside module like the ULN2003 module as a stepper motor driver

There are various types of a driver module and the rating of one will change depends upon the type of motor used. The primary origin for all driver modules will be to source/sink enough current for the motor to operate.

Internet of Things Course Training will help you to learn more about IoT Applications.

  • 1 × Arduino Uno
  • 1 × Stepper Motor (28-BYJ48)
  • 1 × Stepper Motor Driver Module (ULN2003)
  • 1 × Arduino IDE Software

  • 1
    Run a Program

    // Arduino stepper motor control code

    #include // Include the header file

    // change this to the number of steps on your motor
    #define STEPS 32

    // create an instance of the stepper class using the steps and pins
    Stepper stepper(STEPS, 8, 10, 9, 11);

    int val = 0;

    void setup() {
    Serial.begin(9600);
    stepper.setSpeed(200);
    }

    void loop() {

    if (Serial.available()>0)
    {
    val = Serial.parseInt();
    stepper.step(val);
    Serial.println(val); //for debugging
    }

    }

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates