Interfacing Stepper Motor With Arduino Uno

Photo of hIOTron

Made by hIOTron / IoT

About the project

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

Project info

Difficulty: Moderate

Platforms: Arduino

Estimated time: 1 day

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

DC MOTOR click DC MOTOR click x 1
Arduino MKRFOX 1200 Arduino MKRFOX 1200 x 1
BOOSTXL-ULN2003 BOOSTXL-ULN2003 x 1

Software apps and online services

Arduino IDE Arduino IDE

Story

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.

Classroom IoT Training will help you to build an End-to-End  IoT Solutions with various IoT Applications.

Code

Run a program

Credits

Leave your feedback...