P. 1
38

38

|Views: 12|Likes:
Published by Karthick Selva

More info:

Published by: Karthick Selva on Nov 03, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/22/2014

pdf

text

original

International Journal of Computer Science & Communication Vol. 1, No. 1, January-June 2010, pp.

189-191

Microcontroller Based Clockwise/Anticlockwise Stepper Motor Controller Using PC Keyboard Via Com Port
Mandeep Singh1, Rekha2 & Balwinder Singh3
Centre for Development of Advanced Computing (C-DAC), Mohali – 160071, India (A Scientific Society of Ministry of Communication and Information Technology, Govt. of India). 2 University Institute of Engg. & Technology (UIET), Panjab University, Chandigarh. 1 mandeep@cdacmohali.in, 2er.rekha@yahoo.co.in, 3balwinder@cdacmohali.in
1, 3

ABSTRACT Computer controlled stepper motors are one of the most versatile forms of positioning systems. Open loop control of stepper motors suffers from a major disadvantage that the rotation of the rotor becomes oscillatory and unstable in certain speed ranges. This paper presents the micro stepping technique which overcomes the problem of instability and at the same time provides high accuracy for micro stepping applications. This technique improves electronically resolution of the stepper motors and suppresses oscillations due to effects of mechanical resonance. This has greatly enhanced its usefulness in modern control applications. Keywords: Microcontroller, Step Sequence, Stepper Motor, Keil Compiler

1. INTRODUCTION

2. SYSTEM DESIGN

In most process applications the cost of the control system is only a relatively small fraction of the total cost and the cost of the processor is only a fraction of the control system’s cost. Except in some isolated instances, there is not a large number of situations in which direct replacement of control components with a single microcontroller driven version will result in either substantial cost saving or significantly important performance. A large number of applications have been already done for a variety of unit applications, i.e. control of processes that do not interact strongly with other processes. There are typically special purpose applications for which single microcontroller system has unique hardware and software. This application describes the use of single microcontroller to control the speed, direction and rotation angle of a stepper motor by sending pulse sequences to the motor winding in response to the control commands [1]. Commands executed by the code in this application include: single step the motor rotates in a clockwise or counterclockwise direction (i. e. rotate the rotor through a certain number of degrees) when the corresponding key is pressed from the computer keyboard [1]. This is a general purpose application for which a degree of adjustment or programmability is required to meet the needs of specific processes and their performances.

The system is built around the Atmel’s (AT89c51) 8-bit microcontroller. In this system a unipolar stepper motor is used (which is used widely in all kinds of floppy drives and CD drives) as shown in Fig. 1 with following specifications: Maximum voltage: 5V DC, Step angle: 1.8 degree, Steps per revolution: 200. Unipolar stepping motors with 5 or 6 wires are available and usually wired as shown in Fig. 2 with a center tap at terminal 1 and 2 on each of the two windings. In use, the center taps of the windings are typically wired to the positive supply and the two ends of each winding are alternately grounded to reverse the direction of the field provided by that winding.

Fig 1: Unipolar Stepper Motor

1. Clockwise/Anticlockwise Rotation Here.2.190 International Journal of Computer Science & Communication (IJCSC) the coil is turned off. 4 (Schematic Diagram). These pins are called TxD and RxD and are part of Port 3 (P3. These pins are called TxD and RxD and are part of Port 3 (P3. One such converter is MAX232 that converts RS232 voltage levels [2].0 and P3. However the 89c51 lacks sufficient current to drive the stepper motor windings. Step Sequence Stepper motors can be driven in two different patterns or sequences [3]: • • Full Step Sequence.2.e. Half mode is 2. it becomes double the angular resolution in full mode. The 89c51 has two pins that are used specifically for transferring and receiving data serially.1. These pins are TTL compatible and therefore require a line driver to make them RS232 compatible. Pins 21 through 28 of U2 are connected to pins 1 through 4 of U3 as shown in Fig. There are several widely used sequences where each has a different degree of precision. Instead of ULN 2003 transistors can also be used.0592 MHz is used to produce clock frequency for the microcontroller. If transistors are used as drivers. so driver ULN2003 (U3) is used to energize the stator. two coils are energized at the same time and motor shaft rotates. The order in which . Fig 2: Unipolar Stepper Motor Coil Fig. As ULN 2003 has inbuilt driver circuit so it is preferred [5]. So the angular resolution is also increased i. Half Step Sequence. Unipolar stepper motor having 5 leads is used: 4 leads representing the four stator windings and one for centered-tapped leads. These pins are TTL compatible and therefore require a line driver to make them RS232 compatible. diodes should be used to take care of inductive current generated when The 89c51 has two pins that are used specifically for transferring and receiving data serially. Fig 3.0 and P3. Half Step Sequence In Half Step Sequence motor. Table 1 Full Step Sequence Clockwise Rotation Wind ing A 1 1 0 0 Wind ing B 0 1 1 0 Wind ing C 0 0 1 1 Wind ing D 1 0 0 1 Anticlockwise Rotation Wind ing A 0 0 1 1 Wind ing B 0 1 1 0 Wind ing C 1 1 0 0 Windi ng D 1 0 0 1 2. Functional Block Diagram Fig 4: Schematic of Final Hardware 2.2.1). One such converter is MAX232 that converts RS232 voltage levels [2]. Crystal oscillator of frequency 11. Also in half mode sequence the number of steps gets doubled as that of full mode. 2. coils are energized in clockwise and anticlockwise direction is given in table1. step angle reduces to half the angle in full mode. As the sequence of power is applied to each stator winding the rotor will rotate.1).2. 3 shows Microcontroller (AT89c51) based circuit which can control all the functions of stepper motor. Full Step Sequence In the full step sequence.

Prentice Hall of India. “Model Based Design Controller for the Stepper Motor”. 2. pp.. 6. Birou. The key feature of this controller lies in its flexibility to provide for high position resolution operation of a given stepper motor control system. 5.1-4. 2007. Rusu. Szoke. The RPM of the motor can also be increased or decreased by changing the time delay. Sept. REFERENCES [1] Baluta. IEEE International Conference on Automation. 291 – 296. Another program in ‘C’ language is used for transmission of ASCII code of the key pressed from the keyboard as shown in Fig. I. pp. 63 – 68. M. The compiled HEX program is then burnt on AT89c51 chip. ASCII code of the key pressed is then transmitted serially through serial port (Com1) of computer and is received by the SBuffer (SBuff) of microcontroller. C. Chap 17. E. India. It works as per flow chart shown in Fig. CONCLUSION The implementation of microstepping for a standard stepper motor is presented in this paper. [2] [3] [4] [5] Fig 5: Flow Chart for Assembly Program . “Precision Microstepping System for Bipolar Stepper Motor Control”. May 2008. May 2008. C. July 2007. Table 2 Half Step Sequence Winding A 1 1 1 0 0 0 0 0 Clockwise rotation Winding Winding B C 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 Winding D 1 0 0 0 0 0 1 1 Winding A 0 0 0 0 0 1 1 1 Anticlockwise rotation Winding Winding Winding B C D 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 3. the technique presented here appears to be an excellent consideration. IEEE International Symposium on Signals Circuits and Systems. Robotics. E. Coteata. “Microstepping Mode for Stepper Motor Control”. “Embedded System Design for FieldOriented Stepper Motor Control”. IEEE International Conference on Optimization of Electrical and Electronic Equipment. SOFTWARE The software program is written in assembly language for AT89c51 and then compiled to hex file using Keil compiler software. The controller is capable of controlling multiple stepper motors simultaneously with very precise resolution. pp. Fig 6: Flow Chart for ‘C’ Program 4.175 – 179. 492-507. Baluta. New Delhi. 2. The microcontroller checks the ASCII code of the key pressed from the computer. pp. The sequence given in table 2 is called 8 step switching sequence. If the pressed key is ‘F’ then the microcontroller load step sequence to rotate stepper motor in clockwise direction and if key pressed is ‘R’ then the microcontroller load step sequence to rotate the motor in anticlockwise direction. “The 8051 Microcontroller and Embedded Systems”. Szoke. G. Quality and Testing. Rusu. 2007. pp. In the case of retrofitting an existing standard stepper motor controller to a high position resolution controller.Microcontroller Based Clockwise/Anticlockwise Stepper Motor Controller Using PC Keyboard Via Com Port 191 usually preferred over full mode. IEEE International Conference on Electrical Machines and Power Electronics. G. Mazidi Muhammad Ali.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->