178 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 Β© Global Society of Scientific Research and Researchers http://asrjetsjournal.org/ Mimicry Control of the Human Arm to Robot Arm Saad Alkazzaza*, Ahmed Aljanabib a,bMousl University, Dept. of Electrica/Electroni, Erbil 44001, Iraq aEmail: saad_kazzaz@yahoo.com bEmail: ahmed.aljanabi@yahoo.com Abstract In this work presented Mimicry control of the human arm to robot arm where robots more often than not we need to control them manually to the run of the non-programmed has previously work. This requires experiment the robot arm of the human arm response , Carried out the work submitted to build a metal structure for the robot arm( articulate type 5DOF) then drive torque equation in each joint and calculate the maximum torque in each joint in the horizontal position of the robot arm and calculate the direct kinematics for the end effect , after add electrical actuator fit with maximum torque on the arm and added position sensors and driver (h-bridge ) , electrical component has assembled and connected with micro controller (Arduino Due ) witch programming as proportional integral differential (PID) controller . then added the flex sensor position to human arm to measure the angels of joint , this sensor is connected to microcontroller Arduino Uno and programmed to process the zero and span function for sensors and send the data by wireless shield via RS port to the Arduino Due and run the system. Keywords: PWM ; PID ;Arduino DUE ; DOF ; Servo. 1. Introduction mimicry robot arm of the human arm an important topic since many applications require the use of the robot manually by giving orders from the human hand such as robots that deal with dangerous materials , in nuclear and military applications . A large number of studies on the control robot arm through the human hand such as vision based system by tracking markers placed at a dorsal side of human hand using cameras to estimate the 3D position of hand to control the robot were proposed [ 1, 2]. Electromechanical devices (potentiometer and metal parts), are worn by the operator arm to sense the motion of arm [3]. ------------------------------------------------------------------------ * Corresponding author. http://asrjetsjournal.org/ American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 179 EMG (electromyography) signals which are measured using non-invasive electrodes are placed at specific locations of human arm and represent the activity of human arm muscles due to motion to drive the robot [4]. Micro-Electro-Mechanical Systems (MEMS) was used to estimate the 3D position and orientation of human hand by integrating inertial sensors such as gyroscope, accelerometer and magnetometer [5]. This paper present controlling to robot arm by using flex sensors fixed on human hand and send the data wireless via RS-port. 2. Mechanical stricture analysis Figure 1: Side view of robot arm The robot arm which has been built in this research Created three links connected by joints has five degrees of freedom (5 DOF), Every joint is connected with electrical actuator ,that show in figure 1 When : 𝑋𝑋1 …. 𝑋𝑋7 : effect distance between the mass and joint A 𝑀𝑀1 …… 𝑀𝑀𝐸𝐸 : mass 𝑇𝑇1 …..𝑇𝑇3 : torque at the joints The torque in the joint A is given by the equation 𝑇𝑇1 = 𝑋𝑋1.𝑀𝑀1 + 𝑋𝑋2.𝑀𝑀2 + 𝑋𝑋3 .𝑀𝑀3 + 𝑋𝑋4.𝑀𝑀3 + 𝑋𝑋5.𝑀𝑀5 + 𝑋𝑋6.𝑀𝑀6 + 𝑋𝑋7.𝑀𝑀𝐸𝐸 …..(1) And the distance of 𝑋𝑋1 …. 𝑋𝑋7 is given by : 𝑋𝑋1 = 1 2 . 𝐿𝐿1 . cos𝛼𝛼1 ……………………………….….(2) 𝑋𝑋2 = 𝑋𝑋01. cos𝛼𝛼1 ……………………………………..…. (3) 𝑋𝑋3 = 𝐿𝐿1. cos𝛼𝛼1 + 1 2οΏ½ .𝐿𝐿2. cos𝛼𝛼2……………….… (4) American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 180 𝑋𝑋4 = 𝐿𝐿1. cos𝛼𝛼1 + 𝑋𝑋02. cos𝛼𝛼2 ………………….(5) 𝑋𝑋5 = 𝐿𝐿1. cos𝛼𝛼1 + 𝐿𝐿2. cos𝛼𝛼2 + 𝑋𝑋03. cos𝛼𝛼3 ……..(6) 𝑋𝑋6 = 𝐿𝐿1. cos𝛼𝛼1 + 𝐿𝐿2. cos𝛼𝛼2 + 1 2οΏ½ . 𝐿𝐿3. cos𝛼𝛼3 …(7) 𝑋𝑋7 = 𝐿𝐿1. cos𝛼𝛼1 + 𝐿𝐿2. cos𝛼𝛼2 + 𝑋𝑋04. cos𝛼𝛼3………(8) And 𝛼𝛼1 = βˆ…1 , 𝛼𝛼2 = βˆ…1 + βˆ…2 , 𝛼𝛼3 = βˆ…1 + βˆ…2 + βˆ…3 In the same way for the 𝑇𝑇2 and 𝑇𝑇3 𝑇𝑇2 = 𝑋𝑋8.𝑀𝑀3 + 𝑋𝑋9.𝑀𝑀4 + 𝑋𝑋10 .𝑀𝑀5 + 𝑋𝑋11.𝑀𝑀6 + 𝑋𝑋12.𝑀𝑀𝐸𝐸…….. (9) 𝑇𝑇3 = 𝑋𝑋13.𝑀𝑀5 + 𝑋𝑋14.𝑀𝑀6 + 𝑋𝑋15 .𝑀𝑀𝐸𝐸………………………..…(10) Table 1: The Wight of mass and distance 𝑀𝑀2 = 1.78 Kgm 𝑀𝑀1 = 1.49 Kgm 𝐿𝐿1 = 34 CM 𝑀𝑀3 = 1.62 Kgm 𝐿𝐿2= 42.5 CM 𝐿𝐿2= 42.5 CM 𝑀𝑀5= 0.155 Kgm 𝐿𝐿3 = 20 CM 𝑀𝑀4 = 0.62 Kgm 𝑋𝑋01= 28 cm 𝑀𝑀𝐸𝐸 = 0 Kgm 𝑀𝑀6 = 0.74 Kgm 𝑋𝑋03 = 16 cm 𝑋𝑋02 = 38 cm From the table 1 we get the maximum torque 𝑇𝑇1 = 275.6475 π‘˜π‘˜π‘˜π‘˜π‘˜π‘˜ . π‘π‘π‘˜π‘˜ , 𝑇𝑇2=105.9 Kgm.cm , 𝑇𝑇3 =9.88 Kgm.cm So the direct kinematics equations of the end effect is drive and given as : 𝑋𝑋3 = [𝑙𝑙1. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1) + 𝑙𝑙2. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1 + βˆ…2) + 𝑙𝑙3. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1 + βˆ…2 + βˆ…3)]. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…π‘π‘) …………..(11) π‘Œπ‘Œ3 = 𝑙𝑙1. sin(βˆ…1) + 𝑙𝑙2. sin(βˆ…1 + βˆ…2) + 𝑙𝑙3. sin(βˆ…1 + βˆ…2 + βˆ…3)…………………………..(12) 𝑍𝑍3 = [𝑙𝑙1. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1) + 𝑙𝑙2. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1 + βˆ…2) + 𝑙𝑙3. 𝑐𝑐𝑐𝑐𝑐𝑐(βˆ…1 + βˆ…2 + βˆ…3)]. sin(βˆ…π‘§π‘§)……….(13) 2.1 Electrical section This part included building a servo motor that consisting of DC motor , gearbox , electronic driver , microcontroller ,and the position sensor the electronic driver is design and build to works efficiently within the wide scope of dc motor limited by voltage and current values , in this work have been using a new innovative way in directional control, the driver consist the three input tow of this input for the direct of motor and the third input for speed control , we sprate the direction from the speed . American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 181 2.2 Design and modeling the servo motor From practical experience was calculated the transfer function and gear ratio of the DC motor that use in this project . The transfer function is given by : 𝐺𝐺(𝑆𝑆) = 98.982 0.019𝑠𝑠+1 and the gear ratio of gear box = 1 54 In this research was to use a new control system by segmenting error signal resulting from subtract the feedback signal from the reference signal to the two parts , the first is give a logical rotation order to the electronic driver in one of the directions , the second parts it takes error signal and enters to the proportional integral differential controller and then take the absolute value of the output to convert the pulse width modulating (PWM) pulses and enters the electronic driver as a input to control by the speed of DC motor . The Figure 2 shown the modeling of practical servo motor. Figure 2: Modeling the practical servo motor by Matlab American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 182 The result of run the Simulink is shown in figure 3 , 4 , 5. Figure 3: set point with feedback Figure 4: high and low speed with pulse control Figure 5: zoom of pulse of control speed American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 183 After tuning PID controller , get to the result in figure shown 6 , 7, 8. Figure 6: set point with feedback Figure 7: high and low speed with pulse control Figure 8: zoom of pulse of control speed American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 184 2.3 Final stricture The final design of the system is shown in figure 9 ,10 Figure 9: servo system on robot arm joint Figure 10: sensors system on the human arm 3. Software the program algorithm was implemented through Arduino environment on the microcontroller Due. where the use of new algorithm has the ability to deal with any DC motor and use as a servo motor, Since it does not depend on constant time of motor , but her ability to simulation motor through conditional orders (if … then ) to get the best as a result of the position , as well as been designed the algorithm controller PID type, was chosen Microcontroller Arduino Due. DC motor driver Wireless – 900Mhz Serial communication Power supply unit 24 , 12 , 5 VDC 40x04 Lcd display Position sensor DC motor with gear box Wireless – 900Mhz Serial communication Battery 9v Filter 0 Arduino Uno Flex sensor 0 Flex sensor 1 Flex sensor 2 Flex sensor 3 Filter 1 Filter 2 Filter 3 Flex sensor 4 Filter 4 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 185 sampling time 1 mili sec. , the flowchart shows the progress of the program, which includes more than Flowchart first main remaining programs routine. Flow chart 1: algorithm of main program Flow chart 2: algorithm of routine program American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 186 The PID controller algorithm was Experimented from took the reference signal and the feedback signal then enters to the oscilloscope and read the error of sum register the integral part of PID controller from the inside of the microcontroller via RS port and the same for the differential part the figure 11 shown the response of deferential part response . Figure 11: the deferential part of PID controller response Figure 12: the position response of servo motor with PID On the basis of these practical results were chosen as sampling time to fit in control system , and run the servo system completed and we get the result shown in figure 12 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 187 Figure 13: the position response of servo motor after tuning PID After tuning the PID controller we get the perfect result of response as shown in figure 13 Figure 14: accuracy test of servo motor In the same test the accuracy of the servo system , the figure 14 shown that as well was designed algorithm that transfers the signal via the serial port through a wireless card XBee shield , the microcontroller from human side is take the sensors signal that fixed on human arm then send the code to the microcontroller at the robot arm side , when it can to decode this code the robot arm microcontroller send the accept to the human arm microcontroller that send synchronize number to synchronization two microcontroller at last send five angle value to the robot arm microcontroller to control by robot arm servo . the flow chart American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 188 shown the send code and received accept no. and the figure shown the human arm sensors and robot arm . Flow chart 3: algorithm of send conde and received the accept Figure 15: human sensor American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 189 4. Conclusion and recommendation β€’ through mathematical analysis of the structure of the robotic arm show that the installation of the electrical operator in the joint closest to the base link will reduce the dynamic torque on the base operator . β€’ through practical experiments found that measuring the transfer time of the system is important in the process of building a proportional differential integrative controller algorithm PID controller and is intended transmission speed from zero to rated value and vice versa in the case of break the motor , because the integrative and differential depends on the time, The section Integrative is a process error against time to collect so the combination of the time should be up close to the time of transition for example, travel time is 1 second and the time of error collection 1 millisecond, is going to cause a backlog in the wrong a large amount before reaching the required and the best case method has experience in practice is by dividing the sum of error reasonable limits and not reduce sampling time sampling time of the error rate . β€’ Through practical experiences in sending a series of bits that have their own width that is observed when they arrive through transport it does not reach all of the same width and explain the reason for that distortions and objections encountered on the way to that necessitated the receiving mode algorithm process that takes a range of pulse width receiving. Reference [1]. Geoff Williams "CNC Robotics Build Your Own Workshop Bot " Copyright 2003 , The mcgraw-Hili [2]. Brandi House " A Voice Controlled Robot Arm" 2009, International Journal of Scientific and Research [3]. Antoine de RengervΒ΄" Emergent imitative behavior on a robotic arm based on visuo-motor associative memories " 2010 , IEEE/RSJ International Conference on Intelligent Robots and Systems [4]. Mohammed Z. Al-Faiz " HUMAN ARM SIMULATION BASED ON MATLAB WITH VIRTUAL ENVIROMENT " , 2011 , IJCCCE Engineering Conference of Control, Computers and Mechatronics [5]. Hsien-I Lin " Evaluation of Human-Robot Arm Movement Imitation" 2011 , IEEE/RSJ Asian Control Conference [6]. Jon Wilson " Sensor Technology Handbook " Copyright 2005, Elsevier Inc. [7]. John G. Webster " Measurement, Instrumentation, and Sensors Handbook " 1999 , CRC Press LLC. [8]. Jacob Fraden " Handbook of Modern Sensors " 2010, Springer New York. [9]. Robert H. Bishop " The MECHATRONICS Handbook" 2002 , CRC Press LLC. American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2016) Volume 19, No 1, pp 178-190 190 [10]. T. Kilian " Modern Control Technology Components And Systems" , 2006 , Delmar . [11]. Marialena Vagia "pid controller design approaches – theory tuning and application to frontier areas " 2012 , intech.