Presentation is loading. Please wait.

Presentation is loading. Please wait.

Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver.

Similar presentations


Presentation on theme: "Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver."— Presentation transcript:

1 Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver

2 Outline Microcontroller architecture Digital versus analog signals Line sensors Ultrasonic sensors Programming with EasyC

3 Robot Control We programmed the vehicle to perform specific actions Drive in a square “dead reckoning” By adding sensors, we can make the vehicle “smart” by making decisions based on the readings of the sensor

4 Digital versus Analog Digital signals Two levels: 0 or 1 Binary Analog signals Infinite number of levels Signals can be between 0 and 1000 Calibrate readings to physical meaning

5 Microcontroller Ports have different types of signals Analog 1-4 Digital 5-10 Motors Interrupts Analog/Digital Signals (Sensors)

6 Line Sensor Uses an Infrared (IR) LED emitter and detector to measure intensity LED = light emitting diode Distance of the sensor to surface will affect readings Emitter Detector Sensor

7 Ultrasonic Sensor Uses ultrasound to measure time for a pulse to bounce off of an object Time and known speed to sound  distance Sound waves must reflect off the object Difficulty with curved objects Emitter Detector Sensor Object

8 Exercises Download LinefollowerTest.ecp What reading corresponds to white? What reading corresponds to black? Test how distance from the surface affects the reading Download UltrasonicTest.ecp How does the reading vary with distance? How close can you get? What reading do you get with a curved surface?

9 The Grand Challenge Two competitions Autonomous maze Navigate through a maze using sensors and autonomous control Additional time bonus for stopping within 2” of the wall without touching it New adventure race with your team’s best driver

10 The Grand Challenge Teams will use the same vehicle for both competitions Exception different programs will be downloaded Autonomous maze 50 pts Adventure race50 pts

11 Line Follower Logic LeftRight LeftCenterRight Use multiple sensors together to make a “smart” line following robot What decisions are made based on the readings on the different sensors? Two Sensor Configuration Three Sensor Configuration

12 Line Follower Logic If both see line Then go _______ If left sensor sees line Then turn _______ If right sensor sees line Then turn _______ If no sensors see line Then _______ LeftRight Two Sensor Configuration

13 Line Follower Logic What sensor reading is on the line? How much do you turn? How fast can you go without losing the line? Develop a robust program Consider what to do if you lose the line Consider right angles and “T”s If … then …or If … then … else …

14 Exercises 1. Write a code to follow the line Use the test field to test your program Program and test 2. Develop a code to earn the stopping distance bonus 3. Make changes to your vehicle for the final mission Again, hanging bonus is in play

15 This workforce solution was funded by a grant awarded under the Workforce Innovation in Regional Development (WIRED) as implemented by the U.S. Department of Labor’s Employment and Training Administration working in partnership with the Colorado Department of Labor and Employment, the Metro Denver Economic Development Corporation, and the City and County of Denver's Office of Economic Development. The solution was created by the grantee and does not necessarily reflect the official position of the U.S. Department of Labor. The Department of Labor makes no guarantees, warranties, or assurances of any kind, express or implied, with respect to such information, including any information on linked sites and including, but not limited to, accuracy of the information or its completeness, timeliness, usefulness, adequacy, continued availability, or ownership. This solution is copyrighted by the institution that created it. Internal use by an organization and/or personal use by an individual for non-commercial purposes is permissible. All other uses require the prior authorization of the copyright owner.


Download ppt "Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver."

Similar presentations


Ads by Google