2 DOF Robotic Arm By Zachary Guy ET
2 DOF Robotic Arm By: Zachary Guy ET 494 – Spring 2019 Advisor: Dr. Mohammad Saadeh Instructor: Dr. Mohammad Saadeh
Abstract � Build upon last semester work �Prototype constructed � Goal: Program and Trajectory Control of 2 DOF Robotic Arm � Cover such areas as: mechanisms, motion, dynamics, motor control, programming, and electronics.
Final Objective for Project � User input commands will control 2 DOF Robotic Arm, and allow for the graphing of input parameters. � End-effector placed on 2 nd link of Arm will trace graph of functions input (e. g. y=x^2)
Engineering Challenges � Transmission of Motion ◦ Linkage of Arm to motor shafts ◦ Use of Pulleys and Belt � Programming ◦ Arduino to Servo Drive ◦ RS 232 Communication � Trajectory Planning ◦ Determine profile
Research and Methodology � Design of Arm � Use of Belts and Pulleys � Programming � Trajectory Planning � Teach Pendant
Research and Methodology
Research and Methodology Y (X, Y) X
Materials
Materials – pt. 2
Design of Shaft Adapter
Design of Shaft Adapter
Prototype Built
Prototype Built
Prototype Built
Prototype Built
Wiring for RS 232 Communication
Wiring for Wire Transmission
Sample of Arduino Code incoming. Byte = Serial. read(); if (incoming. Byte == 65 || incoming. Byte == 97) { Serial. println("You will run this function: "); //Entering A or a Serial. println("y = x"); //Run func_1 Line(); } else if (incoming. Byte == 66 || incoming. Byte == 98) { //Entering B or b Serial. println("You will run this function: "); Serial. println("y = (1/10)*x^2"); //Run func_2 Parabola(); } else if (incoming. Byte == 67 || incoming. Byte == 99) { //Entering C or c Serial. println("You will run this function: "); Serial. println("(x-h)^2 + (y-k)^2 = r^2"); //Run func_3 Circle(); } else { //Entering anything else Serial. println("Select a Function: A, B, or C"); }
Sample of Arduino Code void Calculate. Servo. Angles(float x, float y) { beta_deg = ((acos((sq(Link_1)+sq(Link_2)-sq(D))/(2*Link_1*Link_2)))*(180/pi)); beta_rad = (acos((sq(Link_1)+sq(Link_2)-sq(D))/(2*Link_1*Link_2))); alpha = ((asin((Link_2*sin(beta))/D))*(180/pi)); calc_angle 1 = (((atan(y/x))*(180/pi)) - alpha); calc_angle 2 = (180 - beta); real_angle 1 = calc_angle 1 - prev_angle 1; real_angle 2 = calc_angle 2 - prev_angle 2; ///////////////////////////////////////////// //For sending correct motor command real_angle 1_actual = (real_angle 1 * (65536/360) * (1)); //change from -1 to change direction of rotation } void move_rel 32(char ID, long pos) { char Axis_Num = ID; Global_Func = (char)Go_Relative_Pos; } Send_Package(Axis_Num, pos);
Sample of Arduino Code //For Wire Transmission if (real_angle 2 < 1. 0 && real_angle 2 > -1. 0) { a = ((real_angle 2 * 100) + 127); } c = 1; else { a = real_angle 2 + 127; } c = 2; if (real_angle 1 < 1. 0 && real_angle 1 > -1. 0) { b = ((real_angle 1*100) + 80); } d = 1; else { b = real_angle 1 + 80; } d = 2;
Sample of Arduino Code //////Transmission to Arduino 2////// Wire. begin. Transmission(8); Wire. write(a); Wire. write(b); Wire. write(c); Wire. write(d); Wire. end. Transmission(); delay(500); ////////////////////////
Sample of Arduino Code void receive. Event(int how. Many) { int a = Wire. read(); int b = Wire. read(); int c = Wire. read(); int d = Wire. read(); } if (c == 1) { angle = ((a-127. 0)/100. 0); } else if (c == 2) { angle = a - 127. 0; } if (d == 1) { theta_1 = ((b-80. 0)/100. 0); } else if (d == 2) { theta_1 = b - 80. 0; } Serial. print("Motor 2 Angle: "); Serial. println(angle); Serial. print("Motor 2 Angle will actually move: "); Serial. println((theta_1 + angle)); theta_2_actual = ((theta_1 + angle) * (65536/360) * (-1)); //multiply actual by -1 to change direction of rotation move_rel 32(2, theta_2_actual); delay(25);
Trajectory Planning and Profiling https: //youtu. be/bitd. Ic. EI 3 ZM Linear Motion
Teach Pendant � Objective Not Met � General Idea ◦ Build upon former teach pendant (pictured below) ◦ Use larger LCD screen and update code to allow for increased user input and control ◦ Utilize dual-axis joystick for manual control (code developed for joystick control)
Review of Deliverables Redesign of Robotic Arm Joint - Offset to Elbow - Replacement of Belt and Pulleys Control of 2 DOF Robotic Arm - Arduino Code to communicate with Servo Drive - Operating both links with one code Trajectory Planning - Determine set points to reach - Use of Inverse Kinematics Redesign of Teach Pendant - Larger Display - More Options for User to select
2 DOF Robotic Arm � Brief Recap of Accomplishments: �Design and construction of 2 DOF Robotic Arm �Develop code for motor control �Trajectory planning and profiling
2 DOF Robotic Arm By: Zachary Guy ET 494 – Spring 2019 Advisor: Dr. Mohammad Saadeh Instructor: Dr. Mohammad Saadeh
- Slides: 27