Machine Control Design
In this project our primary objective was to use a VEX robotics kit and our knowledge of the robot c programming software to make a machine that would accomplish a series of task and meet a list of specific constraints. We worked in teams of four people and each team was able to select from a list of different machines to build. My team decided to try tackling the surgical arm challenge. The surgical arm had to have three degrees of movement a rotating base, an up down motion, and a pinching motion. It also had to be able to pick up and move an item from one point to another. Through out this project I learned a lot. I learned how to replace the gears inside the motors to make them better for speed or torque, I discovered some new parts in the kit that were very useful that I didn't know about, but most importantly, I learned a lot about the effectiveness of good planning and how it can make a project run extremely smoothly. Below you can find some pictures of different stages of the project.
Above is a rough sketch of our final proposed solution to our design challenge.
Above is the pseudocode for our surgical arm's controls (the rough outline of what we want our program to do), and below is what the actual code looked like.
void claw();
void upDown();
void pivot();
//mods
//void upRight();
task main()
{
while(1==1){
upDown();
pivot();
claw();
//mods
//upRight();
}
}
void pivot(){
while(SensorValue(limitSwitchLeft)==1)
{
startMotor(pivotMotor, -13);
}
while(SensorValue(limitSwitchRight)==1)
{
startMotor(pivotMotor, 13);
}
if(SensorValue(limitSwitchLeft)==0 && SensorValue(limitSwitchRight)==0)
{
stopMotor(pivotMotor);
}
}
void upDown(){
while(SensorValue(bumpSwitchUp)==1)
{
startMotor(armMotor, -20);
}
while(SensorValue(bumpSwitchDown)==1)
{
startMotor(armMotor, 14);
}
if(SensorValue(bumpSwitchUp)==0 && SensorValue(bumpSwitchDown)==0)
{
stopMotor(armMotor);
}
}
void claw(){
while(SensorValue(limitSwitchOpen)==1)
{
startMotor(clawMotor, 50);
}
while(SensorValue(limitSwitchClose)==1)
{
startMotor(clawMotor, -30);
}
if(SensorValue(limitSwitchOpen)==0 && SensorValue(limitSwitchClose)==0)
{
stopMotor(clawMotor);
}
}
void claw();
void upDown();
void pivot();
//mods
//void upRight();
task main()
{
while(1==1){
upDown();
pivot();
claw();
//mods
//upRight();
}
}
void pivot(){
while(SensorValue(limitSwitchLeft)==1)
{
startMotor(pivotMotor, -13);
}
while(SensorValue(limitSwitchRight)==1)
{
startMotor(pivotMotor, 13);
}
if(SensorValue(limitSwitchLeft)==0 && SensorValue(limitSwitchRight)==0)
{
stopMotor(pivotMotor);
}
}
void upDown(){
while(SensorValue(bumpSwitchUp)==1)
{
startMotor(armMotor, -20);
}
while(SensorValue(bumpSwitchDown)==1)
{
startMotor(armMotor, 14);
}
if(SensorValue(bumpSwitchUp)==0 && SensorValue(bumpSwitchDown)==0)
{
stopMotor(armMotor);
}
}
void claw(){
while(SensorValue(limitSwitchOpen)==1)
{
startMotor(clawMotor, 50);
}
while(SensorValue(limitSwitchClose)==1)
{
startMotor(clawMotor, -30);
}
if(SensorValue(limitSwitchOpen)==0 && SensorValue(limitSwitchClose)==0)
{
stopMotor(clawMotor);
}
}
This is a picture of the final product. On the left if you look carefully you can see the control panel used for operating the arm. Obviously the final design does not look quite exactly as the proposed design since it has undergone many changes, but I am proud of what I and my team have accomplished.
Conclusion Questions:
1. Describe the objectives for this project in your own words.
In this project our primary objective was to use the VEX kit and robot c programming software to make a remotely operated surgical arm with three degrees of freedom.
2. What were the most difficult parts of the problem? Describe the difficulties you had with these things.
The biggest problems we encountered with our arm were with our choice to use a potentiometer to control rotational movement ant the balancing of our arm. Our arm can only pick up items of within certain weight limit or the arm might be to heavy to move. We eventually were able to work around both issues.
3. List and describe two features that were not part of the design problem that could be added to improve your design.
Two additional improvements I would add to our arm, if we had more time, would be a forward and backward movement mechanic (as our arm can only grab items at a certain distance from it), and omnidirectional movement controls. The way our arm is currently moves, only one motor can function at a time. You are unable to, for example, move the arm up while closing the claw.
4. Describe how your design and program worked during the official test? Was your design successful? Why or why not?
During the official test and presentation, our arm preformed admirably considering the limited time and resources we had to work with. It is definitely not perfect by any stretch, but I am proud of the final product and what my team was able to accomplish.I believe that our success can be attributed to our careful planning and lots of communication and transparency between our software and hardware branches. This allowed us to work separately on our parts and then combine them rather seamlessly. Overall I would say our project was a success.
5. Describe some things you learned during this project.
Through out this project I learned a lot. I learned how to replace the gears inside the motors to make them better for speed or torque, I discovered some new parts in the kit that were very useful that I didn't know about, but most importantly, I learned a lot about the effectiveness of good planning and how it can make a project run extremely smoothly.
1. Describe the objectives for this project in your own words.
In this project our primary objective was to use the VEX kit and robot c programming software to make a remotely operated surgical arm with three degrees of freedom.
2. What were the most difficult parts of the problem? Describe the difficulties you had with these things.
The biggest problems we encountered with our arm were with our choice to use a potentiometer to control rotational movement ant the balancing of our arm. Our arm can only pick up items of within certain weight limit or the arm might be to heavy to move. We eventually were able to work around both issues.
3. List and describe two features that were not part of the design problem that could be added to improve your design.
Two additional improvements I would add to our arm, if we had more time, would be a forward and backward movement mechanic (as our arm can only grab items at a certain distance from it), and omnidirectional movement controls. The way our arm is currently moves, only one motor can function at a time. You are unable to, for example, move the arm up while closing the claw.
4. Describe how your design and program worked during the official test? Was your design successful? Why or why not?
During the official test and presentation, our arm preformed admirably considering the limited time and resources we had to work with. It is definitely not perfect by any stretch, but I am proud of the final product and what my team was able to accomplish.I believe that our success can be attributed to our careful planning and lots of communication and transparency between our software and hardware branches. This allowed us to work separately on our parts and then combine them rather seamlessly. Overall I would say our project was a success.
5. Describe some things you learned during this project.
Through out this project I learned a lot. I learned how to replace the gears inside the motors to make them better for speed or torque, I discovered some new parts in the kit that were very useful that I didn't know about, but most importantly, I learned a lot about the effectiveness of good planning and how it can make a project run extremely smoothly.