Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

DESIGN AND FABRICATION OF STEPPER MOTOR

CONTROL MECHANISM USING ARDUINO


This project report is submitted for partial fulfilment of requirement for
the degree of Bachelor of Technology in Electrical Engineering under
Maulana Abul Kalam Azad University of Technology, West Bengal.

Submitted By:
Name Registration No. Roll No.
Arijit Guria 171480110356 14801617065
Santanu Nath 171480110391 14801617030
Shayantan Bhandari 171480110392 14801617029
Soumyajit Sikdar 171480110401 14801617020
Mainak Sarkar 171480110372 14801617049
Nabarun Bhunia 171480110374 14801617047
Raju Bhandari 171480110384 14801617037

Under The Guidance of : Prof. Avijit Saha


(Assistant Professor)
Department of Electrical Engineering, 2021

Sonarpur Station Rd, Mission Pally, Narendrapur, Kolkata - 700150

1
Acknowledgement
With a deep sense of gratitude, we wish to express our sincere
thanks to our guide, Prof. Avijit Saha Assistant Professor in the
Department of Electrical Engineering for giving us the
opportunity to work under him on this project. We also want to
thank Dr. Pradipta Kr. Banerjee, Head of the Department,
Electrical Engineering for providing us a solid background for our
studies and research thereafter. He has been a great source of
inspiration to us and we thank him from the bottom of our heart.
We shall be failing in our duty if we do not mention about
technical assistant, Mr. Manjur Alam, in particular, whose timely
help and guidance helped us to complete our work.
Finally, we would like to thank all those people whose direct and
indirect support helped us completing our project in time. We
would like to thank our department for giving us the opportunity
and platform to make our e ort a successful one.
Arijit Guria,
Santanu Nath,
Sayantan Bhandari,
Mainak Sarkar,
Raju Bhandari,
Soumojit Sikdar,
Nabarun Bhunia
(Department of Electrical Engineering)

2
List of Figures
3.1 Arduino Uno Board……………………………………………12
3.2 Bipolar Stepper Motor and its winding arrangement showing
Stator and rotor…………………………………………….….13
3.3 L293D IC…………………………………………………...….14
3.3 Breadboard………………………………………………….….15
6.1 Bipolar Stepper Motor with Arduino Uno and L293D IC….….21
6.2 Test 1 on Bipolar Stepper Motor……………………...…….…22
6.3 Test 2 on Bipolar Stepper Motor………………………………22
6.4 Test 3 on Bipolar Stepper Motor………………………………23

3
Contents
ABSTRACT……………………………………………………… 6
Chapter 1 INTRODUCTION
1.1 Introduction ………………………………………………8
Chapter 2 REVIEW OF LITARATURE
2.1 Why we chose this project?.............................................10
Chapter 3 EXPERIMENTAL SETUP
3.1 ARDUINO UNO BOARD COMPONENTS……………….12
3.2 OTHER COMPONENT REQUIRED……………………...13
3.2.1 BIPOLAR STEPPER MOTOR………………………13
3.2.1.1 Calculating the Steps per Revolution for Stepper
Motor……………………………………………...14
3.2.1.2 Why so we need Driver modules for Stepper
motors…………………………………………….14
3.2.2 L293D Motor Driver IC……………………………….14
3.2.3 Power Supply………………………………………...15
3.2.4 BREADBOARD……………………………………….15
3.2.5 CONNECTING WIRES………………………………15

Chapter 4 SOFTWARE REQUIREMENT

4.1 ARDUINO IDE………………………………………………17

4.2 PROTEUS……………………………………………….......17

Chapter 5 METHODOLOGY

5.1 HOW TO DESIGN STEPPER MOTOR CONTROL


CIRCUIT?........................................................................19

Chapter 6 CIRCUIT DIAGRAM AND WORKING OF THE


PROJECT

4
6.1 CIRCUIT DIAGRAM………………………………………...21

6.2 WORKING OF THE PROJECT……………………………21

6.3 CODE FOR ARDUINO UNO………………………………24

Chapter 7 ADVANTAGES and CONCLUSION

7.1 ADVANTAGES………………………………………………29

7.2 CONCLUSION ………………………………………………29

Chapter 8 BIBLIOGRAPHY

BIBLIOGRAPHY…………………………………………………31

5
ABSTRACT
The main aim of this project is speed control of stepper motor
with an Arduino board. This is a new technology of speed control
of stepper motor. We control the motor manually which may
cause manual errors. It becomes very difficult for the elderly or
physically handicapped people to operate them. This system is
enhanced the speed control through an Arduino board by using
program. The proposed systems use an Arduino board and a
rectified power supply.
Because of this discrete nature of step – wise rotation of a
stepper motor, they are often employed in industrial automation,
CNC systems, etc. where precision motion is required.
In this project, we designed a simple system to control a stepper
motor using Arduino. We have used Arduino UNO as the main
controlling part of the project to control the steps of the stepper
motor.

6
Chapter 1
INTRODUCTION

7
INTRODUCTION:
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, Unipolar and Bipolar, 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. See the unipolar and bipolar motor
schematics for information on how to wire up your motor.
In this example, a potentiometer (or other sensor) on analog
input 0 is used to control the rotational speed of a 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.
Due to COVID pandemic, we are unable to represent this project
physically. So we use Proteus software to represent it virtually.

8
Chapter 2
REVIEW OF LITARATURE

9
Why we chose this project?
Now days we cannot imagine life without technology thus, we
can that it makes life more convenient and simper than past.
Information technology brings revolution in our daily life. It
increases our standard of living. It has great effect on business,
science, education, medical sector, transportation and so on.

In 3D printing, textile machines, painting presses, small


robotics, CNC machines, welding machines etc., we use
stepper motor. Now-a-days automatic control provide a vital role
in our daily application.

Arduino is an open-source electronics platform based on easy-


to-use hardware and software. Arduino boards are able to read
inputs - light on a sensor, a finger on a button, or a Twitter
message - and turn it into an output - activating a motor,
turning on an LED, publishing something online

In this project we control stepper motor control using Arduino.


Stepper motors, due to their unique design, can be controlled to
a high degree of accuracy without any feedback mechanisms.
Using Arduino, stepper motor control is bit easier and cheap. So,
Design and Fabrication of Stepper Motor Control
Mechanism Using Arduino more useful.

10
Chapter 3
EXPERIMENTAL SETUP

11
3.1 ARDUINO UNO BOARD COMPONENTS:
❖ Microcontroller ATmega328
❖ Operating Voltage 5V and 3.3 V
❖ Input Voltage (recommended) 7-12V
❖ Input Voltage (limits) 6-20V
❖ Digital I/O Pins 14 (of which 6 provide PWM output)
❖ Analog Input Pins 6
❖ DC Current per I/O Pin 40 mA
❖ DC Current for 3.3V Pin50 mA
❖ Flash Memory 32 KB (ATmega328) of which 0.5 KB used
by Bootloader
❖ SRAM 2 KB (ATmega328)
❖ EEPROM 1 KB (ATmega328) Clock Speed 16 MHz

Figure 3.1 Arduino Uno Board

12
3.2 OTHER COMPONENT REQUIRED:
3.2.1BIPOLAR STEPPER MOTOR: -
Stepper Motor is a type of DC Motor that rotates in discrete steps. Due
to their unique design, stepper motors can be controlled for precise
positioning without any feedback.
A typical stepper motor has multiple coils that are divided into phases.
When each phase is energised in sequence, the rotor of the stepper motor
rotates in steps.

Figure 3.2 Bipolar Stepper Motor and its winding arrangement showing
stator and rotor
➢ Basically, there are three types of stepper motors:
1. Variable Reluctance (VR) Stepper Motors
2. Permanent Magnet (PM) Stepper Motors
3. Hybrid Stepper Motors.
➢ Based on the winding of the stator, stepper motors can also be
classified as-
1. Bipolar Stepper Motors
2. Unipolar Stepper Motors
We will not go into the details of the types of stepper motors but it is
important to identify whether your stepper motor is a bipolar or unipolar
one. This is because, the driving method for each of these stepper
motors is different from the other.
For instance, the driver circuit of a unipolar stepper motor can be
implemented with simple transistor-based circuit or a Darlington

13
Transistor IC like ULN2003A. But in case of a bipolar stepper motor, we
need to implement an H – bridge type driver like L293D Motor Driver IC.

3.2.1.1 Calculating the Steps per Revolution for Stepper


Motor:
It is important to know how to calculate the steps per Revolution for your
stepper motor because only then you can program it effectively.
In Arduino we will be operating the motor in 4-step sequence so the stride
angle will be 11.25° since it is 5.625° (given in datasheet) 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.

3.2.1.2 Why so we need Driver modules for Stepper


motors?
Most stepper motors will operate only with the help of a driver module. This is
because the controller module (In our case Arduino) will not be able to provide
enough current from its I/O pins for the motor to operate. So, we will use an
external module like L239D motor drive module as stepper motor driver. There
are a many types of driver module and the rating of one will change based on
the type of motor used. The primary principle for all driver modules will be to
source/sink enough current for the motor to operate.

3.2.2 L293D Motor Driver IC:


❖ Can be used to run Two DC motors with the same IC
❖ Speed and Direction control is possible
❖ Motor voltage Vcc2 (Vs): 4.5V to 36V
❖ Maximum Peak motor current: 1.2A
❖ Maximum Continuous Motor Current: 600mA
❖ Supply Voltage to Vcc1(vss): 4.5V to 7V
❖ Automatic Thermal shutdown is available
❖ Transition time: 300ns(5Vand 24V) Figure 3.3L293D IC
❖ Available in 16-pin DIP, TSSOP, SOIC packages

14
3.2.3 Power Supply (suitable for stepper motor):
In order to choose the best power supply for our stepper motor, we’ll need
to add up the voltage of the motors. Just like most motors, stepper motors
have a rated voltage and current. These numbers will tell you the
maximum current you can expect when we hook the motor up to a certain
voltage.
For instance, take a typical model with a rated voltage of 2.8 Volts and a
current of 1.68 amps. This means that if we hook the stepper motor up
to 2.8 volts, it will draw roughly 1.68 amps.
A stepper motor driver ensures that the motor doesn’t attempt to draw
more current. This keeps it safe from overheating without compromising
the motor’s efficiency.
So first off, determine the number of stepper motors in your system. Make
sure they all share the same voltage requirements. Next, add their current
rated values.
3.2.4 Breadboard:
We will use this board to connect the components together
without soldering, you can use any type.

Figure 3.3 Breadboard


3.2.5 CONNECTING WIRES:
Jumper wires are used to connect our components with each
other on the breadboard.
We will need:
i) Male to Male ii) Female to Male iii) Female to Female

15
Chapter 4
SOFTWARE REQUIREMENT

16
4.1 ARDUINO IDE:
The Arduino Integrated Development Environment (IDE) is a
cross-platform application (for Windows, macOS, Linux) that is
written in functions from C and C++. It is used to write and
upload programs to Arduino compatible boards, but also, with
the help of third-party cores, other vendor development boards.

4.2 PROTEUS:
The Proteus Design Suite is a proprietary software tool suite
used primarily for electronic design automation. The software is
used mainly by electronic design engineers and technicians to
create schematics and electronic prints for manufacturing
printed circuit boards.

17
Chapter 5
METHODOLOGY

18
5.1 How to Design Stepper Motor Control Circuit?
In this project, we have used a bipolar stepper motor.
Hence, we used the Motor Driver IC L293D, which is an H
– bridge type driver. Since it is a bipolar stepper motor,
there are only 4 wires we need to connect.
So, connect the two wires from one coil to outputs 1 and 2
of L293D and the other two wires from second coil to
outputs 3 and 4.
The 4 inputs of the L293D Motor Diver IC are given from
Arduino UNO. So, connect them to any of the 4 digital I/O
pins (here, we connected them to pins 2, 3, 4 and 5 of
Arduino UNO).
Understand the power requirements of your stepper motor
and provide necessary power supply. Wrong power supply
would permanently damage the motor.
The control of steps is done with the help of computer using
serial monitor. So, make sure that the RX and TX pins of
the Arduino are not used as digital I/O. Alternatively, we can
control the steps or rotation of the motor with the help of
analog input via a potentiometer.

19
Chapter 6
CIRCUIT DIAGRAM AND WORKING OF THE
PROJECT

20
6.1 Circuit Diagram of Stepper Motor Control using
Arduino:

Figure 6.1 Bipolar Stepper Motor with Arduino Uno and L293D IC
6.2 Working of the Project
A simple Stepper Motor Control using Arduino UNO and L293D
Motor Driver IC is designed in this project. The working of the
project is explained here.
The stepper motor used in this project is a Bipolar PMH
(Permanent Magnet Hybrid) type Stepper Motor. Since it is a
bipolar motor, there are only 4 wires corresponding to the end
terminals of two coils. These 4 wires are connected to the output
pins of the L293D Motor Driver IC.
In order to drive the stepper motor, we will be using a technique
called “Half Stepping”. The motor used in this project has 200
step count. With one phase stepper excitation i.e., energising
only one phase at a time, we can achieve the normal 200 step
rotation with least power consumption.

21
Two phase stepper excitations are another technique where two
phases are energised at a time. With this technique, the step
count doesn’t vary from the one phase excitation but the torque
and speed are significantly increased.
But the disadvantage is it requires twice the power. The following
image shows a 4-step based operation of one phase and two-
phase excitation methods.

Full Step-One Phase ON

A A A A Step Phase
A B C D
D B D B D B D B
1 1 0 0 0
C C C C
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1
Figure 6.2 Test 1 on Bipolar Stepper Motor

Full Step-Two Phase ON

Step Phase
A A A A A B C D
1 1 1 0 0
D B D B D B D B 2 0 1 1 0
C C C C
3 0 0 1 1
4 1 0 0 1
Figure 6.3 Test 2 on Bipolar Stepper Motor

There is another technique called Half Stepping. This is a


combination of one phase and two phase excitation. The step
count is doubled i.e. half the step angle can be achieved.

22
So, with half stepping, we can get double the resolution with
along with smoother operation. The image below demonstrates
an 8 step “Half Stepping” excitation method.

A A A A
Step Phase
D B D B D B D B
A B C D
C C C C 1 1 0 0 0
2 1 1 0 0
A A A A 3 0 1 0 0
4 0 1 1 0
D B D B D B D B 5 0 0 1 0
6 0 0 1 1
C C C C
7 0 0 0 1
Figure 6.4 Test 3 on Bipolar Stepper Motor 8 1 0 0 1

As mentioned earlier, the step angle of the motor used in this


project is 1.80 i.e., 200 steps for full step excitation. In order to
increase the resolution (double the resolution), we will use half
step excitation and achieve 400 step count.
In order to control the steps, we will use the serial monitor. In the
program, for clock wise rotation, ‘+’ symbol is assigned and for
anti – clock wise rotation, ‘–’ sign is used.
After selecting the direction, then we can enter the number of
steps directly anywhere between 1 and 400.

23
6.3 CODE FOR ARDUINO UNO:

24
25
26
27
Chapter 7
ADVANTAGES,
CONCLUSION

28
7.1 ADVANTAGES:
❖ The rotation angle of the motor is proportional to the input
pulse
❖ Excellent response to starting, stopping/reversing
❖ The motors response to digital input pulses provides open-
loop control
❖ It is possible to achieve very low speed synchronous
rotation
❖ A wide range of rotational speeds can be realized
❖ Very reliable since there are no contact brushes in the
motor
❖ Accuracy of 3 – 5% of a step and this error is non-
cumulative from one step to the next.
7.2 CONCLUSION
The project demonstrates the working of a Stepper motor and
Stepper Motor Control using Arduino. Due to their high accuracy
and holding torque, stepper motors are used where precision
positioning is essential. These are very popular in our day-to-day
life due to a lot of advantages and also in digital control circuits,
such as robotics because they are ideally suited for receiving
digital pulses for step control.

29
Chapter 8
BIBLIOGRAPHY

30
BIBLIOGRAPHY:
❖ https://en.wikipedia.org/wiki/Arduino//Arduino and its
variations
❖ https://www.arduino.ccllen/Main/arduinoBoardUno
❖ https://learn sparkfun.com/tutorials//what is an Arduino
(1) Arduino interaction with accelerometer project by
Marco schwarz
(2) The principle of an Arduino - IEEE Xplore Document
(3) Arduino Research Papers - Academia.edu
❖Programming Arduino: Getting Started with Sketch by
Simon Monk

31

You might also like