0% found this document useful (0 votes)
45 views4 pages

Controlling DC Motor Using Microcontroller (PIC16F72) With PWM

systems

Uploaded by

Akah Precious
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
45 views4 pages

Controlling DC Motor Using Microcontroller (PIC16F72) With PWM

systems

Uploaded by

Akah Precious
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

International Journal of Engineering Research (ISSN : 2319-6890)

Volume No.1, Issue No.2, pp : 45-47 01 Dec. 2012

Controlling DC Motor using Microcontroller (PIC16F72) with PWM

Shruti Shrivastava1, Jageshwar Rawat2, Amit Agrawal3

Department of Electronics and Telecommunication


Takshshila Institute of Engineering and Technology, Jabalpur, MP482001, India
sshrivastava37@gmail.com, jageshrawat@gmail.com, amitagrawal@takshshila.org
Abstract—Motion control plays a vital role in industrial with only 35 single word instructions to learn. All single cycle
atomization. Different types of motors AC, DC, SERVO or instructions except for program branches, which are two-cycle.
stepper are used depending upon the application; of these The Operating speed is DC - 20 MHz clock input DC 200 ns,
DC motors are widely used because of easier controlling. 128 x 8 bytes of Data Memory (RAM).Interrupt capability
Among the different control methods for DC motor Eight-level deep hardware stack Direct, Indirect and Relative
armature voltage control method using pulse width Addressing modes. It has High Sink/Source Current: 25 mA
modulation (PWM) is best one. We can realize the PWM Timer0: 8-bit timer/counter with 8-bit prescaler
using H-bridge built with IGBT switches or transistors. To Timer1:16-bit timer/counter with prescaler, can be
generate PWM signals we use PIC16F72 microcontroller. incremented during SLEEP via external Crystal/clock
Timer2: 8-bit timer/counter with 8-bit period register,
Index Terms—Microcontroller, H-bridge, PWM, DC motor. prescaler and postscaler Capture, Compare, PWM (CCP)
module
INTRODUCTION Capture is 16-bit, max. resolution is 12.5 ns - Compare is 16
Direct current (DC) motor has already become an important bit, max. resolution is 200 ns PWM max. resolution is 10-bit 8-
drive configuration for many applications across a wide range bit, 5-channel analog-to-digital converter Synchronous Serial
of powers and speeds. The ease of control and excellent Port (SSP) with SPI™ (Master/Slave) and I2C™ (Slave)
performance of the DC motors will ensure that the number of Brown-out detection circuitry for Brown-out Reset (BOR)
applications using them will continue grow for the foreseeable
future. This project is mainly concerned on DC motor speed Special Microcontroller Features:
control system by using microcontroller PIC 16F72. It is a  1,000 erase/write cycle FLASH program memory
closed-loop real time control system, where optical encoder typical Power-on Reset (POR), Power-up Timer (PWRT)
(built in this project) is coupled to the motor shaft to provide and Oscillator Start-up Timer (OST)
the feedback speed signal to controller. Pulse Width  Watchdog Timer (WDT) with its own on-chip RC
Modulation (PWM) technique is used where its signal is oscillator for reliable operation
generated in microcontroller. The PWM signal will send to  Programmable code protection Power saving
motor driver to vary the voltage supply to motor to maintain at SLEEP mode Selectable oscillator options
constant speed.  Processor read access to program memory
MICROCONTROLLER (PIC16F72)
A microcontroller (sometimes abbreviated µC, uC or MCU)
is a small computer on a single integrated circuit containing a
processor core, memory, and programmable input/output
peripherals. Program memory in the form of NOR flash or
OTP ROM is also often included on chip, as well as a
typically small amount of RAM. Microcontrollers are
designed for embedded applications. Microcontrollers are
used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical
devices, remote controls, office machines, appliances, power
tools, and other systems. Microcontroller used here is
PIC16F72.
The program memory contains 2K words, which translate 2048 .
instructions, since each 14-bit program memory word is the
same width as each device instruction. The data memory
(RAM) contains 128 bytes. It has high performance RISC CPU
IJER@2012 Page 45
International Journal of Engineering Research (ISSN : 2319-6890)
Volume No.1, Issue No.2, pp : 45-47 01 Dec. 2012
DC MOTOR CONTROL WORKING THEORY OF H- BRIDGE
A DC motor is an electric motor that runs on direct
current (DC) electricity. DC motors were used to run An H bridge is an electronic circuit that enables a voltage
machinery, often eliminating the need for a local steam engine to be applied across a load in either direction. These circuits are
or internal combustion engine. DC motors can operate directly often used in robotics and other applications to allow DC
from rechargeable batteries, providing the motive power for motors to run forwards and backwards.
the first electric vehicles. Today DC motors are still found in
applications as small as toys and disk drives, or in large sizes
to operate steel rolling mills and paper machines. Modern DC
motors are nearly always operated in conjunction with power
electronic devices. It works on the principle of
electromagnetism. A current carrying conductor when placed
in an external magnetic field will experience a force
proportional to the current in the conductor.DC motor speed
controllers are very useful for controlling the motion of robotic
and industrial automation systems.DC motor can provide a
high starting torque and it is also possible to obtain speed
control over wide range. For precise speed control of servo
system, closed-loop control is normally used. The speed, An H bridge is built with four switches (solid-state or
which is sensed by sensing devices, is compared with the mechanical). When the switches S1 and S4 (according to the
reference speed to generate the error signal and to vary the first figure) are closed (and S2 and S3 are open) a positive
armature voltage of the motor. There are several controllers voltage will be applied across the motor. By opening S1 and S4
that can used to control the speed of the motor such as by switches and closing S2 and S3 switches, this voltage is
using thyristor, phase-locked-loop control, chopper circuit, reversed, allowing reverse operation of the motor.
Fuzzy Logic Controller and etc. Here, we will use PWM
technique.

DIRECTION CONTROL OF DC MOTOR


There are two magnetic fields produced in the motor. One
magnetic field is produced by the permanent magnets and the
other magnetic field is produced by the electrical current
flowing in the motor windings. These two fields result in a
torque which tends to rotate the rotor. As the rotor turns, the
current in the windings is commutated to produce a continuous
Torque output this makes the motor to run. Direction control
of a DC motor is very simple; just reverse the polarity, means
every DC motor has two terminals out. When we apply DC Table for working of H-bridge-
voltage with proper current to a motor, it rotates in a particular
direction but when we reverse the connection of voltage S4 S3 S2 S1 Operation performed
between two terminals, motor rotates in another direction. 1 0 0 1 Motor moves right
0 1 1 0 Motor moves left
0 0 0 0 Motor free runs
0 1 0 1 Motor brakes
1 0 1 0 Motor brakes

A full bridge circuit is shown in the diagram below. Each side


of the motor can be connected either to battery positive, or to
battery negative.

IJER@2012 Page 46
International Journal of Engineering Research (ISSN : 2319-6890)
Volume No.1, Issue No.2, pp : 45-47 01 Dec. 2012
A constant +5 volt supply is given to the microcontroller
when the power supply is fed to the microcontroller it generates
an appropriate PWM signal. The reference sped is given as the
input to the microcontroller. Digital output of the
microcontroller makes the transistors on, the transistor bridge
would regulate the speed of the dc motor .the required speed
can be obtained by varying the duty cycle.

CONCLUSION
. With the very basic concept of PWM and H-bridge the
To make the motor go forwards, Q4 is turned on, and Q1 direction and the speed of the motor can be controlled. It is
has the PWM signal applied to it. Meanwhile, to make the practical one and highly feasible according to economic point
motor go backwards, Q3 is turned on, and Q2 has the PWM of view, reliability and accuracy. It is programmable one
signal applied to it. therefore it can control various motors.

CONTROLLING DC WITH PWM ACKNOWLEDGEMENT


PWM is an effective method for adjusting the amount of power We are thankful to RGPV,bhopal and takshshila institute of
delivered to the load. PWM technique allows smooth speed engineering and technology for there valuable support during
variation without reducing the starting torque and eliminates my work.I would also like to thank prof Amit Agrawal for
harmonics. In PWM method, operating power to the motors is there valuable suggestions.
turned on and off to modulate the current to the motor. The
ratio of on to off time is called as duty cycle. The duty cycle REFERENCES
determines the speed of the motor. The desired speed can be [1] Ali, Y.S.E. , Putra Malaysia, Selangor, Malaysia ;Noor, S.B.M. ; Bashi,
S.M. ; Hassan, M.K. ; “Microcontroller performance for DC motor speed
obtained by changing the duty cycle. The Pulse-Width-
control system”; In the Proceedings of National Power Engineering
Modulation (PWM) in microcontroller is used to control duty Conference, 2003. PEC, 2003; 15-16 Dec. 2003; pp 104 - 109.
cycle of DC motor drive. [2] Ettomi, Y.S. Dept. of Electr. & Electron. Eng., Putra Malaysia Univ.,
PWM is an entirely different approach to controlling the speed Malaysia Moor, S.B.M. ; Bashi, S.M. ; Hassan, M.K.; ”Micro controller
based adjustable closed-loop dc motor speed controller”; In the Proceedings of
of a DC motor. Power is supplied to the motor in square wave
Student Conference In the Proceedings of Student Conference on Research
of constant voltage but varying pulse-width or duty cycle. and Development, 2003; 25-26 Aug. 2003.pp 59 – 63.
Duty cycle refers to the percentage of one cycle during which [3]Khoel,A, Hadidi, KH.; “Microprocessor based closed loop speed controller
duty cycle of a continuous train of pulses. Since the frequency based D.C. motor using power MOSFET”; In the Proceeding of third IEEE
international conference on electronics, circuits, and systems, 1996. ICECS
is held constant while the on-off time is varied, the duty cycle
'96,pp 1247 - 1250 vol.2.
of PWM is determined by the pulse width. Thus the power [4]Ettomi,Y.S.,Moor,S.B.M.,BashiS.M.,Hassan M.K. ;”Microcontroller based
increases duty cycle in PWM. adjustable closed-loop DC motor speed controller” In the proceeding of
CIRCUIT DIAGRAM research and development 2003 student conference, 2003.pp 59-63
[5]Microprocessors And Interfacing (Programming & Hardware)-
douglasv.Hall
[6] Todd D Morton,Embedded microelectronics, (Prentice Hall Inc. New
Delhi India), 2001.
[7] PIC Microcontrollers ,Milan Verle ,mikroelektronika; 1st edition (2008)
[8] Maizidi Ali, Mekinly Rolin D & Carsey Denny , “Microcontroller &
Embedded System”, Pearson Education, 2nd Edition.
[9] Mazidi Jarice & Maizidi Gillirp, “Advanced Microcontroller
Application”,Pearson Education, 2nd Edition.
[10] http://www.parallax.com
[11]1000projects.org/8085-microprocessor-seminar-report-for-ece-
students.html
[12]PIC16F72 datasheet
www.microchip.com/downloads/en/devicedoc/39597c.pdf
[13] electronics4u.com
[14] Wikipedia.com

IJER@2012 Page 47
International Journal of Engineering Research (ISSN : 2319-6890)
Volume No.1, Issue No.2, pp : 45-47 01 Dec. 2012

IJER@2012 Page 48

You might also like