+ All Categories
Home > Documents > INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the...

INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the...

Date post: 10-May-2018
Category:
Upload: phungdiep
View: 216 times
Download: 4 times
Share this document with a friend
7
International Journal of Science, Engineering and Technology Research (IJSETR) Volume 3, Issue 5, May 2014 Abstract— Nowadays, robots are widely used in many applications such as military, medical application, factories, entertainment, automobile industries and etc. In the world of robotics, robot arm has become popular to help automation in place of human. So, this system is implemented to control the X, Y positions of stepper motors for robot arm. The position control system of robot arm used a peripheral interface controller (PIC18F452), three stepper motors and rotary encoder. The PIC acts as the main controller of the position control system and three stepper motors are used for robot arm rotation. For feedback on motors, the rotary encoder is used to record the changes in position. To control the motors position, the input commands are applied to the motor driver through the PC. This system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual Basic. Net and MikroC Pro. Keywords—PIC18F452 microcontroller, Stepper motor, Rotary encoder, Visual Basic. Net, MikroC Pro. I. INTRODUCTION During the past few decades, industrial robots have become a very important factor in the manufacturing industries. A robot can be describes as a mechanical device programmed to perform a task under automatic control. Robots are used effectively in application where a complicated process is going to be repeated. They are also used effectively in hazardous areas, where a person might be harmed by fumes, high temperature or other harmful factors. Unlike human labors, robots do Ma Ngu Wah, Department of Mechatronic Engineering, Mandalay Technological University (MTU), Mandalay, Myanmar, +959425274457, [email protected]. Dr. Kyaw Thiha, Department of Mechatronic Engineering, Mandalay Technological University (MTU), Mandalay, Myanmar, +95943035800, [email protected]. not need heat, light, coffee breaks, overtime pay and worker’s compensation insurance. So, robot is important and useful device for many industries [1]. As robot is important, the position control for robot arm is also important to correctly perform tasks in industry. This system is designed the real time position control for robot arm that is used to correctly pick and place object. This system contains three axes that are the X direction stepper motor, Y direction stepper motor and Z direction stepper motor. Stepper motors are used to control the motions of the robot. Sketch design of the robot arm is shown in Figure 1. Three degree of freedom (3-DOF) plastic robot arm is proposed in this system. It is the combination of individual joints where the action must be controlled in order to perform tasks on the desired motion cycle. The robot arm motion will be controller with the inverse kinematics solution. In this system, PIC18F452 microcontroller is used because it can provide serial communication interface and incorporate all of the peripheral I/O facilities that is needed. Personal computer (PC) is used as graphical user interface (GUI) for monitoring and control of the devices. The implementation of position control system is provided by Visual Basic. Net (VB.Net), and MikroC programming languages. Depending on the control commands on VB.Net window, robot arm will move exactly the required position. 1 All Rights Reserved © 2014 IJSETR PC Based Position Control for Robot Arm Ngu Wah, Kyaw Thiha Department of Mechatronic Engineering Mandalay Technological University [email protected], [email protected]
Transcript
Page 1: INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual

International Journal of Science, Engineering and Technology Research (IJSETR)Volume 3, Issue 5, May 2014

Abstract— Nowadays, robots are widely used in many applications such as military, medical application, factories, entertainment, automobile industries and etc. In the world of robotics, robot arm has become popular to help automation in place of human. So, this system is implemented to control the X, Y positions of stepper motors for robot arm. The position control system of robot arm used a peripheral interface controller (PIC18F452), three stepper motors and rotary encoder. The PIC acts as the main controller of the position control system and three stepper motors are used for robot arm rotation. For feedback on motors, the rotary encoder is used to record the changes in position. To control the motors position, the input commands are applied to the motor driver through the PC. This system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual Basic. Net and MikroC Pro.

Keywords—PIC18F452 microcontroller, Stepper motor, Rotary encoder, Visual Basic. Net, MikroC Pro.

I. INTRODUCTIONDuring the past few decades, industrial robots have

become a very important factor in the manufacturing industries. A robot can be describes as a mechanical device programmed to perform a task under automatic control. Robots are used effectively in application where a complicated process is going to be repeated. They are also used effectively in hazardous areas, where a person might be harmed by fumes, high temperature or other harmful factors. Unlike human labors, robots do not need heat, light, coffee breaks, overtime pay and worker’s compensation insurance. So, robot is important and useful device for many industries [1].

As robot is important, the position control for robot arm is also important to correctly perform tasks in industry. This system is designed the real time position control for robot arm that is used to correctly pick and place object. This system contains three axes that are the X direction stepper motor, Y direction stepper motor and Z direction stepper motor. Stepper motors are used to control the motions of the robot. Sketch design of the robot arm is shown in Figure 1.

Three degree of freedom (3-DOF) plastic robot arm is proposed in this system. It is the combination of individual joints where the action must be controlled in order to perform tasks on the desired motion cycle. The robot arm motion will be controller with the inverse kinematics solution.

In this system, PIC18F452 microcontroller is used because it can provide serial communication interface and incorporate all of the peripheral I/O facilities that is needed. Personal computer (PC) is used as graphical user interface

Ma Ngu Wah, Department of Mechatronic Engineering, Mandalay Technological University (MTU), Mandalay, Myanmar, +959425274457, [email protected].

Dr. Kyaw Thiha, Department of Mechatronic Engineering, Mandalay Technological University (MTU), Mandalay, Myanmar, +95943035800, [email protected].

(GUI) for monitoring and control of the devices. The implementation of position control system is provided by Visual Basic. Net (VB.Net), and MikroC programming languages. Depending on the control commands on VB.Net window, robot arm will move exactly the required position.

Figure 1. Sketch Design of the Robot Arm

II.SYSTEM BLOCK DIAGRAM

The overall block diagram of the system is shown in Figure 2. In this system, the PIC18F452 microcontroller, stepper motors, MAX232 IC and rotary encoder are used for position control of pick and place robot arm. For picking and placing process, the position of robot arm is important.

Figure 2. Block Diagram of the Position Control System for Robot Arm

In this system, three stepper motors are used to design three degree of freedom (DOF) and to control the motions of robot arm such as X motor, Y motor and Z motor. The position of motion for robot arm is controlled by using control commands of VB.Net. After pressing the command buttons on VB.Net window, the required signals send to the RS-232 serial port with serial communication. RS-232 also sends the receiving signals from PC to PIC microcontroller via MAX232. Depending on the receiving signals, PIC microcontroller controls the required motions. And then, the X-axis stepper motor, Y-axis stepper motor and Z-axis stepper motor can rotate forward or backward to position.

1All Rights Reserved © 2014 IJSETR

PC Based Position Control for Robot ArmNgu Wah, Kyaw ThihaDepartment of Mechatronic Engineering

Mandalay Technological University [email protected], [email protected]

Page 2: INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual

International Journal of Science, Engineering and Technology Research (IJSETR)Volume 3, Issue 5, May 2014

III. SYSTEM HARDWARE COMPONENTS

This system consists of several units or modules. These are

• PIC18F452 microcontroller• Unipolar stepper motor• Stepper motor driver• Rotary Encoder• Interfacing circuit between PC and PIC

Overall circuit diagram of the proposed system is shown in Figure 3.

Figure 3. Overall Circuit Diagram of the Proposed System

A. PIC Pin Assignment of the SystemThe main part of the system is PIC18F452 which is used

to control the system. PIC18F452 has 40 pins and 5 input-output (I/ O) ports [2, 3]. The pin connections of microcontroller are important to control the position of robot arm motion. The diagram of pin connection is shown in Figure 4.

Figure 4. Pin Connection of PIC18F452

In this system, the power supply of this controller is +5V DC and connected the pin no. 1. RA0, RA1, RA2 and RA3 are used for X-axis stepper motor and bit numbers 0, 1, 2, 3 from PORTB are also connected to Y-axis stepper motor. Then, RD0, RD1, RD2 and RD3 are used for Z-axis stepper motor. Encoder is connected at RC0, RC1, RC2 and RC3. And then, MAX232 IC is connected at RC6 and RC7.

B. Unipolar Stepper MotorStepper motor is an electromechanical device which

coverts electrical pulses into discrete mechanical

movements. The number and rate of the pulses control the position and speed of the motor shaft. The motor rotation has several direct relationships to this applied input pulses. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. The speed of the motor shaft's rotation is directly related to the frequency of the input pulses and the length of rotation is directly related to the number of input pulses applied. The unipolar stepper motors have the advantage of producing high torque at low speeds [4, 5].

Figure 5. Unipolar Stepper Motor

Unipolar stepper motor is shown in Figure 5. In this system, three unipolar stepper motors are used as X-axis, Y-axis and Z-axis motors. The properties of this motor are as follows:• Unipolar stepper with 0.1" spaced 5-pin cable

connector• 48 steps per revolution• 1/16 geared down reduction• 5V-12V DC suggested operation• Weight: 37 g.• Dimensions: 28mm diameter, 20mm tall not including

9mm shaft with 5mm diameter • 9" / 23 cm long cable• Holding Torque @ 12VDC: 250 gram-force*cm, 25

N*mm/ 3.5 oz-force*in• Shaft: 5mm diameter flattened

C. Stepper Motor DriverIn this system, TIP 122 Darlington transistor is used as

the stepper motor driver. It is designed for general-purpose amplifier and low speed switching applications. Features of TIP 122 Darlington transistor are as follows:

• High DC Current Gain,• Collector-emitter sustaining voltage is 100V,• Collector-emitter saturation voltage is 2V,• Monolithic construction with built-in base –emitter

shunt resistors,• Pb-Free Packages are available [10].

Figure 6. TIP 122 Darlington TransistorTIP 122 Darlington transistor is shown in Figure 6. In the

design of the TIP 122 Darlington transistor, Pin 1 is Base, Pin 2 is Collector, Pin 3 is Emitter and Pin 4 is Collector.

2All Rights Reserved © 2014 IJSETR

Page 3: INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual

International Journal of Science, Engineering and Technology Research (IJSETR)Volume 3, Issue 5, May 2014

D. Rotary EncoderRotary encoders are used in many applications that require

precise shaft unlimited rotation—including industrial controls, robotics, special purpose photographic lenses, computer input devices, controlled stress rheometers, and rotating radar platforms [9]. Rotary encoder is shown in Figure 7.

Figure 7. Rotary Encoder

Rotary encoder provides information about the motion of the motor shaft on DC motor, which is typically further processed elsewhere into information such as speed, distance, and position. In robot applications, the feedback device (encoder) plays a vital role in ensuring that the equipment operates properly. By using the rotary encoder, the microcontroller can't afford to miss any pulses or the resolution of movement that is going to suffer.

E. Interfacing Circuit between PC and PICInterfacing circuit is required to control the input and

output conditions of the process, and to use as serial port. MAX232 IC is used for signal/ level translation. MAX232 IC provides RS232 serial communication with PC easily.

This IC is used to perform necessary adjustment. This circuit is powered with a single 5V voltage. It is used to convert a serial signal from TTL to RS232 standard and vice versa by means of a built-in voltage generator [8].

MAX232 board is connected to a PC via a standard serial cable provided with a pair of female connectors DB9. The female connector DB9 enables connection with devices that use RS232 standard, whereas the connector enables connection with the microcontroller pins intended for serial communication (USART) [6]. Interfacing circuit between PC and PIC is shown in Figure 8.

Figure 8. Interfacing Circuit between PC and PIC

IV. SOFTWARE IMPLEMENTATION OF THE SYSTEM

Overall flowchart of the robot arm position control

system is shown in Figure 9. This system is implemented as the PC based position control system for robot arm. In this system, robot arm needs to reach the required grid locations which is located in the 3x3 matrixes between X=310mm and Y=310mm. So, the robot motion will be control with the inverse kinematic solution. PC based position control system for robot arm allows the user to control the designated position during working area.

Figure 9. Overall Flowchart of the Robot Arm Position

Control System

In this system, PIC18F452 microcontroller is used for the heart of process. MikroC Pro programming is used to control the whole process. Three stepper motors are driven with stepper motor drivers (TIP 122 Darlington transistor).

When the operation is started, the robot will be in its home position. Required grid locations are defined as input in PC via VB.Net. And then, X, Y and Z degree are calculated by using inverse kinematics method. After calculating, X, Y and Z step values are sent to PIC by using MAX 232 IC. And then, PIC drive X, Y and Z step values. To detect current grid, X, Y and Z encoder Values are checked by PIC. Then, PIC sends back X, Y and Z encoder values to PC. To verify current location, X, Y and Z encoder values are checked by VB.Net.

3All Rights Reserved © 2014 IJSETR

Page 4: INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual

International Journal of Science, Engineering and Technology Research (IJSETR)Volume 3, Issue 5, May 2014

A. Inverse Kinematics for Robot ArmIn this system, when the desired location for the tip of the

robotic arm is given, the inverse kinematics method calculates the angles of the joints to locate the tip of the arm at the desired location [7]. For the 3DOF planner robot arm, these inverse kinematics equations can be simplified as follows:

(1)

(2)

(3)

(4)

(5)

(6)

(7)

In the above equations, θ0 is the angle of base rotation, θ1

and θ2 are the angles of first link joint and second link joint. k1 and k2 are constants. l1 and l2 are the lengths of first link and second link. x and y are the lengths of target positions.

TABLE IRESULT OF SAMPLE JOINT DEGREES

V. SIMULATION AND TEST RESULTS

The proposed robot arm position control system used the personal computer (PC) to control the system by using the serial port. This system is implemented by using Visual Basic. Net (VB.Net), and MikroC Pro programming languages.

In the VB.Net form, the proposed system allows the user to choose either the manual mode or the auto mode. At manual mode, X position and Y position are firstly entered in the message box. And then, the “RUN” button must be clicked. After clicking, the correct θ1, θ2 and θ0 will be

showed at “Command”. Manual position control for robot arm is shown in Figure 10.

Figure 10. Manual Position Control for Robot Arm

At auto mode, required target positions are chosen by clicking the check box. After choosing, the “Connect” button must be clicked to display the correct θ1, θ2, θ0, X, Y, Z motor directions and steps at “Command”, and OK at “Received Data”. Auto mode can be run one or more target points in 3x3 matrixes. Auto position control for robot arm is shown in Figure 11.

Figure 11. Auto Position Control for Robot Arm

To open the virtual terminal, the “RUN” button must be clicked. And then, the data enter in the virtual terminal. According to the entered data, the required motors will be operated with the exact motor step. As an example, if X, 1, 00008# is entered in virtual terminal, 8 steps will be rotated due to the clockwise of X motor direction. If Y, 0, 00008# is entered in virtual terminal, 8 steps will be rotated due to the counter clockwise of Y motor direction. If Z, 1, 00008# is entered in virtual terminal, 8 steps will be rotated due to the clockwise of Z motor direction. The simulation result of the system is shown in Figure 12.

4All Rights Reserved © 2014 IJSETR

cos θ2=x2+ y2−l1

2−l22

2 l1l2

sin θ2=√1−cos2θ2k1=l1+l2 cosθ2

k2=l2sin θ2

θ1=a tan 2( y , x )−a tan 2(k1 , k2 )

θ2=a tan 2(sin θ2 ,cosθ2 )

θ0=a tan 2 ( y , x )

Page 5: INTRODUCTION Based Position Control... · Web viewThis system can control the robot arm during the 310mm X position and 310 mm Y position. This system is implemented by using Visual

International Journal of Science, Engineering and Technology Research (IJSETR)Volume 3, Issue 5, May 2014

Figure 12. Simulation Result of the System

Photo of complete circuit is shown in Figure 13.

Figure 13. Photo of Complete Circuit

Photo result of 3DOF robot arm is shown in Figure 14.

Figure 14. Photo Result of 3DOF Robot Arm

VI. CONCLUSION

The PC based position control system for robot arm is designed to get optimum performance with available components at the local market. In this system, both auto and manual modes can be used to control the position of the robot arm. The robot arm is intended for simple pick and place operation. By using this robot arm position control system, many benefits can be obtained including the reduction of unpleasant tasks, improved quality of pick and place process, and reduced time consuming. This system can be extended by changing the motors and microcontroller for future work.

ACKNOWLEDGMENT

The author is very thankful to Dr. Myint Thein, Rector of Mandalay Technological University, for his encouragement, invaluable permission and his kind support in carrying out this paper work.

The author is deeply grateful to Dr. Wutyi Win, Associate Professor and Head, Department of Mechatronic Engineering, Mandalay Technological University for supplying all necessary things.

The author also wishes to thank to supervisor Dr. Kyaw Thiha, Associate Professor, Department of Mechatronic Engineering, Mandalay Technological University, accomplished guidance, his willingness to share his ideas and, helpful suggestions and for his patience, continuous supervision and encouragement during a long period of this paper.

The author especially appreciates and thanks all her teachers for paper support, and guidance during theoretical study and paper preparation durations.

REFERENCES

[1] Naoki Asakawa and Yoshimi Takeuchi. “Techingless Spray-Painting of Sculptured Surface by amn Industrial Robot”, Department of mechanical and Control Engineering, University of Electro-Communications, Chofu, Tokyo, 182 Japan, 1997.

[2] Microchip PIC18FXX2 Microcontroller Data Sheet, Microchip

Technology Inc., 2006. [3] Ken Toe, “PIC18F452”, University of Cambridge, UK.[4] DC Motor Driver Fundamentals, Semiconductor Components

Industry, March, 2014.[5] Moududur Shamim, “Stepper Motor Interfacing with

Microcontroller”, March 23, 2011.[6] “MAX232 Board”, MikroElektronika, Software and Hardware

Solutions for Embedded World.[7] MECH 498: Introduction to Robotics, Inverse Manipulator

Kinematics by M.O’Malley.[8] http:// en.wikipedia.org/wsiki/MAX232.[9] http:// en.wikipedia.org/wiki/Rotary_encoder.[10] http://www.onsemi.com/PowerSolutions/product.do?id=TIP122.

5All Rights Reserved © 2014 IJSETR


Recommended