180 likes | 200 Views
Create a mobile robot with infrared detection to compute distances and react to the environment. Design personalities, avoid harm, and use sensors for actions like object following. Learn electronics, circuits, and prioritize tasks for efficient performance.
E N D
MOBILE ROBOT WITH INFRARED DETECTION Sean Coenen http://www.snc.edu/compsci/cs460/coenst
General Requirements: • The robot uses infrared detection to compute distances. • The robot must be able to react to its environment using two input detectors using a priority based scheduling algorithm. • The robot must stay out of harms way • Design and implement at least two personalities
The Brains • HandyBoard • Microcontroller • 32K of battery-backed static RAM • Outputs for four DC motors • Input for a variety of both Analog and Digital Sensors • Runs InteractiveC Example
Input Sensors • Bump Sensors • Digital Inputs • 1 = Sensor Hit • 0 = No Hit • Four located on robot chassis
Input Sensors • GP2D02 Sensors • Digital Input Sensor • Only returns value at specified interval • Returns value based on distance from object
Input Sensors • GP2D02 Sensors • Takes distance reading when enabled • Reports the distance as a byte-value • Returns meaningful distances from 10cm (~4") to 80cm (~30") Example
Actions: • Avoid Objects • Follow Wall • Follow Object
Avoid Objects • Drives straight until confronts object • Turns based on which flags are triggered • Continues straight until confronts another object • Bump Sensors used in case infrared detector misses object Example 1 Example 2
Follow Wall • Initially finds wall to follow • Maintains specified distance from wall • Adjusts wheel speed to compensate for distances • Turns to follow corners/turns in wall Example 1 Example 2 Example 3 Example 4
Follow Object • Finds object in sensor • Turns to follow object with front sensor • Continues to follow object until robot gets too close or object disappears from field of vision Example 1 Example 2 Example 3 Example 4
Solution • Constant monitoring of four infrared sensors • Based on distances from objects, different sensors are triggered • Depending on distances/what flags are triggered, different actions are taken • Avoid Objects – when close, turn away • Follow Wall • When get far away, turn toward • When lose wall, turn to find again • When find corner with two sensors, turn to avoid • Follow Object: • Keep within given distance of object • If lose object, and it appears in another sensor, turn to follow
What I Did Not Solve • Make the robot respond/move toward other IR devices • Remote Control • IR Beacons • Interact with other devices with IR detectors • Two robots move around room, but avoid one another
Methodology • Start small • Get basic functions working • Distance measurement • Flag variables • Expand to more complicated functions once these concepts are working
Strategies • Independent learning about: • Electronics • Wiring/Soldering • Circuits & Resistors • Robotic Explorations: A Hands-on Introduction to Engineering • Book by Fred G. Martin • Professor of Computer Science at University of Massachusetts Lowell • Inventor of Handyboard Microprocessor
Techniques • Preemption • Priority • Threads • Global Variables/Flags • Event Programming • Computer Engineering • Processor Chip • Wiring • Circuitry
Extensions • Interaction of multiple robots using infrared • Use of more than four infrared detectors for better accuracy/coverage • Explore use of different detection such as Sonar
Advice • Mechanical problems can be very frustrating – need patience • Start with small modules and work your way to the large ones • Set a timeline and stick with it
Questions? Thank You For Coming!