+ All Categories
Home > Documents > 2011 Engineering Notebook (Local)

2011 Engineering Notebook (Local)

Date post: 28-Mar-2016
Category:
Upload: nicholas-seward
View: 217 times
Download: 1 times
Share this document with a friend
Description:
ASMSA's 2011 engineering notebook for our local hum.
38
ASMSA Arkansas School for Mathematics, Sciences and the Arts Team Name: ASMSA BEST Team Number: 165 Advisor: Nicholas Seward ([email protected] ) Web Address: best.asmsa.org
Transcript
Page 1: 2011 Engineering Notebook (Local)

ASMSAArkansas School for Mathematics, Sciences and the Arts

Team Name: ASMSA BESTTeam Number: 165Advisor: Nicholas Seward ([email protected])Web Address: best.asmsa.org

Page 2: 2011 Engineering Notebook (Local)

Table of Contents

Research Paper .......................................................................................1

Design Process ........................................................................................7

Brainstorming Approaches ...............................................10

Analytical Evaluation ..........................................................17

Offensive and Defensive Evaluation ..............................20

Fabrication and Refinement .............................................23

Safety.........................................................................................................25

Appendix

Safety Checklist ...................................................................28

Programming........................................................................30

3/8” Wood Usage.................................................................34

Safety Pictures ....................................................................36

Page 3: 2011 Engineering Notebook (Local)

Research Paper

1

Page 4: 2011 Engineering Notebook (Local)

Genetic engineering opens up windows of possibilities that could potentially reduce the

effects of deadly diseases and pests. However, genetically modifying bugs can have some

unforeseen negative effects on the environment and its inhabitants' health. Therefore, it is

imperative that genetically modified organisms go through many tests before being

released into the environment. The theme of the 2011 BEST game represents a potentially

dire situation, since the bugs that have escaped their laboratories have yet to undergo the

tests that ensure that they will not disrupt the environment. It is the teams' job to capture

the genetically engineered bugs as quickly and safely as possible so that the surrounding

environment and the community remains safe from the potential ill effects that the

modified bugs may have. In a real-world situation, it would be important for people to

handle the bugs as little as possible since they may carry a disease that could spread to the

human population. Therefore, robots seem to be the best alternative for safely and quickly

capturing these bugs.

The idea of genetic engineering can trace its roots back to Charles Darwin and his ideas of

natural selection and evolution. Genetic engineering is, in essence, human controlled

evolution. The first major experiments in the field were Gregor Mendel's experiments with

peas in which he explained the laws of genetics. Almost a century later, in 1973, DNA from

an African clawed toad was extracted and inserted into bacterial DNA. This was the first

successful genetic engineering experiment. Since then, there has been many successes in

the field, such as genetically engineered drugs, food (chymosin), Bovine Growth Hormone,

and even cloning (“History of Genetic Engineering”).

At the University of Arkansas, genetic engineering projects include a project by Professor

Daniel J. Lessner to engineer a methanogen that contains a DNA molecule that allows the

2

Page 5: 2011 Engineering Notebook (Local)

organism to break down esters into methane (Ford). Another project at the University of

Arkansas involves the Agricultural department genetically improving cowpea to be more

resistant to insects and herbicides (Manoharan, Khan, and Gardner) .

Molecular biologist, Stehpen Hughes has been conducting research at the USDA

Agricultural Research Service since September 2004 in an attempt to develop a a

microorganism that can be used in the fermentation process that converts renewable

materials to fuels. The traits they are trying to acquire are ones that are good for

fermentation of lignocelluosic material. To scan thousands of candidates for these traits, a

robot is being used to identify xylose-utilization genes. All of this is in an attempt to

improve the yeast that ferments xylose to ethanol. The robot is instrumental to Hughes

research because it can perform much faster and more accurately than a human could. It's

job is to create genetic libraries from copied genetic material. It uses these libraries to to

pick the best genes and then pairs them up with a corresponding protein. These new

desirable genes can then be inserted into yeasts. It would be impractical do have done all

this work without the help of a robot (McElroy).

While genetic engineering would provide exciting advances in technology, there are

potential hazards from this research. Companies that genetically engineer crops are

threatened by those that engineer insects (Jeeg). Since the crops are made to be resistant

to insects, if the insects are not an issue, the companies no longer have a product to sell. If

some genetically modified insects are able to reproduce and replace the natural population

of insects, certain transgenic traits may be spread through the population and make pest

problems worse or even create unforeseen problems (Jeeg). Genetic engineering could also

potentially allow insects to carry human diseases or to create diseases in the food that they

3

Page 6: 2011 Engineering Notebook (Local)

produce (Jeeg). To prevent possible problems with genetically modified organisms, there

are several precautions that scientists must take. The modified organism has to be able to

pass many tests before it can be released into the wild (“Safeguards on Genetic

Engineering”). Because of the possible negative impacts that genetically modified insects

may have on the outside world, it is important to retrieve escaped bugs before they can

cause any harm.

There are many different types of traps to catch different types of insects. Some traps

utilize pheromones to attract insects and trap them. Traps like these are often used to trap

moths (Tree). Ant traps usually involve a slow-acting poison that the ants can spread to the

rest of the colony, and, hopefully, destroy it (Tree). Since we do not want to harm the

genetically engineered specimens that we are trying to catch, the trap we use for capturing

the bugs is more like a bottle trap. Traps like these allow the specimen to crawl inside, but

not back out (Tree). These traps do not use poisons or harm the bugs they catch (Tree). To

increase the efficiency of the traps they could be attached to robots. Doing this would

allow traps to be moved to around to where the bugs are without human contact. These

robots could also utilize gene identification technology to process bugs to determine

whether they are harmful or not. Thus, bugs could also be organized and placed into

respective holding containers depending on whether or not they pose a potential threat to

the environment.

With new advances in genetic engineering, it becomes imperative that methods for

capturing and storing experiments in the event of an emergency. In some experiments, the

subjects may have the potential to harm human researchers. Robots could bridge this gap

to capture the insects instead. There hasn't been much application of this idea yet,

4

Page 7: 2011 Engineering Notebook (Local)

however, there is much potential. Traditional passive traps could be used in conjuncture

with robots to allow capture that doesn't harm the experiments while ensuring the safety

of researchers. These problems are addressed in this year's BEST game in which teams are

required to safely capture and transport genetically altered insects. The robot is designed

to catch the most insects and quickly transfer then to ensure safety. This theme

acknowledges potential real-life problems that could arise with as genetic engineering

develops more.

5

Page 8: 2011 Engineering Notebook (Local)

Work Cited

McElroy, Auduin. “A Robot Helping Hand.” Ethanol Producer Magazine. 2007. Oct 2010.

<http :// www . ethanolproducer . com / articles /3172/ a - robotic - helping - hand >

“History of Genetic Engineering.” MSPCA-Angell. 2009. Oct 2010.

<http :// support . mspca . org / site / PageServerpagename = advo _ Lab _ Animals _ History _ G

enetic _ Eng ineer >

Jeeg. “Genetically Modified Insects: What next?” Council for Responsible Genetics. 2010.

Oct 2010.

<http :// www . councilforresponsiblegenetics . org / blog / post / Genetically - Modified -

Insects - What - next . aspx >

“Safeguards on Genetic Enigeering.” Oracle ThinkQuest. Oct 2010.

<http :// library . thinkquest . org /20830/ Manipulating / Experimentation / GenEngineerin

g / dangers . htm >

Garner, J. O., M. Manoharan, and S. Khan. “Molecular Genetic Improvement of Cowpea.”

United

States Department of Agriculture. 2008. Oct 2010.

<http :// www . reeis . usda . gov / web / crisprojectpages /201084. html >

Ford, Anissa. “University of Arkansas Professor engineers methane-producing organism.”

HULIQ. 2010. Oct 2010. <http :// www . huliq . com /10178/ university - arkansas - professor -

engineers - methane - producing - organism >

Tree, Alex. “What Are the Different Types of Insect Traps?” WiseGeek. 2003. Oct 2010.

<http :// www . wisegeek . com / what - are - the - different - types - of - insect - traps . htm >

6

Page 9: 2011 Engineering Notebook (Local)

Design Process

7

Page 10: 2011 Engineering Notebook (Local)

To design a successful robot, a solid engineering process was used. This consisted of

brainstorming robot ideas, developing designs from these ideas, ranking these designs

based on their strengths and functionality, analyzing the results, choosing a robot, refining

its construction, and testing the robot to reveal flaws so that they could be repaired.

Initially, the team used their accumulative creative abilities to brainstorm possible designs.

Multiple ideas were proposed, many of which were transformed into designs. These designs

included specifics such as how the proposed robot would to operate. Each design was rated

based on potential points scored, speed, ease of control, weight, and ease of subject

containment. This helped the team decide which robot design was the best to build given

the standing time constraints. Ultimately, three final robot designs were produced. The

highest rated robot design was refined to produce the maximum number of points with

respect to a reasonable assembly time. This robot was assembled and tested for point

acquisition ability and locomotive capabilities. It went though consistent testing phases in

which the robot was analyzed and new features were added or weaknesses were

addressed. This process occurred frequently with many modifications taking place over the

8

Page 11: 2011 Engineering Notebook (Local)

course of the six week time constraint. Our final robot would not have the advanced

functionality it has now without the many changes that took place. Thanks to the clearly

defined design process, the robot was able to drastically increase its scoring capabilities

before the competition.

9

Page 12: 2011 Engineering Notebook (Local)

Brainstorming

10

Page 13: 2011 Engineering Notebook (Local)

After attending the BEST Kickoff Event, our team was enthused and ready to design the

best robot within our abilities. The whole team sat down and began drafting designs and

forming ideas. We scanned each sketch into a computer, which were then uploaded to our

online team folder. Team members could then go online and observe these sketches and

makes suggestions for new features and additions to be added to the robot. We found this

to be an effective way to build upon our early designs. While brainstorming, several

methods were constructed to address various aspects of the game.

Overcoming Obstacles in Front of Containment Areas

The first step was to define the problem at hand: How should the robot deliver the bugs to

the scoring bins? One of the most hurdles our robot needed to overcome in order to score

was navigating through or reaching over the 3 ft x 4 ft space in front of each scoring zone.

The team decided that some viable options were to design a robot that could drive across

or over the obstacle area, design a robot that could reach entirely over the 3 ft length, or

design a robot that could perform a combination of the two. If the robot was designed to

simply drive over the obstacles, it would have required a four-wheel drive system,large

wheels in order to be able to pass over obstacles, and some sort of dump truck design, such

as a scoop on the front or a bin on the back, to transport and score the gathered bugs.

Another proposed idea was to design a robot to reach over the obstacles instead of driving

over them. This eliminated the risk of the robot getting stuck in the obstacles, but the arm

would have to be designed strong enough to reach across the entire three feet and retract

without unbalancing the robot. To gather the bugs, a trap with a self-contained holding bin

could be attached to the end of the arm. One arm design suggested was an arm made of

two pieces of PVC, a smaller tube inside a larger tube. A motor would wind up a string

attached to the inner tube, and as the string wound up the inner tube would be extended.

11

Page 14: 2011 Engineering Notebook (Local)

Another proposed design for the arm was folding arm with a parallel linkage to keep the

upper member parallel. It would be made of three separate legs, two of which were parallel

to each other with pivot points on the robot and the top arm. This would serve to keep the

upper member parallel to the ground. In order to maximize the point acquisition ability of

the robot, the team proceeded to analyze each design.

Obtaining and Scoring Bugs

The team brainstormed several different trap designs to capture a variety of bugs. One idea

was to use an adjustable, articulate scoop that would pick up termites and transport them

to a scoring bin, then dump them. The scoop would also be used to pick up and transport

food into scoring bins. Another proposed idea was a modified scoop with channels. This was

a passive design that was simply set into the cockroach area. The cockroaches would

wander into the channels and be unable to turn around to escape. After a time, the scoop

was lifted and then dumped into a scoring bin. A third idea was a three-pronged “hand” that

could be used to clasp a fly. The “opened” hand would be maneuvered under a fly, the

“closed” when it could grasp the fly. The clasped hand would bring the fly down, then

transport the fly and drop it into a scoring area.

Proposed Locomotion Designs

The first design proposed was the classic four-wheel-drive system. This design involved two

sets of driving wheels each controlled by a large motor. While the preliminary design

appeared well on paper, the point that it would take much more power to drive the two

extra wheels was brought up and the pros and cons were discussed. The cons greatly

outweighed the pros in this case and the second design was proposed.

12

Page 15: 2011 Engineering Notebook (Local)

The second locomotion design was a simplification of the first in that there were two drive

wheels on the front sides instead of four drive wheels equally spaced along the robot sides.

In this design however, there was an extra wheel at the back of the robot to hold the rear

up. This design not only appeared to work as well as the first locomotion design but in at

least one case, it was considered to do better. In the case of turning, this two wheel design

offered more consistent turning by limiting the number of focal points with the ground and

thereby decreasing the variation in turn times caused by the battery level. This design

dominated the minds of the team and was ultimately selected as the locomotion design of

choice.

The third and final locomotion design was an entirely new concept, the Hoeken’s Linkage.

This design involved two legs that moved by varying the sizes of circular movements to the

extent that the resulting motion lifted the leg, pushed it forward, and set it down.

Although this design seemed to work well in testing, it was decided by the team that this

design was overly complicated and had too many points of failure; this reason was realized

during the final test run when the glue-joints broke on one of the legs. Because of this

crucial flaw, this design was not selected but it was concluded that with a little more

thought, this leg movement idea may be promising in the future.

Proposed Designs

The first design proposed was created in order to solely capture cockroaches. The robot

includes an extendable folding arm with an articulated cockroach trap on the end of the

arm. It is driven by two modular wheel assemblies, placed on each side. An omni-wheel

would be placed on the rear of the robot to facilitate mobility of the robot. The cockroach

trap would be lifted up and down using the brake cable and either a servo or small motor.

13

Page 16: 2011 Engineering Notebook (Local)

During each game, the robot would place its trap in the cockroach cabinet and allow the

cockroaches to accumulate in it. Then after a certain period of time the driver would pull

the arm of the cabinet, drive the robot to the wooden pile containment area, extend the

arm over the obstacle, and dump the cockroaches in the scoring zone.

Fig. 1: First draft of robot design, scissor arm, cockroach trap, two wheel drive.

The second design was created with the collection of termites and possibly food in mind.

This design includes a four wheel drive locomotion system driven by large motors mounted

to the bottom of the robot’s base, a large scoop on the front of the robot that pivots in

order to pick up termites and food. When this robot is in play it will scoop termites and

deposit them into the wooden steps containment area. The four wheel drive system will

allow the robot to overcome the steps and place the termites in the scoring zone.

14

Page 17: 2011 Engineering Notebook (Local)

Fig. 2: Design number 2, four wheel drive, tiltable scoop.

The third design for the robot focused on catching flies. It would include a PVC extendable

arm, a claw for grasping flies, and two wheel drive with an omni-wheel. The arm would be

powered by a small motor that would rotate a pulley with string on it to pull the inner PVC

pipe out. The robot would score by opening the cabinet door, grasping flies, then

depositing them one at a time in the wood pile scoring area.

15

Page 18: 2011 Engineering Notebook (Local)

F

Fig. 3: Two wheel drive with omni-wheel, PVC extendable arm, and fly-grabbing claw.

16

Page 19: 2011 Engineering Notebook (Local)

Analytical Evaluation

17

Page 20: 2011 Engineering Notebook (Local)

To evaluate the different robot designs, the pros and cons of each design were examined

and then applied to a table showing each designs overall usefulness. This was a logical step

in selecting the best choice for the robot as the pros and cons could be quantified and

totaled. The robots were rated on the number of points scored, the speed of the robot,

how easy it was to control, the weight of the robot and finally how easy it is to replace the

various of parts on the robot. The final table is displayed below. The scores and arranged

from a “+” which is worth a positive point, a “-” which is worth a negative point and finally a

“0” which is neutral and denotes no points.

Design Number

Points Scored

Speed Ease of Control

Weight Ease of Subject Containment

Total

#1 + + + + + 5

#2 0 + 0 + 0 2

#3 + + - 0 - 0

This table shows the total for each of the designs. The first design was the obvious winner

with a score of five. It received a plus on the first category because, while it was able to only

go after low point targets, it was able to use the highest multiplier containment zone. The

second design got a neutral here since it could only go for a basic zone without the reach of

the first of third designs but it was able to gain a medium point target. It also takes longer

to collect the targets in this design. Finally the third design also gained a plus since it was

not only able to get the highest point target but it also had the reach to use the highest

point containment zone.

The speed category was positive across the board as it was planned to use a modular

system with all three designs that would give them all the same speed. In the control

category the first design received a plus. Control of the first robot only requires the ability

to land the trap on the bug field and then drop them into the containment zone. The

18

Page 21: 2011 Engineering Notebook (Local)

second design requires a slightly higher amount of control as scooping is slightly more

difficult and requires more time. The second design got a zero. The third design was given a

minus on control as it required almost perfect precision to get the claw around the fly and

then to drop it into the containment zone.

In the weight category both designs one and two received “+”s while three got a “-”. Design

one was able to use it's weight to counter balance the arm with the trap. The second design

had a lower weight and didn't need to counterbalance anything. The third design had a long

arm but low weight creating an issue with balance.

Finally they were rated on how easy it was to contain the subject once captured and during

transportation. The first design uses a trap that contains its subjects permanently until

ready to drop out and so gained a “+”. The second design uses an open scoop to collect

subjects creating a small chance of falling but no real danger. The final design however has

a higher chance of dropping the subject and from a very high place possibly losing us points

or getting us disqualified.

19

Page 22: 2011 Engineering Notebook (Local)

Offensive and Defensive Strategies

20

Page 23: 2011 Engineering Notebook (Local)

Before the robot was designed, the team first discussed different ideas for maximum

points, feasibility, and difficulty level. When the different point combinations were

considered, all three types of bugs, food, and separation of the experiments in the different

containment centers were taken into account. Three types of scenarios were evaluated in

the final brainstorming prior to robot construction.

All Flies

The first strategy was to find the maximum points obtainable by capturing every fly and

returning them to the containment centers. This strategy did not include obtaining food, or

sorting the bugs, it did however including putting all the flies into the wood pile

containment center. The point total of this strategy was calculated to be 510 points.

However, this strategy was quickly abandoned because it was deemed to be inefficient.

First of all, to get the 510 points, all flies would have to be captured by our team and be

placed into the wood pile containment area. This is not feasible, considering that other

teams would be seeking the same flies with their robots. Secondly, the main flaw of the fly

catching idea was to collect the flies with a claw-like apparatus. This would require the

robot to grab each of them one by one, which would consume much of the competition

time. Finally, building a claw seemed a terribly difficult engineering task that could not be

accomplished in just six weeks.

One of Every Bug, Plus Food

The second strategy involved obtaining only one of each bug and separating them into the

three containment fields along with a piece of food. With this strategy, cockroaches would

be placed in the stair containment area, termites would be placed in the pipe containment

21

Page 24: 2011 Engineering Notebook (Local)

area, and flies would be placed in the woodpile containment area. The total calculated

points for this strategy were determined to be 239.

Although this strategy had its advantages, such as being relatively easy to complete within

the alloted competition time, it was not chosen for several reasons. The main reason being

it would be an engineering nightmare to design a robot that could be that versatile in the

competition.

All Cockroaches in One Field

The final strategy was to capture most of the cockroaches as fast a possible and dump them

into the wood containment area without food. The total points possible with this strategy is

350, which is only possible if all twelve cockroaches were captured. This was to be

accomplished with a cockroach catching apparatus attached to the extendable arm of the

robot.

The final strategy was chosen because it was possible with only an efficient and specialized

building job. Most of the competition time would be spent waiting for the trap to capture

cockroaches. This simple strategy accomplished the highest point total and was the main

focus of the overall robot design.

22

Page 25: 2011 Engineering Notebook (Local)

Fabrication and Refinement

23

Page 26: 2011 Engineering Notebook (Local)

Before the parts were actually made, our team sat down and discussed possible ideas of the

look and design of the robot. Through discussion, sketching, and prototyping a design was

produced that contained all the aspects of this years game. The robot for the local hub

competition was fabricated using an automated mill. The parts needed were drawn in Auto

CAD and then put into CAM BAM to produce G-Code that was then fed to the CNC mill.

These parts were cut mostly out of the three-eighths wooded sheets. The “claw” on the end

of our arm was fabricated by heating PVC and molding it to our required specifications. The

motor mounts were drawn first in CAD, then by using the band saw, they were cut out and

drilled.

After the first generation, the arm was obviously very ill supported as it swayed from side

to side when the robot turned. This issue was fixed by adding three supporting pieces of

wood along the arm. Although this modification fixed the swaying problem, the arm was

now too heavy to lift with one single motor. A bungee cord was attached onto the end of

the arm and to the base, which easily fixed this problem. Due to lack of material, the wheels

were re-milled to be one-quarter in width, which also helped conserve weight.

24

Page 27: 2011 Engineering Notebook (Local)

Safety

25

Page 28: 2011 Engineering Notebook (Local)

Safety is a top priority at ASMSA Robotics Inc. We cannot afford to lose our valuable team

members due to injury or worse. To prevent any type of injuries, we follow strict safety

rules while working in the wood shop or with the robot. In an unforeseen circumstance, it is

important that we always have safety on our mind so that if there is not a rule that applies

in the situation, we can still be safe.

We make sure that we wear proper safety equipment such as safety goggles and wood

shop appropriate clothing. Only close-toed shoes are allowed and no dangling clothing is to

be worn. There must be be nothing hanging down in front of the operator of machinery and

workers with long hair must keep their hair tied back and out of the way. When operating

machinery, we make sure that we are a safe distance away from the dangerous machines.

No one is to be within close range of the machine operator as this could lead to distractions

and possible injuries. We also make sure that no horseplay takes place in the lab or wood

shop as this could lead to potential injuries or damage to equipment. While in the wood

shop, food and drink are not allowed. These could spill on equipment or be contaminated

by the wood or metal shavings that are produced from the machines.

26

Page 29: 2011 Engineering Notebook (Local)

Appendix

27

Page 30: 2011 Engineering Notebook (Local)

Safety Checklist

28

Page 31: 2011 Engineering Notebook (Local)

Work Shop Safety Checklist and Manual

Proper Safety EquipmentGogglesGlovesClose-Toed ShoesClose Fitting ClothingTied-back Hair

While Operating MachineryStanding a safe distance awayStanding away from operatorTurn off machine to adjustWear appropriate clothing; Including Ear Protection

Before Leaving the AreaLeave the area cleaner than foundSweep all the floorsPut up all unused toolsShut off unnecessary lights

OtherNever work aloneAlways use the proper toolsNo HorseplayNo RunningNo FoodNo DrinkNo TextingAlways THINK before you act

29

Page 32: 2011 Engineering Notebook (Local)

Programming

30

Page 33: 2011 Engineering Notebook (Local)

#pragma config(Motor,  port2,           LeftMotor,     tmotorNormal, openLoop) #pragma config(Motor,  port4,           Trap,          tmotorNormal, openLoop) #pragma config(Motor,  port7,           Arm,           tmotorNormal, openLoop, reversed) #pragma config(Motor,  port9,           RightMotor,    tmotorNormal, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*// 

//Global Variables­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­   int threshold = 40;     // Used to cancel 'noise' of low values   int speed_mod = 3;  // Used to modify output for singl_ctrl 

  int ctrl_type = 3; //1 = dual stick, 2 = single stick, 3 = halo 

  int right_ch1 = 0;   //update 'right_ch1' to new current reading   int right_ch2 = 0;   //update 'right_ch2' to new current reading   int left_ch3 = 0;   //update 'left_ch3' to new current reading   int left_ch4 = 0;   //update 'left_ch4' to new current reading //­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

void control(); void dualS_control(); void singl_control(); void halo_control(); 

task arm() //arm task kept out of main task so arm can be controlled while driving {   while (1 == 1)   { 

    if (vexRT(Btn6U) == 1 )   //if up button on right shoulder is pressed     {                        //move the arms up       motor[Arm] = 127;     }     else if(vexRT(Btn6D) == 1 )   //if down button on right shoulder is pressed     {                            //move the arms down       motor[Arm] = ­127;     }     else     {       motor[Arm] = 0;   //if neither right shoulder button pressed, do nothing with motor     } 

    if (vexRT(Btn5U) == 1 )   //if up button on right shoulder is pressed     {                        //move the arms up       motor[Trap] = 127;     }     else if(vexRT(Btn5D) == 1 )   //if down button on right shoulder is pressed     {                            //move the arms down       motor[Trap] = ­127;     }     else     {       motor[Trap] = 0;

//if neither right shoulder button pressed, do nothing with motor     } 

31

Page 34: 2011 Engineering Notebook (Local)

  } } 

task main() { 

  StartTask(arm);   //begins 'arms' task 

  while(1 == 1)   {     control();   //main subroutine, control scheme switching and motor control     wait1Msec(20);      // the VEXnet controller updates every 15ms or so   } } 

void control() {     right_ch1 = vexRT[Ch1];   //update 'right_ch1' to new current reading     right_ch2 = vexRT[Ch2];   //update 'right_ch2' to new current reading     left_ch3 = vexRT[Ch3];   //update 'left_ch3' to new current reading     left_ch4 = vexRT[Ch4]; //update 'left_ch4' to new current reading 

    if (vexRT(Btn7L) == 1) //dual joystick control       ctrl_type = 1; 

    if (vexRT(Btn7D) == 1) //single joystick control       ctrl_type = 2; 

    if (vexRT(Btn7R) == 1) //halo control       ctrl_type = 3; 

//if up button on right dir pad pressed then activate speed modifier if (vexRT(Btn7U) == 1) 

      speed_mod = 1;     else   //otherwise leave it alone       speed_mod = 3; 

switch (ctrl_type) //use different control mode depending on control type 

{ case 1: dualS_control(); break; 

case 2: singl_control(); break; 

case 3: halo_control(); break; 

 

32

Page 35: 2011 Engineering Notebook (Local)

default: halo_control(); 

void dualS_control()   //dual stick control for bot {     //are either of them over the 'noise' threshold?     if ( (abs(left_ch3) > threshold ) || ( abs(right_ch2) > threshold) )     {         motor[LeftMotor]  = left_ch3;         motor[RightMotor] = right_ch2;     } //NO ­ make no changes//2 motor = 0's necessary bc one channel may be active and other not then     else     {    //other motor won't update         motor[LeftMotor]  = 0;         motor[RightMotor] = 0;     } } 

void singl_control()   //single stick control for bot {     //are either of them over the 'noise' threshold?     if( (abs(right_ch1) > threshold) || (abs(right_ch2) > threshold) )     {         motor[LeftMotor]  = ((right_ch2+right_ch1)/2*speed_mod);         motor[RightMotor] = ((right_ch2­right_ch1)/2*speed_mod);     }     else //NO ­ make no changes.     {         motor[LeftMotor]  = 0;         motor[RightMotor] = 0;     } } 

void halo_control()   //halo stick control for bot {     //are either of them over the 'noise' threshold?     if ( (abs(left_ch3) > threshold ) || ( abs(right_ch1) > threshold) )     {         motor[LeftMotor]  = (left_ch3+right_ch1);         motor[RightMotor] = (left_ch3­right_ch1);     } //NO ­ make no changes//2 motor = 0's necessary bc one channel may be active and other not then    else      {    //other motor won't update         motor[LeftMotor]  = 0;         motor[RightMotor] = 0;     } }

33

Page 36: 2011 Engineering Notebook (Local)

3/8” Wood Usage

34

Page 37: 2011 Engineering Notebook (Local)

35

Page 38: 2011 Engineering Notebook (Local)

Safety Pictures

36


Recommended