You are on page 1of 11

UNIVERSITYOFCALIFORNIA,SANTACRUZ

BOARDOFSTUDIESINCOMPUTERENGINEERING

CMPE118/L:INTRODUCTIONTOMECHATRONICS

SLUG-O-LYMPICS: CITIUS, ALTIUS, SLIMIUS

BackgroundBriefing:

The 31st Summer Games of the Modern Olympiad in Rio de Janeiro have come and
gone.Thechaosofthevenue,thepollutionofthewater,theunexpectedvictories,and
theterribledefeatsareallathingofthepast;thecitybythebayhasretreatedbackinto
her beauty, her music, and her beaches. All told, 10,500 athletes from 206 countries
came to compete in 306 medal events, over 17 days; 42 different sports, in 32
competitionvenues.7.5millionticketsweresold,anduntoldmillionswatcheditaround
theworld.

For the first time in 112 years, Golf has returned as an Olympic sport, featuring the
newly designed Olympic golf course specially built in Barra da Tijuca, south of Rio de

CMPE118/218Mechatronics

FinalProject,Fall2015

Janeiro. The battle between Australias Jason Day and the USs own Jordan Spieth
proved epic, with the midwinter winds off the Atlantic coast wreaking havoc on the
longdrives.

Inanefforttoimprovetheratingsforthetechnerdsaroundtheworld,aswellassave
significantlyoncosts,theOlympiccommitteehasdecidedthatanewsportofrobogolf
will be added to the games. However, since they are broke after the Rio games, they
have decided to engage the UCSC CMPE118 class to develop the robogolf game and
demonstrate the excitement and strategy that can only come from droid on droid
action.

Purpose:
The purpose of this project is to provide an opportunity to apply all that you have
learned in CMPE118 to solve an openended problem. Your task is to build an
autonomousrobotthatwillnavigatethegamefield,pickupballsfromfixeddepots,and
getatotalofthreeballsintotwodistinctgolftargets.

ProjectRequirements:

A. Team and robot meet three Design Reviews (Brainstorm, MidProject Review,
FinalCheckOff)
B. Team maintains an active website and engineering logbook detailing their
progressanddesigns
C. EveryweekteamsatisfiesCheckoffsandmeetswiththeirmentor
D. AllloanedpartsreturnedtoTAs(IOstack,etc.)aftertournament
E. Labcleanedupbeforeendoffinalsweek
F. FinalReportdueatendoffinalsweek
G. ParticipationinPublicTournament(0%ofyourgrade;100%fun)

IfyourrobotcandemonstraterobustFinalCheckOffoneweekbeforethefinaldeadline
theinstructorwillpersonallypresentyourteamwithbeer.Thebeercheckoffhasrarely
beenawarded.

ProjectOverview

Your task is to build a small autonomous robot (bot, droid) that can effectively and
robustly navigate a standardized field, locate a ball loader and load pingpong balls,
locatemultiplegolfballtargets,navigatetothem,anddropthreeballsinatleasttwo
distincttargets(2in1,and1intheother).Youwillbedoingthisinteamsofthree,over
thenextfiveweeks(31days),duringwhichtimeyouwilldesign,implement,test,and
iterateuntilyoucanreliablycompletethetask.Therewillbepracticefieldsinthelabs

CMPE118/218Mechatronics

FinalProject,Fall2015

andlotsofhelpandguidanceavailabletoyou.Dontpanic.Yet.

Thefieldofplayisalargewhite8x8surfacewitha2blacktapeboundary(goingoutof
boundsdisqualifiestherobot).Therearefourballloadersatthefourcornersofthefield
markedwithtrackwire(atthestandard2426KHz)thatwillilluminatetodesignatea
validballloader.Youwillberequiredtoretrievetheballs,getatleasttwoscoresontwo
separategolfballtargets(ballsinthehole)whileyouropponenttriestodothesame.
Therearenorestrictionsonhowtogetballsintotheholethatisuptoyou.

Figure1:FieldofPlayforSLUGOLYMPICS.Blacktapeboundariesandalignmentmarksare2thickPVC
tape, Ball loaders are 12 tall and 4.5 wide, and are marked with 2426KHz track wire extending
diagonallyintothefield10.Threetargets,designatedwithIR2KHzbeaconsare15indiameter,and
haveabeaconlocatedattheircenterataheightof12.

Yourrobotswillstartsomewhereontheedgeofthefield,inarandomorientation.For
checkoff only, the opponent droid will be located somewhere on the field and not
moving.

CMPE118/218Mechatronics

FinalProject,Fall2015

Not all of the Ball loaders will be available for use at


any given time; those that are valid will have their
track wires turned on (those that are not will have
theirtrackwireturnedoff)

Thegolftargetitselfissymmetric.

Theballloadersconsistofa4.5x12tower(Fig.2),
with a plunger mechanism centered on the tower
between 4 and 8 off the ground. Depressing the
plungerwillcause3pingpongballstorollout ofthe
ammo dump at a height of 12 and roughly
proportionaltothevelocityoftheplunger.All3balls
rollwithasingleplunge.Ballloaderswillberestocked
aftertheyaredepleted.Infrontofeachballloaderisa
2426KHz track wire perpendicular to the face of the
loader(seeFig.1),onalinetowardsthecenterofthe
field.

Placed at random within the floor area will be three


tower/targets, consisting of a circular ramp, 9 in
diameterwitha6cutoutinthecenter.Eachramphas
Figure 2: Ball loader tower. The a2widecircularblacktaperingontheoutside,and
tower is 4.5" wide, and 12" tall atthecenterofthetargetisa1diameterrodthatis
withthefeedmechanismplunger 12tall, and is topped by a 4 wide beacon that is
between 4 and 8" from the
transmittinganIRsignalat2KHzwitha50%dutycycle.
ground.
Note: the material of the center pole of the
target/tower can be made of any material and be of
anycolor(yourdesignshouldberobusttothesevariations).

Eachdroidmuststartthematchwithinan11cubevolume(partsmaymoveafterthe
round begins) and remain intact throughout the match. Blocking the view of target
beaconsfromyouropponentisdisallowed.

Your robot is required to stay within the field (marked by 2 black tape), defined by
keeping half of therobot within the black tape. Robots exiting the playing field(more
than half the robot past the black tape boundary) will be disqualified. Your robot is
requiredtodetectcollisionsandresolvethem(e.g.iftheopponentbotoroneofthe
targetsisblockingyourpath,youneedtobeabletomaneuveraroundanimmovable
obstacle).Youarerequiredtobreakcontactwithin5secondsorbedisqualified.

While every attempt has been made to finalize the following specifications and rules,

CMPE118/218Mechatronics

FinalProject,Fall2015

understand that this is a work in progress. As the


projectevolves,wewillbemaking(minor)tweaksto
thespecsaswediscoverwhatflawswehavenotyet
anticipated. These will be announced in class, and
posted on Piazza. They are not meant to destroy
your winning design, but only to make things work
smoothly.Yourunderstandingisappreciated.

MinimumSpecificationCheckoff:
In order to pass this class, your robot must
demonstrate
that it can complete the task. While
Figure 3: Target/Tower. The tower is
12"tallandtoppedbyastandard2KHz the rules and specifications are below, teams are
beacon, the black tape around the free to embellish, go beyond, and otherwise have
perimiter is 2" wide, and the outer funhowever, we suggest you aim for min spec
diameter of the target is 9" with a 6"
first, and then go back and go nuts once you can
innerhole.
meetminspecrobustly.

Yourrobotbeginsthechallengeononeofthefoursidesoftheplayingfieldinarandom
orientation. Within 2 minutes, it must find one of the four ball loaders (indicated as
validbythe2426KHztrackwire)andcollectpingpongballs,findandlocateoneofthe
three tower/targets (designated by a 2KHz IR beacon), and deposit two balls into the
hole,thenfindasecondtower/target,anddepositanotherballintothattarget.Thefirst
teamtoget3ballsintotwoseparatetargetsendsthegame.

At the start of every round, all ball loaders will be loaded with 3 ping pong balls. A
randomselectionofthem(14)willhavetheirtrackwiresilluminated,andallthreeof
thetower/targetswillhavetheirbeaconsturnedon.

Onceaballsisdepositedinthesecondtarget,thegameends.Notethattheopponent
robotforcheckoffwillbeimmobile(andsimplyactasanobstacle),andwillberandomly
locatedonthefield.

Shoulditbecomeapparentthatarobotwillnotcompletearound(forexample,ifitfails
to resolve a collision for more than 5 seconds, or cannot load sufficient balls to
completethetask),therobotwillbedisqualifiedandtheroundwillend.

Tournament:
Inthetournament,youplayagainstanotherteam;teamswillstartondifferentsidesof
theplayingfield,butmaybeonanysideofthefieldexceptyourown.

If your droid successfully loads ping pong balls and deposits balls into two separate
targets (ping pong ball must be completely separate from your droid), and completes

CMPE118/218Mechatronics

FinalProject,Fall2015

thistaskbeforeyouropponent,youwinthematchandadvanceinthetournament.If
neitherteamsucceedsinthischallenge,thevictorywillbeawardedbypoints.Shoulda
tieoccur,bothteamswillloseandneitherwilladvance.

Pointsareawardedasfollows(eachmaybeinvokedexactlyonceperrobotperround):

10points:
LoadingballsfromBallloaders(onlyonce)
20points: Firstballintotower/target
40points: Secondballintotower/target
50points:
Firstballintosecondarytower/target
10points:
Anyadditionalballsintotower/targetsfortiebreakingplay

Robotswillbedisqualifiedforgoingoutofbounds(morethanhalftherobotoverthe
black tape boundary), or for failing to resolve collisions (must break contact by 5
seconds).

Wemay(will)updatetheserulesand/orpointsshould(when)flawsbecomeapparent.

Droid
Thedroidmustbeastandaloneentitythatfitsinan11x11x11cubeatthebeginning
oftheround.Yourmachinemaynotcontainanypingpongballsatthebeginningofthe
round,andwillneedtoretrievetheballsfromavalidballloader(trackwireilluminated)
orfromthefield.Itshouldbecapableofmeetingallspecificationswhiledrawingpower
only from batteries. It must be able to detect bumps at a height of 3.5 above the
ground.Thedroidmustbeabletodetectandresolvecollisionswithanobstacle(break
contactafter5seconds).Droidsshouldbeabletokeepthemselvesonthefield(within
theblack2tapeboundaries).

DroidswillbeprogrammedinC,usingthestandardMPLABXIDE.Yourdroidbehavior
willbeconstructedusingtheES_FrameworkfromLab0(howeveryoumayNOTusethe
Roachprojects).Youmayreprogramyourdroidbetweenroundsifyoudesire,butyou
maynotalteritoncethefieldconfigurationisestablished.

Each droid will be equipped with a remote power switch (using the remote switch
headerontheUnostack).Atthebeginningoftheround,youwillswitchonyourdroid,
andmaynotinterferewithituntiltheroundends.

Materials
Each team will be provided with one Uno Stack, one HBridge, one Stepper Board (if
needed), one DS3658 board, one battery, and one ULN2003. There will be also wire,

CMPE118/218Mechatronics

FinalProject,Fall2015

regulators(fromBELS),andsolderfreelyavailableinthe118labs.

Eachteamislimitedtoabudgetof$150total forotherpartsontherobot,and must


maintain an uptodate bill of materials (BOM). We will have Perfboard, MDF and
FoamcoreavailableforpurchasefromBELS.WewilldoamajorordertoDigikeyandwill
maintain a list of Amazon suggestions for motors, perf board, and other components
within the first week. BELS, Ace Hardware, Fastenal, and Home Depot are all decent
localsources.HSCandTapPlastic(Acrylicfor$1)aremostexcellentresourcesintheBay
Area (get together and caravan). McMasterCarr will deliver nearly any piece of
hardwarewithinacoupledaysbuttheytendtobeexpensive.AmazonPrimeisfreeto
studentsforathreemonthtrial,andwillgetthingstoyouintwodays(orinonedayfor
anextra$5forshipping).

AvailableTools
Itshouldgounsaidthatallworkneedstobedonebytheteamandnotcontractedout.
YouwillhavetheresourcesinBE111,BE113,andBE115aswellasthedrillpress,tool
chest, and Laser cutter in BE138. Your circuits must be soldered on perfboards, no
breadboards. Those of you thinking about PCB houses, you wont get turnaround in
timewithoutblowingyour$150budget.Offtheshelfsensorboards,suchasthosesold
bySparkfunorAdafruit,arefine(butunderstandthatthesoftwareintegrationforthese
sensorscantakeawhile).

FieldSpecifications:
WewillhaveaSolidworksmodelofthefieldavailableafterthemidterm.Themodelin
Fig. 1 will be available on the website in higher resolution, and is drawn to scale.
Modifications(ifany)tothefieldwillbenotedonPiazza.

FurtherclarificationsaboutthefieldspecificationsshouldbepostedtothePiazzaforum.

Safety:
The machines should be safe to the user, the lab and the spectators. For this project,
excessivelyhighvelocityballdeliverywillbediscouraged(sogoaheadandforgetabout
that CO2 PVC pipe launcher you were thinking about.) Voltages are limited to the
rechargeablebatteriesinthelab(youmaypurchaseyourownifyoudlike,butconsider
10V an upper limit), and intentional jamming or blocking of the opposing robot or
masking of any beacon is considered foul play and not allowed. Bots deemed unsafe
willbedisqualified.

NOTE: Young children line the competition field; take this into consideration when
designingyourlaunchmechanisms.EachteamwillberequiredtotakethreePingPong
ballshotsfromtheirownrobotonbarefleshatadistanceof3ftfromthebarreloftheir

CMPE118/218Mechatronics

FinalProject,Fall2015

bot.Allmembersoftheteammustdothis.

Prior to competition your robot should not transcend space or time in any way, nor
shouldyourrobotaltergravitywithinourSolarSystem.However,duringcompetition,
gravityandspacetimemaybealteredatwill.

Evaluation:
Performance testing procedures: All machines will be operated by at least one of the
team members. There will be one round for grading purposes done in the lab to
evaluate droid performance. The public tournament is purely for entertainment
purposes(thoughifyouhavenotyetcheckedoff,successfulcompletionoftheminspec
tasksduringthepublicdemocountsasavalidlatecheckoff).

Gradingevaluation:Eachmachinewillbegradedbasedonitsperformanceinthetesting
beforetheclasscompetitionattheendofthequarter.Eachmachinewillhaveupto2
minutestowinthematch.Gradingisnotbasedonpointvalue,buthowrobustlyyour
robotsolvesthechallenge.

GradingCriteria:

1. Concept(20%):Thiswillbebasedonthetechnicalmeritofthedesignandcodingfor
themachine.Includedinthisgradewillbeevaluationoftheappropriatenessofthe
solution,aswellasinnovativehardwareandsoftwareanduseofphysicalprinciples
inthesolution.

2. Implementation (20%): This will be based on the prototype displayed at the


evaluation session. Included in this grade will be an evaluation of the physical
appearanceoftheprototypeandthequalityofconstruction.Wewillnotpresumeto
judge true aesthetics (though we might comment on it), but will concentrate on
craftsmanshipandfinishedappearance.

3. Report (10%): This will be based on an evaluation of the written report. It will be
judged on clarity of explanations, completeness and appropriateness of the
documentation.

4. Performance (20%): Based on the results of the performance during the evaluation
session.

5. DesignEvaluations(30%):Basedoncheckoffcompletion.

ProjectMilestones:

CMPE118/218Mechatronics

FinalProject,Fall2015

Eachweek,yourteamwillneedtoachievealistofcheckoffstostayonscheduleand
eachpartnerwillneedtosubmitasimplepartnerevaluation.IFYOUDONOTSTAYON
SCHEDULEWITHTHECHECKOFFSyouwillNOTfinishintimeandbeforcedtostay
throughwinterbreakuntilyourrobotiscomplete:STAYONSCHEDULE.

Yourweekswillessentiallybreakintosuch:
Week1:Design,Schedule,andGroupOrder(DesignReviewI)
Week2:ElectronicsandMechanicalPrototyping
Week3:WorkingPrototypeformovingrobotandballloader;StateMachine(Design
ReviewII)
Week4:Finalizingrobotandgettingeverythingtoworktogether.
Week5:CompetitionandFinalCheckOff(DesignReviewIII)

Therewillbeweeklycheckoffs,threedesignreviewsthroughouttheproject,onelab
report,andoneandonlyonecompetition.

Halfofthis projectiscommunicatingwellanddocumentingtostayonschedule.With
thatinmind,weexpecteachteamtomaintainandupdateasmallWordPress,Wiki,or
Googlewebsitefortheproject(postingblockdiagrams,sketches,pictures,schematics,
videos,etc).Wewillusethistoverifyyourcheckoffsforeveryweek.Werecommend
sharing Dropbox folders or SLACK to help you keep your selves on task, but do not
requireit.Thatsaideachteamwillneedtosubmittheirwebsiteandschedulesforthe
DesignReview#1.

A report describing the technical details of the machine will be required. The report
should be of sufficient detail that any skilled CMPE118 alum could understand,
reproduce,andmodifythedesign.

DesignReview1:Thursday,03Nov2016
TeamConcepts,presentyourbestdesigntotheclassforthreeminutes
Comeupwith3teamconceptsforyourdesignfromyourindividualideasanda
bitofbrainstorming.Mixandmatchbetweenthebestofyourdesigns.Howareyouand
your team going to accomplish your project goals? Schedule out your time as well as
yourteams.
Submit your website URL, 3 designs, and schedules to the form (on website).
Bring your best design on paper and team name to class. You will have 3 minutes to
presentyourdesign(andgetsomefeedbackonit).Haveaprimaryandabackupincase
itistoosimilartosomeoneelses.

DesignReview2:MidProjectReview:Thursday,17Nov2016/Friday,18Nov2016
FullPrototype,presentedtothestafffor15minutes.

Present your currentlyworking parts and yourfull design to the instructors for

CMPE118/218Mechatronics

FinalProject,Fall2015

reviewandinsightintopotentialroadblocks.Everysystemshouldbeprototypedatthis
point.

MechatronicsBeerChallenge:Tuesday22Nov2016before6pm
Eachteamgetsexactlythreeconsecutivetriesonthefieldtosuccessfullycompleteyour
final checkoff. If you can complete the task 2 out of 3 attempts, AND your robot still
functions (i.e.: meeting min spec) in the public demo, you get beer. In the history of
mechatronics only three teams have succeeded (and it was easier then). Note that in
thebeerchallenge,thefieldisNOTrandom,but(possibly)setinawaytobedifficultfor
yourparticularrobot.

DesignReview3:FinalCheckOff:Tuesday,29Nov2016toThursday,01Dec2016at
midnight.
Presentyourfinalcheckoffrobottothestaff.Yougetthreetriestosucceedonthefield
ineachsession.

Deliverablesare:
Robotthatmeetsallrequirementsandcompletesthechallenge.

Competition: Friday 02Dec2016, the public demo off your finished, operational
machines.Thisfunperformancewilllikelyhavealargeandenthusiasticaudience.Itwill
be held in the Media Theater, starting at 6:30 PM. You will be expected to arrive at
5:20.

There will be a posttournament beer, dancing, decompress at one of the Santa Cruz
wateringholes.WewillpostplansonPiazza.

CleanupandClassReview:Monday05Dec2016@nooninJacksLounge

LabReport:Thursday08Dec2016at6pm.
Electroniccopyofyourlabreport.
Createasectionforeachdesignandwriteanevaluationofeachaspectofyourdesign:
what went well and what didnt. Make sure to include pictures and links to video as
necessary.AlsoincludeyourfinalBOM.

Notes on successful projects management: There are a few rules of thumb to follow
thatwillmakeyourprojectmuchmoresuccessful,andkeepyouworkingwellasateam.

Thefirstruleisabitparadoxical,butnonethelessimportant:Dowhatyouarebadat.
That is, if you are good at software but bad at mechanics, then you take the lead on
mechanicalstuff,andtakeasecondaryroleinsoftwaredesign.

Thesecondrule:Doubleteameverysingletaskyouneeddone.Thatmeansoneperson

CMPE118/218Mechatronics

FinalProject,Fall2015

isprimary/leadtheotherissecondary.Notethatifyoufollowthefirsttip,thenlikely
thesecondaryisbetteratthetaskthantheprimary.DoNOTattempttosplittasksupso
that each one of you go off and do it and then come backthis never works and is
alwaysslowerinthelongrun.

Whencrunchtimecomes,youcanrunarotationwithyourthreeteammemberssuch
thatonesleeps,twowork(thejustwokenuponeworksundertheonewhohasbeen
up). Then the lead goes to sleep, the secondary goes into lead position (on another
task),andthesleepingonegetswokenuptobesecondary.Whilethisisnotsustainable
beyondacoupleofweeks,youcangetanenormousamountdonethisway.

Again, be careful about sleeplessness and cars/bikes/etc. There are plenty of couches
aroundtocrashon,andanumberofstudentsliveinGSH(200ft.fromthelab).Dont
thinkyoucankeepyourselfawakelongenoughtodrive/bikehome.Besmartaboutthis.

PS:Withthismanypeopleinthelab,itisgoingtobeveryimportantthatyoukeepthe
lab clean and not leave your things lying around. We will be assigning I/O boards and
batteriestoeachteam,andtheywillbeyoursuntiltheprojectisover.

We will be bringing down our box of freedom with random parts that people have
donated over the years, and if you happen to find surplus printers, or other random
electronicsthatpeoplenolongerwant,feelfreetodismantleandputpartsin.However,
pleasediscardallpartsthatarenotsalvageableinanappropriateewastecontainerso
astoreduceclutterinthelab.

Drive motors have, in general, been a makeorbreak part of the project. I would
strongly suggest you consider purchasing some gearhead motors from Jameco,
MPJA.com,orAmazon.com.Orderingthemearly(i.e.:now)wouldensurethatyouhave
a set that will work by the time you need them. I will post on Piazza what I think are
decentmotorsifyouhaveprime,theywillgetherequickly.

PPS: The Mechatronics Beer Challengeany team that is able to complete the beer
challengespec(seeabove)withafullyfunctioningandfinisheddroidafullweekahead
ofthedeadline(TuesdaybeforeThanksgiving,22Nov2016)getsacaseofbeerorother
equivalentadultbeverage(withinreason)suppliedbytheInstructor.Onlythreeteams
haveevercollectedthis.