Project Number One Flow charting and sensor multiplexing project.

36
Project Number One Project Number One Flow charting Flow charting and sensor and sensor multiplexing multiplexing project project

Transcript of Project Number One Flow charting and sensor multiplexing project.

Page 1: Project Number One Flow charting and sensor multiplexing project.

Project Number Project Number OneOne

Flow charting Flow charting and sensor and sensor

multiplexing multiplexing projectproject

Page 2: Project Number One Flow charting and sensor multiplexing project.

PROJECT ONE: MAIN PROJECT ONE: MAIN OBJECTIVEOBJECTIVE1. The specific objective of this contest is to

build a computer controlled Robot that can1. move through a model floor plan

structure of a house, 2. find a red Light Emitting Diode (LED)

"Candle", that represents a small house fire,

3. and extinguish it by covering the LED "candle".

2. This must be done in the shortest time possible, subject to a few operating factors.

Page 3: Project Number One Flow charting and sensor multiplexing project.

SUBJECTIVES, CONSTRAINTS, PARAMETERS

1.1. THE START OF THE GAMETHE START OF THE GAME

2.2. Contestants will be permitted one minute to bring Contestants will be permitted one minute to bring Robot to track immediately followed by a hands off Robot to track immediately followed by a hands off warning.warning.

3.3. An audible starting signal 1500Hz will sound anytime An audible starting signal 1500Hz will sound anytime within a 30 second period after hands off. within a 30 second period after hands off.

4.4. The Robot should begin movement, and at this point The Robot should begin movement, and at this point the three (3) minutes period will begin (at the audible the three (3) minutes period will begin (at the audible sound, NOT when the robot moves). sound, NOT when the robot moves).

5.5. A random selection of numbers will be used to A random selection of numbers will be used to determine the order in which each robot will run.determine the order in which each robot will run.

Page 4: Project Number One Flow charting and sensor multiplexing project.

1. ROBOT OPERATION2. The Robot must be autonomous, that is, once the

Robot is turned on it must perform the task of locating and extinguishing the candle by itself. No human intervention is allowed after starting.

3. The Robot is considered to have entered the room when all its parts have crossed the white line at the doorway.

4. The Robot must enter via the doorway of the room in which the candle exists, in order to extinguish the candle.

5. Once the candle extinguisher has been placed over a suspect candle, it must be released. That is, a design cannot visit all three locations and deploy the fire extinguisher. The penalty for trying this approach will be -20 points for each deployment.

Page 5: Project Number One Flow charting and sensor multiplexing project.

1. Any Robot that damages the playing surface intentionally or unintentionally will be disqualified.

2. Touching or following the walls of the house will be permitted but discouraged by a possible penalty of -5 points.

3. The Robot must be able to fit within the 21 cm x 21 cm x 20 cm (W x L ) Home Area (a 21 x 21 x 20 box will be used to determine if the robot qualifies to enter the contest). The robot does not have to hold the cup in this test but additional marks will be given for qualifying when the robot is holding the cup.

4. The Robot can extend to any size or shape it desires, as long as it is within the room with the expected candle.

Page 6: Project Number One Flow charting and sensor multiplexing project.

1. TIME LIMIT2. The maximum time given for the Robot to locate

and extinguish the fire is three (3) minutes.

3. If the Robot locates, extinguishes the candle, and returns to the Home Area before the three (3) minutes elapse (without committing an offense), then an additional point will be awarded, i.e., one point for returning to the Home Area.

4. If a Robot does not move or perform any function for a period exceeding one (1) minute, it will lose that trial.

5. At the end of the three (3) minute period the Robot should stop moving.

Page 7: Project Number One Flow charting and sensor multiplexing project.

SUBJECTIVES, CONSTRAINTS, PARAMETERS

Page 8: Project Number One Flow charting and sensor multiplexing project.

CONCAVE LENSCONCAVE LENS

•The lens is used to couple scattered light into one focused point

Page 9: Project Number One Flow charting and sensor multiplexing project.

RCX MICROCOMPUTER

• Brains of the LEGO Mindstorm

• Central programming block(s)

• Includes 3 input and 3 output ports, LCD Display, AC adapter connector, infrared transmitter, six AA batteries, AC adapter.

Page 10: Project Number One Flow charting and sensor multiplexing project.

HOW DO WE PROGRAM THE RCX BLOCK?

1. Through direct or infrared connection with the PC

2. LEGO Mindstorm exclusive drag and drop programming software

3. Not Quite C, interactive C and legOS are all acceptable programming languages.

Page 11: Project Number One Flow charting and sensor multiplexing project.

Using Sensor Multiplexers in ROBOT CONSTRUCTION

 

IRPROXIMITYSENSORS

(3)

COLORLINE

SOUND

ROTATION(SPEED)

SENSORS(2)

BREAKBEAM

SENSOR

MUX

MUX

MUX

RCX

MOTOR 1Left Wheel

MOTOR 2Right Wheel

MOTOR 3Robot Arm

Page 12: Project Number One Flow charting and sensor multiplexing project.

Extinguisher cup

Robot arm

LED sensor

Robot wheels

IR receiverLight sensor

IR transmitter

Proximity sensors

 FRONT

Proximity sensors

 

PROXIMITY SENSORSPROXIMITY SENSORS

Wheels

RCX

Page 13: Project Number One Flow charting and sensor multiplexing project.

START

REACTING TO AUDIBLE SIGNAL

FOLLOW DOTTEDWHITE LINE

ROTATING TO CORRECTPOSITION

EXTINGUISHINGLED

CANDLE

RETURNING TO HOME AREA

NAVIGATINGTO DOORWAY

MEASURING DISTANCETRAVELED

STOPPING AND ROTATING TO

CORRECT POSITION

REACHEND OF

LINE

SENSE LED

REACH DISTANCE

FOR DOOR

YES

NO

YES

WHILE

NO

YES

NO

ROBOT ROBOT BEHAVIORBEHAVIOR

Page 14: Project Number One Flow charting and sensor multiplexing project.

MEASURING DISTANCE TRAVELED

SENSINGSPEED

WHILE SENSING ELAPSED

TIME 

CALC. DISTANCE TRAVELED FROM SPEED AND TIME ELAPSED FROM HOME

POSITION

GO TO NEXT POINT AND

STOP

FOLLOW INSTRUCTIONS BASED ON

CURRENTPOSITION

MISSION 

COMPLETE 

TAKE FASTEST ROUTE TO HOME AREA BASED

ON POSITION RECOGNIZED

NO YES

ROBOT BEHAVIOR

Page 15: Project Number One Flow charting and sensor multiplexing project.

AB

C C2

DD2

EF

F2

G H

H2

I

ROBOT BEHAVIOR

Page 16: Project Number One Flow charting and sensor multiplexing project.

EXTINGUISH LED CANDLE

SENSE/ DETECT

LED LIGHT

ROTATE TO POSITION OF STRONGEST

LIGHT INTENSITY

TRACING STEPS FROM

DOORWAY

ENTER ROOM

ENABLE “DETECTION

BEAM”

MOVE FORWARD

UNTIL BEAM IS BROKEN AND STOP

RELEASE CUP RETRACT

ARM

RETRACE STEPS BACK TO COURSE

TAKE FASTEST ROUTE HOME

WHILE

AVOIDING WALLS/

CORNERS

WHILE

ROBOT BEHAVIOR

Page 17: Project Number One Flow charting and sensor multiplexing project.

ISSUES

HARDWARE:•Robot Drift

•Differential

•Testing and refinement in a simulated contest setting

•Prototyping

•Calibration of sensors

SOFTWARE:

•Making sensors interact with one another

•Overall programming

•The abundance of sensors to include in programming

Page 18: Project Number One Flow charting and sensor multiplexing project.

BILL OF MATERIALS

A B

1 Financial Budget2 Color Sensor $20.003 Sound Bandpass Filter $12.004 IR Proximity Sensors $119.855 3 Multiplexers $89.976 IR Break Beam Optosensor $18.957 Prototype Robot Environment $08 LEGO Mindstorm Kit $280.009 Miscellaneous $60.00 10 Total $600.77

Page 19: Project Number One Flow charting and sensor multiplexing project.

RESOURCES

 Baum, Dave. Definitive Guide to Lego Mindstorms. Emeryville,CA: Apress, 2000.

URL: http://www.plazaearth.com/usr/gasperi/light.htmURL: http://www.hitechnic.comURL: http://www.philohome.free.fr/sensors/colorsensor.htmURL: http://www.kabai.com/lego.htmURL: http://www.stormyprods.com/lego/

Various other Internet sites were used with information on Lego Mindstorms.

Page 20: Project Number One Flow charting and sensor multiplexing project.

Project twoSubsumptioSubsumptio

n n architecturarchitectur

ee

Page 21: Project Number One Flow charting and sensor multiplexing project.

Control

Non-real time

Tasks are not time criticalHang-up is handled by manual reset

Real-time

No one process can run foreverSystem stability depends on regular: Inputs, Processing and OutputsWDM will reset a hung processor

Page 22: Project Number One Flow charting and sensor multiplexing project.

Real time

Control always flows straight through, without variable delays.

Page 23: Project Number One Flow charting and sensor multiplexing project.

Non-real time

Control may flow straight through, but variable delays may occur.Variable delays may cause the system to go unstable

Page 24: Project Number One Flow charting and sensor multiplexing project.

Subsumption Architecture

Developed by Prof. Rodney Brooks and the Mobile Robot Group at MIT AI LabDistributed real-time control with sensor-triggered behaviorsAll levels of control systems execute in parallelBehavior fusion rather than sensor fusionA prioritized arbitrator decides dominant behavior for each output time.

Page 25: Project Number One Flow charting and sensor multiplexing project.

Subsumption Architecture – cont.

Behaviors do not control or call each otherHowever data can be passed out of one process and into another.If higher-level process does not need to send a new control effort, then lower-level process can send a new value.Lowest-level process must have a default control effort (I.e. “Go forwards”)

Page 26: Project Number One Flow charting and sensor multiplexing project.

Subsumption Architecture – cont.

Benefits:

Cheaper microcontrollerEasy addition of more processes (simple mod. to arbitrator)

Page 27: Project Number One Flow charting and sensor multiplexing project.

Subsumption Architecture diagram

Functional block diagramAlso called Behavior ControlGood link: http://www.restena.lu/convict/Jeunes/Subsumption.htm

Page 28: Project Number One Flow charting and sensor multiplexing project.

Outputs of Subsumption Architecture1. When the this robot’s battery gets low, the Dock

process takes over2. (Currently no battery monitor on Lego’s robot)3. Pictures taken from “Mobile Robots”

Page 29: Project Number One Flow charting and sensor multiplexing project.

Game playing projects

Project objectives :Two or three RCX is playing with each otherGames : Number guessing Battleship Tic-tac-toe

Challenges :Game playing logicInter RCXcommunication „Server”

Visualisation

„Client” Player 1

„Client” Player 2

„on turn”

Page 30: Project Number One Flow charting and sensor multiplexing project.

Educational benefitsof the „game playing” projects

Students learned and practiced :Communication protocols Broadcast, peer-to-peer

Client-server architecture, game master electionGame logic algorithms

Page 31: Project Number One Flow charting and sensor multiplexing project.

Experiments with “discovering robots”

1. Capturing thecamera image

2. Image processing :Identification of the robotand the target

3. Constructing an internal representation of the environment, searching for a path

4. Sending controlinformation to the robot

Webcamera

Mobil robot

Target object

IR comm. port

Page 32: Project Number One Flow charting and sensor multiplexing project.
Page 33: Project Number One Flow charting and sensor multiplexing project.

Target object

Robot rear

Robot front

The robot must find, turn and go to the target object

Page 34: Project Number One Flow charting and sensor multiplexing project.

Gearing the motors

Page 35: Project Number One Flow charting and sensor multiplexing project.

Other classroom Other classroom possibilitiespossibilities

Operating systems Inspect, document, and modify firmware

Programming languages Develop interpreters/compilers NBC an excellent target language LISP

Supplementary labs for CS1/CS2

Page 36: Project Number One Flow charting and sensor multiplexing project.

Another Larger Another Larger Project Project

Take a child's toy and adapt it through computer Take a child's toy and adapt it through computer programming and ingenuity to become more than what programming and ingenuity to become more than what was it originally intended:was it originally intended: Communicate to PC and other robots using Bluetooth.Communicate to PC and other robots using Bluetooth. Analyze environment to collect data that could be used for Analyze environment to collect data that could be used for

machine learning training.machine learning training.

Compare the capabilities of various programming Compare the capabilities of various programming environments and the abilities of Lego NXT Mindstorm environments and the abilities of Lego NXT Mindstorm robots by running complex programs of our own design.robots by running complex programs of our own design.

Create the first real environment simulator for NXT Create the first real environment simulator for NXT Decreases development timeDecreases development time Can take accurate measurementsCan take accurate measurements