You are on page 1of 57

BANNARI AMMAN INSTITUTE OF TECHNOLOGY

SATHYAMANGALAM – 638 401 Erode District Tamil Nadu

Academic Year: 2020-2021

18EC302:  BASICS OF ELECTRICAL ENGINEERING

SPEED CONTROL OF AC,DC &SPECIAL MOTORS USING


ARDUINO

Date of Submission: 2.11.2020

Name : THARUN A

Roll No :191EC298

Department :ECE

Year/Semester : II/III

Mail id :tharuna.ec19@bitsathy.ac.in
DECLARATION

I affirm that the lab task work titled “Speed control of AC,DC & Special motors
using Arduino” being submitted as the record of original work done by us under the
guidance of Dr. Dheepanchakkravarthy A NAME OF THE SUBJECT HANDLING
FACULTY, Designation, Department of ECE.

THARUN A
191EC298

I certify that the declaration made above by the candidates is true.

(Signature of the Guide)


NAME OF THE LAB HANDLING FACULTY
SPEED CONTROL OF AC SINGLE PHASE INDUCTION MOTOR
USING ARDUINO

OBJECTIVES :
To control the speed of single phase AC induction motor by using
arduino controller. The single phase inverter converts dc voltage into ac
voltage. Single phase induction motor speed depends on the frequency of
inverter.

INTRODUCTION:

 AC MOTOR :
The motor that converts the alternating current into mechanical
power by using an electromagnetic induction phenomenon is called an AC
motor. This motor is driven by an alternating current. The stator and the rotor
are the two most important parts of the AC motors. The stator is the
stationary part of the motor, and the rotor is the rotating part of the motor.
The AC motor may be single phase or three phase.

The three phase AC motors are mostly applied in the industry for
bulk power conversion from electrical to mechanical. For small power
conversion, the single phase AC motors are mostly used.The single phase AC
motor is nearly small in size, and it provides a variety of services in the home,
office, business concerns, factories, etc. Almost all the domestic appliances
such as refrigerators, fans, washing machine, hair dryers, mixers, etc., use
single phase AC motor.
TYPES OF AC MOTOR:

The AC motor is mainly classified into two types. They are the
synchronous motor and the induction motor.

Synchronous Motor :

The motor that converts the AC electrical power into mechanical


power and is operated only at the synchronous speed is known as a
synchronous motor.
Induction Motor or Asynchronous Motor :

The machine which converts the AC electric power into mechanical


power by using an electromagnetic induction phenomenon in called an
induction motor. The induction motor is mainly classified into two types., i.e.,
the single phase induction motor and the three phase induction motors.

The single phase AC motors are further classified as:

1. Single phase induction motors or asynchronous motors.


2. Single phase synchronous motors.
3. Commutator motors.

MATERIAL /KNOWLEDGE REQUIRED :

The main parts of a single -phase induction motor are :

 Stator
 Rotor

STATOR :
As its name indicates stator is a stationary part of induction motor. A
single phase AC supply is given to the stator of single phase induction motor.

ROTAR:
The rotor is a rotating part of an induction motor. The rotor connects the
mechanical load through the shaft. The rotor in the single-phase induction motor
is of squirrel cage rotor type.
Stator of Single Phase Induction Motor:
The stator of the single-phase induction motor has laminated stamping
to reduce eddy current losses on its periphery. The slots are provided on its
stamping to carry stator or main winding. Stampings are made up of silicon
steel to reduce the hysteresis losses. When we apply a single phase AC supply
to the stator winding, the magnetic field gets produced, and the motor rotates
at speed slightly less than the synchronous speed Ns. Synchronous speed Ns is
given by

Where,
f = supply voltage frequency,
P = No. of poles of the motor.

The construction of the stator of the single-phase induction motor is similar


to that of three phase induction motor except there are two dissimilarities in
the winding part of the single phase induction motor.

1. Firstly, the single-phase induction motors are mostly provided with


concentric coils. We can easily adjust the number of turns per coil can
with the help of concentric coils. The mmf distribution is almost
sinusoidal.
2. Except for shaded pole motor, the asynchronous motor has two stator
windings namely the main winding and the auxiliary winding. These
two windings are placed in space quadrature to each other.

Rotor of Single Phase Induction Motor:

The construction of the rotor of the single-phase induction motor is


similar to the squirrel cage three-phase induction motor. The rotor is
cylindrical and has slots all over its periphery. The slots are not made parallel
to each other but are a little bit skewed as the skewing prevents magnetic
locking of stator and rotor teeth and makes the working of induction motor
more smooth and quieter (i.e. less noisy).
The squirrel cage rotor consists of aluminum, brass or copper bars. These
aluminum or copper bars are called rotor conductors and placed in the slots
on the periphery of the rotor. The copper or aluminum rings permanently
short the rotor conductors called the end rings.

To provide mechanical strength, these rotor conductors are braced to the


end ring and hence form a complete closed circuit resembling a cage and
hence got its name as squirrel cage induction motor. As end rings
permanently short the bars, the rotor electrical resistance is very small and it
is not possible to add external resistance as the bars get permanently shorted.
The absence of slip ring and brushes make the construction of single phase
induction motor very simple and robust.

ANALYSIS OF TASK / CONCEPT UNDERSTANDING :

To analyse how to control the speed of single phase AC induction


motor by using arduino.
WORKING PRINCIPLE OF SINGLE PHASE INDUCTION MOTOR :

Single-phase induction motors main winding is supplied with a single -


phase A.C. current. This produces fluctuating magnetic flux around the rotor.
This means as the direction of the A.C. current changes, the direction of the
generated magnetic field changes. This is not enough condition to cause
rotation of the rotor. Here the principle of double revolving field theory is
applied.

According to the double revolving field theory, a single alternating filed is


due to the combination of two fields of equal magnitude but revolving in the
opposite direction. The magnitude of these two fields is equal to the half the
magnitude of the alternating field. This means that when A.C. is applied, two
half magnitude fields are produced with equal magnitudes but revolving in
opposite directions.

So, now there is a current flowing in the stator and magnetic field
revolving on the rotor, thus Faraday’s law of electromagnetic induction acts
on the rotor. According to this law, the revolving magnetic fields produce
electricity in the rotor which generates force ‘F’ that can rotate the rotor.
Applications of Single Phase Induction Motor
These motors find use in fans, refrigerators, Air-conditioners, Vacuum
cleaners, washing machines, centrifugal pumps, tools, small farming
appliances, blowers etc….These are mostly used for low power but constant
speed devices such as agricultural tools and machinery where three -phase
supply are not available. So, basically, we use single phase induction motors in
our daily life frequently.

ADVANTAGES OF SINGLE PHASE INDUCTION MOTOR :

 The working of an induction motor is very simple. It can operate in any


environmental condition. The construction of an induction motor is
robust and sturdy.
 It is very cheap in cost to compare the other motors.
 It is a highly efficient motor .The efficiency of induction motor from 85
to 95%.
 The brushes are not used in an induction motor. So, there are no sparks
in the motor and it can be used in polluted and hazards environment.
 The maintenance of induction motor is very less compared to the DC
motor and synchronous motor .
 In this motor ,only one AC source requires to operate .It does not
require DC excitation like a synchronous motor .
 The speed variation from no-load to rated load is very less .

PICTORIAL REPRESENTATION :
CONCLUSION :
Single phase power system is widely used in domestic
purpose,commercial purpose and to some extent in industrial purpose .As the
single phase system is more economical and the power requirement in most
of the houses,shops ,offices are small ,which can be easily met by single phase
system.The single phase induction motors are simple in construction,cheap in
cost,reliable and easy to repair and maintain .
TO CONTROL THE SPEED OF DC MOTOR USING ARDUINO

OBJECTIVE:

The objective of the task is to control the speed of DC Motor by


arduino using proteus software.

INTRODUCTION:

A direct current (DC) motor is a type of electric machine that


converts electrical energy into mechanical energy. DC motors take
electrical power through direct current, and convert this energy into
mechanical rotation.
DC motors use magnetic fields that occur from the electrical currents
generated, which powers the movement of a rotor fixed within the output
shaft. The output torque and speed depends upon both the electrical input
and the design of the motor.

WORKING OF DC MOTOR:
DC motors include two key components: a stator and
an armature. The stator is the stationary part of a motor, while the
armature rotates. In a DC motor, the stator provides a rotating magnetic
field that drives the armature to rotate.
A simple DC motor uses a stationary set of magnets in the stator, and a coil
of wire with a current running through it to generate an electromagnetic
field aligned with the centre of the coil. One or more windings of insulated
wire are wrapped around the core of the motor to concentrate the magnetic
field.
The windings of insulated wire are connected to a commutator (a rotary
electrical switch), that applies an electrical current to the windings. The
commutator allows each armature coil to be energised in turn, creating a
steady rotating force (known as torque).
When the coils are turned on and off in sequence, a rotating magnetic field
is created that interacts with the differing fields of the stationary magnets
in the stator to create torque, which causes it to rotate. These key operating
principles of DC motors allow them to convert the electrical energy from
direct current into mechanical energy through the rotating movement,
which can then be used for the propulsion of objects.

ADVANTAGES OF DC MOTOR:
 Starting torque of DC Series motor is comparatively higher than
other motors so this kind of motors are widely used for traction
applications
 Series wound motors can use for AC or DC supply so it’s also
known as universal motors.
 Compare with Shunt Motor DC series motor develop more power
for the same construction size.

DISADVANTAGES OF DC MOTOR:
 Speed control and regulation of DC series motor are not good.
 It is necessary to have a load before starting the DC series
motors. So Dc Series motors are not good to use where load does
not apply to the initial stage.

APPLICATIONS OF DC MOTOR:
 Direct Current series motors are useful traction applications in
electrical such as locomotives and trolley cars.
 DC Series Motors are also used for cranes and conveyor belt
where higher starting torque is required .

PICTORIAL REPRESENTATION:

EXPLANATION:

 We have placed a LDR sensor in the simulation and depending on the

value of that LDR sensor our DC motor speed will either increase or

decThe base of this NPN transistor is connected with PWM pin of

Arduino board.

 So, we are generating a PWM pulse on this pin which is then applied on

the base of transistor.


 Now if we increase the duty cycle of this PWM pulse then the transistor

induction will increase and thus the speed of the DC motor.

 Now in order to control this PWM pulse I have used the LDR sensor, now

depending on the LDR sensor the speed of DC motor will increase or

decrease.

 Now upload the below code in you arduino software

int Motor1 = 2;
int Motor2 = 3;

int PWMControl= 6;

int PWM_Input = A0;

int PWM_Value = 0;
void setup() {
pinMode(Motor1, OUTPUT);
pinMode(Motor2, OUTPUT);
pinMode(PWMControl, OUTPUT);
pinMode(PWM_Input, INPUT);
Serial.begin(9600);
}

void loop() {
PWM_Value = analogRead(PWM_Input);
PWM_Value = map(PWM_Value, 0, 1023, 0, 255);
analogWrite(PWMControl, PWM_Value);
if(Serial.available())
{
char data = Serial.read();
Serial.println(data);
if(data == 'C'){MotorClockwise();}
if(data == 'A'){MotorAntiClockwise();}
if(data == 'S'){MotorStop();}

}
}

void MotorAntiClockwise()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, LOW);
}

void MotorClockwise()
{
digitalWrite(Motor1, LOW);
digitalWrite(Motor2, HIGH);
}

void MotorStop()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, HIGH);
}

now we starting the simulation and then we can send the commands via

virtual Terminal and it will start moving and then by changing the LDR

position DC motor speed control will take place.

SPEED CONTROL OF SERVO MOTOR USING ARDUINO


OBJECTIVES :
To control the speed of servomotor using Arduino

INTRODUCTION :

SERVO MOTOR:

A Servomotor is a simple electric motor ,controlled with the


help of servomechanism. If the motor as a controlled device,associated
with servomechanism is DC motor ,then it is commonly known as a DC
Servo motor . If AC operates the controlled motor,it is known as a AC
Servo Motor .

A Servomotor is a linear actuator or rotary actuator that allows


for precise control of linear or angular position, acceleration, and velocity.
It consists of a motor coupled to a sensor for position feedback. It also
requires a relatively sophisticated controller, often a dedicated module
designed specifically for use with servomotors.
TYPES OF SERVO MOTOR:

 DC Servo motor
 AC Servo motor
 Positional rotation Servo motor
 Continuous rotation Servo motor
 Linear Servo motor

DC Servo Motor:

The motor which is used as a DC servo motor generally have a


separate DC source in the field of winding & armature winding. The
control can be archived either by controlling the armature current or field
current. Field control includes some particular advantages over armature
control. In the same way armature control includes some advantages over
field control. Based on the applications the control should be applied to the
DC servo motor. DC servo motor provides very accurate and also fast
respond to start or stop command signals due to the low armature
inductive reactance. DC servo motors are used in similar equipments and
computerized numerically controlled machines.

AC Servo Motor:

AC servo motor is an AC motor that includes encoder is used with


controllers for giving closed loop control and feedback. This motor can be
placed to high accuracy and also controlled precisely as compulsory for the
applications. Frequently these motors have higher designs of tolerance or
better bearings and some simple designs also use higher voltages in order
to accomplish greater torque. Applications of an AC motor mainly involve
in automation, robotics, CNC machinery, and other applications a high
level of precision and needful versatility.
Positional Rotation Servo Motor:

Positional rotation servo motor is a most common type of servo


motor. The shaft’s o/p rotates in about 180o. It includes physical stops
located in the gear mechanism to stop turning outside these limits to guard
the rotation sensor. These common servos involve in radio controlled
water, radio controlled cars, aircraft, robots, toys and many other
applications.

Continuous Rotation Servo Motor:

Continuous rotation servo motor is quite related to the common


positional rotation servo motor, but it can go in any direction indefinitely.
The control signal, rather than set the static position of the servo, is
understood as the speed and direction of rotation. The range of potential
commands sources the servo to rotate clockwise or anticlockwise as
preferred, at changing speed, depending on the command signal. This type
of motor is used in a radar dish if you are riding one on a robot or you can
use one as a drive motor on a mobile robot.
Linear Servo Motor:

Linear servo motor is also similar the positional rotation servo motor
is discussed above, but with an extra gears to alter the o/p from circular to
back-and-forth. These servo motors are not simple to find, but sometimes
you can find them at hobby stores where they are used as actuators in
higher model airplanes.

Servo Motor Working Principle:

A unique design for servo motors are proposed in controlling the


robotics and for control applications. They are basically used to adjust the
speed control at high torques and accurate positioning. Parts required are
motor position sensor and a highly developed controller. These motors can
be categorized according the servo motor controlled by servomechanism. If
DC motor is controlled using this mechanism, then it is named as a DC
servo motor. Servo motors are available in power ratings from fraction of a
watt to 100 watts.The rotor of a servo motor is designed longer in length
and smaller in diameter so that it has low inertia.
SERVO MOTOR INTERFACING WITH ARDUINO :

 Power:

 The power wire mostly has a red colour, which connects to the
5V pin of the Arduino.
 The Servo motor requires a considerable amount of power,
especially for high power servos. So, for multiple servos or
while using servos along with other pins, it is better to power
the servo motor separately with an external supply. Because
the power at the remaining pins would be interrupted during
its operation.
 For external powering, connect the ground of the
arduino commonly with the -ve terminal of the external power
supply. And connect the supply terminal of the servo (+V) to
the  +Ve terminal of the external supply.

 Ground:
The ground wire typically has black or brown colour. It connects to
the ground pin of the Arduino.

 Control signal:
The signal wire commonly has an orange colour. Yellow, white, blue
colours are also used for this connection. One of the Digital pins of
Arduino can be used for the signal connection. But, it is commonly used
on PWM pins (3, 5, 6, 9, 10, or 11). The servo is mostly connected to pin 9
on the Arduino board. Even the servo is not in use, the analogWrite ()
(PWM) functionality on pins 9 and 10 disables by the accessing of the
library function (except the Arduino Mega). Thus the remaining PWM pins
can use for analogwrite () (PWM) by connecting servos to the pin 9 or 10.

Arduino Include Servo Library :


The Arduino Platform itself has the code library for the servo motors. At
the beginning of the sketch, the library function needs to be included as, 
#include <Servo.h>

 Servo servo;     - create servo object to control a servo.


 myservo.attach(9);    - attaches the servo on pin 9 to the servo
object.
 myservo.write(position);      -    tell servo to go to position in variable
‘position’.
Arduino Servo Motor Sweep Code:

A servo sweep circuit moves the servo shaft in to and fro motion.
Which rotates the arm 180 degrees clockwise and 180 degrees anti-
clockwise repeatedly.

Code:

#include <Servo.h>
 
Servo myservo;
int pos = 0;
 
void setup()

  myservo.attach(9);

 
void loop()

  for(pos = 0; pos <= 180; pos += 1)
  {                                  
    myservo.write(pos);
    delay(15);
  } 
  for(pos = 180; pos>=0; pos-=1)
  {                                
    myservo.write(pos);
    delay(15);
  } 

Arduino servo motor control with potentiometer:

Servo motor position control arduino

 Here we are controlling the angular position of a servo motor using a


potentiometer. At every instant, the servo arm follows the position of
the Knob. The servo moves clockwise or counterclockwise (0° – 180°) 
with the corresponding angular position of the potentiometer.
 The wiper pin of the potentiometer is connected to analog input of
the arduino. The terminal(T1) of the potentiometer is connected to
supply voltage and the other terminal(T2) to the ground.
 By turning the potentiometer, the input voltage varies in the range of
0 to 5V.  The arduino uno has a 10-bit analog to digital converter. So
the analog input values for the range 0 to 5 volt is converted into
corresponding decimal values from 0 to 1023.

 In the program, we map the values between 0 – 1023 to 0° – 180°.


Thus the angle of servo proportionally increments and decrements
with the increase and decrease in input value. That is when the knob
is at centre position the servo arm will be at 90°. And will turn
towards 0° and 180° when rotating the knob towards GND terminal
T2 and 5V terminal T1 respectively. Thus, every position change in
the potentiometer will make the corresponding angular position
change in the servo motor.

Code:

 #include <Servo.h>

 Servo servo1;
 int potin;

 void setup()
 {
   servo1.attach(9);
 }

 void loop()
 { 
   potin = analogRead(A0);
   potin = map(potin, 0, 1023, 0, 180);
   servo1.write(potin);
   delay(15);
 }

Servo sweep with Knob speed control:

The speed of the servo motor can be adjusted by the knob connected
to the analog read pin 0 of the Arduino.
Code:

#include <Servo.h>

Servo servo1;
int potin,pos;

void setup()
{
  servo1.attach(9);
}

void loop()

  for(pos = 0; pos <= 180; pos += 1)
  {     
  potin = analogRead(A0);
  potin = map(potin, 0, 1023, 0, 1000);
  servo1.write(pos);
  delay(potin); // dealy of 0 to 1000ms
  } 
  for(pos = 180; pos>=0; pos-=1)
  {      
  potin = analogRead(A0);
  potin = map(potin, 0, 1023, 0, 1000);
  servo1.write(pos);
  delay(potin);
  }                    
}

Position and speed control of servo motor using Arduino serial


monitor:

This Arduino sketch is to control the position and speed of a servo


motor using Arduino serial communication. Here the input decimal values
of position and the speed of the shaft movement can be given through the
serial monitor. The values can be separated by entering the position and
the time delay by a comma.

Code:

#include <Servo.h>

Servo servo1;  
long num, delays;     
int i=0;
void setup()
{
servo1.attach(9);
Serial.begin(9600);
Serial.println("Enter Position and delay = position , delay ");
// Separate the values of position and delay by a comma.
Serial.print("Enter Position and delay = ");
}

void loop()
{
 while(Serial.available()>0)
 {
 num= Serial.parseInt();   
 Serial.print(num);  
 Serial.print(" degree , ");
 delays = Serial.parseInt();
 Serial.print(delays);  
 Serial.println(" ms");
 Serial.print("Enter Position and delay = ");
 }
 
 while (i<num){
 i++;
 servo1.write(i);
 delay(delays);
}
while (i>num){
 i--;
 servo1.write(i);
 delay(delays);
}
i = num;
}

Applications of Servo Motor:


The servo motor is small and efficient, but serious to use in some
applications like precise position control.This motor is controlled by a
pulse width modulator signal. The applications of servo motors mainly
involve in computers, robotics, toys, CD/DVD players, etc. These motors
are extensively used in those applications where a particular task is to be
done frequently in an exact manner.

 The servo motor is used in robotics to activate movements, giving the


arm to its precise angle.
 The Servo motor is used to start, move and stop conveyor belts
carrying the product along with many stages. For instance, product
labeling, bottling and packaging
 The servo motor is built into the camera to correct a lens of the
camera to improve out of focus images.
 The servo motor is used in robotic vehicle to control the robot wheels,
producing plenty torque to move, start and stop the vehicle and
control its speed.
 The servo motor is used in solar tracking system to correct the angle
of the panel so that each solar panel stays to face the sun
The Servo motor is used in metal forming and cutting machines to
provide specific motion control for milling machines
 The Servo motor is used in Textiles to control spinning and weaving
machines, knitting machines and looms
 The Servo motor is used in automatic door openers to control the
door in public places like supermarkets, hospitals and theatres.
Advantages of Servo Motors:

Servo Motors are used throughout many industries and have the following
advantages:

 High efficiency
 High output power relative to their size
 More constant torque at higher speed
 Closed-loop control
 Quiet operation
 Highly reliable
 High ratio of torque to inertia
 High acceleration
 High-speed performance
 Torque control
 Smooth running
 High accuracy
 Small in size
 Well suited to varying load applications
PICTORIAL REPRESENTATION :
EXPLANATION :

 First of all, open your Proteus software and design the below simple
circuit.

 Servo Motor has three pins, one of them goes to Vcc, other one to

GND while the center pin is the controlling pin and goes to any

digital pin of Arduino. I have connected the control pin to pin # 4 of

my Arduino.

 Next thing we need to do is to design the code for Arduino. So, open

your Arduino software and copy paste the above code in it.

 Now compile this code and get your hex file. Its the same code as

given in the Servo folder of Examples in Arduino software.

 Upload your hex file in your Proteus Arduino board.

 Now, run your simulation and you will see that your Servo motor

will start moving from 90 degrees to -90 degrees and then back to 90

degrees and will keep on going like this, as shown in above figures:

 Now when you start it , first of all it will show the Position A in

above figure then will move anticlockwise and pass the position B
and finally will stop at Position C and then it will move clockwise

and comes back to Position A after passing Position B.

 In this way it will keep on moving between Position A and C.

CONCLUSION :

To control servo motors a motor drive and controller is needed.


Servos are generally connected to a motor drive and a single drive or
series of drives are then connected to a motion controller. Multiple
axes of servo motion can be accurately coordinated by a motion
controller. Servos are better fit for coordinated motion because of the
fast responses to disturbances.
SPEED CONTROL OF STEPPER MOTOR USING ARDUINO
OBJECTIVES:

To control the speed of stepper motor using arduino in proteus


software

INTRODUCTION:

STEPPER MOTOR:

Stepper Motor is a brushless electromechanical device which


converts the train of electric pulses applied at their excitation windings into
precisely defined step-by-step mechanical shaft rotation. The shaft of the
motor rotates through a fixed angle for each discrete pulse. This rotation
can be linear or angular.It gets one step movement for a single pulse input.
When a train of pulses is applied, it gets turned through a certain angle.
The angle through which the stepper motor shaft turns for each pulse is
referred as the step angle, which is generally expressed in degrees.

KNOWLEDGE REQUIRED :

The number of input pulses given to the motor decides the step angle
and hence the position of motor shaft is controlled by controlling the
number of pulses. This unique feature makes the stepper motor to be well
suitable for open-loop control system wherein the precise position of the
shaft is maintained with exact number of pulses without using a feedback
sensor.
If the step angle is smaller, the greater will be the number of steps per
revolutions and higher will be the accuracy of the position obtained. The
step angles can be as large as 90 degrees and as small as 0.72 degrees,
however, the commonly used step angles are 1.8 degrees, 2.5 degrees, 7.5
degrees and 15 degrees.
The direction of the shaft rotation depends on the sequence of
pulses applied to the stator. The speed of the shaft or the average motor
speed is directly proportional to the frequency (the rate of input pulses) of
input pulses being applied at excitation windings. Therefore, if the
frequency is low, the stepper motor rotates in steps and for high frequency,
it continuously rotates like a DC motor due to inertia.

Like all electric motors,it has stator and rotor . The rotor is the
movable part which has no windings, brushes and a commutator. Usually
the rotors are either variable reductance or permanent magnet kind. The
stator is often constructed with multiple and multiphase windings,usually
of three or four phase windings wound for a required number of poles
decided by desired angular displacement per input pulse.
There are several types of stepper motors are available in today’s market
over a wide range of sizes, step count, constructions, wiring, gearing, and
other electrical characteristics. As these motors are capable to operate in
discrete nature, these are well suitable to interface with digital control
devices like computers.
Due to the precise control of speed, rotation, direction, and angular
position, these are of particular interest in industrial process control
systems, CNC machines, robotics, manufacturing automation systems, and
instrumentation.

Types of Stepper Motors:

There are three basic categories of stepper motors, namely


 Permanent Magnet Stepper Motor
 Variable Reluctance Stepper Motor
 Hybrid Stepper Motor

Permanent Magnet Stepper Motor


The permanent magnet design motor is perhaps the most common
among several types of stepper motors. As the name implies, it adds
permanent magnets to the motor construction. This type of stepper motors
is also referred as can-stack motor or tin-can motor. The main advantage of
this motor is its low manufacturing cost. This type of motor has 48-24 steps
per revolution.

Variable Reluctance Stepper Motor


It is the basic type of stepper motor that has been in existence for a
long time and it ensures easiest way to understand principle of operation
from a structural point of view. As the name suggests, the angular position
of the rotor depends on the reluctance of the magnetic circuit formed
between the stator poles (teeth) and rotor teeth.
Hybrid Stepper Motor
It is the most popular type of stepper motor as it provides better
performance than permanent magnet rotor in terms of step resolution,
holding torque and speed. However, these motors are more expensive than
PM stepper motors. It combines the best features of both variable
reluctance and permanent magnet stepper motors. These motors are used
in applications that require very small stepping angle such as 1.5, 1.8 and
2.5 degrees.

Based on the winding of the stator, stepper motors can also be classified
as

 Bipolar Stepper Motors

 Unipolar Stepper Motors.

Unipolar Stepper Circuit and schematic


Bipolar Stepper Circuit and schematic
Components Required:
 Arduino UNO 
 L293D Motor Driver IC 
 Bipolar Stepper Motor  
 Power Supply (suitable for your stepper motor)  
 Breadboard (Prototyping Board) 
 Connecting Wires  

Circuit Diagram of Stepper Motor Control using Arduino:


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.

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.

Two phase stepper excitation is 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 is 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.
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.

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.
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.
CODE:
Applications 
 The project demonstrates the working of a Stepper motor and Stepper
Motor Control using Arduino. Stepper motors are commonly used in
robots, CNC Machines, industrial automation, small appliances like
printers etc.
 Due to their high accuracy and holding torque, stepper motors are
used where precision positioning is essential. 

ADVANTAGES :

 The percentage step error does not accumulate as the motor rotates.
 It is able to run at wide range of speeds, including very slow speeds
without reduction gearing.
 Stepper motor provide excellent response during start, stop and
reverse mode.
 It is highly reliable since no brushes or commutator are used. Its life
time depend on life of the bearing.
 Stepper motor control circuit is simple and low cost. It is mainly used
for low power applications.

PICTORIAL REPRESENTATION:
EXPLANATION :

 All grounded terminals are connected together.

 The L293D chip has 16 pins with 4 inputs (IN1, IN2, IN3 and IN4)
and 4 outputs (OUT1, OUT2, OUT3 and OUT4). The 4 outputs are
connected to the bipolar stepper motor as shown in the circuit
diagram.

 The 4 inputs are connected as follows:


IN1 to Arduino pin 8
IN2 to Arduino pin 9
IN3 to Arduino pin 10
IN4 to Arduino pin 11

 The L293D has 2 VCC pins: VCC1 (pin #16) and VCC2 (pin #8). VCC1
is connected to Arduino +5V pin. VCC2 is connected to another
power source (positive terminal) with voltage equal to motor
nominal voltage, it’s labeled in the circuit diagram as V
Motor (VMotor = motor voltage). So if we have a stepper motor with
nominal voltage of 5V we’ve to connect VCC2 to +5V (Arduino 5V
output shouldn’t be used) and if the stepper motor nominal voltage is
12V we’ve to connect VCC2 to +12V (negative terminal of this source
is connected to circuit ground)…

 The 10k ohm potentiometer is used to control the speed of the


stepper motor, its output pin is connected to Arduino analog pin 0.

 The push button which is connected to Arduino pin 4 is used to


change the rotation direction of the stepper motor.

CONCLUSION :

To control stepper motors a motor drive and controller is needed. The


benefit of stepper motors and drives is that they are simpler to setup and
have fewer parameters that need to be configured to get the system
running. Integrated stepper motors with the drive/controller built into the
body of the motor are an increasing common option. This design makes
integrating a stepper motor easier by reducing the number of components
in the system.

You might also like