122-27400 Parallax Inc, 122-27400 Datasheet

MANUAL FOR SUMOBOT

122-27400

Manufacturer Part Number
122-27400
Description
MANUAL FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-27400

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
SumoBot
– Mini-Sumo Robotics
®
Assembly Documentation and Programming
VERSION 2.1

Related parts for 122-27400

122-27400 Summary of contents

Page 1

SumoBot – Mini-Sumo Robotics ® Assembly Documentation and Programming VERSION 2.1 ...

Page 2

... HomeWork Board, Parallax, the Parallax logo, are trademarks of Parallax Inc. If you decide to use trademarks of Parallax Inc. on your web page or in printed material, you must state that "(trademark trademark of Parallax Inc.”, “upon the first appearance of the trademark name in each printed document or web page ...

Page 3

INTERNET DISCUSSION LISTS We maintain active web-based discussion forums for people interested in Parallax products. These lists are accessible from www.parallax.com via the Support → Discussion Forums menu. These are the forums that we operate from our web site: • ...

Page 4

...

Page 5

Table of Contents Preface .........................................................................................................vii Recognitions ..............................................................................................vii Audience...................................................................................................viii Educational Concepts from the SumoBot .................................................viii Copyright and Reproduction .......................................................................ix Chapter 1: Assemble the SumoBot ............................................................. 1 Let’s Build the SumoBot .............................................................................. 2 Tools Required ............................................................................................ 2 About the Parts in the ...

Page 6

Page vi · SumoBot – Mini Sumo Robotics Appendix B: Standard Mini-Sumo Competition Rules ............................ 55 Appendix C: Mini-Sumo Ring .................................................................... 65 Appendix D: SumoBot PCB Schematic .................................................... 67 ...

Page 7

PREFACE Like its human counterpart, robot Sumo was born and thrives in Japan. introduced to the United States in the early 1990's by Dr. Mato Hattori. One of the early American adopters of robot Sumo was noted Seattle Robotics Society ...

Page 8

Page viii · SumoBot – Mini Sumo Robotics This text was authored by Jon Williams of Parallax, and contains additional material by several contributors, including Andy Lindsay and Ken Gracey of Parallax, as well as Bill Wong of Pennsylvania. Bill ...

Page 9

Preface · Page ix ...

Page 10

...

Page 11

Chapter 1: Assemble the SumoBot There's an old axiom among robot enthusiasts that states, "It's harder than it looks...." Speaking from experience, we know this to be true. That said, the purpose of this statement is not to alarm or ...

Page 12

Page 2 · SumoBot – Mini Sumo Robotics LET’S BUILD THE SUMOBOT The SumoBot chassis design leaves little room for mechanical alteration; a requirement to stay within standard Mini-Sumo competition rules. Where the student is encouraged to explore changes is ...

Page 13

Step #1 Install the Battery Box Parts Required: • Battery Box • (2) 4/40 3/8" long flat-head countersunk machine screws • (2) 4/40 nuts • SumoBot chassis Stand the SumoBot on its PCB mounting ears. Install the plastic battery pack ...

Page 14

Page 4 · SumoBot – Mini Sumo Robotics Step #3 Install the Rear SumoBot PCB Stand-offs Parts Required: • (2) 5/8" round standoffs • (2) 4/40 3/8" long pan- head machine screws • SumoBot chassis Using a 4/40 3/8" pan-head ...

Page 15

Step #5 Mounting the PCB Parts Required: • SumoBot PCB • (2) 4/40 3/8" long pan-head machine screws • (2) 1-1/4" round stand-offs • (2) Nylon washers • SumoBot chassis Feed the ends of the 1" long pan-head machine screws ...

Page 16

Page 6 · SumoBot – Mini Sumo Robotics Step #7 Mount the Wheels Parts Required: • (2) Prepared wheels/tires • (2) Black servo-horn screws • SumoBot chassis Carefully press each prepared wheel onto the servo splines. Secure each wheel with ...

Page 17

Step #9 Install Line Sensor Wires Parts Required: • (2) 10" 3-pin extension cables • SumoBot chassis Carefully feed each 10" 3-pin extension cable through the center chassis slot. Step #10 Install the QTI Line Sensors Parts Required: • (2) ...

Page 18

Page 8 · SumoBot – Mini Sumo Robotics Step #11 Make the Connections Plug the servo motors and QTI sensors into the SumoBot PCB connectors as indicated below. Note that the "B" pin on each connector is for the black ...

Page 19

Step #12 Powering the SumoBot The SumoBot PCB has a three-position power switch. The state of each position is shown below. The three-position switch has a middle position that powers the entire circuit except the servos. A complete schematic of ...

Page 20

...

Page 21

Chapter 2: SumoBot Locomotion The first task of any Mini-Sumo robot is to move – most competition rules do not allow the robot to stop (without competitor contact) for more than a few seconds. In this experiment you will learn ...

Page 22

Page 12 · SumoBot – Mini Sumo Robotics Figure 2.1: Milliseconds and Microseconds Details 1 ms µ voltage level is measured in volts, which is abbreviated with an upper case V. The SumoBot PCB has sockets ...

Page 23

I/O pins. In this example, the BASIC Stamp sends a 1500 µs pulse to P13 (left servo) and P12 (right servo). When the pulse is done being executed the signal pin ...

Page 24

Page 14 · SumoBot – Mini Sumo Robotics Figure 2.4: SumoBot Servo Control Pulses For pulses between the 1500 µs stop point and the extremes on either end of the control range, there is a degree of speed control. This ...

Page 25

SumoBot_2.1_Motor_Align.BS2 ' {$STAMP BS2} ' {$PBASIC 2.5} ' -----[ I/O Definitions ]------------------------------------------------- LMotor PIN 13 RMotor PIN 12 ' -----[ Constants ]------------------------------------------------------- LStop CON 750 RStop CON 750 ' -----[ Initialization ]-------------------------------------------------- Reset: LOW LMotor LOW RMotor ' -----[ ...

Page 26

Page 16 · SumoBot – Mini Sumo Robotics Figure 2.5: SumoBot Servo Adjustment Ports Don't worry, for the moment, how the program works; that will become clear in the next section. SUMOBOT MOTION TEST With the motors aligned ...

Page 27

LRevFast CON 500 RFwdFast CON 500 RFwdSlow CON 700 RStop CON 750 RRevSlow CON 800 RRevFast CON 1000 ' -----[ Variables ]------------------------------------------------------- pulses VAR Byte ' -----[ Initialization ]-------------------------------------------------- Reset: LOW LMotor LOW RMotor PAUSE 2000 ' -----[ Program Code ...

Page 28

Page 18 · SumoBot – Mini Sumo Robotics FOR pulses = PULSOUT LMotor, LFwdFast PULSOUT RMotor, RRevFast PAUSE 20 NEXT Hold_Position: DO PULSOUT LMotor, LStop PULSOUT RMotor, RStop PAUSE 20 LOOP END As soon as the program ...

Page 29

The core of the program, at the label Main , is broken down into several sections: • Move forward slowly • Pivot turn 90 degrees on left wheel • Move forward quickly • Pivot turn 180 degrees on right wheel ...

Page 30

Page 20 · SumoBot – Mini Sumo Robotics Figure 2.6: BASIC Stamp Editor with SumoBot_ 2.2_Motor_Test.BS2 Note: The figure above shows the edit window set to split-pane mode so that two sections of the program may be viewed simultaneously. ...

Page 31

CHALLENGE YOURSELF 1. Modify the motor speed constants so that your SumoBot travels straight at low and high speeds. 2. Determine the proper loop count to cause the SumoBot to turn 30 degrees, 45 degrees and 90 degrees. 3. Using ...

Page 32

...

Page 33

Chapter 3: SumoBot Sensors and Border Detection Once the SumoBot is moving, the next task is to scan the playing surface to make sure that it doesn't drive itself out of the ring. The task is accomplished by two specialized ...

Page 34

Page 24 · SumoBot – Mini Sumo Robotics After the QTI is activated, the capacitor is discharged by bringing the R line high and holding it for about one millisecond. RCTIME is then used to measure the time required to ...

Page 35

Read_Left: HIGH LLinePwr HIGH LLineIn PAUSE 1 RCTIME LLineIn, 1, lLine LOW LLinePwr RETURN Read_Right: HIGH RLinePwr HIGH RLineIn PAUSE 1 RCTIME RLineIn, 1, rLine LOW RLinePwr RETURN HOW IT WORKS This program starts by activating the left QTI line ...

Page 36

Page 26 · SumoBot – Mini Sumo Robotics Figure 3.2: QTI Test Program Output Don't worry about small discrepancies between the QTI values over the same color – this is due to minor variations in components and won't adversely affect ...

Page 37

VAR lineBits.BIT1 lbRight VAR lineBits.BIT0 ' -----[ Program Code ]---------------------------------------------------- Main: GOSUB Read_Line_Sensors DEBUG HOME, "LR", CR, BIN2 lineBits, CR, CR SELECT lineBits CASE %00 DEBUG "Continue forward", CLREOL CASE %01 DEBUG "Spin Left", CLREOL CASE %10 DEBUG "Spin ...

Page 38

Page 28 · SumoBot – Mini Sumo Robotics The technique for converting the raw sensor reading to a bit value takes advantage of the {optional} comparison parameter with the LOOKDOWN function. Without the comparison parameter, LOOKDOWN uses equality to scan ...

Page 39

The movement logic is controlled by SELECT-CASE . The purpose of SELECT-CASE is to replace several IF-THEN commands that would examine the same control variable. So, the following code structure: SELECT lineBits CASE %00 DEBUG "Continue forward", CLREOL CASE %01 ...

Page 40

Page 30 · SumoBot – Mini Sumo Robotics Figure 3.4: Start LED Connections on the SumoBot PCB ' SumoBot_3.3_Simple_Mini_Sumo.BS2 ' {$STAMP BS2} ' {$PBASIC 2.5} ' -----[ I/O Definitions ]------------------------------------------------- LMotor PIN 13 RMotor PIN 12 LLinePwr PIN 10 LLineIn ...

Page 41

RStop CON 750 RRevSlow CON 800 RRevFast CON 1000 ' -----[ Variables ]------------------------------------------------------- lLine VAR Word rLine VAR Word lineBits VAR Nib lbLeft VAR lineBits.BIT1 lbRight VAR lineBits.BIT0 pulses VAR Byte temp VAR Byte ' -----[ EEPROM Data ]----------------------------------------------------- RunStatus ...

Page 42

Page 32 · SumoBot – Mini Sumo Robotics GOTO Main Spin_Right: FOR pulses = PULSOUT LMotor, LFwdFast PULSOUT RMotor, RRevFast PAUSE 20 NEXT GOTO Main About_Face: FOR pulses = PULSOUT LMotor, LRevFast PULSOUT RMotor, ...

Page 43

SumoBot in a competition without fumbling for the actual power switch. The code at Reset reads a byte from the BASIC Stamp's EEPROM; located at the address called RunStatus . When the program is first downloaded ...

Page 44

Page 34 · SumoBot – Mini Sumo Robotics CHALLENGE YOURSELF 1. Experiment with the Spin_Left and Spin_Right routines so that the SumoBot generally moves toward the center after touching the border. ...

Page 45

Chapter 4: Infrared Object Detection Today's hottest products seem to have one thing in common: wireless communication. Personal organizers beam data into desktop computers, and wireless remotes let us channel surf. With a few inexpensive and widely available parts, the ...

Page 46

Page 36 · SumoBot – Mini Sumo Robotics The IR detectors have built-in optical filters that allow very little light except the 980 nm infrared that we want to detect onto its internal photodiode sensor. The infrared detector also has ...

Page 47

INSTALLING AND TESTING THE IR EMITTERS/DETECTORS The SumoBot is specially designed to accommodate two IR emitter/detector pairs. Before we install them, we need to assemble the IR LEDs into their shells, then bend and trim the leads so that they ...

Page 48

Page 38 · SumoBot – Mini Sumo Robotics Figure 4.2: IR Detector Figure 4.3 is the schematic for the SumoBot robot’s IR object sensing. Build this circuit on your SumoBot. Note that the 220 Ω resistors are already built into ...

Page 49

Figure 4.4: SumoBot IR Object Detection Components Installed TESTING THE IR PAIRS The key to making each IR pair work is to send one millisecond of unfiltered 38.5 kHz FREQOUT harmonic followed immediately by testing the signal sent by the ...

Page 50

Page 40 · SumoBot – Mini Sumo Robotics ' -----[ Variables ]------------------------------------------------------- irBits VAR Nib irLeft VAR irBits.BIT1 irRight VAR irBits.BIT0 ' -----[ Program Code ]---------------------------------------------------- Main: DO FREQOUT LfIrOut, 1, 38500 irLeft = ~LfIrIn FREQOUT RtIrOut, 1, 38500 irRight ...

Page 51

SUMOBOT MOTION CONTROL The next task is to link the SumoBot robot’s ability to "see" with the motors so that an object – the opponent – can be tracked. demonstration of linking IR object control to the SumoBot motors. ' ...

Page 52

Page 42 · SumoBot – Mini Sumo Robotics Main: GOSUB Read_IR_Sensors BRANCH irBits, [Scan, Follow_Right, Follow_Left, Hold] Scan: BRANCH lastIR, [Move_Fwd, Scan_Right, Scan_Left, Move_Fwd] Move_Fwd: DEBUG HOME, "Forward", CLREOL GOTO Main Scan_Right: DEBUG HOME, "Scan Right", CLREOL PULSOUT LMotor, LFwdSlow ...

Page 53

END ' -----[ Subroutines ]----------------------------------------------------- Read_IR_Sensors: FREQOUT LfIrOut, 1, 38500 irLeft = ~LfIrIn FREQOUT RtIrOut, 1, 38500 irRight = ~RtIrIn RETURN HOW IT WORKS This program is functionally similar to the line detection program. The IR sensors are scanned and, ...

Page 54

...

Page 55

Chapter 5: Basic Competition Code Okay, it's time to get ready for competition. The program in this chapter brings all the SumoBot robot's systems together, and adds some intelligent control. Start by adding a piezo speaker as shown in Figures ...

Page 56

Page 46 · SumoBot – Mini Sumo Robotics ' SumoBot_5.1_Basic_Competition_Program.BS2 ' {$STAMP BS2} ' {$PBASIC 2.5} ' -----[ I/O Definitions ]------------------------------------------------- LMotor PIN 13 RMotor PIN 12 LLinePwr PIN 10 LLineIn PIN 9 RLinePwr PIN 7 RLineIn PIN 8 LfIrOut ...

Page 57

VAR Byte ' -----[ EEPROM Data ]----------------------------------------------------- RunStatus DATA $00 ' -----[ Initialization ]-------------------------------------------------- Reset: READ RunStatus, temp temp = ~temp WRITE RunStatus, temp IF (temp > 0) THEN END ' Sets black threshold to 1/4 the average of ...

Page 58

Page 48 · SumoBot – Mini Sumo Robotics NEXT lastIr = %00 GOTO Lunge Spin_Right: FOR pulses = PULSOUT LMotor, LFwdFast PULSOUT RMotor, RRevFast PAUSE 20 NEXT lastIr = %00 GOTO Lunge About_Face: FOR pulses = 1 ...

Page 59

GOTO Main Scan_Left: FOR pulses = PULSOUT LMotor, LRevSlow PULSOUT RMotor, RFwdSlow PAUSE 20 NEXT GOSUB Creep_Forward GOTO Main Follow_Right: PULSOUT LMotor, LFwdFast PULSOUT RMotor, RRevSlow lastIR = irBits GOTO Main Follow_Left: PULSOUT LMotor, LRevSlow PULSOUT RMotor, ...

Page 60

Page 50 · SumoBot – Mini Sumo Robotics DIRS = $0000 GOTO Reset ' -----[ Subroutines ]----------------------------------------------------- Read_Line_Sensors: HIGH LLinePwr HIGH RLinePwr HIGH LLineIn HIGH RLineIn PAUSE 1 RCTIME LLineIn, 1, lLine RCTIME RLineIn, 1, rLine LOW LLinePwr LOW RLinePwr ...

Page 61

The Start_Delay section serves the same purpose as described previously, it's just a bit fancier in this version of the program. In this case we've added a piezo speaker. At the start, the LED illuminates and then blinks to tick ...

Page 62

Page 52 · SumoBot – Mini Sumo Robotics into edge-avoidance and search mode. In this case the Judge will award the Yuko point and the SumoBot can be stopped by pressing the Reset button. FINAL COMPETITION NOTES The SumoBot – ...

Page 63

Appendix A: SumoBot Parts List All parts used in the SumoBot kit are available individually from the Parallax Component 4 Shop . If you can’t readily find the component you are looking for in the Component Shop enter the name ...

Page 64

... Page 54 · SumoBot – Mini Sumo Robotics 700-00015 Nylon washer Miscellaneous 122-27400 SumoBot Manual 800-00003 Serial (programming) cable 27000 Parallax CD 700-00064 Parallax Screwdriver ...

Page 65

Appendix B: Standard Mini-Sumo Competition Rules Reprinted with permission from Bill Harrison, Sine Robotics. Section 1: Definition of a Match Article 1 Definition The match shall be contested by two teams (At the event, one team consists of one robot ...

Page 66

Page 56 · SumoBot – Mini Sumo Robotics of IR light wide and 10cm long. 3. The Ring shall be marked by a white circular line of 2.5 cm thickness. The Ring is within the outside of this ...

Page 67

Futaba's, JR's, Sanwa's, or Kondo Kagaku's. 5. For stand-alone robots, any control mechanisms can be employed. 6. Stand-alone models must be so designed that a robot starts operating a minimum of five seconds after a start switch is pressed (or ...

Page 68

Page 58 · SumoBot – Mini Sumo Robotics extended by the Judges. 2. The team who wins two rounds or receives two "Yuko" points first, within the time limit, shall win the match. A team receives a Yuko point when ...

Page 69

Article 10 End of Match The match ends when the judge calls the winner. Both contestants bow after removing their robots. Section 6: Time of Match Article 11 Time of Match One Match will be contested for a total of ...

Page 70

Page 60 · SumoBot – Mini Sumo Robotics 2.1. Your opponent's robot has touched the space outside the Ring, on its own. 2.2. Either of the above takes place at the same time that the End of the Match is ...

Page 71

Article 16 The player utters insulting words to the opponent or to the judges or puts voice devices in a robot to utter insulting words or writes insulting words on the body of a robot, or any insulting action. Article ...

Page 72

Page 62 · SumoBot – Mini Sumo Robotics Section 10: Injuries and Accidents during the Match Article 21 Request to Stop the Match A player can request to stop the game when he/she is injured or his/her robot had an ...

Page 73

Section 12: Requirements for Identifications for Robots Article 27 Identifications for Robots Some type of name or number, to identify the robot (as registered in the contest) must be easily readable on the robot's body, while the robot is in ...

Page 74

...

Page 75

Appendix C: Mini-Sumo Ring If you're handy with tools, you can build your own Mini-Sumo ring. Many home improvement centers carry precut circles (wood, MDF, Melamine) that are very close to the official dimension and can be used to create ...

Page 76

...

Page 77

Appendix D: SumoBot PCB Schematic Appendix D: SumoBot PCB Schematic · Page 67 ...

Related keywords