Clarke CON850 Manual de usuario

Busca en linea o descarga Manual de usuario para Sierras circulares Clarke CON850. Applied Robotics with the SumoBot Text Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 266
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente

Indice de contenidos

Pagina 1 - SumoBot

Applied Robotics with the SumoBot Student Guide VERSION 1.0

Pagina 2 - ISBN 1-928982-34-4

Page vi · Applied Robotics with the SumoBot SPECIAL CONTRIBUTORS Parallax Inc. would like to recognize the Education Team members who made this book

Pagina 3 - INTERNET DISCUSSION LISTS

Page 96· Applied Robotics with the SumoBot Figure 3-8 Front Left and Right QTI Schematics Each QTI has four components mounted on its PCB, a 220 Ω

Pagina 4

Chapter 3: EEPROM Tricks and Program Tips · Page 97 The QRD1114 has an IRLED in it that shines IR light on the surface it's facing. Unlike the I

Pagina 5 - Table of Contents

Page 98· Applied Robotics with the SumoBot uses RCTIME to measure and store the time it took for V0 to decay to 1.4 V in a variable named temp: HIGH

Pagina 6

Chapter 3: EEPROM Tricks and Program Tips · Page 99 Figure 3-11 QTI RC-Decay for Different Surfaces If there is no surface to reflect IR from the QT

Pagina 7 - Preface

Page 100· Applied Robotics with the SumoBot Figure 3-12 White Tawara vs. Black Sumo Ring Surface Example Program - TestFrontQtiLineSensors.bs2

Pagina 8 - EDUCATOR RESOURCES

Chapter 3: EEPROM Tricks and Program Tips · Page 101 ' {$STAMP BS2} ' Target = BASIC Stamp 2 ' {$PBASIC 2

Pagina 9 - FOREIGN TRANSLATIONS

Page 102· Applied Robotics with the SumoBot Your Turn - Detecting Tilt What if the QTIs were to give you a unique signature when the SumoBot is tilte

Pagina 10 - SPECIAL CONTRIBUTORS

Chapter 3: EEPROM Tricks and Program Tips · Page 103 should measure the QTI readings for the black surface and use them as a basis for setting a thres

Pagina 11 - BEFORE YOU GET STARTED

Page 104· Applied Robotics with the SumoBot Figure 3-13 White Tawara vs. Black Sumo Ring Surface

Pagina 12 - Parts Required

Chapter 3: EEPROM Tricks and Program Tips · Page 105 ' {$STAMP BS2} ' Target = BASIC Stamp 2 ' {$PBASIC

Pagina 13 - Initial Adjustments

Chapter 1: Mechanical Adjustments · Page 7 Chapter #1: Mechanical Adjustments BEFORE YOU GET STARTED To complete the activities in this book, you wil

Pagina 14 - Testing Plow Adjustments

Page 106· Applied Robotics with the SumoBot DEBUG "Black" ENDIF PAUSE 100 ' Delay for slower

Pagina 15

Chapter 3: EEPROM Tricks and Program Tips · Page 107 √ Save and then run the modified program, starting with both QTIs over a black portion of the p

Pagina 16

Page 108· Applied Robotics with the SumoBot With some creative programming, you can actually check as many QTIs as you want, and it will only a frac

Pagina 17

Chapter 3: EEPROM Tricks and Program Tips · Page 109 The code block below takes less time than an RCTIME command would over a black surface. It start

Pagina 18 - PIN declarations:

Page 110· Applied Robotics with the SumoBot Figure 3-15 Pulse-Decay Trick Timing Accounting for Command Execution Times Figure 3-15 shows the id

Pagina 19

Chapter 3: EEPROM Tricks and Program Tips · Page 111 Example Program: QtiPulseTrickLeft.bs2 The QtiPulseTrickLeft.bs2 program verifies that this techn

Pagina 20 - Top Speed vs. Low Time

Page 112· Applied Robotics with the SumoBot Your Turn - Incorporating the Right QTI Here's the interesting part, you can add another QTI measure

Pagina 21

Chapter 3: EEPROM Tricks and Program Tips · Page 113 Incorporating the Pulse-Decay Trick into Another Program Here is how to incorporate the test code

Pagina 22

Page 114· Applied Robotics with the SumoBot Read_Line_Sensors: HIGH qtiPwrLeft ' Turn on QTIs HIGH qtiPwrRight HIGH

Pagina 23 - SumoBot better performance

Chapter 3: EEPROM Tricks and Program Tips · Page 115 ' -----[ I/O Definitions ]--------------------------------------------------- qtiPwrLeft

Pagina 24 - LowTime CON directive to 20

Page 8· Applied Robotics with the SumoBot its opponent. The less friction, the more easily the SumoBot slips, which means it can no longer push as h

Pagina 25

Page 116· Applied Robotics with the SumoBot LOOP ' -----[ Subroutine - Calibrate_Qtis ]---------------------------------------- Calibrate_Qti

Pagina 26

Chapter 3: EEPROM Tricks and Program Tips · Page 117 Your Turn - Active High vs. Active Low At present, the alert for the SumoBot encountering the whi

Pagina 27

Page 118· Applied Robotics with the SumoBot Figure 3-16 Sensors and Indicators Built on the Breadboard Building and Testing the Side-Mounted IR Obje

Pagina 28 - Unit Conversions

Chapter 3: EEPROM Tricks and Program Tips · Page 119 Figure 3-17 Side-mounted IR Object Detection Circuits Right Left Figure 3-18 Wiring Diagram

Pagina 29

Page 120· Applied Robotics with the SumoBot You will see that TestSideIrObjectDetectors.bs2 is just a modified version of TestFrontIrObjectDetectors.

Pagina 30 - Friction Forces

Chapter 3: EEPROM Tricks and Program Tips · Page 121 Example Program: TestSideIrObjectDetectors.bs2 ' -----[ Title ]-----------------------------

Pagina 31 - Figure 1-9

Page 122· Applied Robotics with the SumoBot Your Turn - Testing All Four Your SumoBot will eventually need to check and process information from all

Pagina 32 - Coefficients of Friction

Chapter 3: EEPROM Tricks and Program Tips · Page 123 √ Start by opening all of the following programs: o TestLedSpeaker.bs2 o TestPushButton.bs2 o

Pagina 33 - Materials µ

Page 124· Applied Robotics with the SumoBot has to be changed back to an input first. So, the Main Routine of TestPushButton.bs2 will not serve our

Pagina 34

Chapter 3: EEPROM Tricks and Program Tips · Page 125 qtiPwrLeft PIN 10 ' Left QTI on/off pin P10 qtiSigLeft PIN

Pagina 35 - Figure 1-11

Chapter 1: Mechanical Adjustments · Page 9 Setting up the SumoBot Competition Ring Poster The SumoBot robot and SumoBot Robot Competition Ring poster

Pagina 36 - Figure 1-12

Page 126· Applied Robotics with the SumoBot ' -----[ Main Routine ]------------------------------------------------------- DO

Pagina 37

Chapter 3: EEPROM Tricks and Program Tips · Page 127 HIGH qtiPwrLeft ' Turn on QTIs HIGH qtiPwrRight HIGH qtiSi

Pagina 38 - Parts and Equipment

Page 128· Applied Robotics with the SumoBot Your Turn - Cleaning up Names These variable declaration names have some room for improvement: irLS

Pagina 39 - Figure 1-13

Chapter 3: EEPROM Tricks and Program Tips · Page 129 √ Repeat by using this feature to change qtiStateLeft to qtiLF. √ Some of the comments may now

Pagina 40 - Figure 1-14

Page 130· Applied Robotics with the SumoBot irLS VAR sensors.BIT3 ' State of Left Side IR irLF VAR sensors.BIT2

Pagina 41

Chapter 3: EEPROM Tricks and Program Tips · Page 131 Figure 3-22 shows an example of how these modified routines display the contents of the sensors b

Pagina 42

Page 132· Applied Robotics with the SumoBot √ In order from BIT0 to BIT6, test the sensors in this order: infrared object detectors - right side, ri

Pagina 43

Chapter 3: EEPROM Tricks and Program Tips · Page 133 ' qtiThreshold VAR Word ' Stores black/white threshold temp VAR

Pagina 44

Page 134· Applied Robotics with the SumoBot RCTIME qtiSigLeft, 1, temp ' <--- New measure charge time LOW qtiPwrLeft

Pagina 45 - DATA directives that have

Chapter 3: EEPROM Tricks and Program Tips · Page 135 ' PULSOUT DummyPin, qtiThreshold ' Wait for threshold time PULSOUT DummyPin, te

Pagina 46

Page 10· Applied Robotics with the SumoBot Testing Plow Adjustments A simple program to make each SumoBot go forward should be used to test the plows

Pagina 47

Page 136· Applied Robotics with the SumoBot IrLedRS PIN 3 ' Right IR LED connected to P3 IrSenseRS PIN 0

Pagina 48 - DATA directive

Chapter 3: EEPROM Tricks and Program Tips · Page 137 DO ' DO...LOOP repeats indefinitely GOSUB Read

Pagina 49 - Figure 2-2 Memory Map

Page 138· Applied Robotics with the SumoBot WRITE QtiThresh, Word multi ' <--- New threshold to EEPROM RETURN ' --

Pagina 50 - RunStatus DATA @10, 0

Chapter 3: EEPROM Tricks and Program Tips · Page 139 INPUT pbSense pushbutton = pbSense ' Store state of pbSense RE

Pagina 51

Page 140· Applied Robotics with the SumoBot SUMMARY This chapter reviewed how the SumoBot's IR detectors work, then introduced basic IR detector

Pagina 52

Chapter 3: EEPROM Tricks and Program Tips · Page 141 11. What factors should you keep in mind when selecting a frequency for a given SumoBot ring? 12

Pagina 53 - .BIT0. The second

Page 142· Applied Robotics with the SumoBot Projects 1. Write a program that beeps at different notes to tell you which sensor it detects. 2. Place

Pagina 54 - .BIT2, and so on

Chapter 4: Navigation Tips · Page 143 Chapter #4: Navigation Tips Effectively using four object detectors and two QTI line sensors for SumoBot naviga

Pagina 55

Page 144· Applied Robotics with the SumoBot ACTIVITY #1: SERVO CONTROL WITH LOOKUP COMMANDS Since all the other subroutines in this book have utilize

Pagina 56

Chapter 4: Navigation Tips · Page 145 Figure 4-2 The Servo Control Loop The FOR...NEXT loop's EndValue is the number of 1/41 second increments

Pagina 57

Chapter 1: Mechanical Adjustments · Page 11 √ Repeat five to ten times to be sure which SumoBot's plow adjustment has the advantage. √ Adjust t

Pagina 58

Page 146· Applied Robotics with the SumoBot With some experimentation, you can also control the speed of the servos too. Note from Figure 4-3 that t

Pagina 59

Chapter 4: Navigation Tips · Page 147 ' Applied Robotics with the SumoBot - ServoControlExample.bs2 ' {$STAMP BS2} ' {$PBASIC 2.5} co

Pagina 60

Page 148· Applied Robotics with the SumoBot Your Turn - Using PIN Definitions and Constants Instead of the number 13 in the PULSOUT command's Pi

Pagina 61

Chapter 4: Navigation Tips · Page 149 Let's take a second look at that LOOKUP command from Chapter 2, Activity #4. If counter is 0, the LOOKUP c

Pagina 62

Page 150· Applied Robotics with the SumoBot √ Save the example program as LookupExampleYourTurn.bs2 √ Add these constant declarations with the CON

Pagina 63 - Parts List

Chapter 4: Navigation Tips · Page 151 The servo control subroutine will send pulse values to the servos. Constants for full speed counterclockwise (

Pagina 64 - LedSpeaker as an

Page 152· Applied Robotics with the SumoBot Example Program: ServoControlWithLookup.bs2 √ Enter and save ServoControlWithLookup.bs2 √ Move the 3-po

Pagina 65

Chapter 4: Navigation Tips · Page 153 NO_ROT CON 750 ' No rotation ' -----[ Variables ]----------------------

Pagina 66

Page 154· Applied Robotics with the SumoBot Your Turn Here is a wider variety of maneuver constants along with extra servo pulse width rotation const

Pagina 67 - Figure 2-6

Chapter 4: Navigation Tips · Page 155 √ Modify the Pulse_Servos subroutine to accommodate the rest of the maneuvers in the SumoBot maneuver constants

Pagina 68 - IF...THEN added to

Page 12· Applied Robotics with the SumoBot DEBUG "Main program running...", CR ' Display program status ' -----[ Main

Pagina 69 - Selecting the Mode

Page 156· Applied Robotics with the SumoBot motion and the opponent collides with it at that moment, it will be at a disadvantage. If the SumoBots a

Pagina 70 - ModeSelect, temp

Chapter 4: Navigation Tips · Page 157 Figure 4-6 Nearby Opponent Seen by one IR object detector, but not for long if curving is the only method em

Pagina 71

Page 158· Applied Robotics with the SumoBot way to ensure this is to keep a subroutine that's in charge of both sending pulses to the servos and

Pagina 72

Chapter 4: Navigation Tips · Page 159 You can test this next example program by positioning the SumoBot so that neither of its IR object detectors see

Pagina 73

Page 160· Applied Robotics with the SumoBot ' -----[ Title ]-------------------------------------------------------------- ' Applied Roboti

Pagina 74

Chapter 4: Navigation Tips · Page 161 temp VAR Word ' Temporary variable counter VAR Byte

Pagina 75

Page 162· Applied Robotics with the SumoBot RETURN ' -----[ Subroutine - Pulse_Servos ]------------------------------------------ Pulse_Ser

Pagina 76

Chapter 4: Navigation Tips · Page 163 ELSEIF irLF = 1 THEN ' Just left? DO UNTIL (irLF = 1 AND irRF = 1) OR counter &

Pagina 77

Page 164· Applied Robotics with the SumoBot GOSUB Servos_And_Sensors counter = counter + 1 LOOP ELSE

Pagina 78

Chapter 4: Navigation Tips · Page 165 Figure 4-8 Peripheral Vision for Opponent Detection Responding to an Object Detection on the Side This code f

Pagina 79

Chapter 1: Mechanical Adjustments · Page 13 an even number of times, including zero, the Reset_Button routine just displays the message prompting you

Pagina 80

Page 166· Applied Robotics with the SumoBot Example Program: FrontAndSideIrNavigation.bs2 The beauty in terminating the rotate loop as soon as one of

Pagina 81

Chapter 4: Navigation Tips · Page 167 IrLedLF PIN 4 ' Left IR LED connected to P4 IrSenseLF PIN 11

Pagina 82 - IR Object Detection

Page 168· Applied Robotics with the SumoBot IF irLF = 1 AND irRF = 1 THEN ' Both? maneuver = Forward &

Pagina 83

Chapter 4: Navigation Tips · Page 169 sensors = 0 ' Clear previous sensor values GOSUB Read_Object_Detectors

Pagina 84

Page 170· Applied Robotics with the SumoBot Your Turn - Limiting Rotation Unlike the front IR detectors, the loops for the side IR detectors do not

Pagina 85 - Testing the IR Detectors

Chapter 4: Navigation Tips · Page 171 state machines". However, the term "state machine" is commonly used to refer to finite state mac

Pagina 86 - Figure 3-3

Page 172· Applied Robotics with the SumoBot that state while pbSense = 1, and the other that transitions to LED off when pbSesnse = 0. State diagra

Pagina 87

Chapter 4: Navigation Tips · Page 173 Your Turn Figure 4-10 shows a modified version of the state machine diagram that involves a variable named count

Pagina 88

Page 174· Applied Robotics with the SumoBot LOOP ELSEIF irRF = 1 THEN ' Just right? counter = 0

Pagina 89 - FREQOUT commands, and

Chapter 4: Navigation Tips · Page 175 Figure 4-11 Hybrid State Machine Diagram √ Compare Figure 4-11 to the Main Routine from FrontIrNavigation.b

Pagina 90

Page 14· Applied Robotics with the SumoBot Figure 1-4 SumoBot Servo Connections The instructions that make the SumoBot move forward starts with thes

Pagina 91

Page 176· Applied Robotics with the SumoBot Your Turn - Drawing a State Machine Diagram √ Try drawing a hybrid state machine diagram for the Main Ro

Pagina 92 - Ensuring Continuity

Chapter 4: Navigation Tips · Page 177 ' -----[ Main Routine ]------------------------------------------------------- DO IF qtiLF = 1 THEN

Pagina 93

Page 178· Applied Robotics with the SumoBot FOR counter = 1 TO 12 ' Look right maneuver = RotateRight GOSUB S

Pagina 94 - FREQOUT command's

Chapter 4: Navigation Tips · Page 179 √ Press and hold the Reset button until you place it on the ring as shown in Figure 4-12. √ Let go of the Rese

Pagina 95 - White wall at 0.85 m

Page 180· Applied Robotics with the SumoBot DummyPin PIN 6 ' I/O pin for pulse-decay P6 ' -----[ Constants

Pagina 96

Chapter 4: Navigation Tips · Page 181 maneuver = Backward ' Back up GOSUB Servos_And_Sensors NEXT FOR coun

Pagina 97

Page 182· Applied Robotics with the SumoBot LOW qtiPwrLeft ' Turn left QTI off multi = temp

Pagina 98

Chapter 4: Navigation Tips · Page 183 ' Pause between pulses (remove when using IR object detectors + QTIs). PAUSE 20 RETURN ' ----

Pagina 99 - Testing the QTI Line Sensors

Page 184· Applied Robotics with the SumoBot Figure 4-13 Sample SumoBot Search Pattern This one is different because the SumoBot looks around bef

Pagina 100 - Figure 3-9

Chapter 4: Navigation Tips · Page 185 √ Add the GOTO Look_About command to the end of the Initialization routine. ' -----[ Initialization ]----

Pagina 101 - Figure 3-10

Chapter 1: Mechanical Adjustments · Page 15 Figure 1-5 Other Collision Paths One SumoBot can approach at an angle, or even with a curved

Pagina 102

Page 186· Applied Robotics with the SumoBot ACTIVITY #6: FULLY FUNCTIONAL SUMO EXAMPLE PROGRAMS This activity features two fully functional SumoBot e

Pagina 103 - RCTIME measurement. Keep

Chapter 4: Navigation Tips · Page 187 ' -----[ Title ]-------------------------------------------------------------- ' Applied Robotics with

Pagina 104

Page 188· Applied Robotics with the SumoBot FS_CW CON 650 ' Full speed clockwise NO_ROT CON 750

Pagina 105

Chapter 4: Navigation Tips · Page 189 NEXT ELSEIF qtiRF = 1 THEN ' Right QTI sees line? FOR counter = 1 TO 15

Pagina 106 - QTI Self Calibration Code

Page 190· Applied Robotics with the SumoBot IF sensors <> 0 THEN GOTO Next_State NEXT Look_About: &a

Pagina 107

Chapter 4: Navigation Tips · Page 191 ' -----[ Subroutine - Calibrate_Qtis ]---------------------------------------- Calibrate_Qtis: HIGH qt

Pagina 108

Page 192· Applied Robotics with the SumoBot ' Pulse to left servo LOOKUP maneuver, [ FS_CCW, FS_CW, FS_CW, FS_CCW, NO_

Pagina 109

Chapter 4: Navigation Tips · Page 193 qtiLF = ~qtiSigLeft ' Snapshot of QTI signal states qtiRF = ~qtiSigRight LOW

Pagina 110

Page 194· Applied Robotics with the SumoBot maneuver = Backward GOSUB Servos_And_Sensors NEXT FOR counter = 1 TO 15

Pagina 111

Chapter 4: Navigation Tips · Page 195 closely matches the conditions for your competition ring, taking into account nearby objects, whether or not the

Pagina 112 - The Pulse-Decay Trick

WARRANTY Parallax Inc. warrants its products against defects in materials and workmanship for a period of 90 days from receipt of product. If you d

Pagina 113

Page 16· Applied Robotics with the SumoBot A notebook for your observations - keep notes on the various results you observe for developing wrestling

Pagina 114 - Pulse-Decay Trick Timing

Page 196· Applied Robotics with the SumoBot IrSenseRS PIN 0 ' Right IR detector to P0 ' -----[ Constants ]---

Pagina 115

Chapter 4: Navigation Tips · Page 197 GOSUB Reset ' Wait for Reset press/release GOSUB Start_Delay

Pagina 116 - DO...LOOP:

Page 198· Applied Robotics with the SumoBot FOR counter = 1 TO 5 ' 5 beeps, 1/second PAUSE 900 FREQOUT LedSpeak

Pagina 117

Chapter 4: Navigation Tips · Page 199 GOSUB Read_Line_Sensors ' Look for lines RETURN ' -----[ Subroutine - Pulse_S

Pagina 118

Page 200· Applied Robotics with the SumoBot READ QtiThresh, Word temp ' Get threshold time INPUT qtiSigLeft

Pagina 119

Chapter 4: Navigation Tips · Page 201 RETURN ' -----[ Subroutine - Track_Front_Left_Object ]------------------------------- Track_Front_Left

Pagina 120

Page 202· Applied Robotics with the SumoBot Track_Side_Right_Object: DO UNTIL irRF = 1 OR irLF = 1 ' Rotate right maneuver

Pagina 121

Chapter 4: Navigation Tips · Page 203 SUMMARY This chapter introduced a technique that uses the LOOKUP command for adapting servo control to use with

Pagina 122

Page 204· Applied Robotics with the SumoBot 9. What combination of PULSOUT commands does it take to make the SumoBot execute a pivot-right turn? 10.

Pagina 123 - Right Left

Chapter 4: Navigation Tips · Page 205 Projects 1. Hold some sumo matches, and make sure to draw cards from the list in Figure 4-7 between each round.

Pagina 124 - Figure 3-19

Chapter 1: Mechanical Adjustments · Page 17 Figure 1-6 Top Speed vs. Low Time As mentioned earlier, taking too much time between pulses to check sens

Pagina 125

Page 206· Applied Robotics with the SumoBot

Pagina 126 - Combining Programs

Chapter 5: Debugging and Datalogging · Page 207 Chapter #5: Debugging and Datalogging If the SumoBot exhibits a problem behavior in the ring, figurin

Pagina 127

Page 208· Applied Robotics with the SumoBot Slow motion debugging leaves out one crucial element: the actual conditions the SumoBot experiences durin

Pagina 128 - Calibrate_Qtis

Chapter 5: Debugging and Datalogging · Page 209 Before testing each of these questions, it's important to make a disposable copy of the SumoWrest

Pagina 129

Page 210· Applied Robotics with the SumoBot √ Try it in the practice ring with the 3-position power switch set to 2. √ Start your test SumoBot wi

Pagina 130

Chapter 5: Debugging and Datalogging · Page 211 GOSUB Servos_And_Sensors LOOP LOW LedSpeaker ' <--- Add

Pagina 131

Page 212· Applied Robotics with the SumoBot √ Modify the main routine so that this bug is incorporated. ELSEIF irLS = 1 THEN

Pagina 132 - Figure 3-21

Chapter 5: Debugging and Datalogging · Page 213 itself that you have declared two symbols, LED_MODE, which has been set equal to one, and DEBUG_MODE,

Pagina 133 - sensors, irRS can be

Page 214· Applied Robotics with the SumoBot #SELECT DEBUG_MODE #CASE 0 DEBUG "DEBUG_MODE is zero." #CASE 1 DEBUG "DEBUG_M

Pagina 134

Chapter 5: Debugging and Datalogging · Page 215 √ Enter, save, and run Compiler directives.bs2 and check the program's behavior against your pre

Pagina 135 - Figure 3-22

Page 18· Applied Robotics with the SumoBot With a couple modifications to Forward100Pulses.bs2 from Activity #1, you'll be ready to go. √ Save

Pagina 136

Page 216· Applied Robotics with the SumoBot DO DEBUG CRSRX, 0, ? counter counter = counter + 1 #IF LED_MODE = 1 #THEN DEBUG "LED st

Pagina 137

Chapter 5: Debugging and Datalogging · Page 217 performs. This kind of tool can be really helpful for isolating both program and circuit bugs. One i

Pagina 138

Page 218· Applied Robotics with the SumoBot ' -----[ Variables ]---------------------------------------------------------- . . . #IF D

Pagina 139

Chapter 5: Debugging and Datalogging · Page 219 . . ' -----[ Subroutine - Avoid_Tawara_Right ]------------------------------------ Avoid_T

Pagina 140

Page 220· Applied Robotics with the SumoBot ENDSELECT DEBUG CRSRX, 20 ' Cursor to column 20 SELECT maneuv

Pagina 141

Chapter 5: Debugging and Datalogging · Page 221 right sides (irLS and irRS) do not detect objects, because they store 0s. The same applies to the lef

Pagina 142

Page 222· Applied Robotics with the SumoBot In the first row, none of the sensors see anything, the state is search pattern (SP), and the SumoBot is

Pagina 143 - Your Turn - Program Cleanup

Chapter 5: Debugging and Datalogging · Page 223 ServoLeft PIN 13 ' Left servo connected to P13 ServoRight PIN

Pagina 144 - SUMMARY

Page 224· Applied Robotics with the SumoBot ' State constants. ATL CON 0 ' Avoid_Tawara_Left ATR

Pagina 145 - Exercises

Chapter 5: Debugging and Datalogging · Page 225 ' -----[ Main Routine ]------------------------------------------------------- DO IF qtiLF =

Pagina 146 - Projects

Chapter 1: Mechanical Adjustments · Page 19 √ Compare the results of the two trials and determine which program gives the SumoBot better performance.

Pagina 147 - Chapter #4: Navigation Tips

Page 226· Applied Robotics with the SumoBot RETURN ' -----[ Subroutine - Calibrate_Qtis ]---------------------------------------- Calibrate

Pagina 148 - Servo Control Review

Chapter 5: Debugging and Datalogging · Page 227 RETURN ' -----[ Subroutine - Pulse_Servos ]------------------------------------------ Pulse_

Pagina 149

Page 228· Applied Robotics with the SumoBot INPUT qtiSigLeft ' Start the decays INPUT qtiSigRight PULSOUT Dumm

Pagina 150 - Rotational Velocity, RPM

Chapter 5: Debugging and Datalogging · Page 229 #IF DEBUG_MODE = 1 #THEN state = GF #ENDIF maneuver = Forward ' 1 f

Pagina 151

Page 230· Applied Robotics with the SumoBot #IF DEBUG_MODE = 1 #THEN state = TSLO #ENDIF DO UNTIL irRF = 1 OR irLF = 1 ' Rota

Pagina 152 - LOOKUP Command Review

Chapter 5: Debugging and Datalogging · Page 231 GOSUB Servos_And_Sensors IF sensors <> 0 THEN GOTO Next_State NEXT Next_State:

Pagina 153 - Your Turn

Page 232· Applied Robotics with the SumoBot ENDSELECT DEBUG CR ' Carriage return for next line PAU

Pagina 154

Chapter 5: Debugging and Datalogging · Page 233 √ Click Run -> Memory map again and compare how much EEPROM is used by the code that was added for

Pagina 155

Page 234· Applied Robotics with the SumoBot #IF DEBUG_MODE = 1 OR DATALOG_MODE > 0 #THEN ' State constants. ATL CON 0

Pagina 156

Chapter 5: Debugging and Datalogging · Page 235 Figure 5-4 Memory Map The highest EEPROM address not occupied by PBASIC program code is $257. An

Pagina 157

Page 20· Applied Robotics with the SumoBot LOOP DEBUG "Press/release reset", CR, ' User instructions "twice to

Pagina 158

Page 236· Applied Robotics with the SumoBot because we do not want to overwrite all the recorded records from the round the SumoBot just finished bef

Pagina 159 - Figure 4-4

Chapter 5: Debugging and Datalogging · Page 237 ' -----[ Subroutine - Servos_And_Sensors ]------------------------------------ Servos_And_Sensor

Pagina 160 - Seen by only one IR

Page 238· Applied Robotics with the SumoBot #IF DATALOG_MODE = 2 #THEN Playback_Round: FOR logIndex = 0 TO MaxBytes STEP 2 ' Loop

Pagina 161 - Seen by one IR

Chapter 5: Debugging and Datalogging · Page 239 To display all the datalogged values when DATALOG_MODE = 2, the same Display_All subroutine from the p

Pagina 162

Page 240· Applied Robotics with the SumoBot √ The SumoBot will log data as it competes for just under 10 seconds, then it stops. √ After the Sumo

Pagina 163

Chapter 5: Debugging and Datalogging · Page 241 qtiPwrLeft PIN 10 ' Left QTI on/off pin P10 qtiSigLeft PIN 9

Pagina 164

Page 242· Applied Robotics with the SumoBot GF CON 2 ' Go-Forward TFLO CON 3

Pagina 165

Chapter 5: Debugging and Datalogging · Page 243 #ENDIF ' -----[ Initialization ]----------------------------------------------------- GOSUB Res

Pagina 166

Page 244· Applied Robotics with the SumoBot sensors = temp.HIGHBYTE ' state = temp.NIB1 maneuver = temp.NIB0

Pagina 167

Chapter 5: Debugging and Datalogging · Page 245 multi = temp ' Free temp for another RCTIME HIGH qtiPwrRight

Pagina 168

Chapter 1: Mechanical Adjustments · Page 21 The distance traveled will not be exactly the same because the servos don't turn as fast with 40 ms p

Pagina 169

Page 246· Applied Robotics with the SumoBot Pulse_Servos: ' Pulse to left servo LOOKUP maneuver, [ FS_CCW, FS_CW, FS_CW, FS_CCW,

Pagina 170 - IrFreq CON directive that

Chapter 5: Debugging and Datalogging · Page 247 qtiLF = ~qtiSigLeft ' Snapshot of QTI signal states qtiRF = ~qtiSigRi

Pagina 171

Page 248· Applied Robotics with the SumoBot RETURN ' -----[ Subroutine - Track_Front_Left_Object ]------------------------------- Track_Fro

Pagina 172

Chapter 5: Debugging and Datalogging · Page 249 GOSUB Servos_And_Sensors LOOP RETURN ' -----[ Subroutine - Track_Side_Right_Object ]---

Pagina 173

Page 250· Applied Robotics with the SumoBot RETURN ' -----[ Subroutine - Display_All ]------------------------------------------- #IF DEBUG

Pagina 174

Chapter 5: Debugging and Datalogging · Page 251 PAUSE 200 ' Pause 0.2 seconds for reading #ELSE PAUS

Pagina 175 - Figure 4-9

Page 252· Applied Robotics with the SumoBot Displaying the sensors variable can help for quick trouble-shooting between rounds. The LCD Terminal App

Pagina 176

Chapter 5: Debugging and Datalogging · Page 253 SUMMARY This chapter introduced three techniques to help find the cause(s) of SumoBot problem behavior

Pagina 177

Page 254· Applied Robotics with the SumoBot 4. Modify SumoWrestlerWithDebugMode.bs2 so that it displays numbers next to each record. Projects 1. De

Pagina 178

Appendix A: System Requirements and Parts Listing · Page 255 Appendix A: System Requirements and Parts Listing System and Software Requirements • PC

Pagina 179

Page 22· Applied Robotics with the SumoBot √ Run the modified program. √ Repeat the 10 second measurement and record the servo speed. √ Keep incre

Pagina 180 - IF qtiLF..., ELSIF

Page 256· Applied Robotics with the SumoBot Table A-1: SumoBot Robot Competition Kit (#27402) Parts and quantities subject to change without notice

Pagina 181

Appendix A: System Requirements and Parts Listing · Page 257 Table A-2: For SumoBot Robots purchased separately Parts and quantities subject to change

Pagina 182 - Figure 4-12

Page 258· Applied Robotics with the SumoBot

Pagina 183

Index - # - #. See conditional compile directives - $ - $. See hexadecimal, See compiler directives - . - .BIT operato

Pagina 184

friction force, 31 friction forces, 26 frictional force diagram, 29 - G - gram, 23 gravity, 24 Guarantee, 2 - H - hardware requir

Pagina 185

programs CompilerDirectives.bs2, 214 Forward100Pulses.bs2, 11 ForwardLowTimeTest.bs2, 18 FrontAndSideIrNavigation.bs2, 166 FrontIrNavigation.bs2, 159

Pagina 186

Scientific Method, 208 SELECT...CASE, 66 self calibrating QTI sensors, 102 sensor flags, 143 servo connections, 13 servo control, 145 servo rotationa

Pagina 187

Chapter 1: Mechanical Adjustments · Page 23 Scales that show both ounces and grams are not uncommon, likewise with scales that show both kilograms and

Pagina 188 - Figure 4-13

Page 24· Applied Robotics with the SumoBot Since weight is a force, and gravity is a form of acceleration, an equation you will find useful in your

Pagina 189 - Figure 4-14

Chapter 1: Mechanical Adjustments · Page 25 If you measure an object's mass to be a certain number of grams, converting to kilograms is a matter

Pagina 190

DISCLAIMER OF LIABILITY Parallax Inc. is not responsible for special, incidental, or consequential damages resulting from any breach of warranty, or

Pagina 191

Page 26· Applied Robotics with the SumoBot These unit conversions take some practice; here are some tips: √ Find the equality with your desired r

Pagina 192

Chapter 1: Mechanical Adjustments · Page 27 Figure 1-8 also shows a close-up of the contact surfaces, where little components of the force you apply

Pagina 193

Page 28· Applied Robotics with the SumoBot WN0WN0Fy==−=∑ N = W indicates that the normal force, N, is pushing back just as hard as the object&

Pagina 194

Chapter 1: Mechanical Adjustments · Page 29 To appreciate how different the coefficients of friction can be for different pairs of materials, take a l

Pagina 195

Page 30· Applied Robotics with the SumoBot Figure 1-10 Friction vs. Applied Forces Another Strategy Consideration Figure 1-9 shows that the Sumo

Pagina 196

Chapter 1: Mechanical Adjustments · Page 31 Coefficients of friction do not have units. A friction force is always equal to the coefficient of frict

Pagina 197 - RETURN command

Page 32· Applied Robotics with the SumoBot Figure 1-12 Individual Free Body Diagrams Since we already know that T = T1, we now know that T = W1.

Pagina 198

Chapter 1: Mechanical Adjustments · Page 33 Next, convert to the corresponding units of force (newtons): N86.6s/m8.9kg7.0fN58.20s/m8.9kg1.2NmgW2

Pagina 199

Page 34· Applied Robotics with the SumoBot Problem: The coefficient of static friction for two surfaces is 0.1 (pretty slippery). How much force wil

Pagina 200

Chapter 1: Mechanical Adjustments · Page 35 Don't worry if you don't happen to have a gram scale or pulley and attachment. Thanks to the po

Pagina 202

Page 36· Applied Robotics with the SumoBot Figure 1-14 Friction Force Test When you have constructed this setup, follow these steps. √ Draw free

Pagina 203

Chapter 1: Mechanical Adjustments · Page 37 √ Use your weights and the equations introduced in this activity to calculate the coefficients of static

Pagina 204

Page 38· Applied Robotics with the SumoBot SUMMARY This chapter introduced a variety of mechanical adjustments you can make to the SumoBot. Adjustin

Pagina 205

Chapter 1: Mechanical Adjustments · Page 39 10. What's the British Engineering unit of mass? 11. How does force relate to mass and acceleration

Pagina 206

Page 40· Applied Robotics with the SumoBot 13. It takes 70 lbs of force to start a 100 lb object sliding along a level surface. Calculate the coeff

Pagina 207

Chapter 2: EEPROM Tricks and Program Tips · Page 41 Chapter #2: EEPROM Tricks and Program Tips The BASIC Stamp's EEPROM is a great tool for stor

Pagina 208

Page 42· Applied Robotics with the SumoBot As the SumoBot programs get larger and more complex, both good EEPROM management and strict adherence to

Pagina 209

Chapter 2: EEPROM Tricks and Program Tips · Page 43 Figure 2-1 shows what the DATA directives will store in the EEPROM bytes with addresses 0 to 31.

Pagina 210

Page 44· Applied Robotics with the SumoBot EEPROM stands for Electrically Erasable Reprogrammable Read Only Memory. EEPROM memory is nonvolatile. T

Pagina 211 - Author's Note

Chapter 2: EEPROM Tricks and Program Tips · Page 45 READ RunStatus, temp DEBUG DEC temp, CR DEBUG "Address of UndefData...", DEC Undef

Pagina 212 - LED Bug Testing Examples

Table of Contents · Page i Table of Contents Preface...

Pagina 213 - Testing for a Cleared Bit

Page 46· Applied Robotics with the SumoBot the right by 161 = 16, then the third digit from the right by 162 = 256, and so on. Add up all the produc

Pagina 214

Chapter 2: EEPROM Tricks and Program Tips · Page 47 √ Modify the RunStatus DATA directive like this: RunStatus DATA @10, Word 500 √ Modify the com

Pagina 215

Page 48· Applied Robotics with the SumoBot READ EepromCounter, temp To make the program count the number of consecutive resets, simply add 1 to the

Pagina 216 - Compiler Directives

Chapter 2: EEPROM Tricks and Program Tips · Page 49 temp = temp + 1 WRITE EepromCounter, temp temp = temp - 1 IF temp = 0 THEN DEBUG "Since

Pagina 217

Page 50· Applied Robotics with the SumoBot binary value from the right is accessed with .BIT1; the third binary value is accessed with .BIT2, and so

Pagina 218

Chapter 2: EEPROM Tricks and Program Tips · Page 51 Figure 2-3 Debug Terminal Transmit and Receive Windowpanes Illustrating Many Jobs with a Few Vari

Pagina 219 - DEBUG_MODE equal to

Page 52· Applied Robotics with the SumoBot DEBUG CR, "Enter up to 20 values", CR, "between 100 and 1000", CR, &

Pagina 220

Chapter 2: EEPROM Tricks and Program Tips · Page 53 DEBUG CRSRX, 0, DEC5 temp, CRSRX, 12 IF temp > compare THEN DEBUG "greater t

Pagina 221

Page 54· Applied Robotics with the SumoBot ' Get values and store them to EEPROM DEBUG CR, "Enter up to 20 values", CR, &

Pagina 222 - DEBUG_MODE = 1

Chapter 2: EEPROM Tricks and Program Tips · Page 55 LOOP ENDIF DEBUG CR, "All done!" END ACTIVITY #3: PROGRAM ON/OFF WITH RESET It&apo

Pagina 223

Page ii · Applied Robotics with the SumoBot ACTIVITY #3: Using Peripheral Vision...16

Pagina 224 - Six of the eight bits

Page 56· Applied Robotics with the SumoBot temp is even, it displays "Program running..." and returns the program to initialization and onw

Pagina 225

Chapter 2: EEPROM Tricks and Program Tips · Page 57 continues to the rest of the program. As you keep pressing the Reset button, the odd/even pattern

Pagina 226

Page 58· Applied Robotics with the SumoBot END ' -----[ Subroutine - Reset ]------------------------------------------------- Reset: READ

Pagina 227

Chapter 2: EEPROM Tricks and Program Tips · Page 59 Building and Testing the LED and Piezospeaker Circuits The LED and piezospeaker circuit shown in F

Pagina 228

Page 60· Applied Robotics with the SumoBot LedSpeaker PIN 5 After declaring this PIN directive, the name LedSpeaker can be used as either an input

Pagina 229

Chapter 2: EEPROM Tricks and Program Tips · Page 61 FOR counter = 1 TO 30 ' Flash LED on/off 15 times TOGGLE LedSpeaker

Pagina 230

Page 62· Applied Robotics with the SumoBot Parts List (1) Jumper wire (1) LED - red (1) 1 Resistor - 470 Ω (yellow-violet-brown) (1) 1 Resistor - 10

Pagina 231

Chapter 2: EEPROM Tricks and Program Tips · Page 63 Figure 2-6 Debug Terminal Displaying the State of pbSense Zeros repeat every 1/10 second while

Pagina 232

Page 64· Applied Robotics with the SumoBot pbSense PIN 6 ' Pushbutton connected to P6 ' -----[ Initializati

Pagina 233

Chapter 2: EEPROM Tricks and Program Tips · Page 65 ACTIVITY #5: PUSHBUTTON PROGRAM MODE SELECTION In some competitions, changing strategy between sum

Pagina 234

Preface · Page iii Preface INTRODUCTION Robotics is currently enjoying ever increasing popularity with students. Especially when it involves a conte

Pagina 235

Page 66· Applied Robotics with the SumoBot has still not been released, the outer loop repeats again, the inner loop beeps three times, and so on. &

Pagina 236

Chapter 2: EEPROM Tricks and Program Tips · Page 67 CASE 1 DEBUG "one" CASE 2 DEBUG "two" CASE 3

Pagina 237

Page 68· Applied Robotics with the SumoBot ' -----[ EEPROM Data ]-------------------------------------------------------- ModeSelect DATA

Pagina 238

Chapter 2: EEPROM Tricks and Program Tips · Page 69 NEXT PAUSE 1000 ' 1 second between beeps IF pbSense

Pagina 239 - Figure 5-4

Page 70· Applied Robotics with the SumoBot One of the most important ingredients of modular programs is keeping the same naming conventions for varia

Pagina 240 - Figure 5-5

Chapter 2: EEPROM Tricks and Program Tips · Page 71 While all the steps up to this point were purely mechanical, the Initialization section will take

Pagina 241

Page 72· Applied Robotics with the SumoBot ' -----[ I/O Definitions ]---------------------------------------------------- LedSpeaker PIN

Pagina 242 - . This

Chapter 2: EEPROM Tricks and Program Tips · Page 73 DEBUG "five" ENDSELECT ENDIF ResetTest: DEBUG CR, "Done!"

Pagina 243

Page 74· Applied Robotics with the SumoBot PAUSE 100 FREQOUT LedSpeaker, 100, 4000 NEXT PAUSE 1000

Pagina 244

Chapter 2: EEPROM Tricks and Program Tips · Page 75 SUMMARY This chapter introduced a variety of EEPROM and program management techniques. EEPROM man

Pagina 245

Page iv · Applied Robotics with the SumoBot EDUCATOR RESOURCES While the SumoBot Competition kit is designed for the classroom, it really provides an

Pagina 246

Page 76· Applied Robotics with the SumoBot 9. What is the decimal number for hexadecimal-E? 10. What PBASIC operator allows you to examine individu

Pagina 247

Chapter 3: EEPROM Tricks and Program Tips · Page 77 Chapter #3: Sensor Management The SumoBot's sensors are critical components to its performan

Pagina 248

Page 78· Applied Robotics with the SumoBot ACTIVITY #1: TESTING AND TUNING INFRARED OBJECT DETECTORS Figure 3-1 shows the SumoBot and the locations o

Pagina 249

Chapter 3: EEPROM Tricks and Program Tips · Page 79 to the header. The right column shows the components that you plugged into the header, the IR rec

Pagina 250

Page 80· Applied Robotics with the SumoBot If the IR receiver is sending 5 V to P11, it means it doesn't see any reflected infrared. If this is

Pagina 251

Chapter 3: EEPROM Tricks and Program Tips · Page 81 The IR receivers are active-low, meaning they send a low signal to signify the active condition (I

Pagina 252

Page 82· Applied Robotics with the SumoBot Figure 3-3 Opponent Detected at Front-Right Example Program - TestFRontIrObjectDetectors.bs2 √ Enter,

Pagina 253

Chapter 3: EEPROM Tricks and Program Tips · Page 83 ' -----[ Title ]-------------------------------------------------------------- ' Applied

Pagina 254

Page 84· Applied Robotics with the SumoBot Your Turn - Headlight Adjustments A small change in the direction the SumoBot's IR LEDs are pointing

Pagina 255

Chapter 3: EEPROM Tricks and Program Tips · Page 85 Testing for Sources of IR Interference Fluorescent lights have a part called a ballast built into

Pagina 256

Preface · Page v “Applied Sensors”, Student Guide, Version 1.3, Parallax Inc., 2003 “Basic Analog and Digital”, Student Guide, Version 1.3, Parallax

Pagina 257

Page 86· Applied Robotics with the SumoBot ' -----[ Main Routine ]------------------------------------------------ DO

Pagina 258

Chapter 3: EEPROM Tricks and Program Tips · Page 87 Always test for and eliminate sources of IR interference near your SumoBot Competition Ring. &a

Pagina 259 - Listing

Page 88· Applied Robotics with the SumoBot Testing for Electrical Continuity The leads on the IR LEDs and receivers tend to be thinner than jumper wi

Pagina 260

Chapter 3: EEPROM Tricks and Program Tips · Page 89 other parts can be clipped into small segments and inserted into very loose-fitting X8 and X9 sock

Pagina 261 - Additional Items

Page 90· Applied Robotics with the SumoBot Figure 3-5 Opponent vs. Distraction If your SumoBot has a tendency to get distracted by nearby object

Pagina 262

Chapter 3: EEPROM Tricks and Program Tips · Page 91 and at each frequency, the Debug Terminal displays a "yes" if the IR receiver detected a

Pagina 263

Page 92· Applied Robotics with the SumoBot The next example program is another modified version of TestIrFrontObjectDetectors.bs2. The IrFreq const

Pagina 264

Chapter 3: EEPROM Tricks and Program Tips · Page 93 √ If zero "yes" readings appear, move the SumoBot 5 cm closer to the wall. If several

Pagina 265 - - S

Page 94· Applied Robotics with the SumoBot ' -----[ Initialization ]----------------------------------------------------- DEBUG CLS, "FRO

Pagina 266

Chapter 3: EEPROM Tricks and Program Tips · Page 95 √ Modify TestIrFrontObjecDetectors.bs2 so that it has 3 or 4 useful versions of the IrFreq CON di

Comentarios a estos manuales

Sin comentarios