electronics and robotics merit badges class 5 – programming robot controllers for sumo competition...

20
Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 06/21/2 2 Electronics and Robotics Merit Badges - Class 5 1

Upload: kory-ashley-henderson

Post on 21-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Electronics and Robotics Merit Badges

Class 5 – Programming Robot Controllers for Sumo Competition

04/21/23 Electronics and Robotics Merit Badges - Class 5 1

Page 2: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

The SumoBot Kit

04/21/23 Electronics and Robotics Merit Badge Class 5 2

Page 3: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SUMOBOT HARDWARE

04/21/23 Electronics and Robotics Merit Badge Class 5 3

Page 4: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

But now we have to program the robots with their instructions for the Sumo ring…

TEAM KIAH-1 TEAM JACOB-2Remember how we talk with the robots (Hint: 1’s and 0’s)?

Electronics and Robotics Merit Badge Class 5

010001000001 = “A”

Page 5: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

• ' Applied Robotics with the SumoBot - PushbuttonLed.bs2 • ' Simple finite state machine example. • ' {$STAMP BS2} • ' {$PBASIC 2.5} • pbSense PIN 6 • LedSpeaker PIN 0• PeizoSpeaker PIN 1 • LOW LedSpeaker • DO• • IF pbSense = 1 THEN • DEBUG HOME, "State = Blink LED" • TOGGLE LedSpeaker • ELSE • DEBUG HOME, "State = Led off", CLREOL • LOW LedSpeaker • ENDIF • PAUSE 100• • LOOP

SUMOBOT SOFTWARE

Electronics and Robotics Merit Badge Class 5 504/21/23

Page 6: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

ASCII Code

04/21/23 Electronics and Robotics Merit Badge Class 5 6

But first we need to break up into some functional areas…

Page 7: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot RulesThe Match:1) Flip a coin to determine who positions their robot first in the ring2) Place the ‘bot in the ring as directed by the referee3) Press the start button on the bot when directed by the referee. After 5 seconds the bot may begin moving (sound/light indicates robot working).4) Move back at least 3 feet from the edge of the ring5) Catch any bot that is out of the ring and turn it off6) Place the bot back in a holding area between matches. A contestant may make adjustments between matches, but may not leave the holding area.Basic Rules:1) One match will consist of three rounds, within a total of 3 minutes each. The team who wins two rounds out of three wins the match.2) The match will be stopped and a rematch will ensue when it is apparent that neither bot is making any progress for duration of about 4 seconds (as determined by the referee).3) If a part on the bot comes off that is less than 5 grams, the round will continue. 4) A player has 30 seconds to correct a problem between rounds.5) The referee has the final decision in a match.

Electronics and Robotics Merit Badge Class 5

Page 8: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot Competition “Specialists” Competition Leads/Motors/Sensors Teams

Electronics and Robotics Merit Badge Class5

Page 9: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot Competition Code – Wiring LED

Electronics and Robotics Merit Badge Class 5

Page 10: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot Competition Code –State Diagram

Electronics and Robotics Merit Badge Class 5

Page 11: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot Competition Code – Code

Electronics and Robotics Merit Badge Class 5

' Applied Robotics with the SumoBot - PushbuttonLed.bs2 ' Simple finite state machine example. ' {$STAMP BS2} ' {$PBASIC 2.5} pbSense PIN 6 LedSpeaker PIN 0PeizoSpeaker PIN 1 LOW LedSpeaker DO IF pbSense = 1 THEN DEBUG HOME, "State = Blink LED" TOGGLE LedSpeaker ELSE DEBUG HOME, "State = Led off", CLREOL LOW LedSpeaker ENDIF PAUSE 100 LOOP

Page 12: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Sensor Teams: Load and run program 3.1 from handout to test and

evaluate the QTI sensors.

Electronics and Robotics Merit Badge Class 5 1204/21/23

Page 13: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot Sensors and Border Detection

04/21/23 13Electronics and Robotics Merit Badge Class 5

Page 14: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Sensor Teams: Record Test Program 3.1 results

Run the 3.1 test program (using Position 1 of the power switch) and record the values from your SumoBot QTI sensors in your Robot Engineering Notebook.

Black White

Left QTI _______ _______

Right QTI _______ _______

Electronics and Robotics Merit Badge Class 5 1404/21/23

Page 15: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Motor Team: Load and run program 2.2 from handout to test and evaluate

the servo motors are ready

Electronics and Robotics Merit Badge Class 5 1504/21/23

Page 16: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Motor Teams: Test Program 2.2 (motors) resultsRun the 2.2 test program (using Position 2 of the power switch)

and you should observe the following behavior by the robot (write this in your Robot Engineers Notebook):

1) Move forward slowly PASS/FAIL__________ 2) Pivot turn 90 degrees on left wheel PASS/FAIL__________3) Move forward quickly PASS/FAIL__________ 4) Pivot turn 180 degrees on right wheel

PASS/FAIL__________5) Move forward quickly PASS/FAIL__________6)Spin turn (rotates SumoBot around its own center) 360 degrees

PASS/FAIL__________7) Stop PASS/FAIL____

Electronics and Robotics Merit Badge Class 5 1604/21/23

Page 17: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Team Leads: Load and run program 3.3 (Simple Mini Sumo) from handout to test

and evaluate overall readiness of your robot

Run the 3.3 test program (using Position 2 of the power switch) and record the values from your SumoBot QTI sensors in your Robot Engineering Notebook.

Pass Fail

Motors _______ _______

Edge Sensors _______ _______

Electronics and Robotics Merit Badge Class 5 1704/21/23

Page 18: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Competition Time!!!

Electronics and Robotics Merit Badge Class 5 1804/21/23

Page 19: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

Robotics merit badge requirements        

1.Safety. Do each of the following:a. Explain to your counselor the most likely hazards you may encounter while working with robots and what you should do to anticipate, mitigate and prevent, and respond to these hazards. Describe the appropriate safety gear and clothing that should be used when working with robotics.b. Discuss first aid and prevention for the types of injuries that could occur while participating in robotics activities and competitions, including cuts, eye injuries, and burns (chemical or heat).

2.Robotics industry. Discuss the following with your counselor:a. The kinds of things robots can do and how robots are best used today.b. The similarities and differences between remote-control vehicles, telerobots, and autonomous robots.c. Three different methods robots can use to move themselves other than wheels or tracks. Describe when it would be appropriate to use each method.

3.General knowledge. Discuss with your counselor three of the five major fields of robotics (human-robot interface, mobility, manipulation, programming, sensors) and their importance to robotics development. Discuss either the three fields as they relate to a single robot system OR talk about each field in general. Find pictures or at least one video to aid in your discussion.4.Design, build, program, test. Do each of the following:

a. With your counselor's approval, choose a task for the robot or robotic subsystem that you plan to build. Include sensor feedback and programming in the task. Document this information in your robot engineering notebook.b. Design your robot. The robot design should use sensors and programming and have at least 2 degrees of freedom. Document the design in your robot engineering notebook using drawings and a written description.c. Build a robot or robotic subsystem of your original design to accomplish the task you chose for requirement 4a.d. Discuss with your counselor the programming options available for your robot. Then do either option 1 OR option 2.

(1) Option 1. Program your robot to perform the task you chose for your robot in 4a. Include a sample of your program's source code in your robot engineering notebook.(2) Option 2. Prepare a flowchart of the desired steps to program your robot for accomplishing the task in 4a. Include procedures that show activities based on sensor inputs. Place this in your robot engineering notebook.

e. Test your robot and record the results in your robot engineering notebook. Include suggestions on how you could improve your robot, as well as pictures or sketches of your finished robot.

5.Demonstrate. Do the following:a. Demonstrate for your counselor the robot you built in requirement 4.b. Share your robot engineering notebook with your counselor. Talk about how well your robot accomplished the task, the improvements you would make in your next design, and what you learned about the design process.

6.Competitions. Do ONE of the following.a. Attend a robotics competition and report to your counselor what you saw and learned about the competition and how teams are organized and managed.b. Learn about three youth robotics competitions. Tell your counselor about these, including the type of competition, time commitment, age of the participants, and how many teams are involved.

7.Careers. Name three career opportunities in robotics. Pick one and find out the education, training, and experience required for this profession. Discuss this with your counselor, and explain why this profession might interest you.

Electronics and Robotics Merit Badge Class 5 1904/21/23

Page 20: Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class

SumoBot RulesThe Match:1) Flip a coin to determine who positions their robot first in the ring2) Place the ‘bot in the ring as directed by the referee3) Press the start button on the bot when directed by the referee. After 5 seconds the bot may begin moving (sound/light indicates robot working).4) Move back at least 3 feet from the edge of the ring5) Catch any bot that is out of the ring and turn it off6) Place the bot back in a holding area between matches. A contestant may make adjustments between matches, but may not leave the holding area.Basic Rules:1) One match will consist of three rounds, within a total of 3 minutes each. The team who wins two rounds out of three wins the match.2) The match will be stopped and a rematch will ensue when it is apparent that neither bot is making any progress for duration of about 4 seconds (as determined by the referee).3) If a part on the bot comes off that is less than 5 grams, the round will continue. 4) A player has 30 seconds to correct a problem between rounds.5) The referee has the final decision in a match.

Electronics and Robotics Merit Badge Class 5