Lego Design - SIUE Robotics

Download Report

Transcript Lego Design - SIUE Robotics

IME 106 LEGO Design

SIUE School of Engineering Fall 2006

Robot

Any software controlled mechanical device • Actuators and Effectors • Sensors • Controller

Industrial Robots

Check out the Mitsubishi Robotic Arms in IME CIM lab (EB 1022) !

Mobile Robots: Remote control, autonomous, or a mixture of two Go To http://roboti.cs.siue.edu/ to control Elmer, Taz, or Marvin

Goals:

• Build better robots – Minimize mechanical breakdowns – Build robots that are easy to control – Encourage good design strategy

Who Builds Robots?

• ECE designs “the brain”, sensors, actuators & wiring.

• ME designs body, gearing, actuators • IME designs and integrates controls.

• CS – designs robot software

All disciplines listed above work together to design/build robots.

Robotics made easy?

Design Problem Design and build a robot to vacuum your house.

What are some of the challenges?

Design Challenges for Mobile Robots

• Position How does robot know where it is (or has been)?

• Navigation How does it navigate around obstacles?

• Object Recognition How does it recognize money, toys, even cats?

Design Approaches

• "Top-down" design – the process of starting with the goal of the project and then developing a solution.

• "Bottom-up" design – the process of first learning about the available materials and then determining what can be done with them.

NEW Add “Project Planning” and “Testing” phases to robot design process.

Lego RCX Brick

RCX Brick with sensors & Motors

Lego RCX Brick Display

Design Strategy

• Incremental – Test components parts as you build them • Drivetrain • Sensors, sensor mounting • Structure • Don’t be afraid to redesign • Internet for design ideas

Design Strategy

• Drive-train driven • Chassis/structure driven • Modular?

Geometry

• Three plates = 1 brick in height • 1-stud brick dimensions:

exactly

5/16” x 5/16” x 3/8” (excluding stud height 1/16”), • This is the base geometry for all LEGO components

Structure

• Common pitfall when trying to increase mechanical robustness:

Structure

• The right way:

Structure

• The right way:

A good robot starts with a good foundation. A robot whose body is not structurally sound will be fraught with problems for the designers. The first and most important is that the friction between stacked bricks should not be relied upon for structural strength. Use connector pegs to help create a "skeleton" like the one below. A design like this is both light and strong but usually requires a number of rebuilds to get perfect.

Structural supports like the ones shown below can be placed on almost any chassis design. Use this to your advantage. You can get by with fewer legos and have a stronger chassis this way

The picture below demonstrates a very structurally sound way of constructing a frame with Legos. The 3 wide connector peg can be used for one of the 3 join points, or an additional 4x1 brick can be used.

The structure below demonstrates a very strong design that will not come apart unless

you

take it apart

.

• • • • •

Pins and axles

Many various kinds Pin, friction pin, and long variants Evil, super friction pin that looks very similar to the normal friction pin Axles, come in various numbers of studs Never bend axles! Axles holding wheels or gears should be closely supported on both sides

Connector pegs

• Black pegs are tight-fitting for locking bricks together.

• Grey pegs turn smoothly in bricks for making a pivot

Connector Pegs

Gears

• Transfer rotation from one axle to another • Even number of gears reverses the direction of rotation • The radii determine gear spacing, transferred speed, and power • Inverse relationship between power and speed • There are lots of gear spacing issues beyond the scope of Lego design

Gears (continued)

• Worm gears – Are effectively one tooth gears – Significant efficiency lost to friction – Since they can’t be back driven, they are great for arms that should hold their position • Some good gear info at – http://www.owlnet.rice.edu/%7Eelec201/Book/l egos.html

1

Worm Gears

• Pull one tooth per revolution

3 2

• Result is a 24:1 gearbox

4

Wheels

• Like pulleys and gears, the wheel dimension is key!

• Think of the wheel as the final gear in the drive train – Larger wheels will make the robot move faster, with less power • With stability, traction, turning agility, and so on, there are lots of trade-offs in choosing wheels • See the LEGO tire traction tests at: – http://www.philohome.com/traction/traction.htm

Drivetrain

• LEGO Gears 8T 16T 24T 40T 1T Worm 24T Crown Bevel

Robot Basics - Gears

• Speed • Torque (climb over obstacles) • Turns

Tips Try different size gear combinations, different types of gears (worm), and different motor placement (rear wheel drive or 4 wheel drive).

Seesaw Physics

Radius, Torque, and Force on a Gear

torque

= r x F

3 to 1 reduction

Since the forces between the teeth of the two gears are equal in magnitude but act opposite in directions, the torque exerted on the right axle is three times the torque exerted on the left axle (since the radii of thee gears differ by a factor of three). Thus this gear system as acts as a “torque converter”, increasing the torque at the expense of decreasing the rate at which the axle turns.

9 to 1 reduction

The torque at the “output shaft” is

9 times

the torque provided on the left (‘input”) axle. The output shaft will of course spin 9 times slower than the input shaft, but it will be much harder to stall. Have someone grab the output shaft and try to “stall” your fingers as you spin the input axle. It’s not that easy!

A three stage gear train with a gear ratio of 27:1

Sample Drive Train

Lego Axle

Gear Rack

Axle Joiner

Toggle Joint

Caster Design

Lego Legs

Grippers

Changing Rotational Axis

Changing Rotational Axis

Spin x-y-z

See more examples at http://constructopedia.media.mit.edu/

Car Turn Problem

Lego Differential Gear

Differential Drive

The differential gear is used to help cars turn corners. The differential gear (placed midway between the two wheels) allows one wheel to turn at a greater speed than the other. Even though the wheels may be turning at different speeds, the action of the differential means that the torque generated by the motor is distributed equally between the half-axles upon which the wheels are mounted. Assuming the robot's weight is sufficient and distributed properly, the robot should be able to turn with its drive motors at full power without causing either wheel to slip.

Motors

• 9V Gear Motor • ~ 150 mA • 300 RPM (no load) • Polarity

Motors

• 9V Micro Motor • 20-30 RPM

Mounting Motors

Note Bulge under motor

Mounting Motors

• Add a gear:

Mounting the Motor

Lego Sensors

Light Sensor Mount

This shows an interesting way to mount a photoresistor, as well as how to sheild it from a dedicated light source.

Touch Sensor Mount

Sensor Issues

– Two light sensors that measure 0-100% light – typical measurements are approximately 30-60 – Two touch sensors which can be used as bumper sensors or limit switches – One rotation sensor • Measurement granularity is 1/16 of a rotation • Can give bad data if very fast or very slow • Rotational speed near motor speed is fine (200-400 rpm)

Sensors (continued)

• Use all the permitted sensors!

• Can stack touch sensors on top of light sensor inputs – A closed touch switch reads 100% brightness – Cannot read 100% otherwise, unless pointed at light source • Good sensor information at: – http://www.plazaearth.com/usr/gasperi/lego.htm

Build for good control

• Slow vs. fast?

• Gear backlash • Stability • Skidding (Tank-tracks vs. wheels) • Differential Steering !!!

Design Strategy

• Incremental – Test components parts as you build them • Drivetrain • Sensors, sensor mounting • Structure • Don’t be afraid to redesign • Internet for design ideas

Design Strategy

• Drive-train driven • Chassis/structure driven • Modular?

Testing

• Don’t wait until you have a final robot to test – Interaction of systems – Work division (work concurrently) • Develop test methods • Repeatability

Competition Philosophy

• Have fun • Be creative, unique • Strive for cool solutions, that work!

• Aesthetics: it’s fun to make beautiful robots!

Be aware of the common problems!

• Wheels stick, slip, or slide depending on surface • Rotations are not always accurate or consistent • Different motor strengths • Touch sensor activation • Robot could fall apart at a bad time • It may not drive straight • Robot might get “lost” on the table • Maybe it is inconsistent and does something slightly different every time

Robot design goals

• Simple: easy to replicate and less to go wrong!

– Ask: Is there an easier solution?

• Robust: don’t want robots falling apart on the table!

• Compact – Small enough to turn in tight spaces – Keep the center of gravity between the wheels – Wire routing – tuck wires in so they don’t get pulled loose • Predictable and reliable – Behavior should be consistent and repeatable • Aesthetics: it’s nice to have a good looking robot!

Some Robust Techniques

• Shielding light sensors • Solid construction • Using good batteries • Going straight (enough) • Reliable Navigation

Control Structures

No matter what language you use, there are 3 basic control structures for organizing the programming commands: – Selection – Repetition (Loops) – Conditional

RCX Program Code

• Commands • Sensor Watchers • Stack Controllers • “My Commands”

How To: Write Programs

Click on “Program RCX.” Stack puzzle pieces.

Move unused pieces to the trash.

Download program to the RCX.

RCX Programmi ng

Commands : Tell robot what to do (e.g. stop, go, turn, etc.).

Sensor Watchers: Test conditions (e.g. light, touch, count) and determine actions based on conditions.

Stack Controllers: Allows robot to repeat commands or wait until condition is true.

My Commands: Makes several actions a “subroutine” which can be used as a single command.

Demo Robot

Robot backs up for 1 s.

Both motors stop in preparation of power change.

Power increases to overcome wheel friction when turning.

Wheel A changes to forward,so robot turns to the right for 1s.

Power decreases to protect sensors when robot bumps objects. Wheel C changes to forward, so robot moves forward.

Selection

• Selection statements are defined as a list of commands that are executed in order.

• For example: Set Forward Direction Go forward for 3 s Stop

Repetition

• Repetition statements allow for a series of commands to be repeated for a set number times.

• For example: Repeat 3 times Set forward direction Move forward for 3 s Stop End Repeat

Conditional

• Conditional statements allow for two (or more) different sets of commands to be executed depending on a condition. • For example, – If certain conditions are true - one set of commands will be execute. – Else if any (or all) are false - another set of commands will be executed.

Example of Conditional Statements

• For example – If the light is <50% Set Direction Forward Move Forward for 3 s Stop – Else If light is >= 50% Stop – End

How To: Download Programs

Select button to download Select program number (1-5)

How To: Save Programs

Features of RCX Software

• Multi-threaded language – Different parts of the program execute at the same time. – Can cause unexpected results!

– Loops in main program interfere with subprogram.

• Variables limited to 1 or 0 – Use counter as variable.

– Not quite C (NQC) language allows for more variables.

NQC (Not Quite C) Programming

Useful Links

• • • • • http://www.crynwr.com/lego-robotics/ http://www.plazaearth.com/usr/gasperi/lego.htm#b ackground http://www.oreilly.com/catalog/lmstorms/resource s/index.html

http://member.nifty.ne.jp/mindstorms/Gallery http://www.robotbooks.com/

Interesting Lego related websites

• • • • • • • • • • • • • • • • • • • • • • ( many links) http://www.oreilly.com/catalog/lmstorms/resources/index.html

(interesting sites for ideas) http://member.nifty.ne.jp/mindstorms/Gallery http://www.mi-ra-i.com/JinSato/MindStorms/index-e.html

http://staticip.cx/~benw/lego/ http://www.verinet.com/~dlc/botlinks.htm

http://www.medialab.nl/Company/Crew/daan/legodiff.htm

http://www.mindspring.com/~clagett/bill/lego/geometry/index.html

http://www.robotbooks.com/ (good introduction to gear and beam construction) http://ldaps.ivv.nasa.gov/Curriculum/legoengineering.html

http://www.fischermellbin.com/Marcus/Lego/Gear_Mth/gear_math.html

http://phred.org/~alex/lego/ (ideas for sensors) http://www.plazaearth.com/usr/gasperi/lego.htm#background http://www.umbra.demon.co.uk/legopages.html

http://www.primenet.com/~johnkit/Projects.html

http://www.mnsinc.com/wesmat/TouchSensor.html

http://www.daimi.au.dk/~mic/speciale/RCX http://www.crynwr.com/lego/lego-robotics/extreme-rotation-sensor.htm

http://www.csepainball.com/chris/radarbot.html

http://kabai.com/lego/lego.htm

http://www.io.com/~woodward/lego/ ftp://ftp.eecs.umich.edu/people/johannb/pos96rep.pdf