Professional Documents
Culture Documents
Version:1.0 Sept.23,2002
By DeanHystad
www.hightechkids.org
AbouttheAuthorandThisDocument
DeanHystadisafirstclassLEGOfanatic.DeanisanengineerforMTSSystemslocated inEdenPrairie,Minnesota.MTSSystemsCorporationisoneoftheworldsleading suppliersofmechanicaltestingandsimulationequipment,makingeverythingfrom earthquakesimulatorstoamusementparkrides.AtMTS,Deanwritescontrolsoftware forarangeoflargeroboticsystems.Asyoucanseeinthisbook,Deanbringsthat expertisetohispassionforLEGO.DeanhasjudgedatFLLeventsforseveralyearsand iscurrentlyworkingasacontributingauthoronasoon-to-bepublishedbookonLEGO Mindstorms.Deancanbereachedatdean.hystad@mts.com. Thisbookisasignificantpieceofwork,andfranklyisaweinspiringtome.Itisan excellentmixoftheoryandpractice.Someofthetextmaybebeyondmiddleschool youth,buttheaccompanyinglabsandpresentationmaterialshouldhelpcoaches understandtheconceptsandpresentkeyideastotheirteams.Thebookcanalsoprovidea usefultextforthoseofyouwantingtoincorporateFLLintohighschoolclasses.Ihope youfindituseful. ThisbookfitswellwithINSciTE'smissiontoadvanceinnovativeprogramsthatprovide anenvironmentwherekids,educators,andthetechnicalcommunitycometogetherto cultivatelifelonglearninginscience,mathandtechnology. FredRose Fredrose@hightechkids.org INSciTEPresident September20,2002
CopyrightandTrademarkNotice
2002INSciTEinagreementwith,andpermissionfromFIRSTandtheLEGOGroup.Thisdocumentis developedbyINSciTEandisnotanofficialFLLdocumentfromFIRSTandtheLEGOGroup.This documentmaybefreelycopiedanddistributed,electronicallyorotherwise,initsentiretyonly,andonlyif usedinconjunctionwithFIRSTLEGOLeague.Anyuse,reproduction,orduplicationofthismanual forpurposesotherthandirectlyrelatedto FIRSTLEGOLeagueisstrictlyprohibitedwithoutspecificwrittenpermissionfromINSciTE. LEGO,ROBOLAB,andMINDSTORMSaretrademarksoftheLEGOGroupusedherewith specialpermission.FIRSTLEGOLeagueisatrademarkownedbyFIRST(For InspirationandRecognitionofScienceandTechnology)andtheLEGOGroup usedherewithspecialpermission.INSciTEisatrademarkofInnovationsinScienceandTechnology Education. INSciTE POBox41221 Plymouth,MN55441 www.hightechkids.org
TableofContents
1 Structures ................................................................................................................1-1 1.1 Bricks,Plates,andBeams ...............................................................................1-1 1.1.1 Bricks ......................................................................................................1-1 1.1.2 Plates.......................................................................................................1-2 1.1.3 Beams .....................................................................................................1-3 1.1.4 AxlesandPins.........................................................................................1-3 1.1.5 LEGOVocabulary ..................................................................................1-4 1.2 BuildingaFrame ............................................................................................1-5 1.2.1 LEGOGeometry.....................................................................................1-7 1.3 SNOT..............................................................................................................1-9 2 Gears.....................................................................................................................2-12 2.1 SpurGears ....................................................................................................2-12 2.1.1 GearSpacing.........................................................................................2-12 2.1.2 GearRatio .............................................................................................2-16 2.1.3 Torque...................................................................................................2-18 2.1.4 Speed.....................................................................................................2-20 2.1.5 GearTrains............................................................................................2-21 2.1.6 ClutchGear ...........................................................................................2-23 2.2 CrownGear...................................................................................................2-24 2.3 BevelGear ....................................................................................................2-24 2.4 WormGear ...................................................................................................2-25 2.4.1 DirectionalTransmission ......................................................................2-27 2.5 Differential....................................................................................................2-27 2.5.1 RatchetSplitter......................................................................................2-29 2.6 GearRack .....................................................................................................2-30 2.7 Pulleys...........................................................................................................2-31 2.7.1 Torque...................................................................................................2-32 2.8 Reinforcinggeartrains..................................................................................2-33 2.9 Backlash........................................................................................................2-34 3 Wheels ..................................................................................................................3-37 3.1 Sizes..............................................................................................................3-37 3.1.1 Speed.....................................................................................................3-37 3.1.2 Force .....................................................................................................3-39 3.2 Treads ...........................................................................................................3-41 3.3 Balance .........................................................................................................3-42 3.3.1 FindingtheCenterOfGravity...............................................................3-42 3.3.2 Inertia ....................................................................................................3-43 3.4 WheelLoadingandFriction..........................................................................3-46 4 LegoElectronics ...................................................................................................4-48 4.1 RCXBrick ....................................................................................................4-48 4.1.1 Firmware...............................................................................................4-48 4.1.2 Programming ........................................................................................4-49 4.2 Motors...........................................................................................................4-51
4.2.1 Modes....................................................................................................4-52 4.2.2 Attaching...............................................................................................4-53 4.3 TouchSensor ................................................................................................4-54 4.3.1 Bumpers................................................................................................4-55 4.3.2 LimitandPositionSwitches..................................................................4-57 4.3.3 Rotationsensor......................................................................................4-57 4.4 LightSensor..................................................................................................4-58 4.4.1 Experiment#1,Color ............................................................................4-59 4.4.2 Experiment#2,AmbientLight..............................................................4-64 4.5 RotationSensor.............................................................................................4-66 4.5.1 Resolution .............................................................................................4-66 4.5.2 Internals ................................................................................................4-67 4.5.3 CountingErrors.....................................................................................4-68 4.6 SensorStacking.............................................................................................4-69 5 RobotDrives .........................................................................................................5-70 5.1 DifferentialDrive..........................................................................................5-70 5.1.1 Casters...................................................................................................5-71 5.1.2 WheelConfiguration.............................................................................5-73 5.1.3 Steering .................................................................................................5-74 5.1.4 SteeringMadeEasier ............................................................................5-76 5.1.5 StraightLineTravel ..............................................................................5-76 5.1.6 DifferentialSkid....................................................................................5-78 5.2 Steeringdrive................................................................................................5-79 5.2.1 Turning..................................................................................................5-80 5.2.2 TricycleDrive .......................................................................................5-82
Figures
Figure1-1.BasicLEGOBrick ......................................................................................1-1 Figure1-2.BrickDimensions........................................................................................1-1 Figure1-3.ThreePlates=OneBrickhigh ....................................................................1-2 Figure1-4.SimpleGearboxUsingTechnicPlates ........................................................1-2 Figure1-5.TechnicBeams ............................................................................................1-3 Figure1-6.PinsandAxles.............................................................................................1-3 Figure1-7.StudsontheSideofaBeam? ......................................................................1-4 Figure1-8.ATypicalDrivenWheelAssembly.............................................................1-4 Figure1-9.A16LTechnicPin ......................................................................................1-4 Figure1-10.CommonTechnicPieces ...........................................................................1-5 Figure1-11.SimpleFrame ............................................................................................1-5 Figure1-12.ImprovedFrame ........................................................................................1-6 Figure1-13.CrossBracedFrame ..................................................................................1-6 Figure1-14.SnapOnConnectionsareWeakinTension ..............................................1-7 Figure1-15.CrossBracing ............................................................................................1-7 Figure1-16.TwoCrossBracingChoices ......................................................................1-8 Figure1-17.ATallFrame .............................................................................................1-8 Figure1-18.DiagonalCrossBracing.............................................................................1-9 Figure1-19.OneofJenniferClark'sIncredibleCreations.YesitsLEGO. ...............1-10 Figure1-20.Turning90degrees.StudsOut ...............................................................1-10 Figure1-21.Turning90degrees.StudsIn..................................................................1-11 Figure1-22.UpsideDown...........................................................................................1-11 Figure1-23.ExtendingBeamsUsingPinsandPlates .................................................1-11 Figure2-1LegoSpurGears.........................................................................................2-12 Figure2-2.StudGearSpacing.....................................................................................2-13 Figure2-3.HalfStudSpacingUsing2Holed1x2Beam ..........................................2-14 Figure2-4.VerticalGearSpacing ...............................................................................2-14 Figure2-5.CircumventingVerticalGearSpacingRestrictions...................................2-15 Figure2-6.DiagonalGearSpacing..............................................................................2-15 Figure2-7.CircumventingDiagonalGearSpacingRestrictions ..................................2-16 Figure2-8.3:1GearRatio ...........................................................................................2-17 Figure2-9.Torque=ForcexDistance ........................................................................2-18 Figure2-10.TheRatiooftheTorquesisEqualtotheRatiooftheRadii ....................2-19 Figure2-11.RatioofAngularVelocitiesisEqualtoInverseRatiooftheRadii .........2-20 Figure2-12.Multi-stageGearTrain ............................................................................2-21 Figure2-13.IdlerGear ................................................................................................2-23 Figure2-14.UsingClutchGeartoLimitForces..........................................................2-23 Figure2-15.CrownGear .............................................................................................2-24 Figure2-16.BevelGear...............................................................................................2-24 Figure2-17.ASmallWheelBuiltfromTwo12tBevelGears ....................................2-25 Figure2-18.WormGear..............................................................................................2-25 Figure2-19.UsingtheWormGear'sSelfLockingFeature.........................................2-26 Figure2-20.LEGOLeadScrew ..................................................................................2-26 Figure2-21.DirectionalTransmission.........................................................................2-27 Figure2-22.LEGODifferential...................................................................................2-27
Figure2-23.DuringTurnstheWheelsCoverDifferentDistances ..............................2-28 Figure2-24.UsingDifferentialtoCalculateAverageRotation...................................2-29 Figure2-25.UsingaDifferentialtoCalculateDifferenceinRotation ........................2-29 Figure2-26.RatchetSplitter.........................................................................................2-30 Figure2-27.LEGOGearRackandPinion ..................................................................2-30 Figure2-28.PulleysandBelts .....................................................................................2-31 Figure2-29.LegoPulleys............................................................................................2-31 Figure2-30.TwowaystoIncreaseTorqueCapacity...................................................2-32 Figure2-31.UsingPulleystoLimitTorque ................................................................2-33 Figure2-32.Forcesongears........................................................................................2-33 Figure2-33.GearboxesDontHavetobeBigtobeStrong ........................................2-34 Figure2-34.Backlashiscausedbypoorgearmeshing ...............................................2-34 Figure2-35.Preloadingageartrainwitharubberband..............................................2-35 Figure2-36.SplitgearmadefromLEGO....................................................................2-36 Figure3-1.LegoWheelsandTires..............................................................................3-37 Figure3-2.AVeryFastTractor...................................................................................3-39 Figure3-3.Force=Torque/Radius............................................................................3-40 Figure3-4.TrackedRobot...........................................................................................3-41 Figure3-5.MarioFerrari'sJohnny5............................................................................3-41 Figure3-6.Wheelbase .................................................................................................3-42 Figure3-7.FindingCGUsingBalanceMethod ..........................................................3-43 Figure3-8.ModifiedBalanceMethod.........................................................................3-43 Figure3-9.AnInclineMovestheEffectiveCG ..........................................................3-44 Figure3-10.TurningGeneratesForcesandMoments.................................................3-45 Figure3-11.FIRSTTeam254'sRobot"CheesyPoofs"DoesaVictoryWheelie .......3-45 Figure3-12.CantileveredandFullySupportedWheels ..............................................3-46 Figure3-13.WheelLoading ........................................................................................3-46 Figure4-1.TheRCXProgrammableBrick .................................................................4-48 Figure4-2.RCXCodeScreenshot...............................................................................4-50 Figure4-3.ROBOLABScreenshot ..............................................................................4-50 Figure4-4.9VoltGearedMotor .................................................................................4-51 Figure4-5.PWMDutyCycles ....................................................................................4-52 Figure4-6.UsingaPulleytoIncreaseDrag ................................................................4-53 Figure4-7.UsingColorCodingtoDocumentProperConnectorOrientation .............4-53 Figure4-8.StrengtheningMotorMountswithCrossBracing .....................................4-53 Figure4-9.MotorMountUsingRails..........................................................................4-54 Figure4-10.WiringtheTouchSensor.........................................................................4-55 Figure4-11.ASimpleBumper....................................................................................4-55 Figure4-12.ABumperthatUsestheRotationSensor ................................................4-55 Figure4-13.ANormallyClosedBumperDesign........................................................4-56 Figure4-14.ImprovedNormallyOpenBumper..........................................................4-56 Figure4-15.PositionandLimitSwitches ....................................................................4-57 Figure4-16.ATouchRotationSensor ........................................................................4-58 Figure4-17.TheLightSensor .....................................................................................4-58 Figure4-18.LightSensorColorExperiment...............................................................4-60 Figure4-19.VisibleLightSpectrum ...........................................................................4-61
Figure4-20.TheLightSensorSeesDifferentlythanOurEyes....................................4-61 Figure4-21.LightColors ............................................................................................4-62 Figure4-22.ColorExperimentSensorReadings.........................................................4-63 Figure4-23.AmbientLightExperiment......................................................................4-64 Figure4-24.LightSensorReadingsforGrayLEGOBrick.........................................4-65 Figure4-25.RotationSensor .......................................................................................4-66 Figure4-26.UsingGearReductiontoIncreaseResolution.........................................4-67 Figure4-27.RotationSensorInternals.DON'TDOTHIS!!! .....................................4-67 Figure4-28.HomemadeRotationSensorMadeFromLEGOParts .............................4-68 Figure4-29.AHomingSwitchtoResettheRotationSensor......................................4-68 Figure5-1.ADifferentialDriveRobot........................................................................5-71 Figure5-2.SwivelCasters ...........................................................................................5-71 Figure5-3.SwivelCastersareSelfAligning...............................................................5-72 Figure5-4.CastersGenerateSteeringForcesWhileAligning ....................................5-72 Figure5-5.DiamondShapedWheelLayout................................................................5-73 Figure5-6.TriangleShapedWheelLayout .................................................................5-74 Figure5-7.TurningRadiusisDeterminedWheelbaseandRelativeSpeed.................5-74 Figure5-8.PivotingAboutaWheel ............................................................................5-76 Figure5-9.SimpleLEGOSlipLimiter........................................................................5-77 Figure5-10.ALockingDifferential ............................................................................5-78 Figure5-11.APairofDifferentialSkidRobots ..........................................................5-79 Figure5-12.Twosteeredwheelrobots........................................................................5-80 Figure5-13.PathPlanningisHarderforNon-HolonomicRobots ..............................5-80 Figure5-14.AckermanSteeringMinimizesGeometryInducedWheelSkid ..............5-81 Figure5-15.TurningRadiusisDeterminedbyWheelBaseandSteeringAngle ........5-81 Figure5-16.TricycleDrive(Left)andSteeringDrive(Right)RobotsLookSimilar ..5-82 Figure5-17.AnySteerAngleisPossiblewithaTricycleDrive .................................5-83
Tables
Table1-1.CalculatingDiagonalLengths ......................................................................1-9 Table2-1.SpurGearSizes ..........................................................................................2-13 Table2-2.DiagonalGearSpacing ...............................................................................2-16 Table2-3.GearRatiosforLEGOSpurGears .............................................................2-18 Table2-4.Measuredpulleydiameters .........................................................................2-31 Table2-5.PulleyRatios................................................................................................2-32 Table4-1.LightSensorReadingsforPeanutM&Ms ..................................................4-59 Table4-2.LightSensorReadingsforColorExperiment.............................................4-60 Table4-3.SensorReadingsforAmbientLightExperiment ........................................4-65 Table4-4.SensorReadingsforTwoStackedSensors.................................................4-69
1 Structures
1.1 Bricks,Plates,andBeams
Bricks,plates,andbeamsarenotasglamorousastheRCXbrick,motors,andsensors. Buttheyarethefundamentalcomponentsthatareusedtobuildtheframethatsupports theRCX,counteractsthemotorsforces,andholdsthesensorspreciselyinplace.Master someLEGObuildingfundamentalsfirst,andyourteamwillhavesuccess.Ignorethem, andyoullspendmoretimerepairingyourrobotthanyoudidbuildingit.
1.1.1 Bricks
ThisisaLEGObuildingbrick.Littlehaschangedsinceitsintroductionin1949. AccordingtoLEGO,theyhaveproduced320billionbricks1sincethattime.Thats approximately52bricksperpersonlivingtoday.
Figure1-1.BasicLEGOBrick
1.1.1.1Dimensions
Thecommonpracticeistorefertobricksusingtheirdimensions:width,length,and height(thoughheightisoftenleftoffwhenreferringtostandardsizedbricks).When doingthis,thewidthandlengthdimensionsaregiveninstuds.Thepiecebelowisa2x4 brick.
1
4
Figure1-2.BrickDimensions
LEGObricksarebasedonthemetricsystem.The2x4brickaboveis16mmwide,32 mmlong,and9.6mmhigh(ignoringthestudsontop).Thatworksoutto1stud=8mm.
1 2
1-1
Italsomeansthatbricksare1.2studshigh.Thisasymmetrycanleadtodesignand buildingdifficultiesaswillbediscussedlater.
Question: What is the smallest sized cube that can be made out of
LEGO bricks?
1.1.2 Plates
Platesareessentiallyshortbricks.Theyare1/3theheightofstandardbricks--3.2mmor 0.4studs.Platesusethesamenamingconventionasbricks.
Figure1-3.ThreePlates=OneBrickhigh
Figure1-4.SimpleGearboxUsingTechnicPlates
Construction Note: Use normal plates when you dont need the through holes. Save the Technic plates for where they are needed.
Question: What is the smallest sized cube that can be made out of
bricks and plates?
1-2
1.1.3 Beams
In1977,LEGOintroducedTechnic3,aseriesofcomplexmodelsforolderchildrento build.CentraltoTechnicarethenewbeamswhichare1xbrickswithholesintheir sides.Theholesarespacedatone-studintervalsandcenteredbetweenthestudsonthe topofthebeam.Thebeamscanbestackedontopofeachotherjustlikebricks.In addition,connectorpinscanbeplacedinthesideholesallowingthebeamstobe assembledsidebyside.Thenumberofassemblytechniquesavailableusingthenew partsisstaggering.
Figure1-5.TechnicBeams
1.1.4 AxlesandPins
TheRISkitcomessuppliedwithawidevarietyofpinsandaxlesforconnectingTechnic beamstogether.ThemostcommonlyusedoftheseistheblackTechnicpinwithfriction, orfrictionpin.Thefrictionpinhassmall,raisedridgesthatmakeitlocktightlyinthe holesofaTechnicbeamprovidingaverystrongconnection.Alongversionofthe frictionpincanbeusedtopinthreebeamstogether.Thedoublepinworkswellwiththe goofytransparentblueconnectorblockthatcomesinthenewerRISsetsandhasanaxle holethatcansometimesbeuseful. A B C
A. B. C. D. E. F.
D E F
PinwithFriction 3LDoublePin LongPinwithFriction TechnicPin HalfPin Pin
G H I
G. H. I. J. K. L.
J K L
AxlePin 6LAxle 3LPinwithStud FullBushing HalfBushing LongPinwithStopBushing
Figure1-6.PinsandAxles
Fromwww.lego.com/eng/info/history
1-3
brick.TheshortpostoftheTechnicpinisactuallythesamesizeasaLEGOstudand canbeusedtomimicstudscomingoutofthesideofabeam.
Figure1-7.StudsontheSideofaBeam?
Figure1-8.ATypicalDrivenWheelAssembly
Figure1-9.A16LTechnicPin
1.1.5 LEGOVocabulary
TheRISkitisfilledwithallkindsofinterestingplasticpartsthatdontlookmuchlike anythingwithwhichyouareusedtobuilding.Lookhardandyoullnotfindonescrew,
1-4
C D
E F
F. G. H. I.
G H
Figure1-10.CommonTechnicPieces
complete Technic parts registry with pictures and an interesting history of LEGO. His URL is w3.one.net/~hughesj/technica/technica.html.
1.2 BuildingaFrame
Arobotneedssomesortofframe.Theframegivestherobotitsshape.Itprovides mountingpointsforsensorsandreactstheforcesgeneratedbymotorsandgears.Itis likeourskeleton,whichgivesusourshape,supportsourorgans,andreactstheforces generatedbyourmuscles.Agoodframeisstrong,lightweight,andholdstogethereven aftermuchuse.
Figure1-11.SimpleFrame
Figure1-11showsasimpleframemadeoutofbeamsand1x8plates.Itsstrong, lightweight,andthedimensionsareappropriateforthebaseofarobotplatform.Butitis
1-5
Figure1-12.ImprovedFrame
Figure1-13.CrossBracedFrame
1-6
Compression
Shear
Tension
Figure1-14.SnapOnConnectionsareWeakinTension
1.2.1 LEGOGeometry
A1x6Technicbeamis1studwide,6studslong,and1.2studshigh.Bricksandbeams notbeinganintegernumberofstudshighcausesproblemswhentryingtodocross bracing.ThiscanbeseenintheleftassemblyinFigure1-15.Thesecondholeinthe verticalbeamdoesnotlineupwiththeholeinthehorizontalbeam.
Figure1-15.CrossBracing
1-7
Figure1-16.TwoCrossBracingChoices
Figure1-17.ATallFrame
1.2.1.1DiagonalBracing
Itsveryeasytogetlockedintothemindsetthathorizontalandverticalaretheonlyways tobuild.Thegrid-likenatureoftheLEGOpiecesreinforcesthisthinking.Butdiagonal connectionsarepossibleaswell. Diagonalbracingistrickiertoimplementthanperpendicularcrossbracing.Cross bracingcanbeusedonanyassemblywherethedimensionisevenlydivisiblebytwo studs,butitcantbeusedanywhereelse.Withdiagonalbracingtherearemoresolutions, buttheirderivationsarenotasobvious.
1-8
4.8
1.5
Figure1-18.DiagonalCrossBracing
Youcanfinddiagonalbracingsolutionsthroughexperimentation.Laythediagonal braceonthepart,andmoveitaboutuntilyoufindaplacewheretheholeslineup.Itcan alsobedoneanalyticallyusingthePythagoreanTheoremforrighttriangles. Thesumof thesquaresofthelegsofarighttriangleequalsthesquareofthehypotenuse. Thisis oftenwrittenas C = A 2 + B 2 . Thetwolegsarethebase(widthacrossthebottom) andtheheight.Thehypotenuseisthediagonalbeam.Diagonalbracingispossibleifthe hypotenuseisclosetoanintegernumber(lessthan0.05studsdifference).
Table1-1.CalculatingDiagonalLengths
Base(A) 4 3 1.5 6
Height(B) 4 4 4.8 8
1.3 SNOT
SNOTisalltherageintheLEGObuildingcommunitytoday.SNOT,standingforStuds NotOnTop,isawayofbuildingwithLEGOthatdoesnotalwaysutilizethetraditional click-fitassemblytechniques.Thiscanbeverytrickyandrequiresgreatimagination,but theresultingmodelsareverybeautifulandquiterealistic.
1-9
Figure1-19.OneofJenniferClark'sIncredibleCreations.YesitsLEGO.
Figure1-20.Turning90degrees.StudsOut
1-10
Figure1-21.Turning90degrees.StudsIn
Figure1-22.UpsideDown
Figure1-23.ExtendingBeamsUsingPinsandPlates
1-11
2 Gears
Eventuallyyouwillwanttomakeyourrobotmove.Afterall,thisisnottheFLL SculptureCompetition!The9voltmotorsprovidethemotivepower,buttheymaynot runattherightspeedorbepowerfulenough.Itmayalsobetoodifficulttopositionthe motorswheretheycanbedirectlyattachedtothewheels.Alltheseproblemscanbe solvedusinggears. Gearsaregenerallyusedforoneofthefollowingreasons: 1. Totransmittorquefromoneaxletoanother 2. Toincreaseordecreasethespeedofrotation 3. Toreversethedirectionofrotation 4. Tomoverotationalmotiontoadifferentaxis 5. Tochangerotarymotiontolinearmotion 6. Tokeeptherotationoftwoaxlessynchronized
2.1 SpurGears
Aspurgearisusedwhenshaftsmustrotateinthesameplane.Inaspurgeartheteethare straightandparalleltotheshaft.Theyarebyfarthemostcommontypeofgears,and theyarewhatmostpeoplepicturewhenyoumentiongears.LEGOincludesfour differentsizedspurgearsintheRoboticsInventionSystem.
16
24
40
Figure2-1LegoSpurGears
2.1.1 GearSpacing
SizesofLEGOspurgearsareshowninTable2-1.Itisinterestingtonotethattheratio oftheradiiisequaltotheratioofthetoothcount(8/24=0.5/1.5=1/3).Thisisbecause allthedifferentsizedspurgearshavethesamesizedteeth--eventhelittle8tgearwithits involuteprofilegearteeth.Havingthesamesizedteethallowsthegearstomesh properly.
2-12
Table2-1.SpurGearSizes
Teeth Radius(studs)
8 0.5
16 1
24 1.5
40 2.5
Knowingtheradiusofagearandthenumberofteeth,wecancalculatethesizeofeach tooth.Thisinformationcanbeusefultoknowwhenusingaspurgearwithagearrack. Circumference Circumference SizexCount Size 16tooth =2xPixRadius =ToothSizexToothCount =2xPixRadius =2xPixRadius/Count =2xPix1/16 =Pi/8studs =0.392studsor3.14mm
Checkitoutforyourself.Theteethforeachspurgearreallydoevaluatetothesame size!
2.1.1.1HorizontalGearSpacing
UsingtheinformationfromFigure2-2,wecancalculatethegearspacingrequiredfor propermeshing.Thedistancebetweenthetwoaxlesisequaltothesumofthetworadii.
Figure2-2.StudGearSpacing
2-13
Figure2-3.HalfStudSpacingUsing2Holed1x2Beam
Construction Notes: Gear spacing of two or three studs provides the maximum number of gear combinations. Two stud spacing also works well in vertical layouts.
2.1.1.2VerticalSpacing
Itisdifficulttomeshgearslaidoutonaverticalaxis.Thegearspacingtableshowsthat propergearmeshingisachievedathalfstudintervalsstartingat1studandgoingupto5 studs.Forgoodverticalgearmeshing,weneedtobuildastructureusing1.2studhigh beamsand0.4studhighplatesthatprovidesthecorrectspacing.Itworksoutthat2and 4studsspacingaretheonlysolutions.
16t 2.0studs
40t 4.0studs
Figure2-4.VerticalGearSpacing
2-14
Figure2-5.CircumventingVerticalGearSpacingRestrictions
2.1.1.3Diagonalgearspacing
Diagonalgearspacingistrickiertocalculatethanperpendicularorverticalgearspacing. Aswasdonetocalculatediagonalcrossbracingsolutions,Pythagorasstheoremforright trianglesisusedtocomputethediagonal(hypotenuse).Thisvalueisthencomparedto theidealgearspacinginformationfromthetableinFigure2-2.
2.8 2
3.44
Figure2-6.DiagonalGearSpacing
2-15
Table2-2.DiagonalGearSpacing
HorizontalSpacing
0 0 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 0.5 1 1 1.56 1.5 1.5 1.92 2.5 3.47 2.97 3.53 4 4.03 5.06 5.03 3.44 4.06 5.02 5.00 2 2 2.56 2 2.06 2.45 2.5 2.5 2.97 4.03 4.92 3 3 3.5 3.5 4 4 4.5 5 5
VerticalSpacing
Figure2-7.CircumventingDiagonalGearSpacingRestrictions
2.1.2 GearRatio
Gearratioishowmuchtheoutputshaftofagearboxturnsforagivenrotationofthe inputshaft.InFigure2-8,wehaveagearboxconsistingoftwogears:an8tgearonthe inputshaftanda24tgearontheoutputshaft.Ifthe8tgearrotatesonefullrevolution theneightofitsteethwouldpassthroughthestartingline.Becausethetwogearsare meshed,eightofthe24tgearsteethwouldalsopassthestartingline.Sincetheteethare evenlydistributedaroundthecircumferenceofthegear,the24tgearturns8/24thsor1/3 ofarevolution.
2-16
Usingtherotationinformationwecancalculatethegearratio.Followingpopular convention,itisexpressedasaratioofwholenumbers. GearRatio =1:1/3 =3:1 The3:1gearratiotellsusthattheinputshaft(attachedtothe8tgear)hastocomplete threefullrevolutionsfortheoutputshaft(attachedtothe24tgear)torotatealltheway aroundjustonce.Usinggearstoslowdownrateofrotationordecreasetheamountof rotationiscalledgearingdown.Ifweweretoswitchthe8tand24tgearsaround,the outputshaftwouldspinthreerevolutionsforeachrevolutionoftheinputshaft.Thisis gearingup,andthegearratiowouldbe1:3. Youmayhavenoticedthatthegearratioistheinverseoftheratioofthenumberofgear teeth.Thereasonforthisiseasiertoseeifwerecalculatethegearratiousinganinput shaftrotationofonly1tooth.Inthecaseofthe8tgeardrivingthe24tgear,theinput shaftwouldturn1/8ofarevolutionandtheoutputshaft1/24ofarevolution. GearRatio =1/8:1/24 =24:8 =3:1 Usinggeartoothcountstodirectlycalculategearratiosiseasierandfasterthan calculatingtherotationsfirstandthenusingthesevaluestoderivethegearratio.
2-17
16:8 or 2:1
24:8 or 3:1
40:8 or 5:1
Table2-3.GearRatiosforLEGOSpurGears
OutputShaftorDrivenGear InputShaftor DrivingGear 8t 16t 24t 40t 8t 1:1 1:2 1:3 1:5 16t 2:1 1:1 2:3 2:5 24t 3:1 3:2 1:1 3:5 40t 5:1 5:2 5:3 1:1
Links: Ted Cochran has a nice treatment of gear ratios with Minnesota FLL
examples at www.hightechkids.org/fll/coaching/Gears/gears.htm.
2.1.3 Torque
Torqueisaforcethattendstorotateorturnthings.Yougenerateatorqueanytimeyou applyaforcetothehandleofawrench.Thisforcecreatesatorqueonthenut,which tendstoturnthenut.Ifthenutistootight,youeitherpullharder(moreforce),orgeta longerhandledwrench(moredistance).
orce F
Torque Distance
Figure2-9.Torque=ForcexDistance
Fromthewrenchexample,weseethattorqueisaproductofforceanddistance.The unitsusedwhenmeasuringtorquereflectthis.IntheU.S.wemeasuretorqueinfootpounds(ft-lbs).Newton-meters(Nm)istheunitoftorqueinthemetricsystem.
2-18
Gearsoperatebytransmittingforcesattheteethofthegear.InFigure2-10,the24tgear isgeneratingaforceagainsttheteethofthe40tgear.Theforce(f)isequaltothetorque (t1)appliedtothe24tgeardividedbytheradius(r1).Theforcetransmittedbyagearis inverselyproportionaltothegearsradius.Thelargertheradiusofthegear,thelessforce itwillgenerateforagiventorque. Theforceagainsttheteethofthe40tgearcreatesatorque(t2)equaltotheforce(f)times theradius(r2).Thetorquecreatedbyapplyingaforcetoagearisproportionaltothe gearsradius.Applyingaforcetoalargegearwillcreatemoretorquethanapplyingthe sameforcetoasmallgear. r1 f =t1/r1 t1 f t2 r2
Figure2-10.TheRatiooftheTorquesisEqualtotheRatiooftheRadii
Thetorqueavailableattheaxleofdrivengear(40t)canbeexpressedasafunctionofthe torqueturningthedrivinggear(24t)andthetworadii;t2=t1xr2/r1.Asmallgear drivingalargergearwillamplifytorque.Therewillbemoretorqueavailableattheshaft ofthelargergearthanissuppliedtotheshaftofthesmallergear. Fromthediscussionearlier,weknowthatthegearratioistheinverseoftheratioofthe gearsradii.Thisallowsustousethegearratiotocalculatethetorqueamplificationofa gearsystem.Usingthegearratiofortheexampleabove: GearRatio =r2:r1 =r2/r1 =5/3 t2 =t1xr2/r1 =t1xGearRatio =t1x5/3 TheTechnicgearmotorsuppliedwiththeRISkitcangenerateatorqueofabout9Ncm withfreshbatteries.Intheexampleabove,howmuchtorquewouldbeavailableatthe shaftofthe40tgearifweattachedthemotordirectlytotheshaftofthe24tgear? t2 =t1x5/3 =9Ncmx5/3 =15Ncm
2-19
2.1.4 Speed
Whenusingsimplemachineslikegears(oranykindofmachineforthatmatter)you nevergetsomethingfornothing.Inourpriorexample,weusedgearstoincreasetorque. Whatwetradedtogetthetorqueincreasewasspeed.Theoutputshaftmayturnstronger, butitalsoturnsslower. Ifwemeasuretheanglesinradians(1radian=180degrees/Pi=1revolution/(2xPi)), thetoothvelocityofagear(v)isequaltotheangularvelocity()timestheradius(r). Thereisaproportionalrelationshipbetweentheradiusandthetoothvelocity.Atagiven angularvelocity,theteethofalargergearwilltravelfasterthantheteethofasmaller gear. r1 v =1xr1 2 =v/r2 2 =(1xr1)/r2 =1xr1/r2 2/1=r1/r2
1 2
r2
Figure2-11.RatioofAngularVelocitiesisEqualtoInverseRatiooftheRadii
Whentwogearsaremeshed,thetoothvelocityforeachgearisthesame.Intheexample above,whatistheangularvelocityofthe40tgearifthe24tgearisspinningat180rpm? r1 =1.5studs=12mm r2 =2.5studs=20mm 1 =180rpm =180revolutions/minutex1minute/60seconds =3revolutions/second =3revolutions/secondx2Piradians/revolution =6Piradians/second =18.85radians/second v =1xr1 =18.85radians/secondx12mm/radian =226.19mm/second 2 =v/r2 =(226.19mm/second)/(20mm/radian) =11.31radians/second =1.8revolutions/second =108rpm Thelargergearspinsmoreslowlythanthesmallergear.Theratiooftheangular velocitiesisequaltotheinverseoftheratiooftheradii.Knowingthiswecancalculate theangularvelocityusingtheradiusratiodirectly.
2-20
2 =1xr1/r2 =180rpmx1.5studs/2.5studs =108rpm Justaswithtorque,thegearratiocanbeusedinplaceoftheratiooftheradii. GearRatio=r2:r1 =r2/r1 =5/3 2 =1xr1/r2 =1x(1/GearRatio) =1/GearRatio =180rpm/(5/3) =180rpmx3/5 =108rpm
Links: How Stuff Works, one of the best sites on the web, has a wonderful
article about gears, gear ratios, torque, and speed. Check it out at www.howstuffworks.lycozone.com.
2.1.5 GearTrains
Ifanumberofgearsarecascadedsothatseveralmeshesrelateaninputtoanoutput,a geartrainisformed.Usingfour40tandfour8tgears,itispossibletocreateagearratio of625:1.
CB
E D
Figure2-12.Multi-stageGearTrain
2-21
AB BC CD DE AE
The9vgearedmotorcangenerateabout0.06ft-lbsoftorquewithfreshbatteries.Ifwe hookedoneuptoshaftAandturnediton,thetorqueamplificationsshouldproduce37.5 ft-lbsoftorqueatshaftE.Thatsenoughtorquetotightenthelugnutsonmycars wheels.Duetofrictioninthegeartrain,theactualavailabletorquewillbemuchlessthan 37.5ft-lbs,butitwillbestrongenoughtosnapaxlesandbreakgearteeth.Becareful whenusinglotsofgearreduction. Asmentionedbefore,anyincreaseintorqueisaccompaniedbyacorrespondingdecrease inrotationspeed.Ifwetookourmotor,hookedituptoshaftAandgotitspinningat200 revolutionsperminute(rpm),shaftEwouldspinat0.32rpmorabout1revolutionevery 3minutes.Ifinstead,weattachedthemotortoshaftE,thenshaftAshouldspinat 125,000rpm.Thatwouldhavetheteethofthelast40tgeartravelingat585mph! Fortunately,thelargeamountoffrictioninthegeartrainpreventstheweak9vmotor fromgeneratingsuchdangerousspeeds.Whengearinguptoincreasespeed,torque amplificationmagnifiesthefrictionforcesofthelaterstages.Withagearratioof1:625, itisunlikelythatthemotorispowerfulenoughtospinthegearsatall.
Question: For the example above, what would the gear ratio be if the
8 tooth gears were replaced with 24 tooth gears?
2.1.5.1IdlerGear
The24toothgearinFigure2-13isanidlergear.Anidlergeardoesnotaffectthegear ratioofageartrain.ThegearratioforACisthesameasitwouldbeifthe24tooth gearwereleftout.Idlergearsarequitecommoninmachineswheretheyareusedto connectdistantaxles.Theyarealsousedtochangethedirectionofrotationoftheoutput shaft. AB =3:1 BC =1:3 AC =ABxBC =3:1x1:3 =3x1:1x3 =1:1
2-22
C
Figure2-13.IdlerGear
2.1.6 ClutchGear
Thefunnylookingwhite24toothspurgearwiththewritingonitsfaceistheclutchgear. Theclutchgearisspecialinthatthegearteethareabletorotateabouttheshaft.Ithasan internalclutchmechanismthatstartstoslipwhenitsmaximumratedtorqueisexceeded. Theclutchgearisusedtolimitthetorqueofagearedsystem,savingmotorsand preventingyourrobotfromtearingitselfapart. Theclutchgearhas 2.5.5Ncm stampedonitsface.Thisisthetorqueratingofthe clutch.NcmstandsforNewtonCentimeter,aunitoftorque(torqueisaproductofforce anddistance,centimeterisaunitofdistance,andNewtonisaunitofforce).Theclutch gearcantransmitamaximumtorqueoffrom2.5to5Ncm(0.018to0.037ftlbsor0.22 to0.44inlbs).
24mm
B
Figure2-14.UsingClutchGeartoLimitForces
InFigure2-14,theclutchgearisusedtolimittheforceoftheliftarmpressingagainst theconnectorpegstops.Withouttheclutchgear,wewouldruntheriskofstallinga motorordamagingtheassembly.Usingtheinformationwehaveabouttheclutchgear, gearratios,anddistance,itspossibletocalculatethemaximumforcetheliftarmcan generatetopushagainsttheconnectorpeg. Amaxtorque GearratioA:B Bmaxtorque =5Ncm =5:3 =AtorquexGearRatio =5Ncmx5/3 =8.33Ncm
2-23
2.2 CrownGear
Thecrowngearhasteeththatareraisedononesideandroundedoffontheother.This givesitacrown-likeappearance.Thecrowngearisusedwhentheshaftstobeturned meetatanangle--usuallyarightangle.Thecrowngearcanbemeshedtospurgearsand wormgears,butitdoesntmeshwellwithothercrowngears.Thecrowngearcanalsobe usedinplaceofa24toothspurgear.
Figure2-15.CrownGear
2.3 BevelGear
Thebevelgearhasteeththatslopealongonesurfaceofthedisc.Itisusedwhenthe shaftstobeturnedmeetatanangle--usuallyarightangle.Ithaslessfrictionthanthe crowngear,butitcanonlymeshwithanotherbevelgear.LEGOproduces12tooth,14 tooth,and20toothbevelgears.Unfortunately,onlythe12toothbevelgearisincluded intheRISkit.
Figure2-16.BevelGear
2-24
Figure2-17.ASmallWheelBuiltfromTwo12tBevelGears
Question: A wheel made out of bevel gears would not have much
traction. For what applications could this be a benefit?
2.4 WormGear
Awormgearisascrewthatusuallyturnsalongaspurgear.Motionistransmitted betweenshaftsthatareatrightangles.Ifyouwanttocreateahighgearratio,nothing beatsawormgear.Eachtimetheshaftspinsonerevolution,thespurgearmovesone toothforward.Ifthespurgearhas24teeth,youhavea24:1gearratioinaverysmall package.
Figure2-18.WormGear
2-25
Figure2-19.UsingtheWormGear'sSelfLockingFeature
Figure2-20.LEGOLeadScrew
Figure2-20isaLEGOimplementationofaleadscrew.Thethreadedrodisconstructed ofmultiplewormgearsonthecenteraxle.Thehalfbushingsontheouteraxlesmakeup thecapturednut.Spinningthecenteraxlecausestheouteraxlestomoveinorout. Construction Note: Be careful when constructing a threaded rod out of worm gears. You can put two worm gears on an axle in four different ways, but only one results in a continuous thread. Bad
Good
2-26
2.4.1 DirectionalTransmission
OneofthecleverestusesIhaveseenforawormgearisthedirectionaltransmission.A directionaltransmissionletsyouuseoneoutputporttoperformtwofunctions.Ithasone inputshaftandtwooutputshafts.Awormgearslidesalongtheinputshaftandengages spurgearsontheoutputshafts.Whichgearisengagedisdependentupontherotation directionoftheinputshaft.
Figure2-21.DirectionalTransmission
2.5 Differential
Adifferentialisadevicethattakesatorqueappliedtoitshousingandevenlydistributes ittotwooutputshafts,allowingeachoutputtospinatadifferentspeed.Differentialsare foundonallmoderncarsandtrucks.All-wheeldrivecarsliketheAudiQuattrocanhave threedifferentials;onebetweenthefronttires,onebetweenthereartires,andone betweenthefrontandreardifferentials.LEGOprovidesadifferentialwiththeRISkit.
Figure2-22.LEGODifferential
2-27
Figure2-23.DuringTurnstheWheelsCoverDifferentDistances
2-28
80rpm
-80rpm
(8080)/2=0rpm
Figure2-24.UsingDifferentialtoCalculateAverageRotation
Figure2-25.UsingaDifferentialtoCalculateDifferenceinRotation
2.5.1 RatchetSplitter
Anintriguinguseforthedifferentialisaspartofaratchetsplitter.Aratchetsplitterlets youperformtwodifferentfunctionswithasinglemotor,justlikethedirectional transmission.Butinsteadofusingfrictiontoswitchgears,theratchetsplitterusesa ratchetingmechanismtopreventanaxlefromspinninginbothdirections.
2-29
Figure2-26.RatchetSplitter
Question: What would happen if a second ratchet was added to 2.6 GearRack
Figure2-27.LEGOGearRackandPinion
2.7 Pulleys
Apulleyisawheelwithagrooveaboutitsdiameter.Thegroove,calledtherace,accepts abeltwhichattachesthepulleytootherpulleys.Asthepulleyrotates,frictionforcespull onthebeltputtingitintension.Thebelttransmitstheforcetotheotherpulleycausingit torotate.
Figure2-28.PulleysandBelts
Figure2-29.LegoPulleys
Table2-5.PulleyRatios
2.7.1 Torque
Pulleysmaybeusedinplaceofgearsinmanyapplications.Sincetherearenoteethto mesh,placementismuchmoreforgiving.Butbecauseithasnoteeth,apulleycannotbe usedtotransmithightorques.Thebeltwillslipfirst.Determiningwhenandhowmuch thebeltwillslipisdifficult.Itdependsonmanyfactorssuchasthesizeofthepulleys, thetensionofthebelt,andthefrictionbetweenthepulleyandthebelt. Youcanincreasethetorquecapacityofapulleysystembyincreasingthereductionratio orbyincreasingthefrictionbetweenthepulleysandthebelt.Increasingthereduction ratiomaynotbedesirablebecauseithasanassociateddecreaseinspeed.Frictioncanbe increasedeitherbyusingatighterbeltorbyincreasingthecontactareabetweenthe pulleysandthebelt.
Figure2-30.TwowaystoIncreaseTorqueCapacity
Question: How else can we increase the friction between the pulleys
2-32
Figure2-31.UsingPulleystoLimitTorque
Construction Notes: The tank tread and sprocket can be used like a pulley and belt system. The treads teeth prevent slipping even if a large torque is applied to the sprocket.
2.8 Reinforcinggeartrains
Thecomponentsofthegeartrainarelikelytoexperiencethelargestforcesofanythingin yourrobot.Themotorwillstallandwheelswillslipbeforeforcesgettoooutofhand. Butwithenoughgearreduction,itiseasytogenerateforcesthatwilltearagearboxapart.
Figure2-32.Forcesongears
Differenttypesofgearsrequiredifferentkindsofsupport.Inspurgears,forcesare appliedperpendiculartotheaxles.Unlesstheaxlesareproperlysupported,theywillbe pushedapartwhenhightorquesareapplied.Supportingtheaxlesisnotaproblemin horizontallayouts,butverticalanddiagonallayoutsmayrequireadditionalbracing. Crownandbevelgearshaveforcesdirectedperpendicularandparalleltotheiraxles.As withspurgears,thesupportingstructurewillprobablyrequirebracingtoholdtheaxlesin place.Thiscanbedifficultattimesbecausethesupportsareperpendiculartoeachother. Crownandbevelgearsalsorequireasolidbackingtopreventthemfromslidingontheir axles. Themostdifficultproblemwiththewormgearislockingthewormscrewinplaceonits axle.Thisisexacerbatedbythegearsoddlength(its15.5mmlonginsteadofthe16mm
2-33
requiredforaperfectfit).Whenthewormgearisusedwithaspurgear,thespurgears axlemustbewellsupported.
Figure2-33.GearboxesDontHavetobeBigtobeStrong
2.9 Backlash
Thebacklashofageartrainistheamounttheinputshaftcanrotatewithoutmovingthe outputshaft.Backlashiscausedbythegearsnotmeshingperfectly(seeFigure2-34).In thisexample,whengearAreversesrotation,thetoothongearBgoesfrombeingloaded ontheleftsidetobeingloadedontherightside.Becauseofthegapbetweentheteeth,A willbeabletorotateasmallamountbeforeBnoticesthechangeindirection.
Figure2-34.Backlashiscausedbypoorgearmeshing
2-34
ReducingBacklash: 1. Placerotationsensorsneartheoutputshaft.Thisminimizestheeffectbacklash hasonthesensorreadings.Unfortunately,italsolimitsyourabilitytoincrease sensorresolutionbygearingup. 2. Uselargegears.Backlashislessnoticeableinlargergears. 3. Minimizethenumberofgearsinageartrain.Thelargerthenumberofmeshes, thegreaterthebacklash. 4. Backlashincreaseswhenyougearupanddecreaseswhenyougeardown. 5. Whenlayingoutgearsdiagonally,keepgearspacingneartheidealvalues. Backlashincreasesifthegearsaretoofarapart. 6. Becarefulwhenusingthewormgear.Thewormgearsoddsize(1.94studs long)makesitdifficulttosupport.Multiplehalfbushingscanbeusedtoholdthe wormgearinplaceforlightlyloadedapplications. Aninterestingalternativeistopreventbacklashfromoccurring.Youcantaketheplay outofageartrainbyapplyingatorquetotheoutputshaft,tradingsomeinputtorquefor moreprecision.Ifthetorqueisgreatenough,itpreventsbacklashfromhappeningwhen changingdirection.InFigure2-35,therubberbandissupplyingtheforceusedto preloadthegeartrain.
Figure2-35.Preloadingageartrainwitharubberband
2-35
Figure2-36.SplitgearmadefromLEGO
2-36
3 Wheels
FLLchallengesinvolvedmovingaroundandpickingupthings,movingaroundand droppingthings,movingaroundandtriggeringthings.Allthismovingaroundrequires somesortofmobileplatform,andmostofthemobileplatformsusewheels. Wheelssupporttheweightoftherobotandtransmitthepowerofthemotorstothe ground.Whatwheelsyouusewillaffectyourrobotsspeed,power,accuracy,andability tohandlevariationsinterrain.Wheelchoiceswillhaveaprofoundeffectonyourrobots successorfailure.
3.1 Sizes
LEGOhassuppliedawidevarietyofwheelsandtiresintheRISkit.Therearethree sizesofsolidrubbertireswhichallfitonthesameplasticwheelandthreesizesof balloontiresthatfitondifferentlysizedhubs.Dimensionsinmillimetersarestampedon thesidewalloftheballoontires.Dimensionsforthesolidtiresarenotavailable, therefore,approximatedimensionsaresuppliedinthefigurebelow.
SmallSolid 24mmx7mm
MediumSolid 30mmx10.7mm
LargeSolid 43mmx10.7mm
Figure3-1.LegoWheelsandTires
3.1.1 Speed
Asyoudrivedownthehighwaythespeedyourcartravelsisdependentuponthe rotationalspeedoftheengine,thegearratioofthetransmission,andthediameterofthe tires.Theenginespeedandgearratiodefinehowfastthedrivewheelsarespinning
3-37
(theirangularvelocity).Theangularvelocitycanthenbeconvertedtolinearvelocity usingtheequationforthecircumferenceofacircle(distancearoundthecircle).
Diameter
1Revolution
Circumference
Circumference=PixDiameter
IamdrivingdownthehighwayinmytrustyCamrywiththebrokenspeedometercable whenIseeapolicecarwithitslightson.Aquicklookattheinstrumentsshowsthe engineisat800rpmandthatIaminthirdgear.AmIgoingtogetaticket?
v=xPi x d
=900rpmx3.14x81.6mm =230,601mmperminuteor8.7mph!Wow!!!
Figure3-2.AVeryFastTractor
Question: For the example above, what would the travel speed be if
we changed the gear ratio by putting the 8 tooth gear on the motor and the 24 tooth crown gear on the axle?
3.1.2 Force
Inourdiscussionofgears,wesawthatthereisarelationshipbetweenforce,torque,and radius--thesamerelationshipsholdtrueforwheels.Whenyouusebigwheelstoincrease speed,youhavetogiveupsomething,andthatsomethingisforce.Arobotwithbig wheelscannotpullasmuchasarobotwithsmallwheels.
3-39
Force
Figure3-3.Force=Torque/Radius
Therelationshipbetweenforce,distance,andtorqueworksagainstuswhenitcomesto wheels.Largewheelshaveabiggerradius(leverlength)andwillgeneratelessforcefor agiventorquethansmallwheelswould.Lessforcemeanslessacceleration.Thecarwill gofaster,butitwilltakelongertoreachthatspeed.Using9Ncmasanestimateforthe availablemotortorque,letsdeterminethewheelforcesforthevehicleinFigure3-2. Torque =MotorTorquexGearRatio =9Ncmx1:3 =3Ncm Radius =Diameter/2 =81.6mm/2 =40.8mmor4.08cm Force =WheelTorque/Radius =3Ncm/4.08cm =0.735N =0.1653lbsor2.64oz!Weak!!! Forcomparison,ifweusedthesmallsolidwheels(24mm),thetractorwouldtravelat 2.5mphwiththewheelssupplyingupto9ozofforce.Switchingthegearratiofrom3:1 to1:3wouldhavethetractorgoingonly mph,butitwouldbecapableofdeliveringa whopping5lbsofforce.Itsunlikelythatthetireswouldhaveenoughtractionto transmitthismuchforcetotheground,consequently,someslippingwouldresult.
Question: If big wheels are less efficient for towing, why do tractors
have big wheels?
3-40
3.2 Treads
TrackedrobotshavebeenverypopularinFLLcompetitions.Theyareeasytobuild,and thekidsthinktheylookcool.TheRISkitcomeswithtwotanktreadsandfoursprocket wheels.Thesprocketwheelshavearoundaxleholeallowingthemtospinfreely. Drivingthetreadrequiressomeadditionalmechanismtolockthesprocketwheelstotheir axle.Thisisusuallydonewitha16toothspurgear.
Figure3-4.TrackedRobot
Figure3-5.MarioFerrari'sJohnny54
Fromwww.marioferrari.org/lego.html
3-41
3.3 Balance
Properbalanceisveryimportantinrobotdesign.Foryourrobottomoveinapredictable andrepeatablemanner,allwheelsmustbeincontactwiththegroundatalltimes,andthe weightcarriedbyeachwheelmustbeconsistent.Improperbalancewillresultinarobot thattipsovereasilyorliftsitswheelswhenacceleratingorturning. Balanceisdependentupontwofactors:wheelbaseandcenterofgravity.Centerof gravity(CG)isthepointwithinyourrobotwherethereareequalamountsofmassabove andbelow,equalamountstotheleftandright,andequalamountsforeandaft.For stabilitycalculations,wepretendthatallthemassofyourrobotisconcentratedinthis tinyspot.Thewheelbaseistheregionoutlinedwhenyouplayconnectthedotswiththe pointswhereyourrobotswheelstouchtheground.
Figure3-6.Wheelbase
3.3.1 FindingtheCenterOfGravity
DeterminingyourrobotsCGisaninformativeandeducationalactivity.Therearemany waysthiscanbedone,rangingfromthedryandboring(summingthemomentofinertia foreachcomponentanddividingbythetotalmass)totheslightlyfrightening(hanging therobotfromastring).AfairlysafeandeasywaytolocatetheCGisthebalance method. TodeterminetheCGusingthebalancemethodyouneedtolocatethebalancepointon thelateral,longitudinal,andverticalaxes.Eachbalancepointdefinesaplaneupon whichtheCGresides.TheCGislocatedattheintersectionofthethreeplanes.
3-42
LateralBalance Plane
LongitudinalBalance Plane
CGisonthisline
Figure3-7.FindingCGUsingBalanceMethod
Tofindthebalancepoints,youneedafulcrumthatwillsupporttheweightoftherobot whilestillallowingittotipeasily.A2x4curvedtopbrickisthefulcrumintheexample above.Placetherobotonthefulcrumsuchthatthefulcrumisparalleltothebalance planeyouaretryingtolocate.Slowlyadjustthepositionofthefulcrumuntiltherobot balances.Thisisthebalancepoint.RepeatfortheothertwoaxestofindtheCG. FindingtheverticalcomponentoftheCGcanbedonethesameway,butsometimesyour robotsdesignwillallowthis.IfIcantbalancethefront,rear,orsidesoftherobotona fulcrum,Imodifythebalancemethodtouseapartoftherobotasthefulcrum.Carefully tilttherobotupuntilitfeelslikeitisbalanced.Nowuseacarpenterssquare(abookor tissueboxwillworkaswell)toprojectaplaneupverticallyfromthefulcrum.TheCGis thepointwherethisplaneintersectsthelateralandlongitudinalbalanceplanes. VerticalLine Centerof Gravity
Figure3-8.ModifiedBalanceMethod
3.3.2 Inertia
Determiningtheverticalcomponentofthecenterofgravityismoredifficultthanfinding theleft/rightcenterorthefore/aftcenter.Sowhybotherdoingit?Afterall,ifyouknow
3-43
CG CG
BalancedOK
OhOh!TipsOver
Figure3-9.AnInclineMovestheEffectiveCG
AmoreimportantreasonforknowingtheverticalCGistobeabletopredicttheeffects thataccelerationwillhaveonyourrobot.Thewidelypublicized(andoverhyped) problemswiththeSuzukiSidekickandothersmallSUVshavemadethepublicaware thatsmallwheelbasevehicleswithhighcentersofgravityaremoresusceptibletorolloversthanvehicleswithlargewheelbasesandlowcentersofgravity.Figure3-9shows howthismayoccuronanincline,buthowdoesithappenonaflatsurfacewhenturning? InhisPrincipia,SirIsaacNewtonwasamongthefirsttodocumentobservationsofa propertycommontoallmatterwhichwenowcallInertia.Hestatedthatbodiesatrest liketostayatrest,andbodiesinmotionliketostayinmotiongoingthesamerateina straightline.Tomovearestingbodyoralterabodysmotionrequirestheapplicationof anexternalforce.ThisissummedupnicelyintheequationForce=massxacceleration, orF=ma. Whenyouaredrivingdowntheroadandturnthesteeringwheel,thedirectionyourcaris travelingchanges.Theroadpushesagainstthetiresofyourcarcausingittoaccelerate sideways.Inertiadictatesthatyourcarandeverythinginsideitresistthisacceleration withaforceequaltotheirmasstimestheacceleration.Theinertialforceislocatedatthe carsCGandispointinginthedirectionoppositetheacceleration.BecauseCGisnot downontheroadwherethewheelforceisapplied,thisinertialforcecreatesatorque(or moment)whichtriestotipthecarover. Luckily,theweightofthecarisgeneratinganopposingmomentthatworkstopreventit fromtippingover.Alliswellaslongasthemomentduetogravityisgreaterthanthe momentduetotheinertialforce.Widewheelbasecarswithlowercentersofgravityare saferbecausetheinertialforcesrequiredtorollthecaroveraremuchgreater.Thetires areincapableofgeneratingsuchlargeforces,therefore,thecarskidsinsteadofrolling over.
3-44
CG
F2=mxa=F
Weight D1
D2
Figure3-10.TurningGeneratesForcesandMoments
Figure3-11.FIRSTTeam254'sRobot"CheesyPoofs"DoesaVictoryWheelie
3-45
3.4 WheelLoadingandFriction
TheweightoftheRCXbrick,batteries,threemotors,alightsensor,andarotationsensor iscloseto1pound.Addtothisaframe,motorsupports,gears,andsomesortof manipulator,andatypicalFLLrobot(ifthereissuchathing)issupporting1.5to2 poundsonitswheels.Dependingontherelativeplacementofthewheelsandsupporting framecomponents,theforceontheaxlesmaybemanytimesgreater.Thesehighforces cancausemuchofthemotorpowertobewastedtryingtoovercometheresulting friction.Whatisgeneratingtheseforces,andhowcantheybeminimized?
Figure3-12.CantileveredandFullySupportedWheels
Mostwheeledvehiclesusesomesortofcantileveredassemblytoattachthewheelstothe vehicle.Supportedononlyoneside,theaxleactslikealever,generatingamomentthat hastobereactedtobytheframe.Amomentistheproductofaforce(theweightbeing carriedbythewheel)anditsperpendiculardistancefromitsaxis(theplacewherethe axleissupportedbytheframe).Thefartherthewheelisfromtheframe,thelargerthe moment. Thewaythattheframereactsthemomenthasagreateffectontheamountoffriction. Wheretheaxlepassesthroughtheframeitdoesnotrestagainstthetopofthechannel, butinsteaditistilted,contactingtheframeatonlytwopoints.Thefartherapartthetwo contactpointsare,thelowertheforcesexertedagainsteach.
B B B
a A
b A W
b A W
Figure3-13.WheelLoading
FrictionForces 6W 4W 1.75W
3-46
Figure3-13andthecorrespondingtabledemonstratetherelationshipbetweenwheel placementandloading. W istheweightofthemodelsupportedbythewheel. A and B areforcesexertedagainsttheaxlebytheframe. a isthedistancebetweenthetwo contactpointsontheframe. b isthedistancefromtheframetothewheel. TocalculatethevaluesofforcesAandBweneedtousewhatwehavelearnedabout forcesandmoments.FromNewtonsequation,F=ma,weknowthatabodywill accelerateifacteduponbyaforce.Sinceourwheelisnotacceleratingupordown,we candeducethattheforcesA,B,andWmustallcancelout;theirsumisequaltozero. Forourpurposeshere,wewillsayforcespushinguparepositiveandforcespushing downarenegative. A-B+W=0 B=A+W Amomentisjusttheproductofaforceactingatadistance,anditfollowsthesamerules asregularforces.Abodyactedonbyamomentwillexperienceanangularacceleration. Iftheangularaccelerationofabodyiszero,thesumofthemomentsaboutanypointon thatbodymustalsobezero.Tomaketheequationseasiertoworkwith,Iamgoingto pickthepointwhereforceBisapplied.Here,wewillusetheconventionthatamoment thatwantstocauseaclockwiserotationispositive,andacounterclockwiserotationis negative. Axa+Bx0Wxb=0 Axa=Wxb A=b/axW Nowwecanstuffinsomenumbers.Thevaluesbelowarefromtheleftmostexamplein Figure3-13. a =1stud b =2.5studs A =b/axW =2.5xW B =A+W =2.5xW+W =3.5xW Theimportantthingtotakeawayfromthisdiscussionisthatyoucanreducefrictionby: 1. Placingthewheelsclosetotheframe 2. Spreadingouttheaxlesupportstoreducetheforcesrequiredtoreactthemoment fromthewheel.
Question: What would the table entry look like for the fully
supported wheel assembly shown in Figure 3-12?
3-47
4 LegoElectronics
4.1 RCXBrick
TheRCXisyourrobotsbrain,atinycomputershapedlikeaLEGObrick.Atthecoreof theRCXisaHitachiH88bitmicrocontrollerrunningat5to20MHzwith32KofRAM. Thismayseemanemicwhencomparedtomoderndesktopcomputerswith2GHz32bit processorsand512Mbytesofmemory,butitsaspowerfulastheAppleIIcomputerI learnedtoprogramonandsignificantlymorepowerfulthanthecomputersthatsentmen tothemoon. Themicrocontrollerisusedtocontrolthreevoltageoutputs,threesensorinputs,andan infraredserialcommunicationsport.Snap-onwireleadsareusedtoconnecttheRCXto motors,lamps,touchsensors,lightsensors,rotationsensors,etc Theserial communicationportisusedtodownloadprogramsfromaPCandcanbeusedto communicatebetweentwoRCXs. TheRCXispoweredby6AAbatteries.OlderversionsoftheRCXalsohada9VDC inputplugforusewithanoptionalACadapter.IfyouhavethismodelofRCX,the transformerwillpayforitselfinsavedbatterycosts.Havingtwoorthreesetsofgood qualityrechargeablebatteriesisalsoagoodidea.Therechargeablealkalinebatteries seemtoworkbestwiththeRCX. Construction Note: When building your robot, remember that you will have to occasionally remove the RCX to replace the batteries. Design accordingly.
Figure4-1.TheRCXProgrammableBrick
4.1.1 Firmware
TheRCXcontains32Kofbattery-backedRAM.Mostofthisisusedupbythefirmware thatyouhavetoinstallpriortoloadingyourownrobotprograms.Anadditional6Kis reservedtostoreuptofiveuserprograms.Thismaynotseemlikemuchspace,butmost
4-48
RCXprogramsareonlyafewhundredbyteslong.Theremainingmemoryisusedfor runningprograms. WhenaprogramiswrittenfortheRCX,itdoesnotcontainnativecodefortheCPU. Instead,itismadeupofspecialbytecodeswhichareinterpretedbythefirmware.Thisis similartothewayJavaprogramsonthewebareinterpretedbytheJavaVirtualMachine runninginyourbrowser.UsingabytecodeinterpreterallowstheRCXtomaintaina reliableenvironmentforexecutinguserprograms.Yourprogrammaynotdowhatyou want,butitwontcrashtheRCX. BecausethefirmwareisstoredinRAM,itiserasedifyourRCXremainswithoutpower formorethanafewseconds.AcapacitorintheRCXpowersthememorylongenough foryoutochangethebatteries(15-30seconds).IfafterchangingbatteriesyourRCXno longerfunctionsproperly,youmayhavelostyourfirmware.Youcantellifthefirmware isloadedbylookingattheLCDdisplay.Ifallyoucanseeistheprogramnumberand theminifigicon(eitherstandingorwalkingasinFigure4-1),thenthefirmwareisnot loaded.ThiswillbetheconditionofyourRCXbrickwhenyoureceiveyourkit. Construction Note: Whenever it is turned on, the RCX is receptive to messages coming in on its infrared serial port. With all the activity and congestion at competitions, it is quite possible that another team could unintentionally overwrite the programs stored in your RCX. Care should be taken to block the IR port when not in use.
4.1.2 Programming
TheRCXisprogrammedusingspecialsoftwarethatresidesonyourPC.Theprogramis translatedintobytecodesandtransferredtotheRCXviaaninfraredseriallink(usingthe IRtower).Thismethodofprogramming--writingcodeononetypeofcomputertoberun onanothertypeofcomputer--iscalledcrossdevelopment.Acomputerwithouta keyboardandmonitor,liketheRCX,iscalledanembeddedsystem.Thatmeansall FLLersareembeddedsystemsdevelopers,familiarwithcrossdevelopmenttools.This isimpressivestufftoputonyourresume. UserprogramscanbewritteneitherinRCXCodeorROBOLAB.RCXCodeisthe graphicalprogrammingtoolthatLEGOsuppliestoprogramtheRCX.Itistargetedto peoplewithnoprogrammingexperience.Programsarewrittenbypickinginstruction blocksandsnappingthemtogether,muchlikeusingactualLEGObricks.Theoriginal versionsofRCXCodewereverylimited(V1.0andV1.5).Manyinstructionssupported bythebytecodeinterpreterwerenotavailable,andsupportforvariableswasminimal.If youplantouseRCXCode,makesureyouhavetheversion2.0software.RCXCodeis currentlyonlyavailableforWindowsPCs.
4-49
Figure4-2.RCXCodeScreenshot
Figure4-3.ROBOLABScreenshot
page.LearningallthereistoROBOLABcouldtakealongtime.Luckily,everythingyou needforFLLisisolatedinonesectioncalledInventor.ROBOLABalsohasextensive userdocumentationbuiltintothetool,plusthereisaverythoroughusermanualavailable onlineathttp://www.ceeo.tufts.edu/robolabatceeo/documentation.htm. ProgrammingusingRCXCodeorROBOLABisprettymuchthesame.Theprogrammer usesthemousetoselectfromalistoficonsthatrepresentprograminstructions.The selectedinstructioniconsareplacedintoaworkspace.Somesortofgraphicalconnection metaphorisusedtodefinetheflowoftheprogram(snappingtogetherforRCXCode, wiresforROBOLAB).Whentheprogrammerfinisheslayingouttheinstructions,he/she usesamenuortoolbarbuttontocompiletheprogramanddownloadittotheRCX. IfyouareprogrammingonaMac,thenyouhavetouseROBOLAB.Otherwise,the choiceismostlyamatteroftaste.CarefulanalysisofMinnesotaFLLcompetitionresults overthelastthreeseasonsshowsnocorrelationbetweenateamssuccessandthe programminglanguageitused.
4.2 Motors
Themotorthatcomeswiththechallengekitiscalledthe9voltgearedmotor.Ithasan internalgeartrainthatdeliversa12:1gearreduction.Thisconvertsaninternalrotation speedof4200rpmtoamoreuseable350rpm5attheoutputshaft.Theinternalgearing alsoincreasesthestalltorqueto8.9Ncmor0.06ft-lbs6.
4Studs
2.8Studs or 2.33Bricks
Figure4-4.9VoltGearedMotor
5 6
Typicalspeedunderloadiscloserto200rpm FromtheRandomHallLegoRoboticsSeminar(web.min.edu/sp.742/www/motor.html)
4-51
4.2.1 Modes
TheRCXhasthreemodesofcontrollingthemotor--Off,On,andFloat.InFloatmode, themotorisnotdrivenandcanspinfreely.Itbehavesjustasitwouldiftheconnecting leadswereremoved. InOffmode,theRCXinternallyshortsthecontactsoftheoutputconnector.Thishasa brakingeffectontheattachedmotorcausingittoquicklystopspinning. InOnmode,theRCXsendsthemotoreither+9Vor-9Vtomakethemotorspin clockwiseorcounterclockwise.Pulsewidthmodulation(PWM)isusedtoprovideeight powerlevelsettings.
PowerSetting1 25%DutyCycle PowerSetting3 50%DutyCycle PowerSetting5 75%DutyCycle
Figure4-5.PWMDutyCycles
Pulsewidthmodulationisaninexpensivewaytocontrolpoweroutput.Insteadofsetting theoutputvoltage(voltageregulatorsareexpensive),theRXCquicklyswitchesthe poweronandoff.Differentpowerlevelsareachievedbyvaryingthepercentageoftime thatthepowerison(thisiscalledthedutycycle).OntheRCX,theminimumpower settingiszero,whichcorrespondstoadutycycleof12.5%(thepowerison12.5%ofthe time).Atlevel7,powerissuppliedcontinuously(100%dutycycle). Thegearedmotorhasalittleinternalflywheelthatevensoutthemotorspeedasthe powerisswitchedonandoffforPWM.Youseeitinoperationwhenyouspintheshaft ofanunattachedmotor.Theshaftcompletesseveralrevolutionswhiletherotationspeed slowsdowntozero.Ifyoucontinuetogivetheshaftatwistonceasecondorso,itis prettyeasytogetitturningatafairlyconsistentspeed.Thisiskindofamechanical versionofpulsewidthmodulation Onceyougetthemotorspinning,itdoesnttakemuchenergytokeepitgoing.Thiscan beabitofaproblemifyouareusinglowpowersettingstorunyourmotorslower. Withoutmuchload,agearedmotorspinsuptoaboutthesamespeedregardlessofthe powersetting.Eachpower-onpulsesuppliesmoreenergythanfrictioncandissipate duringtherestofthecycle.Theextrapowergetsstoredintheflywheelasinertia.With everycycle,alittlebitmoreenergyisstoredintheflywheel,increasingtherotation speeduntilequilibriumisreachedatthepointwherethemotortorquestartstofalloff.
4-52
Figure4-6.UsingaPulleytoIncreaseDrag
4.2.2 Attaching
Amotorisattachedtooneofthethreeoutputconnectorsbyusingasnap-onwirelead. Youcanreversetherotationdirectionofthemotorbychangingtheorientationofthe connection.Ifyouneedtowireupamotorduringcompetitionforaconfiguration change,makesurethatyoualwaysattachtheleadsthesameway.Markingthe connectorleadsandmotorportswithcolorcoded1x2platesworkswellasareminder.
Figure4-7.UsingColorCodingtoDocumentProperConnectorOrientation
Figure4-8.StrengtheningMotorMountswithCrossBracing
4-53
Figure4-9.MotorMountUsingRails
4.3 TouchSensor
ThetouchsensoristhesimplesttouseofalltheLEGOsensors.Itconsistsofa2x3 brickwithaspringloadedbutton.Thebuttonvariestheresistanceofthesensorwhenit ispressed.TheRCXsoftwareconvertsthesensorfeedbacktoabinarysignal:onefor whenthebuttonispressed,andzeroforwhenitisreleased. 3studs
2studs
4-54
Good
Figure4-10.WiringtheTouchSensor
Bad
4.3.1 Bumpers
Abumperisadevicethatnotifiesyourrobotthatyouranintoanobstacle.Whenstruck, thebumpermovesandpressesorreleasesatouchsensor,notifyingyourrobotofthe impact.BumpersarethemostcommonuseforatouchsensorinFLL.Thismaybedue totheConstructopediausingtouchsensorsprimarilyinthisrole,oritcouldbebecause bumpersaresuchusefuldevices.
Figure4-11.ASimpleBumper
Figure4-12.ABumperthatUsestheRotationSensor
4-55
Figure4-13.ANormallyClosedBumperDesign
Mostbumperdesignscanbedividedintotwocategoriesbasedonthewaytheymonitor theirsensorforimpacts.ThebumperinFigure4-11isa NormallyOpen design.When acollisionoccurs,thebumperpressesagainstthetouchsensor,closingthecontacts.Ina NormallyClosed styleofbumper,thereturnmechanismpullsthebumperagainstthe touchsensor.Acollisioncausesthebumpertopullawayfromthetouchsensor,opening thecontacts. WhenthenormallyopenbumperinFigure4-11collideswithanobstacle,theimpactof thecollisionistransmittedthroughthebumpertothetouchsensor.Thiswillloosenthe sensormounting,andafterafewcollisionsthesensormayfalloff.Additionalbracing couldbeusedtostrengthenthesensormounting,butthisjusttransmitstheimpacttothe robotframe. InanormallyclosedbumperlikethatinFigure4-13,theforceofacollisionisabsorbed bytherubberbands.Thisbumperalsohasalong throw, thedistancebetweenwherea collisionisdetectedandthebumper bottomsout againstahardstop.Thelongthrow allowsthebumpertosenseanobstacleandstoptherobotbeforeahardcollisionoccurs.
Figure4-14.ImprovedNormallyOpenBumper
4-56
4.3.2 LimitandPositionSwitches
Touchsensorshavemanyusesotherthanbumpers.Limitandpositionswitchestellyou whenacomponentofyourrobotisinacertainlocation.Theyarediscretesensors(as opposedtocontinuoussensors)inthattheyprovidepositioninformationonlyatcertain locations.Youonlyknowwhereyouarewhilethetouchsensorispressed.Whenitis open,youonlyknowwhereyouarenot.
Figure4-15.PositionandLimitSwitches
Limitandpositionswitchesreallydifferonlyintheiruse.Limitswitchesareguardsthat watchforsomethingbeingwhereitisnotsupposedtobe.Theyareprotective mechanismsusedwhendamagecouldresultfromadevicemovingoutsideitsworking envelope.Apositionswitchisjusttheopposite;itisamessengerthatnotifiesyouwhen adeviceiswhereyouwantittobe. ThelightscannerinFigure4-15hastwolimitswitchesandapositionswitch,andalluse onlyonetouchsensor!Thebottomtwocamsarepartofthelimitswitches.Theyprevent thescannerpostfromtwistingmorethan+/-90degrees.Thetopcamisapositionswitch thattellstheRCXwhenthesensorispointedstraightforward.Tobeabletointerpretthe touchsensorfeedback,theprogramhastokeepcarefultrackofwherethescannerpostis andwhichwayitisspinning.
4.3.3 Rotationsensor
PerhapsthemostrepeatedgripeIveheardfromFLLteamsisaboutthelackofasecond rotationsensor.Havingtwojustseemstomakesense:oneforleftandoneforright,or onefordistanceandoneforsteering.Otherteamsseethelackofasecondrotation sensorasachallenge,andsomeoftheirsolutionshavebeenverycreative.
4-57
Figure4-16.ATouchRotationSensor
4.4 LightSensor
Thelightsensorisa2x4LEGObrickthatcontainsaredlightemittingdiode(LED)and aphototransistor.TheredLEDilluminatestheareainfrontofthebrick,andthephoto transistormeasurestheintensityofthereflectedlight.Thelightsensorreturnsavaluein therangeof0to100%.ThelowestreadingIhaveeverseenis20%,whichItookat midnightinthemiddleofmybasementwiththelightsoff.Youcangetto100%by aimingthesensoratthesunonacleardayorbyholdingitwithinafewinchesofa100W lightbulb.Innormaloperation,thesensorvaluestendtobebetween30and60%. 2studs
4-58
Imadeapivoting LazySusan typerobotthatIcouldsurroundwithcupstoreceivethe candy.Therubbertrackmadeaniceconveyorbelt,andIfoundadesignforsomething calleda marblepump thatdidagreatjobofgettingthecandy,oneatatime,outofthe hopper.Withallthemechanicsworkingcorrectly,allthatwasleftwastopopthelight sensorvaluesforeachcolorintotheprogram.VisionsofwatchingBattlebotswhile munchingonbrownM&Msdancedthroughmyhead.
Table4-1.LightSensorReadingsforPeanutM&Ms
stud 1stud
Red 48 45
Orange 48 46
Yellow 51 48
Green 38 37
Blue 40 35
Brown 40 35
Inevergotthatsortertoworkverywellbecausethesensorvaluesfordifferentcolored M&Msweretoosimilar.Afterplayingaroundabitandtryingafewthings,Igotitto sortM&Msintothreecolorgroups:Yellowinonecup,OrangeandRedinanother,and Blue,Green,andBrowninathird.Eventually,Igottiredofworkingontherobotand disassembleditforparts.IthinkthissamesortofthinghappenstomanyFLLteamsthat trytousethelightsensorontheirrobot.Theycomeupwithareallyneatideaandbuild robottotryitout.Duringtesting,therobotdoesntworkquiterightordoesntwork reliably.Theteamtinkersaroundwithitabit,failstomakerealprogress,andtossesthe sensorbackintothepartsbin. TheproblemsIhadwiththecandysorterwerenotthefaultofthelightsensor.The projectwasdoomedfromtheverystartwhenIchosetousethesensorinanapplication forwhichitwasillsuited.Ineededtohaveabetterunderstandingofthelightsensor beforeusingitinanotherproject,therefore,toincreasemyunderstanding,Iperformeda seriesofexperiments.
4.4.1 Experiment#1,Color
Frommycandysorterexperience,Iknewthelightsensorreadingisaffectedbythecolor oftheobjectatwhichitisaimed.Butthereadingalsoappearstobeaffectedbythe distancebetweenthesensorandtheobject,variationsintheobjectssizeandshape,and ambientlightingconditions.IfIwasgoingtolearnanythingaboutthelightsensor,Ihad tolimitthenumberofvariables.Formyfirstexperiment,Idecidedtostudythe relationshipbetweenlightsensorvalue,color,anddistance.
4-59
Figure4-18.LightSensorColorExperiment
1 43 54 49 45 53 50 44 42
2 38 48 43 40 48 45 38 37
3 35 43 39 35 43 41 34 32
4 33 40 35 31 39 37 32 29
5 27 37 32 29 36 35 31 28
4.4.1.1Color
AsIwasperformingmylightsensorexperiments,itbecameapparentthatthelightsensor doesntseelightthesamewayIdo.Tomyeyes,thegreenbricksappearbrighterthan theredbricks,yetthegreenbricksensorreadingswereconsistentlylower.Infact,the lightsensorreadingsforthegreen,blue,darkgray,andblackbrickswereessentiallythe same. Lightismadeupofelectromagneticwaves--vibrationsofelectricandmagneticfieldsthat travelthroughspace.Therearemanytypesofelectromagneticwaves:somewecanfeel (heat),somewecansee(light),andsomewehaveharnessedforourownuses(television andradio).Oureyescandetectelectromagneticwaveswithwavelengthsintherangeof 400nm(violet)to700nm(red)inlength.Wecallthistinyportionoftheelectromagnetic spectrumvisiblelight.Oureyesperceivedifferentwavelengthsofvisiblelightashaving 4-60
differentcolors.Lightwithawavelengthof700nmisred;bluelighthasawavelength around460nm.
Figure4-19.VisibleLightSpectrum
400
500
600
700
800
900
1000
1100
Wave le ngth(nm )
Figure4-20.TheLightSensorSeesDifferentlythanOurEyes
4-61
Blue
Figure4-21.LightColors
Question: In a dark room, what color do you see when shining the
light sensors red LED light on a yellow LEGO brick?
4.4.1.2Distance
TheInverseSquareLawisaneatmathematicalformulathatshowsupallovertheplace inphysics.Itdefinestherelationshipbetweenthemeasuredstrengthofathing,likethe pullofgravityortheloudnessofsound,andthedistanceyouarefromthesourceofthe thing.TheInverseSquareLawforlightintensitystatesthattheintensityoflight observedfromasourceofconstantbrightnessfallsoffasasquareofthedistancefrom theobject.Itisgenerallyexpressedastheratiooflightintensitiesl1andl2atdistancesd1 andd2.
100 RelativeIntensity(%) 80 60 40 20 0 1 2 3 Re lative Dis tance 4 5
l1 d 22 = l2 d12
4-62
intensitywouldbedecreasedto1/9,1/16,and1/25oftheoriginalvalue.Initially,intensity fallsoffveryquicklyasyoumoveawayfromalightsource.Butasyougetfartherand fartheraway,thechangebecomeslessandlessnoticeable. Giventhat,itwasnosurprisethatplotsofthesensorreadingsshowtheintensity decreasingrapidlyasthedistancebetweenthelightsensorandthetargetincreases.Im notsurewhythesensorreadingsdidntfalloffasquicklyaspredictedbytheInverse SquareLaw,butIthinkitmightbeduetothephototransistorandLEDbeingsoclose together(muchofthelightmeasuredbythephototransistorneverleavesthelightsensor housing).Lookingattheplotsandthetable,InowseewhyInevergotmycandysorter toworkverywell.Achangeindistanceassmallashalfastudisenoughforthelight sensortoconfuseredwithyelloworbluewithgreen,andifaredbrickisplacedtwo studsfartherawaythanagreenbrick,thelightsensorcanttellthedifferencebetween them.
55 50 SensorReading(%) 45 40 35 30 25 1 2 3 Dis tance(s tuds) 4 5 Y ellow Red Blue Green
Figure4-22.ColorExperimentSensorReadings
4.4.1.3Conclusions
Fromthisexperiment,IdrewafewconclusionsabouttheLEGOlightsensor.Themost importantisthatyoucanusethesensortomeasuredistanceifyouknowthecolorofthe reflectingsurface,oryoucantellcolorifyouknowthedistancefromthereflecting surface,butyoucantdoboth.Forbestresults,thelightsensorshouldbeusedin carefullycontrolledconditions.Caremustbetakentolimitthenumberofvariables. Thelightsensordoesnotseelightthesameashumansdo.Thesensitivityofthesensor isnotwellmatchedtohumanvision.Whatappearsbrighttooureyesmaybedarktothe lightsensor,andlightthatisoutsideourrangeofvisioncaneasilydrivethesensor readingto100%.Itisalwaysagoodpracticetocollectandanalyzesomesensordata priortodevelopingastrategyforusingthelightsensor.
4-63
4.4.2 Experiment#2,AmbientLight
Inmyfirstexperiment,Istudiedtherelationshipbetweencolorandthelightsensor reading.Fromthedata,Ideducedthatthesensorreadingisnotonlydependantuponthe coloroftheobjectbeingviewedbutalsouponthewavelengthofthelightilluminating theobject.Innormalusage,thelightsensorandtargetwillnotbeinasealedcontainer. Lightfromexternalsources,ambientlight,willhavesomeeffectonthesensorreading. Tobetterunderstandhowambientlightaffectsthesensorreadings,Iperformedasecond experiment. Forthisexperiment,Ibuiltawallofdifferentcoloredbrickstouseasatargetandan adjustablestandtoholdthesensoraknowndistanceawayfromthebricks.Thestand was spiderlike tominimizetheshadowitcast.Ithenrecordedthelightsensor readingsforeachcoloredbrickatdifferentdistancesunderavarietyoflighting conditions.First,asabaseline,Itookmeasurementsinacompletelydarkroominmy basement(lightsensorreading22%).Irepeatedtheexperimentin normalbasement lightingconditions(sensorreading46%)andthenin brightcompetition lighting conditions(sensorreading65%).ThereadingsappearinTable4-3.
Figure4-23.AmbientLightExperiment
4-64
line with one of the many black lines on the table was a useful navigation landmark. Many teams had a hard time finding the blue line. What was the likely source of their problem, and how could they have improved their chances?
Table4-3.SensorReadingsforAmbientLightExperiment 1 stud 39 40 43 50 36 39 47 49 NoLight 2 3 std std 27 27 34 30 38 34 44 40 32 28 36 33 43 39 44 39 4 std 26 28 33 37 27 29 36 37 1 stud 39 40 45 52 40 45 51 52 LowLight 2 3 std std 36 35 38 38 45 43 50 50 42 42 44 45 49 48 50 49 4 std 35 38 43 50 42 45 49 50 1 stud 39 43 49 58 49 51 56 58 BrightLight 2 3 std std 46 52 47 53 53 57 60 62 55 58 58 60 60 62 61 63 4 std 52 53 57 63 58 60 62 62
However,thereallyinterestingandimportantthingtonoticeishowambientlight changestherelationshipbetweensensorvalueanddistance.Figure4-24isaplotofthe Graybricksensorreadingsunderthethreelightingconditions.In nolight conditions, thesensorreadingsaresimilartothosetakeninthesealedchamberinexperiment#1. Thesensorreadingsarealmostflatin lowlight conditions.ThelightfromtheredLED iscompletelyoverwhelmedbythelightfrommultiple100Wincandescentlampsusedto lighttheroom.Andin brightlight conditions,thesensorreadingsactuallyincreaseas thesensorismovedawayfromthetarget.Atshorterdistances,thelightsensorbodyand testfixtureblockedsomeoftheambientlightfromstrikingthetarget.Lesslightwas blockedasthesensorwasmovedfartheraway.
60 55 SensorReading(%) 50 45 40 35 30 25 1 2 3 4 Dis tance (s tuds) NoLight Low Light BrightLight
Figure4-24.LightSensorReadingsforGrayLEGOBrick
4-65
4.4.2.1Conclusions
Itappearsthatthelightsensorisverysensitivetoambientlight,whichisdisconcerting becauseyouseldomhavecontroloverthelighting.Thispointwasreallydrivenhome whenIdemonstratedafewofmyrobotsatanoutdoorexposition.Eventhoughthe demonstrationtablewasunderacanopytent,Ihadaverydifficulttimegettingtherobots withlightsensorstoworkcorrectly.AndIthoughtIhadthesensorsprettywell protected.Ishouldhavetestedmyrobotsundertheexpectedlightingconditions. Rememberthiswhentestingyourrobotinadimlylitbasement.Itmaybehavevery differentlyonceitisunderthebrightlightsofthecompetitionarena.
4.5 RotationSensor
Therotationsensorisusedtomeasurehowfararotatingaxlehasturned.Ithasafree spinningbushingtoreceivetheaxle.Asthebushingturns,acounterintheRXCis incrementedordecremented.Eachfullrotationregistersas16countsgivingthesensora resolutionof22.5degrees. 4studs
2bricks or 2.4studs
4.5.1 Resolution
Theresolutionoftherotationsensorisusuallyadequatefordistancemeasurement. UsingthelargestLEGOwheel(the81.6mmballoontire),22.5degreesworksouttoonly 0.6 oflineartravel.Forthesmallballoontire,itis .Butthismuchmeasurement uncertaintymaybeunacceptableforaccurateturning.Foradifferentialdriverobotwith awheelbase10studswide, ofwheeltravelworksoutto8degreesofturnangle.
4-66
Figure4-26.UsingGearReductiontoIncreaseResolution
4.5.2 Internals
Therotationsensorisaninterestinglittledevice.IfyouhadSupermansX-rayvision, youcouldseethatitisbuiltusingtwotinyopto-interrupters.Theseareforkshaped devicesthathaveanLEDononetineandaphotoresistorontheother.Thephoto resistorsenseswhenanobstructionpassesbetweenitandtheLED.
Figure4-27.RotationSensorInternals.DON'TDOTHIS!!!
4-67
Figure4-28.HomemadeRotationSensorMadeFromLEGOParts
4.5.3 CountingErrors
TherehavebeendozensofpostsonLUGNET(LEGOUsersGroupNetwork)discussing amysteriousproblemwiththeLEGOrotationsensor.Thereisawideheldbeliefthat countingerrorsoccuriftherotationspeedistoofastortooslow.Exactspeedsare uncertain,buttheyhavebeenreportedtobebelow10-20rpmorabove1200-1400rpm. Thelargebodyofexperimentaldataavailableonthewebseemstoagreethattherotation sensorisquitereliableifspeedsarekeptinthe601000rpmrange.
Figure4-29.AHomingSwitchtoResettheRotationSensor
readingsincorrectly),designerrors(inadequatesensorresolutionorexcessivebacklash), controlproblems(acceleratingandturningtoofast),orvariationsininitialconditions (notputtingeverythingintherightplacebeforepushingthestartbutton).Butifyoustill haveproblems,aftercheckingthateverythingelseworksfine,youmightneedahoming switch. Ahomingswitchisasecondarysensorthatcanbeusedtocheckorresetthevalueofthe primarysensor.ThelightscannerinFigure4-29usesatouchsensorforahoming switch.Thecamattachedtotherotatinglightsensorpressestheswitchwhenthelight sensorisfacingforward.PressingtheswitchnotifiestheRCXtocheckthevalueofthe rotationsensorandresetthecountsiftheyareincorrect(thecountshouldbezeroatthe straightaheadposition).
4.6 SensorStacking
TheRCXhasthreemotoroutputportsandthreesensorinputports,yetthechallengekit includestwotouchsensors,twolightsensors,andonerotationsensor.Whatdoyoudo withallthoseextrasensors?ManyFLLteamsresolvethisdilemmabyleavingthe sensorsoutoftheirdesign.Oneteamcameupwiththecreativeideaofusingitstouch sensorsasdecorativeeyes.Theeyeslookedcoolbutwerentveryhelpful.Themost usefulsolutionistostackthesensors. Stackingistheattachingofmultiplesensorstoasingleinputport.Whendonecorrectly, theRCXisabletoreadtheinputportvalueanddeterminewhichsensorthevaluecame from.Touchsensorsarethebestcandidatesforstacking.Theycanbestackedwithlight sensorsorothertouchsensors.Theoretically,twolightsensorscouldbestacked,butI wouldntknowhowtointerpretthesensorreading.Rotationsensorscannotbestacked duetothenatureoftheirfeedbacksignals.
Table4-4.SensorReadingsforTwoStackedSensors
TouchOpen 0 1 lightlevel
TouchClosed 1 1 100
4-69
5 RobotDrives
Avastmajorityofrobots,especiallythoseusedinindustry,areofthestationarytype. Theymayhavehandstopickthingsupandarmstomovethingsfromheretothere,but theyhavenolegs.Instead,theydependonotherspecializedmachinestobringthemthe materialstheyneedfortheirworkandcartoffthefruitsoftheirlabor.Therobots designedforFLLarequitetheopposite;theyneedtomove.Theyhaveplacestogoand scientiststosave,andallwithoutanyoutsideinterventionorcontrol.Thiskindofrobot iscommonlyreferredtoasanAutonomousRoboticVehicleorARV,anditisamongthe mostdifficultkindsofrobotstobuildandprogram. ThepartofanARVthatisresponsibleformovingaroundiscalledthemotionbaseor motionplatform.Earlymotionbaseswereexclusivelywheeledplatformsthatonlyhad tomovetheirrobotsaroundonasmoothlaboratoryfloor.Asrobotsmovedoutofthe lab,automotiveandtanktyperobotsbecameincreasinglypopular.Nowadays,ARVs arezoomingdownthehighwayat60mph,divingtothedeepestdepthsoftheocean, walkingdownintothecauldronsofactivevolcanoes,flyingsurveillanceoverenemy armies,androllingoverthesurfaceofMars. ThemotionbasesforFLLrobotshaventbeenquitesoexotic.Theiroperating environmentisclosertothesmoothlaboratoryfloorthanthecauldronofanactive volcano.Wheeledplatformsarethemostcommon,buttracksarepopulartoo.Some haveall-wheel-drivetohelpthemclimbinclinesortraverseruggedterrain.Afewteams havetriedautomotivetypeplatformswithsteeredfrontwheels,butmostrobotsusesome sortofdifferentialsteeringarrangementwhereturningisperformedbychangingthe relativespeedsofthetwodrivemotors. Muchofyourrobotssuccesswillbedeterminedonhowwellthestrengthsofitsmotion basematchtheneedsofyouroverallstrategy.Whatsmoreimportant,speedor accuracy?Istravelinginaperfectlystraightlinereallyrequired?Doyourplansrequire lotsofturnsandmaneuveringintightquarters?Ispullingcapacityorloadcarrying capacityimportant?Whataboutobstacles,uneventerrain,surfacevariations?Many questionsmustbeansweredbeforebuildingcanbegin.
5.1 DifferentialDrive
Differentialdrivemotionplatformswereverypopularinearlymobilerobots.Two wheelsmountedonasingleaxisareindependentlypoweredandcontrolled,providing bothdriveandsteering.Steeringisperformedbychangingtherelativevelocitiesofthe twodrivewheels.Spinningtheleftwheelfastercausestherobottoturnright.Spinning therightwheelfastercausestherobottoturnleft.Byspinningthewheelsinopposite directions,itispossibletoturninplace,somethingthatisimpossibletodoinan automobile.Perhapsthemostcommonexampleofadifferentialdriveplatformin everydaylifeisthewheelchair.
5-70
Figure5-1.ADifferentialDriveRobot
5.1.1 Casters
Becauseitishardtomakeastabletwowheeledvehicle,mostdifferentialdriverobots haveoneormorenon-drivenwheelstoprovidebalance.Commonlycalledcasters, idlers,orbogeys,thejobofthesewheelsistopreventtherobotfromtippingoverwhile atthesametimehavinglittleornoimpactonlocomotionorsteering.Unlikethedriven wheelsthathaveonlyoneaxisofmotion,thesebalancewheelsmustbeabletoturnin anydirection.Upside-downballrollersareperfectlysuitedforthistask.Usingskidscan alsobeagoodsolutionifthefloorissmoothandslippery.
Figure5-2.SwivelCasters
5-71
andpivotaxle.Thisoffsetmakesthecasterwheelselfaligning.Whenyourrobot changesdirectionthecasterautomaticallyturnstothenewheading. Aligning Torque Steer Angle Travel Direction Caster Offset
O =CasterOffset A =SteerAngle D =Oxsin(A) F =DragForce T =AligningTorque =FxD =FxOxsin(A)
D Drag
Figure5-3.SwivelCastersareSelfAligning
Figure5-4.CastersGenerateSteeringForcesWhileAligning
Increasingtheoffsetwillmakeacasterlesstwitchy,butitcanalsoamplifycastersteer, whichissomethingthatisnotverydesirableinrobotapplications.Castersteeris somethingweareallfamiliarwithfromourexperiencewithshoppingcarts.Itisthe tendencyofthecasterstosteerthefrontendofthecartwhiletheyalignthemselvesafter completingaturn.Thisisparticularlynoticeableifthecartisheavilyloadedand straighteningafterasharpcornerorreversingdirection.Whileonlymildlyannoyingina shoppingcart,itcanbearealprobleminarobot.Excessivecastersteermakesyour robotdifficulttocontrolandintroduceserrorsindistanceandsteeringmeasurements. Whenthecasterwheelisnotalignedwiththedirectionoftravelitgeneratesasideways forceasitrolls,justasthefrontwheelsofanautomobilegenerateasidewaysforce duringsteering.Ifthefrictionbetweenthewheelandthegroundistoogreattoallowthe castertoskid,theforceisexertedagainstthecart,causingthefrontendtomove sideways.Asthecasterstraightensout,thesidewaysmotionbecomeslessandless noticeable.
5-72
5.1.2 WheelConfiguration
Earlydifferentialdriverobotsoftenhadadiamondshapedwheelconfigurationlikethat showninFigure5-5.Theserobotsusedencoders(rotationsensors)onthetwodrive wheelstomeasuredistancetraveledandtocontrolsteering.Therefore,itwasvery importantthatthedrivewheelsbeinfirmcontactwiththeground.Byhavingcasters bothforeandaft,itwaspossibletoputtherobotscenterofgravitydirectlyoverthe drivewheels,whichsupportedalmostalloftherobotsweight.Thismaximizedthe tractionofthedrivewheelsandminimizedtheforcesgeneratedbythecastersaligning.
CG
Figure5-5.DiamondShapedWheelLayout
Thediamondlayoutworkedgreatinthelab,glidingalongoverthesmoothflatfloors,but itencounteredsomeseriousproblemsoutintherealworld.Toachievestaticstability (notfalloverwhenstandingstill),avehiclemusthaveatleastthreewheels,notallona commonaxis,touchingtheground.Ifthevehiclehasmorethanthreewheelsthereisno guaranteethatallthewheelswillbetouchingthegroundatanygivenmoment.A problemwiththediamondwheellayoutisthatwhenoneofthecastersdrivesovera bumpitcausesoneofthedrivewheelstoliftupintotheair.Whenthishappens,the robotturnsuncontrollablytowardstheraisedwheel.Bythetimethecastergetsoverthe bump,therobotisnolongercertainofitsheadinganddistancetraveled. Athreewheeledtriangleconfigurationfixesthisproblem,butitlosessomeofthe advantagesofthediamondlayout.Withonlythreewheels,youareguaranteedtohave allthreewheelsincontactwiththeground.Unfortunately,usingthreewheelsalsomeans thatthecenterofgravitycannotbecenteredoverthedrivewheelaxis,andsomeofthe robotsweightwillbesupportedbythecaster.Tocompensate,robotdesignersposition theCGasclosetothedrivewheelaxisandasfarawayfromthecasteraspossible. Movingthecasterfartherawayfromthedrivewheelsalsohelps.
5-73
CG
Figure5-6.TriangleShapedWheelLayout
5.1.3 Steering
Adifferentialdriverobotsteersbyturningthedrivewheelsatdifferentspeeds.Spinning theleftwheelfastersteerstherobottotheright,andspinningtherightwheelfastersteers therobottotheleft.InhisarticlefortheSeattleRoboticsSociety,G.W.Lucas8shows thatthedrivewheelsofadifferentialdriverobotfollowconcentriccircularpathswhile turning.Thisisshowninthefigurebelow.
R B A L1 L2 =TurningRadius =WheelbaseWidth =AngleofTurn =InnerWheelArcLength =OuterWheelArcLength
L2 L1 B W2 W1
Figure5-7.TurningRadiusisDeterminedWheelbaseandRelativeSpeed
5-74
Withalittlealgebraicmanipulationwecandefinetheturningradius(R)asafunctionof thewheelbasewidth(B)andthetwoarclengths(L1andL2). A= L2/(R+B)=L1/R RxL2=(R+B)xL1 Rx(L2L1)=BxL1 R=BxL1/(L2L1) Ifwehaveadifferentialdriverobotwitha4 widewheelbase,whatistheturningradius iftheinnerwheelistravelingat18inchesperminute(ipm)andtheouterwheelat 24ipm?Whatwouldbetheheadingchangeiftherobotmaintainedthisspeedfor10 seconds? Thereareseveralwaystosolvethisproblem,butperhapstheeasiestistocalculatethe distanceeachwheelwouldtravelduringthe10seconds,andusethesevaluestocalculate theturningradius. L1=V1xTime =18ipmx10seconds =18ipmx10/60minutes =3 L2 =24ipmx10/60minutes =4 R =BxL1/(L2L1) =4 x3 /4 =3 Nowthatweknowtheturningradius,itiseasytocalculatetheturningangle.The turninganglejusthappenstobethesameastheangularchangeintherobotheading.
NewHeading OldHeading
5-75
5.1.4 SteeringMadeEasier
Theodometryequationdiscussedintheprevioussectionrequirespositioninformation fromeachdrivewheel.ThismakesusingodometryforyourFLLrobotabitdifficult. Therotationsensoristhebestdeviceformeasuringwheelposition,andthechallengeset hasonlyonerotationsensor.Onesolutionwouldbetoconstructarotationsensoroutof alightsensorortouchsensor.Someteamshavedonethisandgottenittoworkpretty well(andscoredsomemajorcreativityandmechanicaldesignpoints).Anothersolution istorethinktheodometryequation,andmakeitworkwithonlyonewheelposition sensor.
B L2 A =WheelbaseWidth =OuterWheelArcLength =Angleofturn=L2/B
L2
A B W2 W1
Figure5-8.PivotingAboutaWheel
5.1.5 StraightLineTravel
Aproblemthatmanyteamshavewiththeirdifferentialdriverobotsisgettingthemto travelinastraightline.Differentialdriverobotsareextremelysensitivetotherelative velocityofthetwodrivewheels.Evenaverysmalldifferenceinspeedwillresultinthe robottravelinginanarc.Thetendencytoturncanbeminimizedthroughgoodbuilding practices,evenweightdistributionandchoosingwellmatchedmotors.Buttotravelina perfectlystraightlinerequiressomesortofcorrectionmechanism,eithermechanicalor software. First,youneedtodecideiftravelinginastraightlineisimportantornot.Ifyour competitionstrategyisbasedonmakingperfectturnsandtravelingalonglaserstraight paths,yourteammaybeinforsomedisappointment.Themostsuccessfulteamsbuilda robotthat goesstraightenough andrelyonotherstrategiestocompensateforany 5-76
5.1.5.1.1 SoftwareSolution
Mostdifferentialdriverobotsuseencoders(rotationsensors)tomeasurethepositionof eachdrivewheel.Totravelinastraightline,therobotscontrolsoftwarecontinuously monitorstheencoderfeedbackandadjuststhepowertotheleftandrightmotorstokeep thevalueseven.Thismethodisdifficulttoimplementwithonlyonerotationsensor availableintheFLLchallengekit.Itrequiresthatasecondencoderbeconstructedusing thelightsensororatouchsensor.
5.1.5.1.2 MechanicalSolutions
Inautomotiveapplicationsitisoftendesirabletolimittheslipbetweentheleftandright drivewheels.Aclassicexampleofthisisbeingstuckinthesnow.ManytimesIhave seencarsstuckinthesnowwithonetirespinningwildlyonanicypatchandtheother tiresittingstationaryondrypavement.Thedifferentialsuppliesthesametorquetoeach wheel,butbecauseonewheelisspinningfreelyontheice,themaximumtorquetothe otherwheelisverysmall. Manycarsinnorthernclimatesareequippedwithalimitedslipdifferentialtosolvethis problem.Withalimitedslipdifferential,ifonewheelisspinningfasterthantheother, thedifferentialremovestorquefromthefasterwheelandsuppliesittotheslower.This isoftendonewithsomesortofclutchthatconvertsaslidingmotionintoatorque.
Figure5-9.SimpleLEGOSlipLimiter
Figure5-10.ALockingDifferential
compartment for locking and unlocking the differential. Can you think of a scheme where the RCX could lock and unlock our LEGO implementation?
5.1.6 DifferentialSkid
Differentialskid,sometimesreferredtoasskid-steer,isavariationofthedifferential drive.Itsnormallyusedwithtrackedvehicles(liketanks),butsometimeswith4or6 wheelplatforms(liketheBobcatskidloaderorGatorATV)aswell.Castersarenotused inadifferentialskiddrive;allthewheelsaredriven.Wheelsontheleftsidearedriven byonemotor,wheelsontherightbyanother. Skidsteerconfigurationsrelyontrackorwheelslippageforsteering.Asaconsequence, thewheelpositioninformationcannotbeusedforreliableodometry.Forthisreason, skidsteeringisusuallyreservedfortele-operated(remotecontrolled)robotic applications.Non-drivenmeasurementwheelscanbeaddedtoobtainodometry informationforautonomousoperation.
5-78
Figure5-11.APairofDifferentialSkidRobots
5.2 Steeringdrive
Asteeringdriveisthefamiliarconfigurationusedinautomobiles.Inasteeringdrive, onemotorisusedforlocomotionandasecondmotorforsteering.Decouplingsteering fromforwardmotionmakesasteeringdriveeasiertocontrolthanadifferentialdrive wherethevelocityofeachdrivewheelmustalwaysbecarefullymeasuredand controlled.Frontwheeledsteeringprovidesaccurateodometrywhilesupportingthe tractionandgroundclearanceneedsofall-terrainoperation.Thismakesitapopular choiceforoutdoorautonomousvehicles. Ingeneral,asteeringdriverobotismoredifficulttobuildthanadifferentialdriverobot. Itneedsadifferentialtotransferthepowerofthedrivemotortothewheels.Extra gearingisusuallyrequiredtoamplifythetorqueoutputofthesingledrivemotor.The steeringmechanismcanalsobedifficulttodesignusingthepartsavailableintheRISkit. Luckily,therearemanyTechnicsteeringdriveexamplesontheweb.Aquicksearchon LUGNETrevealedover100differentsteeringdrivevehicles. Figure5-12showstwodifferentsteeringdriverobots.Therobotontheleftusescrown gearsandspurgearstopivotthefrontaxles.Therobotontherighthasrackandpinion steeringjustlikemostcarsontheroadtoday.Therobotontherightusesaspecialgear rackthatisavailableinmanyTechnicvehiclesets,butasimilarmechanismcouldbe builtusingthegearrackssuppliedintheRISkit.
5-79
Figure5-12.Twosteeredwheelrobots
5.2.1 Turning
Asteeringdriverobothasanon-zeroturningradius.Thismeansthatunlikeadifferential driverobot,asteeringdriverobotmusttranslate(moveforward,backwards,and/or sideways)whileturning.Suchsystemsaresaidtobenon-holonomic.Inanonholonomicrobot,oneormoreofthedegrees-of-freedom(heading,position)cannotbe controlledindependently.Thismakespathplanningmoredifficultbecauseeachheading changewillhaveanaccompanyingpositionchange.Non-holonomicvehiclescanbe particularlydifficulttonavigateintightspaces.Rememberthelasttimeyouparallel parked?
DifferentialDrive
SteeringDrive
Figure5-13.PathPlanningisHarderforNon-HolonomicRobots
5-80
TurningCenter WithAckermanCorrection
TurningCenter? WithoutAckermanCorrection
Figure5-14.AckermanSteeringMinimizesGeometryInducedWheelSkid
WithoutAckermancorrection,thefrontwheelsbothturnthesameamountwhensteering. Thisresultsinthemtryingtotravelalongarcswithdifferentcenters.Asthevehicle turns,oneorbothofthefrontwheelsareforcedtoskidsideways,generatinglargeforces onthesteeringcomponentsandproducingexcessivewearonthetires.Moreimportant forroboticsapplications,isthefactthatyoucantcalculatesolutionsfortheodometry equationsbecausetheturningcentercannotbeabsolutelydetermined. ItspossiblebutdifficulttobuildaLEGOsteeringdrivewithAckermancorrection.I foundsomewebpageswithcalculatorsfordesigningthecomponentsandgeometryanda fewbooksdevotedtothesubject.Unfortunately,thesolutionsrequireusingspecifically sizedcomponentsthatoftendontmapwelltomyavailableLEGOpieces. Asimplersolutionistouseonlyonesteeredwheel.Threewheeledsteeringdrivesare mostcommoninspecializednichemarketslikegolformeterreadercarts.Theirmain disadvantage,atendencytotipoverwhenturningathighspeed,isnotabigproblemin theseapplications.However,athreewheeledplatformssimplerconstructionand odometrymakesitagoodchoiceforaLEGOrobot.
A
A =SteerAngle L =WheelbaseLength R =TurningRadius =L/sin(A)
Figure5-15.TurningRadiusisDeterminedbyWheelBaseandSteeringAngle
5-81
AsshowninFigure5-15,theturningradiusofasteeringdriveisdeterminedbythe lengthofthewheelbaseandthesteerangleofthefrontwheel(s).Thisiswhylongtrucks havealargeturningradiusandsmallsportscarsatightturningradius. Letssaywehaveasteeringdriverobotwitha6 longwheelbaseandamaximumsteer angleof30degrees.Whatistheminimumturningradiusforthefrontwheel,andhow farwouldthefrontwheeltravelwhilecompletinga45degreeturn? TurningRadius =L/sin(A) =6 /sin(30degrees) =12 TravelDistance =RadiusxAngle(inradians) =12 x45degreesx(Piradians/180degrees) =12 xPi/4 =9.42
5.2.2 TricycleDrive
Atricycledriveisasteereddriveplatformwithasingledrivenfrontwheelandtwo passiverearwheels(orviceversa).Thoughitmaylookverysimilartoathreewheeled steeringdriveplatform,atricycledrivehassomeuniquecharacteristicsthatmakeit preferableformostroboticapplications.Themostimportantoftheseisitsabilitytoturn inplace.
Figure5-16.TricycleDrive(Left)andSteeringDrive(Right)RobotsLookSimilar
A=90
A<90
L=R
L R>L
Turning Center
Turning Center
Figure5-17.AnySteerAngleisPossiblewithaTricycleDrive
5-83