Anda di halaman 1dari 6

International Conference on Mechanical, Industrial and Energy Engineering 2010

23-24 December, 2010, Khulna, BANGLADESH


A Microcontroller Based Controller Circuit for the Motion Control of an Articulated Robot with Three Degrees of Freedom

Enaiyat Ghani Ovy 1,*, Mohammad Rokonuzzaman 2, S.M.Ferdous2 , Sayedus Salehin1, N.A.Chowdhury1 Department of Mechanical and Chemical Engineering, Islamic University of Technology, Board Bazar, Gazipur-1704, BANGLADESH 2 Department of Electrical and Electronic Engineering, Islamic University of Technology, Board Bazar, Gazipur-1704, BANGLADESH

ABSTRACT Due to the quick evolution of manufacturing processes, the demand for more flexible automation systems is on the rise. To answer these requirements, distributed motion control architecture based on intelligent drives tends more and more to replace the traditional solutions. This paper presents the control of an articulated arm robot with three degrees of freedom. The essential part of the robotic arm is a programmable microcontroller based system capable of driving basically three stepper motors design to form an anthropomorphic structure. This paper explains the method of interfacing the robotic arm stepper motors with the programmed Atmega16 microcontroller which is used to control the robot operations. C programming language is employed here in programming the microcontroller. Keywords: Microcontroller (ATMEGA 16), Stepper motor Controller (ULN 2003), Stepper Motor, Proteus.

1. Introduction The advancement for the control of robotic arm is developing day by day. The robot can be controlled in various ways and steps. Fuzzy logic is applied at several hierarchical levels of a typical robotic control system [1]. For controlling robotic manipulators, transpose jacobian (TJ) control are used [2]. Neural network based adaptive control system is developed to control the flexible robotic arm [3]. The DSP based instantaneous torque controller is developed to control the manipulator [4]. Using microcontroller circuit for interfacing joint sensor to control robotic arm is also done [5]. A simple structured linked model of the articulated limb is developed where the model is manipulated in simulation to pull the end of the limb towards the desired destination position and orientation [6]. A PIC 16F877 micro-controller based system is developed where an articulated robot arm having six degrees of freedom is controlled [7]. In our present work, ATMEGA 16 microcontroller based circuit is developed by which the three degrees of freedom articulated robotic arm can be controlled. Programming language C is used to program the microcontroller which is written in AVR STUDIO 4 software. 2. Mechanical Specifications Degrees of freedom: 3 Repeatability: 0.5 mm at the end of arm (fully extended) 2.1 Specification of the Stepper Motor Volt : 5V Current : 1.4A Step : 7.5/Step

Table 1: Mechanical capabilities: Joint Maximum Angle(degree) Base 360 First arm 90 Second arm 90

Speed(range of allowable speed) 0-27 0-10 0-10

3. Different Movements We have employed three different movements in our robotic arm. They can be titled like: Waist Movement First Arm Movement Second Arm Movement 3.1 Waist Movement The waist of the robotic arm is controlled by the spur gear mechanism which is placed in the base of arm. The stepper motor is directly coupled with a pinion having 20 teeth. The pinion is meshed with a gear having 258 teeth. Hence the speed of the motor is decreased by around 13 times and the torque is increased by the same ratio. The gear holds the total assembly on it so that the assembly can rotate according to the requirements.

Fig.1 First stepper motor is used in the set up to rotate the base. * Corresponding author. Tel.: +88-01714334897 E-mail address:

3.2 First Arm Movement Another stepper motor is coupled with a worm reducer, which has a reduction ratio of 40:1. The worm reducer will transmit the power to the shaft. This shaft is connected to the first (lower) arm. So if the shaft rotates then the first arm will rotate accordingly.

4. Dimension of the Arm The dimension of the first and second arm is shown here. The mechanical design is prepared by the AutoDesk Inventor 2010 software.

Fig.2 Second stepper motor is used in the set up for moving the elbow up and down. 3.3 Second Arm Movement A third stepper motor is coupled with the second (upper) arm. This motor transmits the motion directly to the shaft which is connected to the second (upper) arm. This shaft rotates according to the rotation of the motor and the rotation of the shaft also causes the rotation to the second arm. In this case, the gear transmission system was not used to transmit the power to the second arm shaft.

Fig.3 Third stepper motor is used in the set up for moving the arm up and down.

Fig.5 Showing the design of the first arm (dimensions in mm)

Fig.4 Mechanical structure of the robotic arm. MIE10-072- 2

Fig7 Block diagram of Robotic arm function This is a basic block diagram of the robotic arm with three different joints. As we have discussed in the earlier section the arm is capable of employing three different movements, and three stepper motor is mounted on the joints which are responsible for these movements. Three stepper motors are used in the system. First stepper motor is used for rotating the waist. Second stepper motor is used for moving up and down the first arm (lower). Third stepper motor is used for moving up and down the second arm (upper). These motors will be controlled by user through microcontroller. The microcontroller is controlled by an external interface that will be operated by the user. This interface will consist of an array of ten switches which are durable and simple to use. User will be able to control the movements of each joint by pressing specific button or switch in the interface. 6. Stepper motor control Stepper motors are very different from a regular DC motors. Instead of spinning like DC motors do stepper motor steps at a specific resolution for each pulse. The motor that we are using needs 48 steps / pulses just to complete a single revolution. There are several stepping modes that anyone can use to drive the stepper motor like single stepping, high torque stepping, and half stepping. Single step mode is employed in the system which needs 48 pulses to complete rotation. Each pulse moves rotor by 7.5 degrees. The following sequence has to be repeated 12 times for motor to complete one revolution. Pulse 1 2 3 4 Coil a1 ON Coil b1 ON ON ON Coil a2 Coil b2

Fig.6 Showing the design of the second arm (dimensions in mm) 5. The control structure: The intelligence of the control structure is composed of a microcontroller Atmega 16 manufactured by ATMEL , 3 ULN2003A motor controller , a 7447 bdc to seven segment display driver with 3 stepper motors.

MIE10-072- 3

As the motor will rotate a degree of 7.5 for a pulse, the microcontroller will generate appropriate number of pulses for certain amount of movement of the arm. A motor controller ULN2003A is used for the control purpose of the motors. Pulse sequence for both clockwise and anticlockwise rotation is generated by the microcontroller which rotates the motor through motor controller ULN2003A.

The figure shows the ten user interface switches for the system. Switch1, 2, 3 are used for selecting the motor which to be activated. Switch 4, 5, 6, 7, 8, 9 is used for controlling the rotation angle of the selected motor. The degree of rotation of the stepper motors can be controlled by the switches 4 to 9. If switch 4 is pressed then a lower rotation angle is selected for the stepper motor. Then if switch 5 is selected a rotation angle is selected for the motor which is higher than the previous one. The process will be continued in the same way. Maximum rotation angle is obtained when switch 9 is pressed. Switch 10 is for resetting the whole system. 8. Display Unit A seven segment display device is used to display the number of the motor which is in operation that time. A BCD to 7-Segment Decoder/Driver with OpenCollector Outputs is used with the seven segment display for displaying the data taken from the microcontroller. 9. Control Circuit The total circuit is designed and simulated with the help of Proteus 7 Professional software. The detail design of the circuit is shown in Fig. 11.

Fig.8 Interfacing stepper motor with ULN2003A 7. User interface

Fig.10 The physical circuit which controlls the motion of the articulated robotic arm. Fig.9 User interface of the system

MIE10-072- 4


SW9 D7


14 15 9 10 11 12 13 QG QF QE QD QC QB QA 7447 LT RBI BI/RBO D C B A 3 5 4 6 2 1 7





U3 U1 D4 SW5
SW-SPST DIODE 32 30 AREF AVCC PB7/SCK PB6/MISO PB5/MOSI PB4/SS PB3/OC0/AIN1 PB2/INT2/AIN0 PB1/T1 PB0/XCK/T0 PA7/ADC7 PA6/ADC6 PA5/ADC5 PA4/ADC4 PA3/ADC3 PA2/ADC2 PA1/ADC1 PA0/ADC0 XTAL2 XTAL1 RESET 8 7 6 5 4 3 2 1 33 34 35 36 37 38 39 40 12 13 9 1 2 3 4 5 6 7 1B 2B 3B 4B 5B 6B 7B COM 1C 2C 3C 4C 5C 6C 7C 9 16 15 14 13 12 11 10 + 8 8 .8

D5 SW4

21 20 19 18 17 16 15 14 29 28 27 26 25 24 23 22




1 2 3 4 5 6 7 1B 2B 3B 4B 5B 6B 7B COM 1C 2C 3C 4C 5C 6C 7C 9 16 15 14 13 12 11 10 + 8 8 .8

D2 SW2



SW-SPST 1 2 3 4 5 6 7

1B 2B 3B 4B 5B 6B 7B COM 1C 2C 3C 4C 5C 6C 7C 9 16 15 14 13 12 11 10

+ 8 8 .8



Fig.11 Circuit diagram of the articulated robotic arm.

MIE10-072- 5

h. 10. Software flow chart

Multiple stepper motor driven from the same source can maintain perfect synchronization.

12. Conclusion In this paper, concentration has been focused to design a microcontroller based circuit for the overall control of the robotic arm. Three degrees of freedom of the arm is controlled by the circuit developed. End effector design is not considered here as our main purpose is to implement the robot arm in spot welding which will be controlled by the microcontroller based circuit. The logics and facts are carefully introduced in the microcontroller programming. With the help of the stepper motor as well as microcontroller precise positioning is achieved which gives a positive direction towards the industrial automation. REFERENCES [1] Clarence W. de Silva, Applications of fuzzy logic in the control of robotic manipulators, Fuzzy Sets and Systems, Volume 70, Issues 2-3, 20 March 1995, Pages 223-234 [2] S. Ali A. Moosavian, Evangelos Papadopoulos, Modified transpose Jacobian control of robotic systems, Automatica, Volume 43, Issue 7, July 2007, Pages 1226-1233 [3] Jorge I. Arciniegas, Adel H. Eltimsahy, Krzysztof J. Cios, Neural-networks-based adaptive control of flexible robotic arms, Neurocomputing, Volume 17, Issues 3-4, November 1997, Pages 141-157 [4] K. J. Tseng, DSP-based control of brushless DC drives for direct-driven robotic arms, Microprocessors and Microsystems, Volume 19, Issue 10, December 1995, Pages 581-589 [5] John R. Rogers, Low-cost teleoperable robotic arm, Mechatronics, Volume 19, Issue 5, August 2009, Pages 774-779 [6] D. J. F. Toal, C. Flanagan, Pull to position, a different approach to the control of robot arms for mobile robots, Journal of Materials Processing Technology, Volume 123, Issue 3, 10 May 2002, Pages 393-398 [7] Ahmad M. Hisham, A COMPUTER CONTROLLED 6-DOF ARTICULATED ROBOTIC ARM, RAS Newsletter University of Waterloo, Issue 7, January 2009

Fig.12 Software flowchart of the system. 11. Reasons Behind to Select the Stepper Motor: a. They are compatible with digital systems and not require digital to analog conversion at the input. b. While simple open loop control is good enough for the control of position and speed, it can also be used in closed loop position and speed control system with either analog or digital system. c. A wide range of step angle is available off the shelf from most manufactures, in the range of 1.8 to 90. d. Bi-directional control is available. e. Maximum torque occurs at low plus rates. f. Low speeds are possible without reduction gear. g. Moment of inertia is usually low.

MIE10-072- 6