Patterns ofbuildinglegos

59
Patterns of Patterns of Building Legos Building Legos Kyle Brown Kyle Brown

description

And now for something completely different. This is something I wrote back in 2007 for my FLL team when teaching them basic concepts for robot design.

Transcript of Patterns ofbuildinglegos

Page 1: Patterns ofbuildinglegos

Patterns of Building Patterns of Building LegosLegos

Kyle BrownKyle Brown

Page 2: Patterns ofbuildinglegos

AcknowledgementsAcknowledgements

Fred G. Martin, Fred G. Martin, The Art of Lego The Art of Lego DesignDesign, , The Robotics Practitioner: The Robotics Practitioner: The Journal for Robot Builders, The Journal for Robot Builders, v1, v1, #2, Spring 1995#2, Spring 1995

Dean Hystad, Dean Hystad, Building Lego Building Lego Robots for FIRST Lego LeagueRobots for FIRST Lego League, , v1.3, available from v1.3, available from www.hightechkids.orgwww.hightechkids.org

Page 3: Patterns ofbuildinglegos

GlossaryGlossary Rotary motion – motion in a Rotary motion – motion in a

circle; like a wheel spinning or an circle; like a wheel spinning or an axle turningaxle turning

Linear motion – motion in a Linear motion – motion in a straight line; like your hand straight line; like your hand pushing forwardpushing forward

Reciprocal motion – linear Reciprocal motion – linear motion that switches direction, motion that switches direction, like a car pistonlike a car piston

Torque – the amount of force on Torque – the amount of force on a rotating axle (different from a rotating axle (different from the speed of rotation)the speed of rotation)

Page 4: Patterns ofbuildinglegos

AnglesAngles

9090° angle (also known as a right ° angle (also known as a right angle)angle)

90°

Page 5: Patterns ofbuildinglegos

What’s a pattern?What’s a pattern?

A solution to a commonly recurring A solution to a commonly recurring problemproblem

If you come across the problem If you come across the problem again, you can apply the solution again, you can apply the solution again!again!

Page 6: Patterns ofbuildinglegos

Frame BuildingFrame Building

Page 7: Patterns ofbuildinglegos

2 hole plate frame2 hole plate frame

Problem: How do you Problem: How do you build a sturdy build a sturdy rectangular frame with rectangular frame with holes for axles?holes for axles?

Solution: Connect Solution: Connect technic beams with 2-technic beams with 2-hole plates on the end. hole plates on the end. For even stronger frames For even stronger frames use 2-hole plates on top use 2-hole plates on top and bottomand bottom

Page 8: Patterns ofbuildinglegos

Cross-bracingCross-bracing

Problem: How do Problem: How do you join technic you join technic beams together so beams together so they won’t slip they won’t slip apart?apart?

Solution: Use Solution: Use cross-bracingcross-bracing

Page 9: Patterns ofbuildinglegos

EXERCISEEXERCISE

Each team build Each team build twotwo rectangular rectangular bases that:bases that:• Are Are at leastat least two technic beams high two technic beams high • Won’t slip when the corners are pushed Won’t slip when the corners are pushed

to the right or leftto the right or left• Are Are at leastat least 1 ½ times longer than an 1 ½ times longer than an

NXT motor and NXT motor and at leastat least 3 times as wide 3 times as wide

Page 10: Patterns ofbuildinglegos

Basic Rotary MotionBasic Rotary Motion

Page 11: Patterns ofbuildinglegos

Stop BushingStop Bushing

Problem: How do Problem: How do you keep gears you keep gears from sliding around from sliding around on an axle or keep on an axle or keep axles from sliding axles from sliding out of a frame?out of a frame?

Solution: Use stop Solution: Use stop bushingsbushings

Page 12: Patterns ofbuildinglegos

When do you need more torque?When do you need more torque?

If you need to move a heavy load or If you need to move a heavy load or move something with a long swing move something with a long swing distance, you need more distance, you need more torquetorque

Technically it’s defined as force Technically it’s defined as force (weight) times a distance (a (weight) times a distance (a moment moment armarm).).

Point of rotatio

n

distance

force

Page 13: Patterns ofbuildinglegos

Gear RatiosGear Ratios

Problem: How do Problem: How do you make an axle you make an axle move either faster move either faster (with less torque) (with less torque) or slower (with or slower (with more torque) than more torque) than a motor?a motor?

Solution: Use Solution: Use gear gear ratiosratios to gear up or to gear up or gear downgear down

*the gear ratio is the number of teeth on each gear expressed as a fully reduced fraction

Page 14: Patterns ofbuildinglegos

GangingGanging Problem: How do Problem: How do

you create gear you create gear ratios that go ratios that go beyond the ratio of a beyond the ratio of a single pair of gears?single pair of gears?

Solution: Gang the Solution: Gang the gears together by gears together by placing large and placing large and small gears together small gears together on the same axle on the same axle

See: gear ratiosSee: gear ratios

Page 15: Patterns ofbuildinglegos

Gear TrainGear Train

Problem: How do Problem: How do you change the you change the torque or speed of torque or speed of rotation between rotation between two axles?two axles?

Solution: Mesh two Solution: Mesh two or more gears or more gears together into a gear together into a gear traintrain

See: frame building See: frame building patternspatterns

Page 16: Patterns ofbuildinglegos

Idler GearIdler Gear

Problem: How do Problem: How do you make two you make two axles separated axles separated over a small over a small distance turn in the distance turn in the same direction?same direction?

Solution: Use an Solution: Use an idler gearidler gear

Note: Idler Gears do NOT change the gear ratios between Input and output axles!

Page 17: Patterns ofbuildinglegos

ExerciseExercise

Using the rectangular bases from the Using the rectangular bases from the last exercise:last exercise:• Attach two wheels (one on each side) to Attach two wheels (one on each side) to

an axle so that the wheels turn at 3/5 an axle so that the wheels turn at 3/5 the speed of the drive axlethe speed of the drive axle

For every five turnsof this drive axle

The wheel should turnthree times

Page 18: Patterns ofbuildinglegos

Robot BasicsRobot Basics

Page 19: Patterns ofbuildinglegos

Drive BaseDrive Base

Problem: How do you allow your Problem: How do you allow your robot to have a stable base that robot to have a stable base that allows both navigation and allows both navigation and manipulation of objects?manipulation of objects?

Solution: Use a separate Solution: Use a separate drive basedrive base that moves the robot and that moves the robot and attachments that manipulate objects.attachments that manipulate objects.

Page 20: Patterns ofbuildinglegos

Example Drive BasesExample Drive Bases

Drive bases can have 3 wheels, 4 wheels, Drive bases can have 3 wheels, 4 wheels, tank treads, skids, or any combination of tank treads, skids, or any combination of the above!the above!

A drive base consists of a sturdy A drive base consists of a sturdy frameframe with motors, controller brick , skids, with motors, controller brick , skids, casters or wheels attached to the framecasters or wheels attached to the frame

Page 21: Patterns ofbuildinglegos

Drive base combinationsDrive base combinations

Differential DriveDifferential Drive Tank treadsTank treads Two Wheel DriveTwo Wheel Drive Synchro driveSynchro drive

Page 22: Patterns ofbuildinglegos

Differential DriveDifferential Drive

Has two powered wheels plus casters Has two powered wheels plus casters or skidsor skids

Independently powered wheels

Skids or casters (front, back or both)

Page 23: Patterns ofbuildinglegos

Building a simple casterBuilding a simple caster

The key is that both the wheel axle The key is that both the wheel axle and the center axle need to swivel and the center axle need to swivel freelyfreely

Page 24: Patterns ofbuildinglegos

Differential DriveDifferential Drive

AdvantagesAdvantages• SimpleSimple• Turns on the spotTurns on the spot

DisadvantagesDisadvantages• May not drive straight accuratelyMay not drive straight accurately• Friction may lead to varying accuracy in Friction may lead to varying accuracy in

turnsturns

Page 25: Patterns ofbuildinglegos

Tank TreadsTank Treads

Instead of wheels Instead of wheels and casters, use and casters, use tank treadstank treads

AdvantagesAdvantages• Good gripGood grip• Low slippageLow slippage

DisadvantagesDisadvantages• Unpredictable Unpredictable

rotationrotation

Page 26: Patterns ofbuildinglegos

Two-wheel DriveTwo-wheel Drive

Front Wheel steering with powered Front Wheel steering with powered back wheelsback wheels

Just like on a carJust like on a car

Page 27: Patterns ofbuildinglegos

Two Wheel DriveTwo Wheel Drive

When you turn all When you turn all the wheels move at the wheels move at different speedsdifferent speeds• Use a Use a differentialdifferential on on

the back wheelsthe back wheels You need a You need a

mechanism to turn mechanism to turn the front wheelsthe front wheels• Usually a rack and Usually a rack and

pinionpinion

Page 28: Patterns ofbuildinglegos

Two Wheel DriveTwo Wheel Drive

AdvantagesAdvantages• Can carry very heavy payloadsCan carry very heavy payloads

DisadvantagesDisadvantages• Very, very complicated to buildVery, very complicated to build• Comparatively large Comparatively large turning radiusturning radius

Page 29: Patterns ofbuildinglegos

Synchro DriveSynchro Drive

Have all the wheels simultaneously Have all the wheels simultaneously powered and turnedpowered and turned• One motor powers the wheelsOne motor powers the wheels• One motor turns the wheelsOne motor turns the wheels• Use a Lego turntable to independently Use a Lego turntable to independently

turn the wheelsturn the wheels Advantage: EXTREMELY accurateAdvantage: EXTREMELY accurate Disadvantage: VERY complicatedDisadvantage: VERY complicated

Page 30: Patterns ofbuildinglegos

EXERCISEEXERCISE

Build a robot with the following Build a robot with the following attributes:attributes:• It has a stable rectangular base that It has a stable rectangular base that

does NOT use the NXT brick as a does NOT use the NXT brick as a structural memberstructural member

• It uses differential drive with a front It uses differential drive with a front caster or skidcaster or skid

• The drive wheels turn at only 3/5 of the The drive wheels turn at only 3/5 of the speed of the drive wheel motors speed of the drive wheel motors

Page 31: Patterns ofbuildinglegos

Advanced Rotary MotionAdvanced Rotary Motion

Page 32: Patterns ofbuildinglegos

Bevel GearsBevel Gears

Problem: How do Problem: How do you convert rotary you convert rotary motion into rotary motion into rotary motion at a 90motion at a 90°° angle with a 1:1 angle with a 1:1 gear ratio?gear ratio?

Solution: Use two Solution: Use two bevel gearsbevel gears

Page 33: Patterns ofbuildinglegos

Crown gearCrown gear

How do you How do you convert rotary convert rotary motion to rotary motion to rotary motion at a 90motion at a 90°° angle with a angle with a differing gear differing gear ratio?ratio?

Use a regular gear Use a regular gear and a crown gearand a crown gear

Page 34: Patterns ofbuildinglegos

Worm GearsWorm Gears

Problem: How do Problem: How do you convert rotary you convert rotary motion to rotary motion to rotary motion at a 90motion at a 90°° angle that is self angle that is self locking?locking?

Solution: Use a Solution: Use a worm gear with a worm gear with a crown gearcrown gear

*self locking means that the follower axle can’t move the drive axle

Page 35: Patterns ofbuildinglegos

Clutch GearClutch Gear

Problem: How do Problem: How do you limit the you limit the torque in a gear torque in a gear train?train?

Solution: Use a Solution: Use a clutch gearclutch gear

*you often want to limit torque to prevent lego piecesfrom breaking under strain.

Page 36: Patterns ofbuildinglegos

RatchetRatchet

Problem: How do Problem: How do you limit rotary you limit rotary motion to a single motion to a single direction only?direction only?

Solution: Use a Solution: Use a ratchetratchet

Page 37: Patterns ofbuildinglegos

Pulleys and BeltsPulleys and Belts

Problem: How do Problem: How do you connect two you connect two widely separated widely separated axles turning in the axles turning in the same direction?same direction?

Solution: Use Solution: Use pulleys and beltspulleys and belts

*pulleys and belts can also be used to limit torque since the beltwill slip when the torque is too high

Page 38: Patterns ofbuildinglegos

Belts at an AngleBelts at an Angle

Problem: How do Problem: How do you connect two you connect two widely separated widely separated axles that are at an axles that are at an odd angle?odd angle?

Solution: Use Solution: Use pulleys and beltspulleys and belts

Page 39: Patterns ofbuildinglegos

Linear MotionLinear Motion

Page 40: Patterns ofbuildinglegos

Rack and PinionRack and Pinion

Problem: How do Problem: How do you convert rotary you convert rotary motion to linear motion to linear motion 90motion 90°° away away from the rotating from the rotating axle over a short axle over a short distance?distance?

Solution: Use a Solution: Use a Rack and PinionRack and Pinion *notice that the rack has

to be able to slide on a smooth track.

Page 41: Patterns ofbuildinglegos

Piston RodPiston Rod

Problem: How do you Problem: How do you convert rotary motion to convert rotary motion to reciprocal linear motion reciprocal linear motion 9090°° away from the away from the rotating axle over a very rotating axle over a very short distance?short distance?

Solution: Use a piston Solution: Use a piston rodrod

Note: a Piston like Note: a Piston like this has a bit of side-this has a bit of side-to-side motion to it…to-side motion to it…

Page 42: Patterns ofbuildinglegos

Lead ScrewLead Screw

Problem: How do Problem: How do you convert rotary you convert rotary motion into motion into continuous linear continuous linear motion in the same motion in the same direction as the direction as the rotating axle over a rotating axle over a short distance?short distance?

Solution: Use a Solution: Use a Lead ScrewLead Screw

Page 43: Patterns ofbuildinglegos

Scissor ArmScissor Arm

Problem: How do Problem: How do you convert a you convert a small linear motion small linear motion into a larger linear into a larger linear motion at a 90motion at a 90°° angle?angle?

Solution: Use a Solution: Use a scissor armscissor arm

Page 44: Patterns ofbuildinglegos

ExerciseExercise

Build a crank-powered Lego Build a crank-powered Lego construction to:construction to:• (1) Move a lego minifigure 1 ½ inches (1) Move a lego minifigure 1 ½ inches

forwardforward• oror• (2) Move a lego minifigure 6 inches (2) Move a lego minifigure 6 inches

forwardforward

Page 45: Patterns ofbuildinglegos

Object manipulationObject manipulation

Page 46: Patterns ofbuildinglegos

Pusher PistonPusher Piston

Problem: How do Problem: How do you move an you move an object a short object a short linear distance?linear distance?

Solution: Use a Solution: Use a pusher pistonpusher piston

Picture shows a Picture shows a piston connected piston connected to a crankshaftto a crankshaft

Page 47: Patterns ofbuildinglegos

DumperDumper

How do you release How do you release one or more one or more objects all at once?objects all at once?

Solution: Use a Solution: Use a gravity-fed dumpergravity-fed dumper

You can either You can either rotate the dumper rotate the dumper into position or lift into position or lift it up on one end it up on one end with a with a pistonpiston or or lead screwlead screw

Page 48: Patterns ofbuildinglegos

Water wheelWater wheel

Problem: How do Problem: How do you release several you release several objects from a objects from a hopper over a hopper over a period of time?period of time?

Solution: Use a Solution: Use a gravity-fed water gravity-fed water wheelwheel

Page 49: Patterns ofbuildinglegos

PincerPincer

Problem: How do Problem: How do you grasp an you grasp an object when you object when you have clearance on have clearance on two sides?two sides?

Solution: Use a Solution: Use a pincerpincer

Page 50: Patterns ofbuildinglegos

Pincer typesPincer types

Parallel GripperParallel Gripper Pinch GripperPinch Gripper

Page 51: Patterns ofbuildinglegos

Simple fork tinesSimple fork tines Problem: How do you grab Problem: How do you grab

an object at a fixed height an object at a fixed height and deposit it in base? e.g. and deposit it in base? e.g. how do you pick a loop up?how do you pick a loop up?

Solution: Use a simple fork Solution: Use a simple fork tine attachment, either tine attachment, either powered or unpoweredpowered or unpoweredThe simplest one is a fork The simplest one is a fork directly attached to a directly attached to a forward-facing motorforward-facing motorMultiple tines allow for Multiple tines allow for variation in accuracy in variation in accuracy in getting to the loop. Single getting to the loop. Single tines give more control but tines give more control but require precise navigationrequire precise navigation

Page 52: Patterns ofbuildinglegos

ForkliftsForklifts

Problem: How do you Problem: How do you grab an object at a grab an object at a variable height and variable height and deposit it later at a deposit it later at a different height?different height?

e.g. how do you pick a e.g. how do you pick a loop up and put it back loop up and put it back down?down?

Solution: Use a forklift Solution: Use a forklift attachmentattachmentCan use either belt drive Can use either belt drive (simple) or gear drive (simple) or gear drive (more robust)(more robust)

Page 53: Patterns ofbuildinglegos

ScoopsScoops

Problem: How do Problem: How do you relocate an you relocate an object freely sliding object freely sliding on the board?on the board?

Solution: Use a Solution: Use a scoop or plow scoop or plow attachmentattachment

Page 54: Patterns ofbuildinglegos

ExerciseExercise

Each team build either a pinch Each team build either a pinch gripper or a parallel grippergripper or a parallel gripper• Capable of grabbing a minifigureCapable of grabbing a minifigure

How would you power these from How would you power these from an NXT motor?an NXT motor?

Page 55: Patterns ofbuildinglegos

WedgeWedge

Problem: How do Problem: How do you separate two you separate two objects?objects?

Solution: Use a Solution: Use a wedge to force the wedge to force the two aparttwo apart

Page 56: Patterns ofbuildinglegos

Navigation patternsNavigation patterns

Page 57: Patterns ofbuildinglegos

OdometryOdometry

Problem: How do you Problem: How do you navigate simple turns and navigate simple turns and short straight distancesshort straight distances

Use odometry; measure your Use odometry; measure your distances and turn radius distances and turn radius and program the robot to and program the robot to move exactly that much move exactly that much

Odometric methods are Odometric methods are prone to wheel slippage prone to wheel slippage and center of gravity and center of gravity variationsvariations

Page 58: Patterns ofbuildinglegos

Line FollowingLine Following Problem: How do you more Problem: How do you more

precisely navigate to specific precisely navigate to specific obstacles when a line is available obstacles when a line is available leading to that obstacle.leading to that obstacle.

Solution: Use a line following Solution: Use a line following algorithm and a light sensor. A algorithm and a light sensor. A simple switch one is available in simple switch one is available in the NXT education instructions. the NXT education instructions. More advanced (PID) algorithms More advanced (PID) algorithms can be found here: http://nxt-can be found here: http://nxt-progs.blogspot.com/2011/02/line-progs.blogspot.com/2011/02/line-following-pid-controller.html following-pid-controller.html Others are available onlineOthers are available online

Page 59: Patterns ofbuildinglegos

Wall huggingWall hugging Problem: How do you Problem: How do you

navigate precisely to an navigate precisely to an obstacle that is adjacent to a obstacle that is adjacent to a wall?wall?

Solution: Use a wall-hugging Solution: Use a wall-hugging approach. Have the robot approach. Have the robot turn a bit into the wall as it turn a bit into the wall as it moves.moves.This usually requires a wall-This usually requires a wall-following attachment and is following attachment and is compatible with compatible with odometryodometry. . The design of the attachment The design of the attachment should account for variable should account for variable distances between the mat distances between the mat and the wall.and the wall.