DC Motor Control System by Using PIC Microcontroller
DC Motor Control System by Using PIC Microcontroller
DC Motor Control System by Using PIC Microcontroller
1 1
Abstract
DC motor can be designed to rotate in clockwise direction, counter clockwise direction and
bidirectional rotation. The PIC microcontroller receives the instruction and processing is made.
Then it sends signals to clock wise rotation unit, counter clock wise rotation unit, bidirectional
rotation unit and display unit. The direction of rotation is shown simultaneously by both light
emitting diode and liquid crystal display. The required programs are written in Pic BASIC Pro
language in MicroCode Studio software. The programs are complied and downloaded into PIC
16F877A microcontroller and PIC16F84A microcontroller via GTP USB Lite programmer.
Key words: PIC16F84A and PIC16F877A microcontrollers, Pic Basic Pro language.
Introduction
DC motors consist of one set of coils, called armature winding, inside another set of
coils or a set of permanent magnets, called the stator. Applying a voltage to the coils produces
a torque in the armature, resulting in motion. The stator is the stationary which is outside part
of a motor. The stator of a permanent magnet dc motor is composed of two or more permanent
magnet pole pieces. The magnetic field can alternatively be created by an electromagnet. In
this case, a DC coil (field winding) is wound around a magnetic material that forms part of the
stator. The rotor is the inner part which rotates. The rotor is composed of windings (called
armature windings) which are connected to the external circuit through a mechanical
commutator. Both stator and rotor are ferromagnetic materials. The two are separated by air-
gap. A winding is made up of series or parallel connection of coils. Armature winding is the
winding through which the voltage is applied or induced. Field winding is the winding
through which a current is passed to produce flux (for the electromagnet). Windings are
usually made of copper.
PIC Microcontroller
A microcontroller is a single chip computer. Micro suggests that the device is small,
and controller suggests that the device can be used in control applications. A microcontroller
differs from a microprocessor in many ways. The main difference is that a microprocessor
requires several other components for its operation, such as program memory and data
memory, I/O devices and external clock circuit. A microcontroller on the other hand has all
the supported chips that are incorporated inside the same chip. All microcontrollers operate on
a set of instructions (or the user program) stored in their memory. A microcontroller fetches
the instructions from its program memory one by one, decodes these instructions, and then
carries out the required operations. In this work, three dc motor control units are designed and
constructed. They are clock wise rotation unit, counter clock wise rotation unit and
bidirectional rotation unit. These control units are also shown by liquid crystal display unit.
Lecturer, Dr, Department of Physics, Yadanabon University
Lecturer, Dr, Department of Physics, Yadanabon University
Yadanabon University Research Journal, 2019, Vol-10, No.1 2
(GND) of L293D are connected to ground. Pin 3 (1Y) of L293D is connected to one end of
DC motor and pin 6 (2Y) of L293D is also connected to other end of DC motor respectively.
Conclusion
DC motor is widely used in many areas. It can be found in many places such as small
machines to large machines. The basic theory and operation of dc motor can be enhanced by
carrying out this work. The application and control of dc motor are also suggested to be
carried out as further works by using other electronic devices.
Yadanabon University Research Journal, 2019, Vol-10, No.1 5
+ 5V 20 k
10 k
14
+ 12V
100 4
VDD
RESET MCLR
32 11 15 2 3
10 k VDD VDD 33 11 6 1 3
RB 0 DB 4 A VDD V EE RB0
1 34 12 PC817
LED
MCLR RB 1 DB 5 PIC16F84A RED 2 4
LCD
13
RB 2 35 DB 6 2004A 22pF
16 C
RB 3 36 14 DB 7 OSC1
22 pF 5 16 OSC2 E
13 6 4 1 15
OSC 1 RB 4 37 22pF
DC
MOTOR
4 MHz RB 5 38
14 OSC 2 VSS
22 pF 5
VSS VSS
12 31 + 12V
14 8 16
VDD VCC2 VCC1
4 MCLR
BCW
3
1Y
10 k 6 2
14 10k RB0 1A
VDD 6 1 3
4
RB0
PIC16F84A
RESET MCLR 7 7 2A
LED
PC817 BCCW RB1
4 DC
GREEN 2 RA0 L293D MOTOR
8 1
C RB2 1,2EN
PIC16F84A 10k
22pF TIP122
B 22pF 6
16
OSC1 E 2Y
16
4MHz OSC1
DC
OSC2 MOTOR 4MHz
15
22pF VSS GND GND
OSC2
5 15 4 5
22pF VSS
5
Fig.4 Complete circuit diagram of “DC Motor Control System By Using PIC
Microcontroller”
Acknowledgements
We would like to express our gratitude to Dr Maung Maung Naing, Rector, Dr Si Si
Khin, Pro-Rector and Dr Tin Moe Thuzar, Pro-Rector of Yadanabon University for their
suggestion and permission to perform this project work. We would also like to express our
great thanks to Dr Yi Yi Myint, Professor (Head of Department), Dr May Thidar Win,
Professor and all teachers and staffs from Department of Physics, Yadanabon University for
their help and discussion throughout this research work.
References
“Getting Start with PIC Microcontrollers”, Fred Stevens (1997).
"How to use Liquid Crystal Display (LCD)", PIC Microcontroller Course Electronics Training
Center (2004).
“Interfacing PIC Microcontrollers Embedded Design by Interactive Implantation”, Martin
Bates, Elsevier (2006).
“Microchip PIC16F84A Data Sheet, 18-pin Enhanced FLASH/EEPROM 8- bit Microcontroller”,
Microchip Technology Inc:, (2001).
“Microchip PIC16F877A Data Sheet, 40 pin Enhanced FLASH/ EEPROM 8-bit
Microcontroller”, Microchip Technology Inc, (2001).
T. L. Floyd, ninth edition, “Digital Fundamentals”, New Jersey (2006).