activity booklet of fischertechnik txt discovery set

48

Upload: etc-educational-technology-connection-hk-ltd

Post on 29-Jul-2016

309 views

Category:

Documents


7 download

DESCRIPTION

Activity Booklet of fischertechnik Robotics TXT Discovery Set

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.

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.

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

robotics roboticsBauanleitungAssembly instructionInstructions de montageBouwhandleidingInstrucciónes de construcciónManual de montagemIstruzioni di montaggioИнструкция по сборке安装说明书

fischertechnik GmbHKlaus-Fischer-Straße 172178 WaldachtalGermany

Phone: +49 74 43/12-43 69Fax: +49 74 43/12-45 91

[email protected]

Discovery set Discovery set

154

520

- P

rinte

d in

Ger

man

y -

Tech

nisc

he Ä

nder

unge

n vo

rbeh

alte

n -

Sub

ject

to

tech

nica

l mod

ifica

tions