robo tx training lab activity booklet - fischertechnik · prevent a short-circuit. this can damage...
TRANSCRIPT
-
TXT Discovery Set
ROBOTICS
2
Welcome to the fischertechnik World of ROBOTICS 4
Some General Information 5
Electricity 5
AboutthisActivityBooklet 5
Robot,ArtificialHumans? 6
ROBOTICS,(Almost)EverythingAutomatic 7
Component Explanations 8
EncoderMotors 8
XSMotor 9
LEDs 9
LensTipLamp 9
Phototransistor 10
Pushbutton 10
HeatSensor(NTC) 11
CameraModule 11
ROBOTICSTXTController 12
A Few Tips 13
First Steps 14
Starter Models 15
Pedestrianlight 15
Handdryer 16
TemperatureControl 18
Barrier 19
"CameraMan" 20
SwivelingCamera 22
-
TXT Discovery Set
ROBOTICS
3
Mobile Robots - The Next Challenge 23
MobileRobot 23
HindranceDetector 27
HindranceDetectorwithCamera 28
TrailSearcher 30
DetectionRobot 33
SoccerRobotwithMovementControl 35
SoccerRobot 38
Trouble Shooting 43
InterfaceTest 43
CablesandWiring 43
LooseConnection 43
ShortCircuits 44
PowerSupply 44
ErrorsintheProgram 44
CameraFunction 44
LastSourcesforHelp 45
And what else can I do? 46
-
TXT Discovery Set
ROBOTICS
4
Welcome to the fischertechnik World of ROBOTICS
Hello!
Wearehappyyouhavechosenthe"ROBOTICSTXTDiscoverySet"constructionsetfromfisch-ertechnik.Becausewiththisconstructionsetyoucanconductmanyinterestingexperimentsandsolveexcitingtasks.
Readthisdigitalbookletandtrytheexperimentsandtasks,tolearnstep-by-stephowyoucancontrolandprogramsimpleaswellascomplicatedmachinesandrobotsusingtheROBOTICSTXTControllerfromfischertechnik.
Learningisaprocessofbuildingthingsupfromafoundationanditisnotpossibletostartwiththemostdifficultthingsrightaway,eventhoughtheymaybealittlebitmoreinterestingthanthemoresimpletasks.Thisiswhywehavestructuredtheexperimentsandtasksinthisbookletsothatyoulearnsomethingdifferentwitheverynewtaskandcanthenusethisasthebasisforthenexttask.
Sodon'tworry,wewillstartwithsmallthingsandthenworktogethertoprogresstothebigrobots.
WehopeyouhavealotoffunandsuccessnowexperimentingwithyourROBOTICSTXTDiscoverySet.
Yourteamfrom
-
TXT Discovery Set
ROBOTICS
5
Some General Information
Beforewereallygetstartedwiththeconstructionset,youstillneedtoknowafewthings.Eventhoughthecomponentswewillworkwithareveryrobust,ifyoudonothandlethemproperly,theycanbedamagedundercertaincircumstances.
Electricity
Asyoucertainlyknow,alotofthecomponentsintheROBOTICSTXTDiscoverySetuseelectricpower.Andyouknowitisnecessarytobeparticularlycarefulnottomakeanymistakeswhenworkingwithelectricalcomponents.Thatiswhyyoushouldalwaysreadtheassemblyinstructionsverycarefullywhenwiringtheelectricalcomponents.
Neverconnectthepositiveandnegativepolesdirectlytooneanothertopreventashort-circuit.ThiscandamagetheROBOTICSTXTControllerortherechargeablebattery.
Thesubjectsofelectricityandelectronicsarejustasinterestingasrobotics(whichiswhatthisconstructionsetisabout)andthereisaconstructionsetfromfischertechnik,whichdealsspecificallywiththesesubjects.Ifyouareinterestedinthis,youwillalsohavejustasmuchfunwithour"PROFIElectronics"constructionsetaswiththeROBOTICSTXTDiscoverySet.
About this Activity Booklet
ThisPDFactivitybooklethasanumberoffunctions,whicharenotpresentintheprintedbookletandwhichmayalreadybefamiliartoyoufromtheInternet.
▯ Links within the Booklet
Whensomethingismentionedsomewhereinthetext,whichisexplainedinmoredetailatanotherpointinthisbooklet(forexample,components),thetextappearsindarkblueandunderlined.Youcanclickonthetexttomoveautomaticallytothepagecontainingtheexplanation.Thisiscalleda"crossreference."
-
TXT Discovery Set
ROBOTICS
6
▯ Background Infos
Insomecasesinthisbooklet,therearetermsorforeignwords,whichmayrequireexplanation.Thesetermsaredisplayedingreenandunderlined.Ifyoutouchthetextwiththemousepointer,awindowappearswithanexplanation.
▯ Link Outside of this Booklet
AfewlinksrequireanInternetconnection(forexample,thefischertechnikwebsite),oraninstalledROBOPro(forconnectiontotheROBOProonlinehelp).Thesetermsaredisplayedinlightblueandunderlined.
▯ Pictures
Apictureiswortha1000words.Youhavecertainlyheardthissentencebefore.Andbecausethiscertainlycontainsalotoftruth,youcandisplayapicturebytouchingthewordsinbrownandunderlinedtoseeapictureshowingwhatismeantinthetext.
▯ The ROBO Pro Icon
Thisisalwayslocatedinthevicinityoftasks.Thismakessense,becauseassoonasyouclickonit,asuitableexampleprogramopenswithapossiblesolution.
Allexampleprogramsarelistedunder C:\Programs (x86)\ROBOPro\Example programs\ROBO TX Automation Robots.[Translatorsnote:HavethesedirectorynamesbeenprogrammedinEnglish?Ifnot,theywillhavetoremaininGerman.]
Robot, Artificial Humans?
Whatisyourfirstthoughtwhenyouheartheword"robot?"Haveyoueverseenarobot?Inamovieorontelevision?Orperhapsarealone?
Therearemanydifferenttypesofrobots.Somerobotslookabitlikeahuman,whileothershaveonlyoneormorearms.So,whatexactlymakesarobotarobot?
Thedictionarystates:"Robotsarestationaryormobilemachines,whichperformsettasksaccordingtoacertainprogram."
click-me.rpp
-
TXT Discovery Set
ROBOTICS
7
ROBOTICS, (Almost) Everything Automatic
Thus,robotsaremachinescontrolledbyaprogram.Andwecallthiscontrolofmachines(orinourcasemodels)"ROBOTICS."
The"ROBOTICSTXTDiscoverySet"providesyouwithawonderfulstarttolearnaboutthissubject.Thisisbecausetheconstructionsetcontainseverythingyouneedtobuildandcontrolmanydifferentmachines.
YoucancreatetheprogramsforcontrolofthemodelsonaPCwiththeaidoftheROBOPro4.0(orhigher)softwareandthentransferthemtotheROBOTICSTXTControllerusingtheUSBorBluetoothconnection.Thecontrollerthencontrolsoroperatesthemodelaccordingtotheprogramyouhaveprepared.
-
TXT Discovery Set
ROBOTICS
8
Component Explanations
The construction set contains all of the followingFirst,itcontainsnumerousfischertechnikbuildingblocks,aswellasmotors,indicatorlightsandsensorsandcoloredassemblyinstructionsforbuildingvariousmodels.
Afteryouhaveunpackedallthebuildingblocks,itisnecessarytofirstassembleafewcomponentssuchascablesandplugsbeforeyoucanreallygetstarted.Detailsaregivenintheassemblyinstructionsunder"AssemblyTips."Itisbesttodothisfirst.
ActuatorsActuatorsareallcomponents,whichcanperformsometypeofaction.Thismeansthattheybecome"active"insomewaywhentheyareconnectedtoelectricpower.Inmostcasesyoucanseethisdirectly.Amotorruns,anindicatorlightilluminatesandsoforth.
Encoder Motors
Weusethetwoencodermotors,containedintheconstructionset,todriveourrobots.Atfirstglance,thesearenormalelectricmotors,designedforavoltageof9voltsandmaximumcurrentinputof0.5amperes.
Buttheencodermotorscandomore:Inadditiontotheconnectionforthepowersupplyforthemotor,theyhaveanotherconnectorforathree-pinconnectioncable,whichisusedincombinationwithaso-calledencodertomeasuretherotationofthemotor.
Thisencoderworksthesamewayasaspeedometeronabicycle.Amagnet(inmostcasesforabicyclelocatedononeofthespokes)passesbyasensor(attachedtotheforkofthebicycleinmostcases)witheachrevolutioncausingthesensortogenerateapulse.Thesepulsescanbecounted,and,inthecaseofaspeedometer,forexample,multipliedbythecircumferenceofthetire.Thisgivesusthedistancetraveled.
Theencodersonthefischertechnikencodermotorsgeneratethreepulseseachtimethemotorshaftrevolvesonce.Andbecausetheencodermotorsalsohaveagearboxwithatransmissionratioof21:1
-
TXT Discovery Set
ROBOTICS
9
(read"21to1"),onerevolutionoftheshaftcomingoutofthegearbox,correspondsto21x3=63encoderpulses.
XS Motor
TheXSmotorisanelectricmotor,exactlyaslongandhighasafischertechnikbuildingblock.Inaddition,itisverylight.Thismeans,youcaninstallitatpointstoosmallforthebigmotors.
BothgearboxesincludedintheconstructionsetfitperfectlyontheXSmotor.
TheXSmotorisdesignedforasupplyvoltageof9voltsandamaximumcurrentof0.3amperes.
LEDs
TwoLEDsarecontainedintheconstructionset.Theycanbeusedinavarietyofways.Forexampleassignallightsinatrafficlight,asflashinglightsonarobotorforbetterilluminationofanimagesuppliedbythecameraalsoprovidedintheconstructionset.
TheLEDsaredesignedforavoltageof9voltsandconsumeapproximately0.01amperesofcurrent.
Caution! When connecting LEDs to the power supply, always pay particular attention to correct polarity. Connect the positive pole to the red marking on the LED.
Lens Tip Lamp
Thisincandescentbulbcontainsalenstofocusthelight.ItlooksverysimilartoanLED.Becarefulnottomixthemup.Onthelenstiplampthepolaritymakesnodifference-thisiswhythesocketisnotmarked.Youneedthelenstiplamptobuildalightbarrierincombinationwiththephototransistor.
Thelenstiplampisdesignedforavoltageof9voltsandcurrentofapprox.0.15amperes.
-
TXT Discovery Set
ROBOTICS
10
SensorsSensorsaresotospeakthecounterparttotheactuators.Thisisbecausetheydonotperformanyactions,butreacttocertainsituationsandevents.Forexample,apushbuttonreactswhenpressed,allowinganelectriccurrenttofloworinterruptingitsflow.Aheatsensorreactstothetemperatureinitssurroundings.
Phototransistor
Phototransistorsarealsocalled"lightsensors“.Thisisa"feeler"thatreactstobrightness.
Foralightbarrierthisisthecounterparttothelenstiplamp.Whenthereisahighdegreeofbrightness,thatiswhenthetransistorreceiveslightfromthelenstiplamp,itconductselectricity.Ifthebeamoflightisinterrupted,itdoesnotconductanyelectricity.
Caution! When connecting the phototransistor to the power supply, pay particular attention to correct polarity. Connect the positive pole to the red marking on the phototransistor.
Pushbutton
Thepushbuttoncouldalsobecalledatouchsensor.Pressingtheredbuttonactuatesaswitchmechanicallyallowingelectricitytoflowfromcontact1(middlecontact)tocontact3.Atthesametimethecircuitbetweencontacts1and2isinterrupted.Soyoucanusethepushbuttonintwodifferentways:
As a "normally open switch" (NO or push-to-make switch)
Contacts1and3areconnected.
Pushbuttonswitchpressed:Electricityflows.Whenthepushbuttonisnotpressed:Electricitydoesnotflow
As a "normally closed switch" (NC or push-to-break switch)
Contacts1and2areconnected.
Pushbuttonswitchpressed:Noelectricityflows.Whenthepushbuttonisnotpressed:Electricityflows.
3
1
2
3
1
2
-
TXT Discovery Set
ROBOTICS
11
Heat Sensor (NTC)
Thiscomponentisaheatsensorformeasuringtemperatures.At20°Citselectricalresistanceis1.5kΩ(kiloohms,butpronounced'kil-ohms').NTCstandsforNegativeTemperatureCoefficient.Thissimplymeansthattheresistancevaluedecreaseswhenthetemperatureincreases.
Theinformationprovidedbythesensors,forexample,bright/dark,pressed/notpressedandtemperaturevalue,can,aswewillseelater,betransmittedbytheROBOTICSTXTControllertoaPCwhereitcanbeusedincombinationwiththesoftwaretoprogramamotortodriveafanwhenalightbarrierisinterrupted.
Camera Module
Thecameramoduleisaparticularlyversatiletypeofsensor.Theimageresolutionis1megapixel(meaningthateachimageconsistsofonemillionimagedots).ConnectthecameratothelargeUSBport(USB1)onyourROBOTICSTXTController.TheimagesfromthecameracanbetransferredtothePCandviewedonthemonitor.Thisallowsyoutoseewhatyourrobotisdoingatanyparticulartime.MoreovertheROBOTICSTXTControllercanprocesstheimagestherebyrecognizingmotion,colorsandtracks,allowingyoutocontrolyourrobotmodelaccordingly.ItisalsopossibletoconnectthecameradirectlytoaUSBinterfaceonyourPCandprocesstheimageswiththeROBOProsoftware.Thispossibilityisalsousedbyafewmodels.
Youcanfocusthecameraimagebyturningthecameralens.
ROBO Pro 4.x SoftwareROBOProisagraphicprogramminginterfaceforcreatingprogramsfortheROBOTICSTXTController.
A"graphicprogramminginterface"allowsyoutocompileprogramsvisuallywiththeaidofgraphicsymbolsinsteadof"writing"themoutby
-
TXT Discovery Set
ROBOTICS
12
handlineforline.Anexampleofsuchaprogramisshownattheleft.
TheprocedureforcreatingsuchaprogramisdescribedindetailintheChapter"FirstSteps".TheROBO Pro HelpfeaturealsoshowshowthisworksinChapters3and4.
ThissoftwarehasalreadybeeninstalledonyourPCtogetherwiththisactivitybooklet.
ROBOTICS TXT Controller
TheROBOTICSTXTControlleristheheartofthisROBOTICSconstructionset.Itcontrolsactuators,andevaluatestheinformationfromthesensors.
ForthispurposetheROBOTICSTXTControllerhasnumerousterminalsforconnectiontothecomponents.TheinstructionmanualfortheROBOTICSTXTControllerdescribeswhichcomponentscanbeconnectedtowhichconnectionsandthefunctionsoftheconnections.
ThecolortouchscreenallowsconvenientoperationofyourROBOTICSTXTController.ThecameracontainedintheconstructionsetcanbeconnectedtotheUSBhostport(USB-1).TheintegratedBluetoothandWLANinterfaceisaparticularlyinterestingspecialfeature.ItallowsyoutocompleteawirelesslinkbetweenyourPCandtheROBOTICSTXTController.
YoucandefinehowthecontrollerinteractswiththeindividualcomponentsandwhattheyaretodoindetailintheprogramyouwritewiththeROBOProsoftware.
Power Supply (not included)Asyouknow,manyofthecomponentsintheROBOTICSTXTDiscoverySetneedelectricitytooperate,sonaturallyyoualsoneedapowersupply.
ThefischertechnikAccuSetisbestsuitedforthis.Itisnotincludedintheconstructionset.
-
TXT Discovery Set
ROBOTICS
13
A Few Tips
Experimenting makes the most fun when the experiments also work. This is why you should follow a few basic rules when building the models.
Work carefullyTake your time and look precisely at the assembly instructions for the model. If you have to look for an error later, this will take much longer.
Check the movement of all partsWhen putting models together continually check to see if parts, which have to move, move easily.
Use Interface TestBefore starting to write a program for a model, you should test all parts connected to the ROBOTICS TXT Controller, using the interface test feature in ROBO Pro. How this works is described in the ROBO Pro help in Chapter 2.4.
-
TXT Discovery Set
ROBOTICS
14
First Steps
Nowthatyouhavemadeallofthepreparationsandreadtheinformation,youcanfinallystartworking.
Thischapterdescribeshowto:
▯ buildthefirstsimplemodel,aventilatingfan,andconnectittotheROBOTICSTXTController,
▯ connecttheROBOTICSTXTControllertothepowersupplyandPC,
▯ loadtheROBOProSoftwareandtestthemodel,
▯ loadandstartaROBOProprogram,and
▯ createandstartyourfirstsimpleprogramwithROBOPro
Clickhere,toseethefirst,easy-to-understandsteps.
SinceyouwillbeworkingparticularlywiththeROBOProSoftwareinadditiontothefischertechnik
componentsthemselves,youshouldbefamiliarwiththedetailsforwritingprograms.AndbecausethisisexplainedveryclearlyinChapters3and4oftheROBO Pro Help,it
isbestatthispointtocontinuebyworkingthroughthesechapterscarefully.
Thefollowingtipalsoapplieshere:Takeyourtimeandconcentrate;thenyouwillhavethatmuchmorefunwiththemodelslater.
file:%20%20%20%20Terminal\app.exe%20language%253Dde%20page%253Dfirststeps
-
TXT Discovery Set
ROBOTICS
15
Starter Models
AfterreadingthroughChapters3and4intheROBO Pro Help,youwillbeabletoprogramsomeofthemodelsintheconstructionset.Let'sgetstarted.ROBOProhasvariouslevels,whichyoucanselectonthemenubar.WewillstartwithverysimpleprogramsatLevel1.Wheneveryouhavefinishedbuildingandwiringamodel,checkwhetherallinputsandoutputsontheROBOTICSTXTControllerareproperlyconnectedandifthesensors,motorsandlightsallfunctionproperlywiththeaidoftheinterface test.
Pedestrian light
Apedestrianlighthasbeeninstalledinfrontofyourhouse.Sincethetechnicianfromthetrafficlightcompanydoesn'thavemuchtime,youoffertoprogramthetrafficlightcontrolforhim.
Themanexplainstoyouhowthecontrolissupposedtowork.Butfirst,buildthemodel.
Task: (Level1)
Thetrafficlightshouldberedinitially.WhenpushbuttonI1ispressedbyapedestrianthetrafficlightshouldchangetoyellowthreesecondslaterandafteranadditionalfoursecondstored.Thegreenphaseistolastfor10seconds,beforethelightturnsredagain.
Programming Tips:
ThevariousLEDsareassociatedwiththefollowingoutputsontheTXTController.
▯ Red–M1
▯ Green–M2
Turntheindicatorlightsonandoffoneafteranothertoobtainthedesiredsequence.
Youcanloadthefinishedprogrambyclickingonthepictureontheright. Pedestrian_light.rpp
-
TXT Discovery Set
ROBOTICS
16
Hand dryer
Inthebathroomatyourschool,newhanddryershavebeeninstallednexttothesinks.Theseareequippedwithlightbarriersforswitchingthefanonandoff.
First,buildthemodelasdescribedintheassemblyinstructions.
Task 1: (Level 1)
Nowitisnecessarytoprogramthehanddryersothatassoonasthelightbarrierisinterruptedthefanswitchesonandthenbackoffagainafter5seconds.
Programming Tips:
IntheprogramsequencefirstswitchonthelightforthelightbarrieratoutputM2.
Thenwaitonesecondtoallowthephototransistortimetoreacttothelight.Thelightbarriershouldthenworkproperly.
Thencheck(interrogate)thephototransistoratInputI1.Ifthevalueis"1"(lightbarriernotinterrupted),theinputshouldbeinterrogatedcontinuouslyinaloop.
Assoonasthevaluechangesto"0"(lightbarrierinterrupted),switchmotorM1onandthenbackoffafter5seconds.
Thenreturntotheloopforinterrogatingthephototransistor.
Starttheprogramwiththestartbuttonandcheckwhetheritworksthewayyouwant.Ifitdoesworkright,you'reonyourwaytobecomingaprofessionalROBOProprogrammer.
Ifitdoesn'twork,trytofindoutwhy.
Theinterface testallowsyoutocheckwhetherallinputsandoutputsworkproperlyandiftheyareconnectedcorrectly.
Whiletheprogramisrunning,youcanfollowtheprogramsequencewiththeredbuildingblocks.Thisallowsyoutoquicklyseewhereanerrorhascreptin.
-
TXT Discovery Set
ROBOTICS
17
Finallyyoucancompareyourprogramwiththefinishedexampleprogram,whichcanbecalledwiththeiconontheright.
Afteryouhavetakenthishurdle,wewanttochangethetaskslightly:
Task 2: (Level 1)
Theschoolprincipalisalwaysinterestedinsavingenergyanddoesn'tlikethehanddryertocontinuerunningafteryourhandsaredry.Heasksyoutorewritetheprogramsothatthefanshutsoffassoonasyoupullbackyourhands.That'snotaproblemforyou,isit?
Programming Tips:
Asinthefirstprogram,itisnecessarytointerrogatethephototransistorI1.Ifthevalueis"0,"switchmotorM1onandifthevalueis"1"switchmotorM1offandsoforth.
Forthistask,thereisalsoacompleteprogramjustincase:
Handdryer_1.rpp
Handdryer_2.rpp
-
TXT Discovery Set
ROBOTICS
18
Temperature Control
Athomewhereyoulive,anewairconditioningsystemhasbeeninstalled.Ofcourse,youimmediatelyaskedtheplumberhowthetemperaturecontrolworks.Hewashappytoexplaintoyouthatatemperaturesensorcontinuallymeasuresthetemperature.Assoonasamaximumvalueisexceeded,theairconditioningisswitchedon.However,ifthetemperatureisbelowtheminimumvalue,theairconditioningisswitchedoffandtheheatingturnedon.Nowyouneedtotrytoprogramacontrolcircuitbasedonthe"temperaturecontrol"model.Butfirst,buildthemodel.
Task: (Level 1)
TheheatingissimulatedbylenstiplampM2.ThefanatoutputM1servesasthe"airconditioningunit".AnNTCthermistoratinputI8isusedtomeasurethetemperature.
Programthemodelsothataboveacertaintemperaturevaluetheheatingisshutoffandthefanisturnedon.Thisistocoolthehouseuntilaminimumvalueisreached.Thenthefanistobeshutoffandtheheatingturnedon.
Programming Tips:
Please note!TheresistanceoftheNTCthermistordecreaseswithincreasingtemperature.Therefore,theuppertemperaturelimitisthesmallestvalueforI8.Thefanshouldswitchonwhenthislimitisreached.ThelowertemperaturelimitisthelargestvalueforI8.Theheatingshouldswitchonwhenthislimitisreached.
YoucanseethevalueofI8atroomtemperatureusingtheinterface test.TurnontheindicatorlightM2andobservehowmuchthevaluedecreases.Nowswitchonthefantofindouthowmuchthevalueincreases.Usethisasabasisforselectingthelimitsforheatingandcooling.
Youcanopenthefinishedprogrambyclickingontheiconontheright.
Temperature_control.rpp
-
TXT Discovery Set
ROBOTICS
19
Barrier
Suchabarrierisfrequentlylocatedattheentranceorexittoaparkinglot.First,buildthemodelasdescribedintheassemblyinstructions.
Ourbarriercouldbeattheexit.
Task: (Level 2)
Whenacarapproachesthebarrier,itinterruptsalightbarrier.Thisshouldopenthebarrier,leaveitopenacertaintime(e.g.5seconds)andthencloseitagain;howeveronlywhenthelightbarrierisnotinterrupted,becauseotherwisethebarriercoulddamageacarlocatedexactlybelowthebar.Thetrafficlightshouldturngreentoshowthecardriverthatthebarrierisopenandredwhenitisclosed.
Programming Tips:
Useasubroutineforthe"opening"and"closing"operationsforthebarrier(seealsoROBO Pro HelpChap.4).
ForthispurposesetROBOProtoLevel2.
Youcanopenthefinishedprogrambyclickingontheiconontheright.
Barrier.rpp
-
TXT Discovery Set
ROBOTICS
20
"Camera Man"
Nowwewanttotakealookattheinterestingsubjectofcamerasandimageprocessingforthefirsttimeinthisactivitybooklet.Forthispurposebuildthe"cameraman"modelasdescribedintheassemblyinstructionsandconnectthecameradirectlytoyourPCwithaUSBcable.Thecamerawillberecognizedandtheassociatedcameradriverinstalledautomatically.
NowstarttheROBOProsoftware.
Task 1:
PlacethecameramaninfrontofyourPCandletROBOProshowyouwhatthecamera"sees".
Programming Tips:
TodothisitisnotevennecessarytowriteaROBOProprogram.SimplyopenanewprograminROBOPro,gotothe"camera"tab,setthecameraconnectionto"PC"thereandclick"Switchoncamera".
Youcanfocustheimagebyturningthelensonthecamera.
Task 2: (Level 3)
Nowyoucanprogramthecameramantoreacttomotion.Assoonassomeonewalksthroughtheimage,aredlightconnectedtooutputM1shouldflashthreetimesontheTXTController.
Programming Tips:
ConnecttheTXTControllertoyourPCusingasecondUSBinterface.
ConnectanLEDwithredcovertooutputM1ontheTXTController.
Switchtolevel3inROBOPro.RefertotheROBO Pro HelpinChap.5toseetheadditionalfunctionsavailablethere.
-
TXT Discovery Set
ROBOTICS
21
Drawarectangleofthedesiredsizeinthecamera"Motion"sensorfieldinROBOPro.
Theinteractivefieldformotionrecognition,whichcanbeopenedbyright-clickingwiththemouseontheinsertedsensorfield,allowsyoutosethowintensethemotionmustbetoactuatethesensorandhowextensivethemotionmustbeinrelationtotheentiresensorfield,forittoreact.Thebestwayistotryitwiththedefaultvaluesfirstandthenlaterchangethesettingstoseethereaction.
CreatearoutineinROBOProforcheckingwhetherthesensorfieldhasrecognizedamotion.Tointerrogatethesensorfield,usethecamerainputelementfromLevel3inROBOProandusealooptocheckwhethermotionispresent.
Interrogationof"MotionC"input (Changecontrast).Isthevalue >0?Ifso,thelightshouldflash.
FurtherinformationonthecamerasensorfieldsisgiveninROBO Pro HelpChap.11.
Youcanopenthefinishedexampleprogramhere.
Camera_man.rpp
-
TXT Discovery Set
ROBOTICS
22
Swiveling Camera
Nextyoucanbuildasurveillancecameraforyourroom.First,buildthemodelasdescribedintheassemblyinstructions.
Task: (Level 3)
Thiscameraisdrivenbyanencodermotortorepeatedlyturnitslightlybeforecheckingifanythingmovesintheroom.Ifso,itshouldtriggeranalarmontheTXTControllerloudspeaker;ifnothingmoves,itshouldcontinuetoturnslightlybeforecheckingagain.
Afterreachingtheendoftheswivelrange,itshouldreturntoitsinitialpositioninsmallincrements.
Programming Tips:
Thecamerashouldfirstmovetoitsinitialposition(untilpushbuttonI1isdepressed).
Thenitshouldrepeatedlymoveacertainnumberofpulsesintheotherdirection.Youcaneasilycheckhowmanypulsesarepracticalperrotationwiththeaidoftheinterface tests.
Usethecamera"Motion"sensorelementtocheckwhetheranythingchangesintheimage.Ifso,triggeranalarmontheTXTControllerloudspeaker,see(ROBO Pro Help).
Repeatthisoperationuntilthecamerareachestheendofitsswivelrange,thenmovebackintheotherdirectiontolimitswitchI1.
Hereisoursolutionforthistask:
ThismodelcanbeoperatedindependentlyofthePCinthedownloadmode.Itistheperfectsurveillancecameratokeeptrespassersoutofyourroom.
Swiveling_camera.rpp
-
TXT Discovery Set
ROBOTICS
23
Mobile Robots - The Next Challenge
Mobile Robot
Withthismodel,wewanttofindouttogetherhowyoucancontrolamovingrobot.Howdoyougetittomove,howdoesthesteeringworkandcanyouperhapsimproveitsprecision?Wewillanswerthesequestionswiththehelpofthetasksinthischapter.
Butfirstofcourse,youhavetoputtherobottogether.Asalways,youwillfindthedescriptionintheassemblyinstructions.
Takeyourtimeputtingittogether.Lookcloselyatthedrawingsintheassemblyinstructionsandthewiringaswell.IfyoudonotconnectthecomponentstotheROBOTICSTXTControllerasdescribedintheassemblyinstructions,therobotmaynotbehavelikeyouexpect.
Afterassembly,checkallcomponentsconnectedtotheROBOTICSTXTControllerwiththeROBOProsoftwareinterface test.Whenthemotorsturncounterclockwise,therobotshouldmoveforwards.
DirectionofmotionDirectionofrotation,
motor1Directionofrotation,
motor2
Forwards Left LeftBackwards Right Right
Left Left RightRight Right LeftStop Stop Stop
Task 1: Simply Straight Ahead
Havetherobotmovestraightaheadfor3seconds(notonatable,dangeroffallingoff!)andthenstraightbackfor3seconds.
Didtherobotreallycomebacktoitsstartingpoint?
Repeattheprogramseveraltimesandobserveiftherobotreal-lymovespreciselystraightaheadandback.
-
TXT Discovery Set
ROBOTICS
24
ProgrammingTips:
Evenifthistaskiseasyforyou,wewouldliketomakeafewsuggestions:
The Steering
Evenifitisfuntowatchtherobotmovestraightahead,itissomewhatmonotonous.That'swhy,itisnowtimetolearntomoveinacurve.Andhowisthatdone?Verysimple:
Task 2: Also moving in a curve
Lettherobotmovestraightaheadagainforthreeseconds(bothmotorsturningatthesamespeed)thenchangethedirectionofrotationoftherightmotor(M1)foronesecondandthenlettherobotmovestraightaheadagainforthreeseconds(meaningbothmotorsatthesamespeedinthesamedirection).
Findouthowlongyouhavetoletthemotorsrunindifferentdirectionstomaketherobotturn90°.
Programming Tips:
Forthis,changethewaitingtimeafterthecommandforchangingthedirectionofthesecondmotor.
Youcanopenthefinishedprogramasusualbyclickingontheiconontheright.
Task 3: Moving through a figure
Nowthatyouknowhowlongitisnecessarytoreversethedirectionofrotationofamotortomaketherobotturntotherightorleft,programtherobotsothatitmovesinarectangle,returningtoitsstartingposition.
Makeamarktocheckiftherobotreallymovespreciselytoitsstartingposition.
Mobile_robot_1.rpp
Mobile_robot_2.rpp
-
TXT Discovery Set
ROBOTICS
25
Programming Tips:
Youcancreateasubroutinefor"turningacorner."Thiskeepsthemainprogramclearer.
Youprobablyalreadyhavethesolutiontothetaskinyourhead.Buthereisanotherrecommendation,justincase:
Always the same, but not exactly?
Youhaveprobablynoticedthattherepetitionaccuracyoftherobotcouldbeimproved.Evenwhenitperformspreciselythesametaskseveraltimes,theresultisnotalwaysthesame.Thisisduetovariousreasons.Oneoftheseisthatbothmotorsdonotrotateatexactlythesamespeed.Forexample,thegearboxforonemotorcanrunwithmorefrictionthantheothermotor.Andbecausebothmotorsareoperatedatthesamevoltage(ninevolts),thismakesonemotorrotateslowerthantheother.Since,inthepast,wehavecontrolledourrobotusingwaitingtimes,perhapsonewheelhasrotatedfartherduringthistimethantheotherone.
Thus,thesolutionwouldbetohavebothmotorsrotateatexactlythesamespeed.Andthisispreciselywhatencodermotorsdo.
Task 4: Using Encoder Motors
Repeatthelasttaskusingtheencodermotorelementsinsteadofthenormalmotoroutputandwaitingtimeelements.HowtousetheseisdescribedintheROBOProhelpinChap.12.6.
Programming Tip:
Withtheencodermotorelementyoucancontrolbothmotorssimultaneouslywithoneprogramelement.Withthedistanceentryfieldyoucanseteachmotortoturnexactlythedistanceitissupposedto.
Mobile_robot_3.rpp
-
TXT Discovery Set
ROBOTICS
26
Youcanopenthesolutionsuggestionsasusualbyclickingontheiconsontheright.
AnadditionalprogramelementisnotrequiredinROBOProtocountthepulsesatthehighspeedcounterinputsC1-C4.ThecounterinputC1isautomaticallyassignedinternallytomotorM1;M2isconnectedtoC2andsoforth.
Note:Ifthemodeldoesnotmovestraightaheadinspiteofusingtheencodermotorelementsthecausecanbethemodelitself.Forexample,ifahubnut,whichtransferstheforcefromtheaxletothewheels,isnottightenoughtheaxleslipsandthemodelmovesinacurveeventhoughthemotorsarerotatingatthesamespeed.Thereforebesurethehubnutsaretightenedwell.
Mobile_robot_1_sync.rpp
Mobile_robot_2_sync.rpp
Mobile_robot_3_sync.rpp
-
TXT Discovery Set
ROBOTICS
27
Hindrance Detector
Yourrobotcannowmovestraightaheadandturn.Anduptonowitdoesthispreciselyasdescribedinyourprogram.
However,arobotshouldactuallybeabletoreactasindependentlyaspossible.Thisiswhywenowwanttohaveitreacttoobstacleswiththeaidabumper.
First,buildthemodelasdescribedintheassemblyinstructions.
Task:
Thehindrancedetectorshouldmovestraightahead.Assoonasithitsanobstaclewithitsleftbumper,itshouldstop,movebackashortdistance,turnslightlytotherightandthencontinuetomovestraightahead.Ifithitsanobstaclewithitsrightbumper,itshouldmovearoundtheobstacletotheleftinthesamemanner.
Programming Tips:
Leftbumper:PushbuttonI6;Rightbumper:PushbuttonI5
Useasubroutineforeachofthevariousactions:forwards/reverse,goaroundtoleft/right.
Ensurethattherobotdoesnotmovethesamenumberofpulseswhenmovingtotherightandtotheleft;otherwiseitcouldgetintoacornerandnotbeabletogetout.Howeverifthenumberofpulsesisdifferent,itwillbeabletoworkitswayoutofacorner.
Youcanfindthefinishedprogramhere:
Hindrance_detector.rpp
-
TXT Discovery Set
ROBOTICS
28
Hindrance Detector with Camera
Nowyoucanequipyourmobilerobotwithacamerasoitcanseewhereitisgoingandallowyoutocontrolitbyremotecontrol.Todothissimplytakethehindrancedetectorandinstallacameraasdescribedintheassemblyinstructions.ThecameracanbeconnectedtotheUSB-1interfaceontheTXTController.
Task 1:
Firsttherobotshouldbehaveinexactlythesamemannerasthehindrancedetectorwithoutcamera.Inadditionitshouldstopandturnaroundwhenyouholdaredcardinfrontofit.
Usethecamera"Color"sensorfieldforcolorrecognitionanddrawitlargeenoughthatitsareacoversthemajorportionofthecameraimage.
Thensettherobotparameterssothatitmovesstraightaheadaslongasaredcardisnotdetectedandnohindranceispresent.Youcanusethehindrancedetectionfromthe"Hindrancedetectorprogram".
Itisbesttouseyourownsubroutineforcheckingthecolor.Checkthecamerainputtodetermineiftheredvalueisgreaterthangreenandblueandifthecolorislighterthanblack.
Usethesmallredcardcutfromthelargecuttingtemplateintheconstructionset.
The"sensorvalues"inthecamerawindowinROBOProshowthecolorvaluefortheredcard.
Againyoucanseeoursolutionhere:
Note:Avoiddirectsunlight.Therobotmayconfusesunlightwiththeredcard.Particularlybrightsunlightwithahighpercentageofred.
Hindrance_detector_camera_1.rpp
-
TXT Discovery Set
ROBOTICS
29
Task 2: Remote control of robot
Note:ThistaskrequiresaWLANconnectionbetweentheTXTControllerandyourPC.TheprocessforcompletingthisconnectionisdescribedintheinstructionmanualfortheTXTController.
Tips:
AftersuccessfullycompletingtheWLANconnection,opentheappropriateprogramwiththeicon.
Changetothecontrolpanelandlookfortheinterfaceforremotecontrolofthemodelthere.
Starttheprogramintheonlinemode.Nowyoucanusethevariousbuttonsontheremotecontroltocontroltherobotandyoucanalsoseewhereitisgoing.Ifyouoverlookanobstacle,itwillbedetectedbythebumperandthemodelwillautomaticallymovebackashortdistance.
Havefunexploringthearea!
Hindrance_detector_camera_2.rpp
-
TXT Discovery Set
ROBOTICS
30
Trail Searcher
Withthismodelthecameraisusedtomaketherobotmovealongaline.Theamazingpartoftrailsearchingwiththecameraisthat,inadditiontorecognizingwhetheratrackispresent,itcanalsodetectitsprecisepositionandoutputitinthecameraimage.Thisallowstherobottoreactandeithermovestraightahead,whenthetrailisexactlyinthemiddleoftheimageorcorrectitsmotiontotheleftorright,whenthetrailisnotinthemiddle.
Theobjectiveisfortherobottofindtheblacklineandmovealongit.
Butonethingatatime.First,itisnecessarybuildthetrailsearchermodel.Naturallytheassemblyinstructionsdescribehowtodothis.
Afteryouhavecompletedthemodel,youshouldcheckitwiththeinterface testtoensurethatallcomponentsareproperlyconnectedtotheROBOTICSTXTControllerandareworkingcorrectly.
Task 1: Recognition of a trail
Programtherobotsothatitfollowsastraightblacktrailwhenplacedonit.Ifitlosesthetrailoritends,therobotshouldstop.Usetheobstaclecoursefromtheconstructionsetforthistask.
Programming Tips:
Usetheobstaclecoursefromtheconstructionsettotesttheblacktrail.
SetthecamerasothatthetrailisinproperfocusintheROBOProcamerawindow.
Usethecamera"Line"sensorfieldfordetectingthetrail.Itconsistsofastraightlineinthecameraimage,locatedacrosstheimagefromlefttorightwithascalefrom-100to+100.0ispreciselyinthemiddle.
-
TXT Discovery Set
ROBOTICS
31
Furtherinformationonthecamera"Line"sensorfieldisgiveninROBO Pro HelpChap.11.
Nowyoucancheckthepositionofthetrailinyourprogram.
▯ Ifitislocatedbetween–10and+10therobotshouldmovestraightahead(M1andM2=left:v=5)
▯ Between–11and–40itshouldcorrectslightlytotheleft(M1left:v=5,M2left:v=2)
▯ Between+11and+40itshouldcorrectslightlytotheright(M1left:v=2,M2left:v=5)
▯ Atvalues<–40itshouldcorrectstronglytotheleft(M1left:v=5,M2right,v=3)
▯ Atvalues>+40itshouldcorrectstronglytotheright(M1right:v=3,M2left,v=5)
▯ Ifitloosesthetrail,itshouldstop.
Youcanfindthefinishedprogramhere:
Yourrobotcannowreact.Howeveritwouldbeevenbetterifyourrobotwouldturnaroundattheendofthetrailinsteadofjuststopping.
Trail_searcher_1.rpp
-
TXT Discovery Set
ROBOTICS
32
Task 2: Turning around at the end of the trail and following it back
Expandyourprogramtoincludeafunction,sothatwhentherobotgetsoffthetrailitturnsaroundandreturns.
Programming Tips:
Thereareseveralpossibilitiesforcorrectingthedirection.Youcanstoponemotorandlettheotheronecontinuetorunorhaveonemotorrotateoppositethedirectionofmovement.Experimenttodeterminewhichmethodisbetter.
Hereisoursuggestedsolution:
So!Nowyourrobotcanmoveonvisual"rails".Theonlydisadvantageisthatyoufirsthavetosetitontherail.Wewanttochangethis.Therobotshouldsearchforitstrailonitsown.
Task 3: Finding the trail and following it
Writea"search"subroutinetomaketherobotsearchforablacktrailifitdoesnotfindonewhentheprogramstarts.Forthispurpose,therobotistofirstmoveinacircleforonetime.Ifitdoesnotfindatrailwhenitdoesthisitshouldmovestraightaheadforashortdistance.Assoonastherobotdetectsatrail,itshouldfollowit.Ifthisdoesn't,thesearchshouldstartoverfromthebeginning.Afterithasmovedinacircle10timeswithoutfindingatrail,itshouldstopandflashthreetimes.
Programming Tips:
Incaseyouarenotexactlyontherighttrail,hereisoursuggestedsolution:
Trail_searcher_2.rpp
Trail_searcher_3.rpp
-
TXT Discovery Set
ROBOTICS
33
Detection Robot
Onthismodelwenowwanttocombineanumberofcamerafunctions.Therobotshouldbeabletolookforwardtodetectitssurroundings,howeveritshouldalsobecapableoflookingdownandfollowingthevariouscoloredtrailsontheobstaclecourseincluded.Moreoveritshouldalsocollectthe"temperaturedata"foritssurroundingsusingitsNTCthermistor.
First,buildthemodelasdescribedintheassemblyinstructions.
Task 1: The robot should function as follows:
Firstplaceitontheblacktrail.Itshouldmovealongittoitsend.Thenitshouldturnaroundandmoveintheoppositedirection.Afterreachingtheendoftheblacktrailwherethetrailiswider,itshouldraisethecameraandlookforward.Ifyouthenholdaredorgreencardinfrontofit,itshouldfirstfollowtheblacktrailandthenturnontotheredorgreentrail.Beforemovingoff,itagainmeasurestheambienttemperatureandsendsittotheTXTControllerdisplay.
Youcancutthesmallcoloredcardsoutofthelargecuttingtemplateintheconstructionset
Programming Tips:
ThisprogramisintendedtoshowyoueverythingthatispossiblewithROBOPro.Sinceweknowthatprogrammingisnotallthatsimple,justloadthepreparedprogramandtryitout:
Task 2:
The"Trail"subroutineisresponsibleforcontrollingtheencodermotorwhilefollowingatrail.Compareitwiththesubroutinefromthetrailsearchermodel.Whatdifferencesdoyousee?
Detection_robot.rpp
-
TXT Discovery Set
ROBOTICS
34
Solution:
Thesubroutineforthedetectionrobotisconsiderablymorecomplicatedthanforthetrailsearcher.Itcontainsacontrolfunctionwhichmakesthedegreetowhichthedirectioniscorrecteddependentonthedistancefromthemiddleofthetrail.Incomparison,thetrailsearcherdifferentiatedonlybetweenstraightahead,minorcorrectionandmajorcorrection.Creatingsuchacontrolfunctionrequiresagreatdealofprogrammingexperience(suchasourprofessionalprogrammershave).Butthecontrolresultsarealsosignificantlybetterthanwiththetrailsearchermodel.Inthefutureyoucansimplyusethissubroutineforyourownprograms,andbehappythatitworkssowell.
Task 3:
Ifyouhaveasmartphone(withAndroidoperatingsystem),youcanuseittocontrolthedetectionrobot.YoucandownloadtheappforthisfromtheGooglePlaystore.Itiscalled"TXTCamdroid“.ConnecttheTXTControllertoyoursmartphoneviaWLANtogetstarted.Youcanseewhatthecameraseesonyoursmartphonedisplay.Youcancontrolthemodelwithdifferentkeysandsenditondiscoverytrips.Havefun!
-
TXT Discovery Set
ROBOTICS
35
Soccer Robot with Movement Control
HaveyoueverheardabouttheRoboCup?ThisistheSoccerWorldCupforrobots.Itisheldina
differentcountryeveryyear.Therearevariousleaguesforvarioustypesofrobots.DetailedinformationisavailableontheRoboCuphomepagehttp://www.robocup.org
Twosuggestionsforconstructionofasoccerrobotaregivenintheassemblyinstructions.
Itisjustasagileasourotherrobots,butinadditionithasalightbarrierfordetectingaballandtriggeringa"kickingmechanism."Nowwecanequipandcontroltherobotswiththecamerainanumberofdifferentways.
First,buildthesoccerrobotwithmovementcontrolasdescribedintheassemblyinstructions.
Thenyoucanprogramitand"train"ittoperformafewballtricks.And,asalwaysyoushouldusetheinterface testtoseeifthemodelfunctionsproperlybeforestartingtheprogramming.
Usetheorangetabletennisballincludedintheconstructionsetfortheball.
Note:Itmaybenecessarytoadjustthepushbutton,usedasalimitswitchfortheleverontheactuatingmechanism,sothatitisdepressedwhentheleverisforward,howeverdoesnotblocktheleversimultaneously.
Withthisrobotthecameraislocatedonitsownstandnexttothemodel,notinstalledonthemodelitself.ItshouldbepluggeddirectlyintotheUSMportonthePC.
-
TXT Discovery Set
ROBOTICS
36
Task 1: "There, he has the ball and shoots . . ."
Thefirststepistoteachtheelectronicballwizardtoshoottheballassoonasitisdetectedbythelightbarrier.Experimentalittlewiththe"shootingspeed."Ashortpausebetween"detection"and"shooting"maypossiblyleadtoanimprovement.
Programming Tips:
ForthistaskitisfirstnecessarytoconnecttheTXTControltoyourPCusingtheUSBcable.Aswiththehanddryeryoushouldwaitafewsecondsafterthelens tip lampswitchesonbeforecheckingthephototransistoronthelightbarrier.
Beingatrainerisnoteasy.Ifyourrobotplayerdoesnotobeyyou,perhapsyoucangetitsattentionwithourprogramsuggestion.
Butsincearealballwizardshouldbeabletodomorethanjustapenaltyshootout,wewanttoexpandthecapabilitiesofoursoccerrobotabit.
Task 2: Motion control for soccer robot
Nowwewanttoprogramthesoccerrobottoreacttomotionsyoumakeinfrontofthecamera.Whenyouwavewithyourlefthand,itshouldmovetotheleft;ifyouwavewithyourrighthanditshouldturntotheright.Ifyouwavewithbothhandsinthemiddleoftheimage,itshouldmovestraightahead.Whenthelightbarrierdetectstheball,itshouldshoot,naturallyintothegoalifpossible.
Programming Tips:
Note:ForthistaskitisnecessarytoconnecttheTXTControltoyourPCviaWLANorBluetooth.
Eventhoughthistaskmaysoundsomewhatdifficultinitially,youhavealreadyusedmostofthefunctionsforthisprogramwithyourotherrobots.
Soccer_robot_movement_control_1.rpp
-
TXT Discovery Set
ROBOTICS
37
Usethreecamera"Motion"sensorfieldsforcontrolofthemotion.Positiononeoftheseinthemiddleofthecameraimage,oneontheleftandoneontheright.Placethecamerainfrontofyourmonitorwhereyoucaneasilyreachthethreeareasinthecamerawindowwithyourarmswithoutthesensorfieldsreactingunintentionally.Forthispurposeplacethefieldspreferablyintheupperhalfofthecamerasurface.
Thensimplyhaveyourprograminterrogatethethreesensorfieldstodeterminewhichofthefieldshasdetectedmotionandactuatetherobotaccordinglytomovetotheleft,rightorstraightahead.YouhavealreadyprogrammedtheshootingmechanisminTask1.Youcanintegratethisintoyourprogram.
ThenstarttheprogramintheROBOProonlinemode.ThecameraimageistransferredtothePCovertheUSBinterface;therobotcontroliswirelessviaBluetoothorWLAN.
Forthismodelyouonlyneedthegoalfromthesoccerstadiumincludedwiththeconstructionset.Youcouldalsousethe"sideboards"tokeeptheballfromrollingaway.Howevertheyareactuallyrequiredfororientationoftherobotonlyafterbuildingthenextmodel.Andnow,havefun"waving"andshootinggoals.
Onceagainwealsohavearecommendedsolutionforthisprogram.
*seealsoROBO Pro Help,Chap.11.
Soccer_robot_movement_control_2.rpp
-
TXT Discovery Set
ROBOTICS
38
Soccer Robot
Althoughitisveryamusingtocontrolthesoccerrobotbywavingyourarms,arealsoccerrobotshouldbeabletokicktheballintothegoalbyitself.Nowwewanttoteachhimtodothisbyinstallingthecameradirectlyontherobot.
Onceagaintheassemblyinstructionsdescribehowtodothis.
ConnectthecameratotheUSB-1interfaceontheTXTController.
Theentiresoccerstadiumisrequiredforthismodel.Itconsistsoftheunprinted,whiterear,youalreadyusedfortheobstaclecourseforthetrailsearcherandthedetectionrobotaswellasthesideboardsprintedwithblackstripesandthegoal.
Therobotneedsthepurewhitebackgroundtodetecttheorangeballwiththecamera"Ball"sensorfield.
Theblackstripesonthesideboards,whichhaveadifferentappearanceoneachside,allowtherobottodetectwhereitisontheplayingfieldandwherethegoalis.Thestripesontherearwallofthegoalshowtherobotwheretoshoot,whenithastheball.
Task 1:
Aswiththedetectionrobot,thisrobotisnoteasytoprogram.ThereforestartbytryingouttheprogramprovidedbyloadingitontheTXTController.
Hereisoursuggestedsolution:
Tips:
Adjustthelensonthecamerasothatthestripesonthegoalsideboardsinthestadiumarefocusedwhentherobotisattheoppositeendofthestadium.
Soccer_robot.rpp
-
TXT Discovery Set
ROBOTICS
39
Positiontherobotinthestadiumandthenthrowaballontotheplayingfield.Therobotwillsearchfortheball,attempttocatchitandshootitinthedirectionofthegoalassoonasithasturnedtofacethegoal.Withalittlelucktherobotwillshoottheballintothegoal.
Task 2:
TrytounderstandhowtheballdetectionworksbasedonthedescriptionintheROBOProhelp.
Solution:
The"Ball"sensorfielddetectsacoloredballonthewhitebackground.Itoutputsthepositionofthecenterpointoftheballinthesensorfield.SeealsoROBO Pro Help,Chap.11.
Similartothetrailsearcher,0isexactlyinthemiddlebetweenrightandleft.Intheverticaldirectionthevaluegoesfrom0toanautomaticallycalculatedmaximumheight.Therobotselectsitsdirectionofmotiondependingonwheretheballislocated.
-
TXT Discovery Set
ROBOTICS
40
Task 3:
Whichcamerasensorelementdoestheprogramusetoevaluatestripesonthesideboards?
Solution:
The"line"sensorelementisused.Incontrasttothetrailsearcher,threelinesensorsarelocatedfromtoptobottominthecamerawindowtodetectthethreehorizontalstripesonthesideboards.Therobotusestheirwidthtocalculatewhereitispresentlylocatedandwhereitneedstomoveto.
Moreoverthestripesallowittorecognizewhenitistooclosetothesideboardandtostopbeforecollidingwiththesideboard.
Task 4:
Two"Exclusion"sensorfieldsarepresentintheROBOProcamerawindowforthisrobot.Canyouimaginewhatthesearefor?
Solution:Thesesensorfieldssupplementthesensorfieldforballrecognition.Theexclusionareasarenotevaluatedwhenlookingfortheball.Thiscanbehelpful,whenobjectssuchasthephototransistorforthesoccerrobotarelocatedintheimageandcouldbemistakenfortheball.
-
TXT Discovery Set
ROBOTICS
41
How does the robot find its way around the playing field?
Maybeyouhavewonderedhowtherobotfindsitswayaroundtheplayingfieldusingthestripecodesonthesideboards.Asamatteroffact,thisisnotasimpleoperation,butitworksaccordingtothefollowingprinciple.
Infacttherobotiscapableofdeterminingitspositionontheplayingfieldtoanaccuracyofapproximately2 cmandanangleofapprox.5degreesbasedonthesideboards.Forthispurposetherobotmeasurestheheightofthesideboardsatvariouspointsandusesthisheighttocalculatethedistancesandthenfinallytheangleandabsoluteposition.Thisprocessisknownastriangulation.
Thesideboardsalwayshave3blackstripeswith2whitestripesinbetween.Oneoftheblackstripesiswiderthantheotherstripes.Thisallowstherobottorecognizewhichsideboardiswhich.Alltotaledthereare5differentsideboardpatterns,oneforeachsideoftheplayingfieldandoneforthegoal.
Moreovertherobotusesthecountingpulsesfromtheencodermotorstocalculatethepositionandanglebetweentriangulationoperations.
Thisprocessisknownasodometry.Odometryismorepreciseforshorttimesanddistances.Howeverithasthedisadvantagethaterrorsaccumulateinthecourseoftime.Forthisreasonthedataobtainedbyodometryiscorrectedusingthedatafromtriangulation.
Thesoccerrobotprogramhastwosubroutinesforthesecalculations:thetriangulationandodometrysubroutines.Ifyouwouldlike,takeacloserlookatthem.Butdon'tbealarmed!Theylookprettycomplicated;andtheyare.
Ifeverythinglookstootheoreticalforyou,don'tworry.Simplyusetheprogramprovided,beamazedathowitworksandmakeabetwithyourfriends,howmanytimestherobotwillhavetotrybeforemakingagoal.
-
TXT Discovery Set
ROBOTICS
42
Here are a few more tips on the playing field:
Ensurethatalargegapisnotpresentbetweenthefloorandthesideboards.Otherwisethecameracouldthinkthegapisastripeandthecalculationofthepositionwouldbewrong.
Topreventthisitisimportantforyoutofoldtheedgesexactlyandensurethattheplayingfieldisplacedonalevelsurface.Inadditionyoucanalsoplacebooksorotherobjectsalongtheoutsidesofthesideboardstohelpholdthemdown.
Iftheballcontinuouslyrollstowardonecornerorfrequentlystopsagainstoneofthesideboards,youcanleveltheplayingfieldbyplacingflatobjectssuchasnewspapers,schoolnotebooks,cardboard,etc.underthecornerssotheballwillrollbacktothemiddleinsteadofstoppingagainstthesideboard.Thiswillputmoreactionintothegame!
-
TXT Discovery Set
ROBOTICS
43
Trouble Shooting
Ifthingsdon'tworkrightfromtheverystartthereisusuallyasimplereason.But,itisnotalwayseasytofind.That'swhywewanttogiveyousomeinformationhereaboutpossiblesourcesoferrors.
Interface Test
Onceagainhereouradvice:CheckeachindividualcomponentforproperfunctionwiththeaidoftheROBOProinterface tests.
Cables and Wiring
Ifanelectricalcomponentdoesnotworkatall,checkthecableusedtoconnectittotheROBOTICSTXTControlleragain.Forthispurposeusethecabletoconnectthelenstiplamptothebattery.Ifthebulblightsupthecableshouldbeokay.
Anothersourceoferrorsareincorrectlyinstalledplugs(forexample,agreenplugonaredcable).
Alsocheckthat"+"and"-"arecorrectlyconnected.Forthispurpose,compareyourmodelwiththeillustrationsintheassemblyinstructions.
Loose Connection
Acomponent,whichworkssometimesanddoesn'tworkatothertimes,probablyhasalooseconnectionsomewhereinthewiringforthecomponent.
The most frequent causes for this are:
▯ LoosePlugs
Whentheplugsforthecablesaretooloose,thatiswobblyinthejacksockets,theydonotprovidesufficientcontact.Inthiscaseyoucancarefullybendthecontactspringsapartatthefrontontheaffectedconnectorsusingascrewdriver.Justalittle,sotheplugsareheldfirmlyinthejacksocketswhenyouplugthemin.
▯ PoorContactbetweenCableandPlug
Alsocheckthecontactbetweenthestrippedendsofthecableintheconnectorandtheconnectoritself.Itmaybesufficienttotightenthescrewsintheconnectorslightly.
-
TXT Discovery Set
ROBOTICS
44
Short Circuits
Whenapositiveandnegativeconnectiontouchoneanotheryouhaveashortcircuit.ThebatteryaswellastheROBOTICSTXTControllerhaveabuilt-infusetokeepthemfrombeingdamagedbyashortcircuit.Theysimplyswitchoffthepowersupplyforawhile.Naturally,yourmodelwillnotworkanymoreeither.
Thecauseforashortcircuitcanbeeitheramistakeinthewiringorscrewswhichhavenotbeentightenedsufficientlyintheconnectors.Theycantouchwhentheconnectorsarepluggedin,causingashortcircuit.That'swhyyoushouldalwayscompletelyscrewinthescrewsandplugintheplugssothatthescrewscannottoucheachother.
Power Supply
Shortinterruptionsormotors,whichruntooslowly,usuallyindicatealowbattery.Inthiscase,youshouldchargetherechargeablebatterywiththebatterycharger.ThebatteryiscompletelychargedwhentheredLEDonthechargerstopsflashingandilluminatescontinuously.
Errors in the Program
Evenifnoonelikestoadmitit:Everyonemakesmistakes.Andespeciallywithcomplexprograms,anerrorcancreepinquitequickly.
Ifyourmodelstilldoesn'tdowhatyouwantittoafteryouhavecheckedeverythingonthemodelitselfandhaveremediedanyfaults,youshouldalsocheckyourprogram.Gothroughitlineforlinetoseeifyoucanfindtheerror.
Youcanalsowatchtheprogramrunningonthemonitorintheonlinemode,whichmeanswiththeROBOTICSTXTControllerconnectedtothePC.Theprogramelementactiveatanygivenmomentishighlightedallowingyoutoalwaysseethepointwheretheprogramisandwheretheerroroccurs.
Camera Function
Thecameraworksbestwhenthelightisgood.
Light too low:Itcannotrecognizecolorormotioninthedark.
Remedy:LEDstoilluminatethecamerafieldofvision.
Light too bright:Excessivelight-directsunlightforexample-changesthecolorvalueandcontrastsothatthelinedetectorcannolongerrecognizethelinessatisfactorily.
-
TXT Discovery Set
ROBOTICS
45
Remedy:Avoiddirectsunlightorreducethelightbypullingthedrapesorclosingtheshutters.
Other remedies:Usethesoftwaretoadaptthecameraproperties.ThiscanbeaccomplishedwiththeROBOProsoftwareinthepropertyfieldsforthecamerasensors.Hereitispossible,forexample,tosetthesensitivityforrecognitionofanobjectandadaptittothesurroundings.DetailsaregiveninROBOProHelpChapter11.
Last Sources for Help
If,inspiteofallthis,youhavenotfoundtheerror,therearestilltwopossibilitiesforobtaininghelp:
▯ EmailHelp
Sendanemailtofischertechnikdescribingtheproblem.
Ouremailaddressis:[email protected].
▯ InternetHelp
YoucanalsovisitourwebsiteontheInternetathttp://www.fischertechnik.de.Thesiteincludesaforumwhereyouarecertaintofindhelp.Inaddition,youcanalsobecomeamemberofthefischertechnikFanClubatnocharge.
http://www.fischertechnik.dehttp://www.fischertechnik.de
-
TXT Discovery Set
ROBOTICS
46
And what else can I do?
Wasthateverything?No,ofcoursenot.Theexperimentsandmodelsyoutriedoutinthisbookletshouldonlybethebeginning.Your"firstattemptstowalk"sotospeakinthegiganticandexcitingrealmof"ROTBOTICS".
WhatwehaveshownyouhereisonlyaverysmallportionofthepossibilitiesofferedbyyourROBOTICSTXTControllerandthefischertechnikcomponents.Andnowitisyourturn.Youcangiveyourfantasyfreereinandsimplybuildwhatyoufeellike.
Ifyoudon'thaveanyideasforyourowncompletemodelthenjusttakealookatthemodelsinthisbooklet.Perhapssomethingwilloccurtoyouhowtobuildamodeldifferently.Oryoucanchangethefunctionofamodel.
Forexampleyoucouldfastenapentothemobilerobot,sothatitcanbemovedupanddownallowingittowriteonalargepieceofpaperwhiletherobotismovingacrossit.Thenyoucandrawthefigurestherobotmovesthrough.Thisturnsyourmobilerobotintoadrawingmachine.
Youcanalsouseathickfelt-tippentodrawyourownobstaclecourseonapieceofpaperandhavetherobotmovethroughit.AndifyourfriendshaveaROBOTICSTXTController,youcandoevenmoreinterestingthings.Youcanrunracestoseewhoserobotcanmasteragivenobstaclecoursefaster.And,inadditiontoallowingyourPCtocommunicatewiththeROBOTICSTXTController,theBluetoothinterfacecanalsobeusedtoconnectanumberofcomputerswithoneanother.Then,forexample,youcouldprogramtworobots,toreacttooneanother.Ordancewitheachother.AgreatdealofinterestinginformationonthissubjectisgiveninChapters4.5and7intheROBO Pro Help.
Not finished yet
Fantasy
Changing the present
Drawing machine
Racing with friends
-
TXT Discovery Set
ROBOTICS
47
DoesyourcomputerhaveaWLANinterface?IfsoyoucanconnecttheROBOTICSTXTControllertothecomputerusingWLANinsteadofaUSBcable.Ifnot,youcanbuyaUSBWLANstickanduseitforwirelessconnectionbetweenyourROBOTICSTXTControllerandPC.ThisisdescribedintheinstructionmanualfortheROBOTICSTXTControllersandathttp://www.fischertechnik.de.
So,whatareyouwaitingfor?Getstarted!Inventandexperiment!Anddon'tbebotheredbylittlesetbacks.Patienceandperseveranceareprimaryfactorsforexperimenting.Therewardafterthisisafunctioningmodel.
Wehopeyouhavelotsoffuntryingoutyourownideas.
Wireless freedom
Persistence pays off
Welcome to the fischertechnik World of ROBOTICSSome General InformationElectricityAbout this Activity BookletRobot, Artificial Humans?ROBOTICS, (Almost) Everything Automatic
Component ExplanationsEncoder MotorsXS MotorLEDsLens Tip LampPhototransistorPushbuttonHeat Sensor (NTC)Camera ModuleROBOTICS TXT Controller
A Few TipsFirst StepsStarter ModelsPedestrian lightHand dryerTemperature ControlBarrier"Camera Man"Swiveling Camera
Mobile Robots - The Next ChallengeMobile RobotHindrance DetectorHindrance Detector with CameraTrail SearcherDetection RobotSoccer Robot with Movement ControlSoccer Robot
Trouble ShootingInterface TestCables and WiringLoose ConnectionShort CircuitsPower SupplyErrors in the ProgramCamera FunctionLast Sources for Help
And what else can I do?2 Seite 13 TXT Discovery Set_2014-09_V1.1_GB.pdfWelcome to the fischertechnik World of ROBOTICSSome General InformationElectricityAbout this Activity BookletRobot, Artificial Humans?ROBOTICS, (Almost) Everything Automatic
Component ExplanationsEncoder MotorsXS MotorLEDsLens Tip LampPhototransistorPushbuttonHeat Sensor (NTC)Camera ModuleROBOTICS TXT Controller
A Few TipsFirst StepsStarter ModelsPedestrian lightHand dryerTemperature ControlBarrier"Camera Man"Swiveling Camera
Mobile Robots - The Next ChallengeMobile RobotHindrance DetectorHindrance Detector with CameraTrail SearcherDetection RobotSoccer Robot with Movement ControlSoccer Robot
Trouble ShootingInterface TestCables and WiringLoose ConnectionShort CircuitsPower SupplyErrors in the ProgramCamera FunctionLast Sources for Help
And what else can I do?
2 Seite 13 TXT Discovery Set_2014-09_V1.1_GB.pdfWelcome to the fischertechnik World of ROBOTICSSome General InformationElectricityAbout this Activity BookletRobot, Artificial Humans?ROBOTICS, (Almost) Everything Automatic
Component ExplanationsEncoder MotorsXS MotorLEDsLens Tip LampPhototransistorPushbuttonHeat Sensor (NTC)Camera ModuleROBOTICS TXT Controller
A Few TipsFirst StepsStarter ModelsPedestrian lightHand dryerTemperature ControlBarrier"Camera Man"Swiveling Camera
Mobile Robots - The Next ChallengeMobile RobotHindrance DetectorHindrance Detector with CameraTrail SearcherDetection RobotSoccer Robot with Movement ControlSoccer Robot
Trouble ShootingInterface TestCables and WiringLoose ConnectionShort CircuitsPower SupplyErrors in the ProgramCamera FunctionLast Sources for Help
And what else can I do?
2 Seite 13 TXT Discovery Set_2014-09_V1.1_GB.pdfWelcome to the fischertechnik World of ROBOTICSSome General InformationElectricityAbout this Activity BookletRobot, Artificial Humans?ROBOTICS, (Almost) Everything Automatic
Component ExplanationsEncoder MotorsXS MotorLEDsLens Tip LampPhototransistorPushbuttonHeat Sensor (NTC)Camera ModuleROBOTICS TXT Controller
A Few TipsFirst StepsStarter ModelsPedestrian lightHand dryerTemperature ControlBarrier"Camera Man"Swiveling Camera
Mobile Robots - The Next ChallengeMobile RobotHindrance DetectorHindrance Detector with CameraTrail SearcherDetection RobotSoccer Robot with Movement ControlSoccer Robot
Trouble ShootingInterface TestCables and WiringLoose ConnectionShort CircuitsPower SupplyErrors in the ProgramCamera FunctionLast Sources for Help
And what else can I do?
Ursprung: Nur zum Testen des Button 4: Ziel: Button zum Testen 3: Kapiteslsprung: zu Controller 22: Kapitelsprung: Controller 16: Ursprung: ROBOTICS TXT Controller 11: Lichtschranke 21: Kapitelsprung: Fototransistor: Ursprung Aktoren 2: Lichtschranke 22: Ursprung Taster gedrückt "Schließer" 2: Ursprung Taster gedrückt "Öffner" 2: Schaltbild 1-3 Taster gedrückt 5: Schaltbild 1-2 Taster gedrückt 5: Lichtschranke 7: Kapiteslsprung: zu Controller 23: Kapitelsprung: Controller 17: Lichtschranke 23: Kapiteslsprung: zu Controller 24: Kapitelsprung: Controller 18: Kapiteslsprung: zu Controller 26: Kapitelsprung: Controller 20: Ursprung: ROBO Pro Hilfe 27: Ursprung Aktoren 3: Ursrung Sensoren: Ursprung SW ROBO Pro: Kapiteslsprung: zu Controller 25: Kapitelsprung: Controller 19: Ursprung SW ROBO Pro 2: Link Erste Schritte: Ursprung SW ROBO Pro 3: Ursprung: ROBO Pro Hilfe 29: Ursprung: ROBO Pro Hilfe 30: Kapiteslsprung: zu Controller 16: Kapitelsprung: Controller 10: KapSprung: Sensor: Kapitelsprung: Encoder-Mot: Kapitelsprung: LEDs: Urprung: Interface-Test 2: Fussgaengerampel: rpp 2: Off
Ziel: Interface-Test: Lichtschranke 19: Lichtschranke 20: Ursprung: Ausgang M2: Ursprung Sensoren 2: Ursprung: Eingang I1: Ursprung: Start-Button: Urprung: Interface-Test 3: Ziel: Interface-Test 2: Ziel: Ausgang M2: Ziel: Eingan I1: Ziel: Start-Button: Farbsortierroboter: rpp 3: Offrpp 41: Offrpp 52: Offrpp 63: Offrpp 74: Offrpp 85: Offrpp 106: Offrpp 137: Offrpp 148: Offrpp 159: Offrpp 2710: Offrpp 2611: Offrpp 1112: Offrpp 1213: Offrpp 2214: Offrpp 1615: Offrpp 1716: Offrpp 1817: Offrpp 1918: Offrpp 2119: Offrpp 2020: Offrpp 2321: Off
Ursrung Sensoren 3: Lichtschranke 8: Ursprung: Ausgang M1: Ursprung: Eingang I8: Kapitelsprung: NTC: Urprung: Interface-Test 4: Ziel: Interface-Test 3: Ziel: Ausgang M1: Ziel: Eingang I8: Ursprung: ROBO Pro Hilfe 32: Ursprung: ROBO Pro Hilfe 31: Ursprung: ROBO Pro Hilfe 19: Kapiteslsprung: zu Encoder-Motoren: Urprung: Interface-Test 5: Ursprung: ROBO Pro Hilfe 20: Ziel: Interface-Test 4: Kapiteslsprung: zu Controller 17: Kapitelsprung: Controller 11: Urprung: Interface-Test 6: Ziel: Interface-Test 5: Lichtschranke 9: Ursprung: Encodermotor-Element: Ursprung: Motorausgangselement: Ursprung: Wartezeitelement: Ursprung: ROBO Pro Hilfe 21: Ursprung: Distanz-Eingabefeld: Ziel: Encodermotor-Element: Ziel: Motorausgangselement 2: Ziel: Wartezeitelement 2: Ziel: Distanz-Eingabefeld_2: Ursprung: Zähleingängen C1-C4: Ursprung: Encodermotor-Element 3: Ziel: Zähleingängen C1-C4: Ziel: Encodermotor-Element 3: Urprung: Interface-Test 7: Kapiteslsprung: zu Controller 18: Kapitelsprung: Controller 12: Ziel: Interface-Test 7: Ursprung: ROBO Pro Hilfe 22: Urprung: Interface-Test 8: Ziel: Interface-Test 8: Lichtschranke 18: Kapitelsprung: Händetrockner: Kapitelsprung: Linsenlampr: Ursrung Sensoren 4: Ursprung: ROBO Pro Hilfe 23: Ursprung: USB-1: Ziel: USB-1: Ursprung: ROBO Pro Hilfe 24: Ursrung Sensoren 5: Urprung: Interface-Test 9: Kapiteslsprung: zu Controller 19: Kapitelsprung: Controller 13: Ziel: Interface-Test 9: Kapiteslsprung: zu Controller 20: Kapitelsprung: Controller 14: Kapiteslsprung: zu Controller 21: Kapitelsprung: Controller 15: Ursprung: ROBO Pro Hilfe 25: Ursprung: ROBO Pro Hilfe 26: Ziel: Interface-Test : Kapiteslsprung: zu Controller 15: Kapitelsprung: Controller 9: Ursprung: ROBO Pro Hilfe 28: Urprung: Interface-Test 10: http://www: fischertechnik: de: