Speed Control of DC Motor Using Microcontroller

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

Journal of Network Communications and Emerging Technologies (JNCET) www.jncet.

org
Volume 7, Issue 3, March (2017)

Speed Control of DC Motor Using Microcontroller


Prathmesh A. Askar
EE Department, PCE Nagpur, India.

Piyush P. Naphade
EE Department, PCE Nagpur, India.

Ajaykumar R. Jupaka
EE Department, PCE Nagpur, India.

Rahul V. Adle
EE Department, Assistant Professor, PCE Nagpur, India.

Abstract – This paper presents speed control of DC motor using microcontroller is as shown in Figure 1. The MAX 232 which
an 8051 series microcontroller. The speed of DC motor is directly is used to insert the program in the microcontroller 89C51 by
proportional to the voltage applied across its terminals. Hence, if using computer.
voltage across motor terminal is varied, then speed can also be
varied. This paper uses the above principle to control the speed of
the motor by varying the duty cycle of the pulse applied to it. The
paper uses two input buttons interfaced to the microcontroller,
which are used to control the speed of motor. PWM (Pulse Width
Modulation) is generated at the output by the microcontroller as
per the program. The program can be written in assembly
language or in embedded C. The average voltage given or the
average current flowing through the motor will change depending
on the duty cycle (ON and OFF time of the pulses), so the speed of
the motor will change. A motor driver IC is interfaced to the
microcontroller for receiving PWM signals and delivering desired
output for speed control of a small DC motor.
Index Terms – DC motor, 16×2 LCD, microcontroller, motor
driver IC L293D.
1. INTRODUCTION
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. It is important to make a
controller to control the speed of DC motor in desired speed.
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. DC motors are suitable for belt-driven applications
and the applications where great amount of torque is required.
In train and automotive traction, fuel pump control, electronic
steering control, engine control and electric vehicle control are
good examples of these. In aerospace, there are a number of
applications, like centrifuges, pumps, robotic arm controls,
gyroscope controls and so on. For precise speed control of
servo system, closed-loop control is normally used. Basically, Fig.1: Block diagram of the speed control.
the block diagram of the speed control of DC motor using

ISSN: 2395-5317 ©EverScience Publications 12


Journal of Network Communications and Emerging Technologies (JNCET) www.jncet.org
Volume 7, Issue 3, March (2017)

2. METHODOLOGY
Following sub topics are covered in methodology:
 Pulse Width Modulation
 power supply
 motor driver
 Microcontroller
 LCD display
2.1 Pulse Width Modulation:
Pulse width modulation (PWM) is a method for binary signals Fig.2. Wave form at different duty cycles
generation, which has two signal periods (high and low). The 2.2 power supply:
width of each pulse varies between 0 and the period (T). The
main principle is control of power by varying the duty cycle. Power supply is the main part of the system. The electronic
Here the conduction time to the load is control of power by system requires DC supply for operation. Here step down
varying the duty cycle. Here the conduction time to the load is transformer which is used for step down 230V AC supply into
controlled. Let for a time t1, the input voltage appears across 12V DC supply. After that full wave bridge rectifier is used to
the load i.e. ON state and for t2 time the voltage across the load convert from AC to DC. Figure 3 is circuit diagram
is zero. conversion process of power supply. During the positive half-
cycle of voltage, diodes D2 and D4 are conducting and diodes
 The duty cycle can be varied from 0 to 1 by varying t 1, T D1 and D3 are reverse bias. Therefore, current flows through
or f. Therefore, the output voltage V0 can be varied from the winding, diode D2, load and diode D4. During negative
0 to Vs by controlling k, and the power flow can be half-cycles of voltage, diodes D1 and D3 conduct, and diodes
controlled. D2 and D4 are reverse bias, therefore current flow through
diode D3, D1 and load. In each condition the current flow in
 As the time t1 changes the width of pulse is varied and
the same direction.
this type of control is called pulse width modulation
(PWM) control.
For better understanding of PWM these diagrammatic
representations can be use. Figure 2 represent the waveforms
obtained as output at different voltage requirements.
High speed signal (90%): The shaded part of the signal
represents the ON time and the part of it represents time when
it is not receiving any voltage.

Fig.3. Circuit diagram of power supply


2.3 Motor driver:
L293D is a dual H-bridge motor driver integrated circuit (IC).
In its common mode of operation, two DC motors can be driven
simultaneously, both in forward and reverse direction. L293D
has two set of arrangements where one set has input 1, input 2,
output 1 and output 2 and other set has input 3, input 4, output
3 and output 4, according to above figure 4.

ISSN: 2395-5317 ©EverScience Publications 13


Journal of Network Communications and Emerging Technologies (JNCET) www.jncet.org
Volume 7, Issue 3, March (2017)

 If pin no 2 and 7 are high then pin no 3 and 6 are also high.  Pin No. 20 is grounded
If enable 1 and pin number 2 are high leaving pin number
 Pin No. 40 connected to 5V supply
7 as low then the motor rotates in forward direction.
Features of 89C51
 4k ROM (EPROM)
 128 byte RAM
 Universal asynchronous receive-transmit (UART)
 32 input-output port lines
 Two, 16-bit timer/counters
 Six interrupt sources and
 On-chip clock oscillator and power on reset circuitry.

Fig.4.Schematic diagram of motor driver IC L293D


2.4 Microcontroller:
The 89C51 has been specifically developed for control
applications. As mentioned earlier, out of the 128 bytes of
internal RAM, 16 bytes have been organized in such a way that
all the 128 bits associated with this group may be accessed bit
wise to facilitate their use for bit set/reset/test applications.
These are therefore extremely useful for programs involving
individual logical operations. One can easily give example of
lift for one such application where each one of the floors, door
condition, etc may be depicted by a single hit. The 89C51 has
Fig.5.Schematic diagram of 89C51
instructions for bit manipulation and testing. Apart from these,
it has 8-bit multiply and divide instructions, which may be used 2.5 LCD Display:
with advantage.
A general purpose alphanumeric LCD, with two lines of 16
The pins of 89C51 are wired as: characters.
 Pins from port 2 i.e., P2.0 (21) to P2.7 (28) to LCD LCDs with a small number of segments, such as those used in
data pins. digital watches and pocket calculators, have a single electrical
contact for each segment. An external dedicated circuit
 Pins from port 3 i.e., P3.0 (10) to P3.2 (12) to LCD
supplies an electric charge to control each segment. This
control pins.
display structure is unwieldy for more than a few display
 XTAL 1 (19) and XTAL 2 (18) to crystal elements.
 Pins from port 3 i.e., P3.3 (13) to P3.5 (15) to The "R/S" bit is used to select whether data or an instruction is
Keyboard being transferred between the microcontroller and the LCD. If
the Bit is set, then the byte at the current LCD "Cursor" Position
 Pins from port 3 i.e., P3.6 (16) to Motor Driver IC
can be read or written. When the Bit is reset, either an
L293d
instruction is being sent to the LCD or the execution status of
 Pins No.9 is reset pin the last instruction is read back.

ISSN: 2395-5317 ©EverScience Publications 14


Journal of Network Communications and Emerging Technologies (JNCET) www.jncet.org
Volume 7, Issue 3, March (2017)

We will discuss how a 16×2 LCD is interface with AT89C51.


LCD 16×2 is used as output by the controller to display data to
user. The 16×2 LCD display have 16 number of data can be
written on 2 lines.
The pins are wired as:

Pins Pin description of LCD

1 Ground

2 Vcc

3 Contrast Voltage
Fig.8.Final schematic circuit with motor and all component
4 "R/S" _Instruction/Register Select combination

5 "R/W" _Read/Write LCD Registers In figure no. 8 bimetallic type thermostat is used with
combination of relay only for protect motor from overheating.
6 "E" Clock Separate step down transformer 230/18 volt which is used here
for driving the motor.
7 - 14 Data I/O Pins 4. RESULTS AND DISCUSSIONS
In fig 9 as the PWM changes the speed of the DC motor is
changes. Hence speed of the DC motor is controlled by PWM
technique.

3000
speed (RPM)

2000

1000

0
60%
10%
20%
30%
40%
50%

70%
80%
90%
100%
Fig.6.Schematic diagram of LCD interface with 89C51
3. HARDWARE PWM

Below figure 7 shows the connection of power supply in which


diode bridge rectifier with filter is used. Power supply converts Fig.9. PWM in % vs. speed
the AC supply into the pure form of DC supply with the help 5. CONCLUSION
of filter.
It is quite clear from the above discussion that Speed Control
of DC motor using microcontroller by using PWM may be a
comprehensive system that controls the speed of a motor by
giving instructions to the microcontroller to reduce the manual
work. The technology saves money too and gives a return on
investment.
Finally we conclude that this method is one of the best
methods for controlling the speed of the DC motor.
6. FUTURE SCOPE
Fig.7.Connection of power supply on PCB
1. Speed control of DC motor by using microcontroller can deal
Above figure 6 shows the LCD interface with microcontroller with robotics while moving their arms and joints. We can move
89C51. their arms in whatever directions we want to move it. By just

ISSN: 2395-5317 ©EverScience Publications 15


Journal of Network Communications and Emerging Technologies (JNCET) www.jncet.org
Volume 7, Issue 3, March (2017)

changing the power supply connections in the circuit we can International Journal of Scientific and Research Publications, Volume
2, Issue 6, June 2012.
move the arms of a robot in any direction. This will become the
[4] Ajay P. Thakare,Member IEEE,Member ISTE2 Department of
more important technique used in robotics and plays a Instrumentation and control, SCET, Surat1, Department of Electronics
prominent role in their movement. Engineering, SIPNA, Amravati, Vol. 1 Issue 9, November- 2012.
[5] Muhammad H. Rashid, ‘‘Power Electronics Circuits, Devices, and
2. Within no time this will shows their importance in the Applications,” Prentice Hall, 3rd edition, 2003.
industrial area by using this technique with changes in the [6] Muhammad H. Rashid Power Electronics Circuits, Devices and
circuit diagram. Applications 3rd edition. United States of America: Prentice Hall 2004.
[7] Christopher A. Adkins and Michael A. Marra, modeling of a Phase-
3. DC motors are widely used in industry because of its low Locked Loop Servo Controller with Encoder Feedback. IEEE
Spectrum, August 1999.
cost, wide range of speed and torque, less complex control [8] Moore, A.W. Phase-Locked Loops for Motor-Speed Control, IEEE
structure so better future of this project. Spectrum, 1993, pp.61-67.
[9] P. C. Sen and M. L. MacDonald. Thyristorized DC Drives with
REFERENCES regenerative braking and Speed Reversal. IEEE Transactions on energy
[1] Remya Ravindran, Arun Kumar,” A DC Motor Speed Controller using conversion, 1978, Vol. IECI - 25, no. 4:347-354.
LABVIEW and Visual Basic”, IJECT Vol. 3, Issue 1, Jan. - March [10] Abu Zaharin Ahmad and Mohd Nasir Taib. A study on the DC Motor
2012. speed control by using back-EMF voltage asia SENSE SENSOR,
[2] N. Milivojevic, Mahesh Krishnamurthy and Yusuf Gurkaynak, Stability 2003.,359-364.
Analysis of FPGA- Based Control of Brushless DC Motors and [11] Iovine John. PIC Microcontroller Project Book. 2nd edition. Singapore:
Generators Using Digital PWM Technique”, IEEE Transactions on McGraw-Hill.
Industrial Electronics, Vol. 59, no. 1, January 2012. [12] Sjhinskey, FG.Process control systems. 2ndEdition, Singapore:
[3] Rohit Gupta, Ruchika Lamba and Subhransu Padhee, ”Thyristor Based McGraw-Hill Book Company, 2003.
Speed Control Techniques of DC Motor: A Comparative Analysis”,

ISSN: 2395-5317 ©EverScience Publications 16

You might also like