Difference between revisions of "Robotic Arm Deux"
(5 intermediate revisions by the same user not shown) | |||
Line 29: | Line 29: | ||
*Find right coordinates for presentation. | *Find right coordinates for presentation. | ||
*Stabilize and refine the final product. | *Stabilize and refine the final product. | ||
+ | |||
+ | ==Matlab Code== | ||
+ | |||
+ | == ''gotoAngles5()'' == | ||
+ | |||
+ | function gotoAngles5(s,Theta1,Theta2,Theta3,Theta4,Theta5,T) | ||
+ | |||
+ | % Turn servos to specified angles (in degrees). | ||
+ | |||
+ | % s is serial connection. | ||
+ | |||
+ | % ThetaA motor is attached to channel 1 (angle from -90 to +90). | ||
+ | |||
+ | % ThetaB motor is attached to channel 2 (angle from -90 to +90). | ||
+ | |||
+ | % ThetaC motor is attached to channel 3 (angle from -90 to +90). | ||
+ | |||
+ | % ThetaD motor is attached to channel 4 (angle from -90 to +90). | ||
+ | |||
+ | % ThetaE motor is attached to channel 5 (angle from -90 to +90). | ||
+ | |||
+ | % T is time for move (in mS); | ||
+ | |||
+ | |||
+ | pw1=round(Theta1); %Put in calibrarion. | ||
+ | |||
+ | pw2=round(Theta2); %Put in calibrarion. | ||
+ | |||
+ | pw3=round(Theta3); %Put in calibrarion. | ||
+ | |||
+ | pw4=round(Theta4); %Put in calibrarion. | ||
+ | |||
+ | pw5=round(Theta5); %Put in calibrarion. | ||
+ | |||
+ | cmd=['#1P' num2str(pw1)... | ||
+ | '#2P' num2str(pw2)... | ||
+ | '#3P' num2str(pw3)... | ||
+ | '#4P' num2str(pw4)... | ||
+ | '#5P' num2str(pw5)... | ||
+ | 'T' num2str(T)]; | ||
+ | |||
+ | fprintf(s,cmd); | ||
+ | |||
+ | pause(T/1000); %Wait for command to finish. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == ''FinalProgram'' == | ||
+ | |||
+ | % Robot Part Deux! | ||
+ | |||
+ | % Members: David D'Annunzio | ||
+ | |||
+ | % Matt Bowers | ||
+ | |||
+ | % Elan Silverblatt-Buser | ||
+ | |||
+ | |||
+ | |||
+ | gotoAngles5(s,1530,1550,2350,570,600,3000) | ||
+ | |||
+ | gotoAngles5(s,1530,1550,1270,1660,600,3000) | ||
+ | |||
+ | |||
+ | |||
+ | % Grab cup | ||
+ | |||
+ | gotoAngles5(s,1530,1550,1270,1660,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1530,1550,2350,570,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,2350,570,1400,3000) | ||
+ | |||
+ | |||
+ | |||
+ | % Lower cup to the bowl | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,1300,1400,3000) | ||
+ | |||
+ | |||
+ | |||
+ | % Pour the cup | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,200) | ||
+ | |||
+ | |||
+ | |||
+ | % Shake excess water | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1750,2400,1400,50) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,100) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1750,2400,1400,50) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,100) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1750,2400,1400,50) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,100) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1750,2400,1400,50) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,2400,1400,100) | ||
+ | |||
+ | |||
+ | |||
+ | % Bring cup to final platform | ||
+ | |||
+ | gotoAngles5(s,1930,1950,1650,1300,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1930,1950,2350,570,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2350,570,1400,3000) | ||
+ | |||
+ | |||
+ | |||
+ | % Lower cup to final platform | ||
+ | |||
+ | gotoAngles5(s,1330,1250,1550,1390,1400,3000) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,1550,1390,600,3000) | ||
+ | |||
+ | |||
+ | |||
+ | % Bring arm back up | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,1390,600,3000) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,3000) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | % Clapping | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,1850,300) | ||
+ | |||
+ | gotoAngles5(s,1330,1250,2330,570,600,300) | ||
+ | |||
==Difficulties== | ==Difficulties== |
Latest revision as of 19:36, 9 December 2008
Contents
Members
Goals
- Improve original robotic arm:
- We will add three more motors.
- Claw to replace pencil holder.
- This will allow the robot arm to pick objects up (perhaps glasses of water) and pour them.
- Waiters will become obsolete!
Original Design (picture)
Project Description
- Disassemble original arm.
- Attach three extra motors; five total.
- Zero-Out each.
- Test out the movements.
- Find right coordinates for presentation.
- Stabilize and refine the final product.
Matlab Code
gotoAngles5()
function gotoAngles5(s,Theta1,Theta2,Theta3,Theta4,Theta5,T)
% Turn servos to specified angles (in degrees).
% s is serial connection.
% ThetaA motor is attached to channel 1 (angle from -90 to +90).
% ThetaB motor is attached to channel 2 (angle from -90 to +90).
% ThetaC motor is attached to channel 3 (angle from -90 to +90).
% ThetaD motor is attached to channel 4 (angle from -90 to +90).
% ThetaE motor is attached to channel 5 (angle from -90 to +90).
% T is time for move (in mS);
pw1=round(Theta1); %Put in calibrarion.
pw2=round(Theta2); %Put in calibrarion.
pw3=round(Theta3); %Put in calibrarion.
pw4=round(Theta4); %Put in calibrarion.
pw5=round(Theta5); %Put in calibrarion.
cmd=['#1P' num2str(pw1)...
'#2P' num2str(pw2)... '#3P' num2str(pw3)... '#4P' num2str(pw4)... '#5P' num2str(pw5)... 'T' num2str(T)];
fprintf(s,cmd);
pause(T/1000); %Wait for command to finish.
FinalProgram
% Robot Part Deux!
% Members: David D'Annunzio
% Matt Bowers
% Elan Silverblatt-Buser
gotoAngles5(s,1530,1550,2350,570,600,3000)
gotoAngles5(s,1530,1550,1270,1660,600,3000)
% Grab cup
gotoAngles5(s,1530,1550,1270,1660,1400,3000)
gotoAngles5(s,1530,1550,2350,570,1400,3000)
gotoAngles5(s,1930,1950,2350,570,1400,3000)
% Lower cup to the bowl
gotoAngles5(s,1930,1950,1650,1300,1400,3000)
% Pour the cup
gotoAngles5(s,1930,1950,1650,2400,1400,3000)
gotoAngles5(s,1930,1950,1650,2400,1400,200)
% Shake excess water
gotoAngles5(s,1930,1950,1750,2400,1400,50)
gotoAngles5(s,1930,1950,1650,2400,1400,100)
gotoAngles5(s,1930,1950,1750,2400,1400,50)
gotoAngles5(s,1930,1950,1650,2400,1400,100)
gotoAngles5(s,1930,1950,1750,2400,1400,50)
gotoAngles5(s,1930,1950,1650,2400,1400,100)
gotoAngles5(s,1930,1950,1750,2400,1400,50)
gotoAngles5(s,1930,1950,1650,2400,1400,100)
% Bring cup to final platform
gotoAngles5(s,1930,1950,1650,1300,1400,3000)
gotoAngles5(s,1930,1950,2350,570,1400,3000)
gotoAngles5(s,1330,1250,2350,570,1400,3000)
% Lower cup to final platform
gotoAngles5(s,1330,1250,1550,1390,1400,3000)
gotoAngles5(s,1330,1250,1550,1390,600,3000)
% Bring arm back up
gotoAngles5(s,1330,1250,2330,1390,600,3000)
gotoAngles5(s,1330,1250,2330,570,600,3000)
% Clapping
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
gotoAngles5(s,1330,1250,2330,570,1850,300)
gotoAngles5(s,1330,1250,2330,570,600,300)
Difficulties
- Construction:
- Stability. Keeping the arm level.
- Programming:
- Calibrating five zero values. - Coordinating the motors to result in smooth motion.
Video Examples of Finished Arm
Link to Video: Robot Arm Demo
Link to Video: Robot Arm Gripper Demo
Link to Video: Robot Arm Joint 1 Demo
Link to Video: Robot Arm Joint 2 Demo
Link to Video: Robot Arm Vertical Joint Demo
Link to Video: Robot Arm Wrist Demo