Send Orders for Reprints to reprints@benthamscience.ae 1044 The Open Automation and Control Systems Journal, 2015, 7, 1044-1050 Design of the Control System for Step Motor Based on MCU Open Access Liu Honge * Qingdao Huanghai University, Qingdao City, Shandong Province, 266427, P.R. China Abstract: A control system for step motor based on 8051 MCU is designed in this paper. The pulse signal is produced by the MCU. The step motor is driven by the ring points circuit and the power amplification circuit. The instruction is entered by the matrix keyboard, and the rotational speed of the step motor is shown on the nixie tube. Prepared by applying SCM control procedures and building control circuit, it is convenient to control the movement of the stepper motor. Keywords: Step motor, MCU, Control system, Ring points circuit. 1. INTRODUCTION Stepper motor is a kind of electromagnetic actuators which can convert digital input pulse into rotation or linear. For each drive pulse input, step motor shaft steps into a pitch Angle increment and general motor rotation Angle is proportional to the number of input pulses [1-3]. Compared with the DC motor and AC motor, the step motor has many advantages. For example, it can be started quickly, has high positioning accuracy and low rotor inertia, reverse braking, displacement and number corresponding to the input pulse, few position error and short-term accumulation, and so on. So the step motor is a kind of commonly used components of control system [4-6]. To further understand the motion characteristics of stepper motor, familiar with its control process, this article designs the stepper motor control system which is based on 8051 MCU. It can be convenient to control the stepper motor under the control circuit and the motor control program which is established through the application of MCU. 2. HARDWARE DESIGN OF CONTROL SYSTEM In view of the mechanical equipment the control system is developed based on the commonly used motor of threephase stepper. System block diagram is shown in Fig. (1). This system is mainly composed of hardware circuit and the control program. The hardware circuit includes power supply circuit and control circuit. Power supply circuit provides the control voltage which is required by each element in control system and step motor driving voltage. Control circuit mainly includes microcontroller circuit, ring circuit, power amplifier circuit, display circuit and keyboard interface. MCU communicates with 8279 chip microcontroller and sends control information to the ring circuit which is used for controlling the stepper motor s speed and direction. *Address correspondence to this author at the Qingdao Huanghai University, Qingdao City, Shandong Province, 266427, P.R. China; Tel: 13793260578; E-mail: e-123618@163.com 2.1. Design of the Power Circuit The design of the power supply circuit is shown in Fig. (2). This circuit is mainly composed of transformer, rectifier bridge, capacitance, three-terminal voltage regulator integrated block, etc. The input terminal of the transformer transfers 220V alternating current and the DC which after rectifying filtering were sent to the input end of the threeterminal voltage regulator blocks 7812 and 7805. In the output of three-terminal voltage regulator block we will get the DC of 12V and 5V which is used for step motor and MCU. 2.2. Design of the MCU Circuit ATMEL Company's AT89S52 MCU internal contains high-performance CMOS 8-bit microcontroller. The single chip microcomputer has been widely used in industrial production because it has so many advantages like low power consumption, good compatibility, system stability and cheaper [7, 8]. The design circuit of single chip microcomputer is shown in Fig. (3). In order to make the single chip microcomputer work normally, crystals circuit and reset circuit are designed. 2.3. Design of Ring Points Circuit The stepping motor s each phase winding is according to certain rhythm to work after they are powered on. So the control pulse must be allocated to each phase with the rules of electricity. The circuit is called pulse distributor which completes the function of pulse distribution and is also known as the circular allocator. Circular distributor consists of stepper motor control winding number (number) and your work style. Fig. (4) is the circuit principle diagram for the design of three-phase six film which has the function of positive & negative annular divider. In the circuit principle diagram Q1, Q2 and Q3 are the three triggers of three-phase of A, B, C and control with three OR gate respectively, formed three-phase six circular allocator. A, B, C are the output ends of the end of corresponding triggers high level which is 1 and it is said electric motor winding. Low level is 0 and it is said motor winding is cut off. 1874-4443/15 2015 Bentham Open
Design of the Control System for Step Motor Based on MCU The Open Automation and Control Systems Journal, 2015, Volume 7 1045 Fig. (1). Block diagram of stepper motor control system. Fig. (2). Principle diagram of power supply circuit.
1046 The Open Automation and Control Systems Journal, 2015, Volume 7 Liu Honge Fig. (3). Microcontroller circuit. Fig. (4). Schematic diagram of allocator. The working process of the circular distributor is as follows: in prefabrication side plus the pulse before the CP pulse has not yet arrived, set "1" to Q1 while Q2 and Q3 are 0. At this point, the circular distributor of prefabricated state is set (or reset) for 100 and it is the initial state. Because A port is 1 when put into a positive pulse on the CP end, B and C will be set 0. According to the logical principle of D flip-flop only trigger Q2 and A, C end are still to keep the original state unchanged and the B comprised "0" to "1". Circular allocator is state from 100 to 110. The circular allocator becomes another state when CP port into the second pulse, only triggers Q1, comprised A "1" to "0" it also called 010 form. Similarly, when CP client accepts the 3, 4, 5, 6 pulse, the state of the annular distributor successively chang-
Design of the Control System for Step Motor Based on MCU The Open Automation and Control Systems Journal, 2015, Volume 7 1047 Fig. (5). The principle diagram of ring circuit. Fig. (6). Computer simulation of the ring circuit diagram. es into 011, 001, 101, 001. It is a circulation. The second cycle begins with the seventh pulse start. The circuit is designed according to the working process which is shown in Fig. (5). It can be seen from Fig. (5) that ring points circuit is composed of 2 pieces of 74LS74 and one piece of 74 LS32, two pieces of 74 LS08 and peripheral independent components. Ring of circuit simulation waveform is shown in Fig. (6) and the pulse for pulse signal from the single chip microcomputer, AP, BP, CP are the three-phase signals generated from the circular distributor respectively. 2.4. Design of the Power Amplifier Circuit The stepper motor which is used in this article has three phases. As shown in Fig. (7), it can be seen that for each phase, the power amplifier circuit has been designed. In this circuit L1 is motor winding and T401 is power amplifier switching components and e is it s control site which is connected with the microcontroller pulse output, a and b are VDD and GND, respectively. The resistance R401 can reduce power amplifier circuit time constant, thus reducing the circuit of current increase and decrease of transition time. The capacitance C401 is speed-up capacitor whose voltage
1048 The Open Automation and Control Systems Journal, 2015, Volume 7 Liu Honge Fig. (7). Amplifier circuit of motor single-phase power. Fig. (8). Keyboard interface and display circuit. can t undergo mutations, so that in the conduction of the instantaneous voltage all signals that landed during the winding made the current rise faster. The diode D401 and resistance R402 are picked up at opposite ends of the winding which are in parallel. They also have the function to provide consumption path for producing inductive electromotive force when VMOS tube shuts off momentarily [9]. 2.5. Design of Keyboard Interface and Display Circuit The 8279 chip is a programmable keyboard and displays interface chip which has the function of keystroke handling and automatic display [10, 11]. It is also used widely in the system of MCU. 8279 chip is selected to communicate with MCU in this paper. It used the matrix keyboard to input instructions. It displays the stepper motor speed on the four digital tubes. Fig. (8) shows us the keyboard interface and display circuit. Fig. (9) is the photo of the control circuit which hind leg is spliced into the motor. 3. THE PREPARATION OF THE MCU S CONTROL PROGRAM In order to reduce the single chip microcomputer of storage space and improve the execution speed, we can use assemble language compiled to the single-chip microcomputer
Design of the Control System for Step Motor Based on MCU The Open Automation and Control Systems Journal, 2015, Volume 7 1049 Fig. (9). The control circuit of stepper motor after mounted. control procedures. The control procedures are composed of the main program, keyboard scanning and display subroutine, ten-two conversion subroutine, pulse generated subroutines and delay subroutine. The keyboard scanning and display subroutine is mainly used to drive 8279 chip keyboard scanning and control digital tube display. The ten-two conversion subroutine is used to display the value of the corresponding which is replaced by the speed of the stepper motor. Pulse generated subroutines can produce the instructions which is required for the stepper motor rotation. And the delay subroutine is used to delay for some time. The main program of control MCU is shown below: Program Startup ORG 0000H LJMP MAIN Main Program ORG 0030H MAIN MOV R0 #00H 4K Space reset MOV R1 #7EH M1 MOV @R0 #00H INC DJNZ R1 R0 M1 MOV R0 #20H MOV SP #32H CLR EA MOV A #0D1H MOV IRQ and FIQ DPTR #7FFFH input MOVX @DPTR A WAIT MOVX A @DPTR Read Status JB ACC.7 WAIT MOV A #00H 8 character display, left MOVX @DPTR A MOV A #34H LCALL KEY LCALL DTOB Display the subroutine SETB EA IRQ and FIQ SETB LCALL END CONCLUSION EXO PUL This article developed a single-chip stepper motor control system which is based on MCU, built hardware circuits, including the power supply circuit and microprocessor circuits, sub-circuit loop, various control circuit power amplifier circuit, keyboard and display interface circuit. Finally, the preparation of the MCU program is designed. The test results show that the system can be convenient to control the movement of the stepper motor. CONFLICT OF INTEREST The author confirms that this article content has no conflict of interest.
1050 The Open Automation and Control Systems Journal, 2015, Volume 7 Liu Honge ACKNOWLEDGEMENTS The work is partially supported by a grant from Shandong Provincial Natural Science Foundation of China (Grant No. ZR2012EEL15), and a grant from the Fundamental Research Funds for the Central Universities (Grant No. 11CX04031A). REFERENCES [1] M. Shi, and X. Wang, The stepper motor s drive design and technological improvement, Science & Technology Information, vol. 13, pp. 128-130, 2012. [2] H. Shao, and Y. Gao, A PLC stepper motor control system design, Science & Technology, vol. 29, pp. 550-552, 2011. [3] C. Lu, Simulation design of step motor controlling system based on proteus, Research and Exploration in Laboratory, vol. 29, pp. 54-57, 2010. [4] Y. Wang, To compare the stepping motor with servo motor, Management & Technology of SME, vol. 12, pp. 311-312, 2010. [5] S. Chen, Stepper motor in the application of the NC machine tools, Industrial & Science Tribune, vol. 11, pp. 67-68, 2012. [6] Y. Wu, Application of step motor control system in slab continuous casting marking machine, Metallurgical Power, vol. 2, pp. 76-78, 2012. [7] L. Xie, The click on measurement system which is measure the rotational speed is based on AT89C51, Guangxi Journal of Light Industry, vol. 2, pp. 72-73, 2012. [8] H. Chen, The basic structure and working principle of MCU - AT89S52 the function of MCU, clock system, timing and reset, Practical Electronics, vol. 2, pp. 58-61, 2006. [9] Z. Hang, The Circuit Design of Rf Power Amplifier, The Publishing Company of Xi'an Electronic and Engineering University: Xi an 2009, pp. 20-26. [10] Q. Xiong, and F. He, The circuit design of lots pieces of 8279 with MCU and the keyboard /display interface, Journal of Wuhan University of Science and Technology (JCR Science Edition), vol. 3, pp. 293-294, 2002. [11] W. Wei, and S. Wei, Application of the 8279 chip in control system for tanks, Mechanical Research & Application, vol. 2, pp. 55-56, 2010. Received: September 16, 2014 Revised: December 23, 2014 Accepted: December 31, 2014 Liu Honge; Licensee Bentham Open. This is an open access article licensed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/bync/4.0/) which permits unrestricted, non-commercial use, distribution and reproduction in any medium, provided the work is properly cited.