You are on page 1of 4

2015 International Conference on Fluid Power and Mechatronics

Design and Simulation of PWM DC Motor Speed


Regulator Based on Proteus

Jie Sun Qinfang Sun


Tianjin University of Technology Tianjin University of Technology
School of Management School of Computer and Communication Engineering
Tianjin, China Tianjin, China
syuan323@163.com 394232412@qq.com

Abstract—This design uses Proteus software to design and motor (load), pause, continuous, and other functions [2]. The
simulate for the DC motor PWM speed regulator and get the DC motor system designed by the oscillator and clock circuit
main control of the motor. This article is designed primarily to module, input module, control module, display module, and
achieve DC motor PWM governor of forward, reverse, speed up, DC motor PWM control implementation module. Oscillator
slow down, stop and other operations. And it also includes and clock module is mainly composed of 80C51 and some
simulation of the circuit and program design. To realize the capacitor, and crystal vibration. Design input module is mainly
microcomputer control system, the core part of the entire control realized by interruption of independent type keyboard. Design
circuit in the design is the use of 80C51. In order to achieve control module is mainly composed of 80C51 external interrupt
realistic and accurate measurement of motor parameters, it is
extend circuit. Design and display module includes liquid
equipped with all kinds of display module, drive module. The
overall system is composed of the command module, the
crystal display parts and LED digital display. DC motor PWM
photoelectric isolation module and the H module. In the design, control implementation module [3] is mainly composed of
the pulse width modulation technique (PWM) is used to change some of diode, motor, base and L298 DC motor driver module.
the speed of the motor by changing the duty ratio of PWM. In
the design of the overall framework, the integrated circuit
III. THE HARDWARE CIRCUIT DESIGN
module can simplify the hardware circuit, and improve the The basic hardware circuit of DC motor PWM speed
stability and reliability of the overall system, thereby improving regulation design is mainly composed of single chip
overall system performance through the use of a large degree. microcomputer of the entire control module, L298 motor driver
module, LED display module, independent keyboard control
Keywords—DC motor; PWM speed control; proteus simulation; module, clock module, and reset circuit module.
80C51 single chip microcomputer; speed control system
A. The Whole Control Module of Single Chip Microcomputer
I. INTRODUCTION It can send PWM pulse wave automatically by setting
In recent years, with the progress of science and technology, single chip microcomputer initialization, and change the size of
power electronic technology has been developed rapidly; the the average voltage through changing the DC motor armature
application of DC motor is more and more widely. It has good voltage duty ratios at the same time, in order to control the
characteristics of speed control, speed smooth, convenient, and speed of the motor [4].
wide range of speed regulation. Overload capacity can
withstand the impact of frequent load, and realize step less B. L298 Motor Driver Module
frequent fast starting, braking and reverse. In order to meet the L298 is a monolithic with 15 pins. It has high voltage, high
operating requirements of various special production process current and four-channel driver. It can be used to realize the
automation systems, the DC motor speed regulation is put reception of DTL L298 or TTL logic level. Because the L298
forward higher request. The technology to change the armature is double H high voltage large current power integrated circuit,
loop resistance speed adjustment or change the armature it can use the L logic level control directly, so can be used to
voltage adjusting speed cannot meet the requirements, then drive the relay, DC motors, stepping motors and other
through the PWM control of DC motor speed control methods inductive loads.
emerge when the times require [1]. In addition, you can drive switch power transistor [5]. Its
II. RESERACH DESIGN interior also includes four-channel logic driving circuit, its
rated current of 1A, and can reach 1.5A. VSS minimum
The function of the DC motor PWM control system mainly voltage is 4.5V, and up to 36V.The maximum voltage VS is
includes: to realize the acceleration and deceleration of DC also 36V. L298 can control the motor circuit directly, and
motor and the forward and inversion of the motor, to realize the isolation is not required.
motor speed adjustment, and to read out the motor speed
conveniently at the same time, finally achieve the motor
intelligent control. This also includes direct reset, start the DC

978-1-4799-8770-2/15/$31.00 ©2015 IEEE  August 5-7, 2015


Harbin, China
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on June 18,2021 at 12:21:37 UTC from IEEE Xplore. Restrictions apply.
SCM system [7]. Clock circuit is shown in Figure 4. The
number of the two capacitances in circuit is usually set about
30pF.

XTAL1

Fig. 1. L298 internal structure.

Because the motor has a great sensibility, the current cannot XTAL2
be mutated, and if the current is suddenly cut off, it will
produce a higher voltage power tube ends, resulting in damage
to the device. So we applied to the diode in the driver circuit to
protect the freewheeling L298 chip. This circuit mainly uses Fig. 4. The clock module
diode unidirectional continuity. This freewheeling circuit
diagram is shown in Figure 2. F. Reset the Module
VS
Reset is the initialization of microcontroller, and the main
function is to initialize the PC to 0000H. It is the
D1 D2
M1 microcontroller to begin program execution from location
+ M
0000H. In addition, if encounter run error or improper
D3 D4 operation when the system is in a deadlock, in order to bail out,
Y1 also need to reset button to restart.
Y2

RESET
Fig. 2. Continued flow circuit diagram.

C. Continued Flow Circuit Diagram RESET

The circuit design of the display module is mainly used


LED, light-emitting diode, and it is a semiconductor device of
solid-state that can converse electricity into light directly [6].
Fig. 5. Reset the module.
D. Independent Keyboard Control Module
By detecting the level of the state of the input lines to IV. SOFTWARE DESIGN
quickly determine which key was pressed. Stand-button circuit
A. Main Program Design
design has flexible configuration, and simple control features.
The main system is mainly to complete the initialization,
set the timer constant and interrupts the program [8]. The main
program is in a status of continuous cycle waiting and interrupt.
ORG 0000H
AJMP START
ORG 0003H
LJMP INT0
ORG 000BH
LJMP ITT0
ORG 0030H ; System initialization
 START: MOV SP, #60H ; Initial value
Fig. 3. The expansion method of the external interrupts.
MOV R0, #00H ; Give R0 value 0
E. The Clock Circuit Module MOV R1, #00H ; Give R1 value 0
Because the functional components of the microcontroller CLR P1.5 ; Set 0
are up and running benchmarked against clock control signal,
and conduct the work orderly, the frequency of the clock will CLR P1.6 ; Set 0
affect the speed of the SCM system directly, and the quality of CLR P1.7 ; Set 0
the clock circuit will also directly affect the stability of the



Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on June 18,2021 at 12:21:37 UTC from IEEE Xplore. Restrictions apply.
MOV TMOD, #01H ; Write the control word BB: MOV A, R0
MOV TL0, #0FFH ; Set time constant SUBB A, #25
MOV TH0, #0FFH MOV R0, A
SETB EA ; Allow the interrupt AJMP CC
SETB EX0 ; Allow the external interrupt 0 CC: MOV A, R0 ; Digital number
SETB ET0 ; Allow TL0 interrupt MOV B, #25
CLR IT0 DIV AB
SETB TR0 ; Start the TL0 MOV B, #10
B. Function Program Design DIV AB
After the interruption, the corresponding function is MOV 40H, A
acceleration, deceleration, forward, reverse, suspension and
other key programs. This section of the program code is [8]: MOV 41H, B
ITT0: CPL P1.5 ; P1.5 mouth invert SETB EX0
JNB P1.5, Z1 LCALL TTS ; Call delay
MOV A, #0FFH ; Low level timing LCALL TTS ; Call delay
SUBB A, R0 LCALL TTS ; Call delay
MOV TH0, A LCALL TTS ; Call delay
SETB TR0 ; Start the TL0 RETI
RETI FF: SETB P1.6 ; Motor back pass
Z1:MOV TH0, R0 ; High level timing CLR P1.7
SETB TR0 LCALL TTS
RETI LCALL TTS
INT0:CLR EX0 ; Keyboard control LCALL TTS
MOV A, #0FFH SETB EX0
MOV P2, A RETI
MOV A, P2 ZZ:CLR P1.6 ; Motor forward
JNB ACC.0, JIA SETB P1.7
JNB ACC.1, JIAN LCALL TTS
JNB ACC.2, FF LCALL TTS
JNB ACC.3, ZZ LCALL TTS
JNB ACC.4, TZ SETB EX0
AJMP CC RETI
JIA: CJNE R0, #0FFH,AA ; Motor acceleration TZ: CLR P1.6 ; Achieve motor stop
AJMP CC CLR P1.7
AA: MOV A, R0 LCALL TTS
ADD A, #25 LCALL TTS
MOV R0, A LCALL TTS
AJMP CC SETB EX0
JIAN: CJNE R0, #00, BB ; Motor reduction RETI
AJMP CC TTS: MOV R3, #0E0H ; Delay subroutine



Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on June 18,2021 at 12:21:37 UTC from IEEE Xplore. Restrictions apply.
TT1S: MOV R4, #40H
TT0S: DJNZ R4, TT0S
DJNZ R3, TT1S
RET
END
V. SYSTEM FUNCTION DEBUGGING
A. Debugging Software
Proteus software is a kind of low investment electronic
design automation software. It can realize the circuit design
and simulation, and it is a complete simulation platform of
embedded software and hardware. The ISIS module is mainly
used to complete the circuit diagram of the layout and Fig. 7. The whole simulation circuit diagram.
simulation, which is different from other software advantage. It
can simulate a large number of single-chip microcomputer and C. Analysis of the Simulation Results of the System
microcontroller peripheral circuit. By using the Proteus When the simulation starts, each module is in the initial
software, we can easily obtain a full-featured, easy to use state. The level of both ends of the H Bridge is low, and the
microcontroller laboratory [9]. motor is stopped. When the acceleration or deceleration of the
KeilC51 software is also one of the outstanding MCU independent keyboard is pressed, the display module begins to
development software which is set to edit, compile, simulation display the numbers. If you click on the positive or reverse
in one integrated development and debugging tools, and it rotation, the direction of rotation of the motor will be changed.
supports the assembler, C language, PLM language of design, Motor drive module can achieve the motor reversing,
and all Windows interface. It is user-friendly and easy to learn acceleration and deceleration, stop and other operations. And
and use [10]. when the duty cycle of the PWM pulse is changed, the
operating voltage of the motor will be changed. From this, we
When the circuit design is complete, in order to reduce the can see from the simulation results that the design can achieve
difficulty of debugging the board, and to ensure the accuracy of the expected results of the simulation.
circuit design, the .HEX that compiles the generated from
KeilC51 will be file loaded into Proteus software, realizing REFERENCES
circuit simulation. [1] Liu Fahui, Yang Jumei, Application of Keil+PROTEUS in the
experiment of single chip microcomputer, Journal of Jiangxi Vocational
B. Simulation of DC Motor PWM Speed Regulation Function and Technical College of Electricity, vol. A23 (01), pp. 43-45,2010.
[2] Ayala K J, Eighty Fifty-One Microcontroller: Architecture,
Programming, and Applications, West Publishing Co., 1991.
[3] Xie Weicheng, Principle and application of single-chip microcomputer
and C51 programming, Beijing: Tsinghua University press, 2006, pp.34-
37.
[4] Zhou Runjing, Zhang Lina, Design and Simulation of circuit and
microcontroller system based on PROTEUS, Beijing: Beijing Aerospace
Press, 2006, pp.74-79.
[5] Jiang He, PIC16 MCU series microcontroller C programming and
PROTEUS simulation, Beijing: Beijing aeronautics and astronautics
press, 2010, pp.16-17.
[6] Chen ping, Based on PROTEUS AVR single chip C language program
design and simulation of micro, Beijing electronic industry press, 2011,
pp.34-36.
[7] Fang Li, DC motor control system design based on single chip
 microcomputer, Machinery manufacturing and automation, vol. 6, pp.
175-177, 2011.
Fig. 6. Motor simulation diagram.
[8] Zhao Yuandong, and Fang Yuan, and Liang Luyang, C language
environment of DC motor speed control system based on single chip
microcomputer, The design and implementation of computer and
modern, vol. 4, pp. 45-47, 2012.
[9] Yang Xuecun, Yang Zhanshe, Kong Linghong, Based on ARM
embedded DC motor PWM speed control system design, Coal mining
machinery, vol. 4, pp. 255-257, 2012.
[10] Jiang Shiming, Single-chip computer application technology based on
Proteus, Beijing: electronic industry press, 2009, pp.14-15.



Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on June 18,2021 at 12:21:37 UTC from IEEE Xplore. Restrictions apply.

You might also like