Speed Control of DC Motor Using PIC 16F877A Microcontroller: July 2014
Speed Control of DC Motor Using PIC 16F877A Microcontroller: July 2014
net/publication/370952409
CITATIONS READS
12 260
3 authors, including:
Jayashree Deka
Assam Don Bosco University
7 PUBLICATIONS 35 CITATIONS
SEE PROFILE
All content following this page was uploaded by Jayashree Deka on 23 May 2023.
ISSN:2348 - 6953
Control system design and analysis technologies are widely suppress and very
Abstract
useful to be applied in real-time development. Some can be solved by hardware
technology and by the advance used of software, control system are analyzed easily
and detail.
DC Motors can be used in various applications and can be used as various sizes and
rates as per our applications. In this project we have control the actual speed of dc
motor as per ours requirement. This can be achieved through PIC microcontroller.
The microcontroller computes the actual speed of the motor by sensing the terminal
voltage and displayed on LCD.
In this project firstly we are giving the supply to PIC microcontroller. Then
controller generates the pulse generally 5 volt DC. The generated pulse is nothing
but PWM signal. Which giving to driver circuit. The function of this driver circuit
to generate 12v DC pulse. This is necessary to switch/triggering on MOSFET.Thus
speed of DC motor is control through duty/PWM cycle. This PWM pulse is giving
to MOSFET for triggering purpose.
The modeling and simulation of this project is done through MP-LAB software.
It then compares the actual speed of the motor with the reference speed and
generates a suitable control signal which is fed into the triggering unit using
223 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
MATLAB.Here we use PID Controller for error minimization purpose. This unit
drives a Power MOSFET amplifier, which in turn supplies a PWM voltage to the dc
motor.
1. INTRODUCTION
1.1 Background
Control system design and analysis technologies are widely suppress and very useful to be
applied in real-time development. Some can be solved by hardware technology and by the
advance used of software, control system are analyzed easily and detail.DC Motors can be
used in various applications and can be used in various sizes and rates as per our applications.
The DC-Motor is used in domestics and industrial purpose.
Whenever we think about any programmable devices then the embedded technology comes
into fore front. The embedded is now-a- days very much popular and most of the product are
developed with Microcontroller based embedded technology. The advantages of using the
microcontroller is the reduction of the cost and also the use of extra hardware such as the use
of timer, RAM and ROM can be avoided. This technology is very fast so controlling of
multiple parameters is possible; also the parameters are field programmable by the user.
In this project we are controlling speed of DC motor. As we increase the speed of DC Motor
as a result an increase in the productivity of material. The application of this is used in
domestic’s purpose examples are hair dryer, mixer, zero machine,elevator and industrial
purpose examples are traction and elevator. In this project we have control the actual speed of
dc motor as per ourrequirement. This can be achieved through PIC microcontroller. The
microcontroller computes the actual speed of the motor by sensing the terminal voltage and
displayed on LCD.
In this project firstly we are giving the supply to PIC16F8774 microcontroller. Then
controller generates the pulse generally 5VDC.The generated pulse is nothing but PWM
signal,which is given to the driver circuit. The function of this driver circuit is to generate
12V DC pulse. This is necessary to switch/trigger the MOSFET.Thus the speed of DC motor
is controlled through duty/PWM cycle. This PWM pulse is given to MOSFET for triggering
purpose.
The modeling and simulation of this project is done through MATLAB/PROTES software.It
then compares the actual speed of the motor with the reference speed and generates a suitable
control signal which is fed into the triggering unit using MATLAB.here we use PID
Controller for error minimization purpose. This unit drives a Power MOSFET amplifier,
which in turn supplies a PWM voltage to the dc motor.DC Motors can be used in various
applications.
224 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
The main core of this project is to design a speed control system of DC Motor by using
microcontroller. This system will be able to control the DC motor speed at desired speed
regardless the changes of load.
In order to achieve the objective of the project, there are several scope had been outlined. The
scope of this project includes using MPLAB IDE to program microcontroller PIC 16F877A,
build hardware for the system, and interface the hardware to computer by using RS232 serial
port communication. Last but not least, a graph of speed versus time is obtained by using
Visual Basic 6.0 at computer to observe the performance of the system.
AC SUPPLY
RECTIFER AND FILTER
GATE CURCUIT(MOSFET)
DRIVER CURCUIT
PIC 16F877A MICROCONTROLLER
5 VOLT DC SUPPLY
BOOSTER CURCUIT
DC MOTOR
225 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
The AC voltage, typically 220V rms, is connected to a transformer, which steps that ac
voltage down to the level of the desired DC output. A diode rectifier then provides a full-
wave rectified voltage that is initially filtered by a simple capacitor filter to produce a dc
voltage. This resulting dc voltage usually has some ripple or ac voltage variation.A regulator
circuit removes the ripples and also remains the same dc value even if the input dc voltage
varies, or the load connected to the output dc voltage changes.
PIC microcontrollers have a data memory bus of 8-bit and a program memory bus of 12, 14
or 16 bit length depending on the family. All PIC microcontrollers have a mix of different on-
226 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
chip peripherals like A/D converters, Comparators, weak pull-ups, PWM modules, UARTs,
Timers, SPI, I2C, USB, LCD, and CAN etc.
1. Buffer Circuit
2. Isolation Circuit
3. Phase Shifting (Transitor)
4. Darlington pair
D1
FROM MICRO CONTROLLER
U1
D1N1190
R1 R3
R4 Q2
1K
1k
Q3
OP-07C/301/TI
Q1 100 230/12V
MCT2E R2
R5
500mA
G C1
100 BDX37 1n
100
R8
1k
R6
1k
S
0
The buffer IC used here IC 4050 is used for pulse generation to generate triggering pulse.
There are pull up resistors to provide a resistance in series with the microcontroller which
acts as a current source here. This IC acts as an impedance improvement buffer IC. Voltage
follower concept is used and the signal is getting inverted. Now it is given to the isolator.
Since the microcontroller is a sensitive device and MOSFET carries high current, in order to
provide isolation between the two, isolation is being provided by the opt coupler required.
1.9.2 Optocoupler
227 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
A common implementation involves an LED and a light sensor, separated so that light may
travel across a barrier but electrical current may not. When an electrical signal is applied to
the input of the opto-isolator, its LED lights, its light sensor then activates, and a
corresponding electrical signal is generated at the output. Unlike common implementation
involves an LED and a light sensor, separated so that light may travel across a barrier but
electrical current may not. When an electrical signal is applied to the input of the opto-
isolator, its LED lights, its light sensor then activates, and a corresponding electrical signal is
generated at the output. Unlike a transformer, the opto-isolator allows for DC coupling and
generally provides significant protection from serious overvoltage conditions in one circuit
affecting the othertransformer, the opto-isolator allows for DC coupling and
generallyprovides significant protection from serious overvoltage conditions in one circuit
affecting the other.
With a photodiode as the detector, the output current is proportional to the amount of incident
light supplied by the emitter. The diode can be used in a photovoltaic mode or a
photoconductive mode.
Device rating:
The function of this phase shifting transistor is to shift the output pulse of PIC
microcontroller to exact 0 and 1 binary form.
This transistor removing over pulse voltage to suitable voltage pulse which is necessary for
next operation.
228 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
A similar transistor configuration using two transistors of opposite type (NPN and PNP) is
the Sziklai pair, sometimes called the "complementary Darlington". Finally the amplified
signal is sent to the multilevel inverter and the output is obtained.
2. CONTROL TECHNIQUE
In this project we are using PWM control technique.this technique is used from PIC
microcontroller.The pwm pulse is coming from PORT C of microcontroller.this PWM pulse
is divided into various duty cycle.e.g.25%,50%.
3. BOOSTER CIRCUIT
The main fuction booster circuit is to boost the supply to required demand of the motor.
1) AC Power supply
2) Transformer
3) Rectifier
4) Inductor
5) Switch(MOSFET)
229 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
6) Diode
7) Capacitor
4. DC MOTOR
Direct current (DC) motors have variable characteristics and are used extensively in variable-
speed drives. DC motor can provide a high starting torque and it is also possible to obtain
speed control over wide range. Why do we need a speed motor controller? For example, if we
have a DC motor in a robot, if we just apply a constant power to each motor on a robot, then
the poor robot will never be able to maintain a steady speed. It will go slower over carpet,
faster over smooth flooring, slower up hill, faster down hill, etc. So, it is important to make a
controller to control the speed of DC motor in desired speed.
Fig.8 DC-Motor
DC motor plays a significant role in modern industrial. These are several types of
applications where the load on the DC motor varies over a speed range. These applications
may demand high-speed control accuracy and good dynamic responses.
230 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
Procedure:
1. Open mplab software.
2. Select project and project wizard.
3. Choose pic16f68774 controller
4. Select complier-hitech
5. Give floder path and finish
6. Creat new source file.
7. In that space type code of project.
8. Save as extension .c
9. Source file right click and add file .c
10. Open and run (black icon)
11. Ensur that rs232 cable is coonect to dump kit.
12. Select programmer and RIC kit 2
13. Download the program in pic controller
14. after that kit is ready this massage will come.
6. RESULTS OF PROJECT
231 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
232 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
8. CONCLUSION
Recent developments in science and technology provide a wide range scope of applications
of high performance DC motor drives in area such as rolling mills, chemical process, electric
trains, robotic manipulators and the home electric appliances require speed controllers to
perform tasks. DC motors have speed control capabilities, which means that speed, torque
and even direction of rotation can be changed at anytime to meet new condition.
The goal of this project is to design a DC motor speed control system by using
microcontroller PIC16F877A.The controller will maintain the speed at desired speed when
there is a variation of load. By varying the PWM signal from microcontroller to the motor
driver, motor speed can be controlled back to desired value easily.
ACKNOWLEGEMENT
Each and every effort requires a positive support from the many peoples and areas. We would
like to thank our respected HOD Prof. N. M. LOKHANDE. Who permitted and allowed us to
carry out project work using the facilities available in the department.We wish to extend our
thanks to the guidance which we receive from our project guide Prof. Jayashree Deka.
233 | P a g e
M19-1-2-7-2014
Multidisciplinary Journal of Research in Engineering and Technology, Volume 1, Issue 2, Pg. 223-234
REFERENCES
rd
[1]. Muhammad H. Rashid. Power Electronics Circuits, Devices and Applications. 3 edition. United States of
America: Prentice Hall. 2004.
[2]. http://homepages.which.net/paul.hills/SpeedControl/SpeedControllersBody.html Abu Zaharin Ahmad and Mohd
Nasir Taib. A study On the DC Motor Speed Control by Using Back-EMF Voltage. AsiaSENSE SENSOR, 2003,
pg. 359-364
nd
[3]. Iovine John. PIC Microcontroller Project Book. 2 Edition. Singapore: Mc Graw-Hill. 121-123; 2000.
[4]. Moore, A.W. Phase-Locked Loops for Motor-Speed Control. IEEE Spectrum, April 1973. 61-67.
[5]. www.wikipedia.com
234 | P a g e
M19-1-2-7-2014