A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1....

79
A GUIDE TO YOUR 2003 OCCRA ROBOTICS KIT TABLE OF CONTENTS I. INTRODUCTION……………………………………………………………………………………………………………………………2 II. THE SCIENTIFIC BASIS OF YOUR ROBOT…………………………………………………………………3 1. BACKGROUND ELECTRICAL TERMS AND CONCEPTS…………………………………………4 2. BACKGROUND PNEUMATIC TERMS AND CONCEPTS……………………………………………6 3. OVERCURRENT PROTECTION…………………………………………………………………………………………8 4. MOTORS…………………………………………………………………………………………………………………………………12 5. MECHANICAL ADVANTAGE……………………………………………………………………………………………15 III. CONTROL PANEL………………………………………………………………………………………………………………………17 IV. OPERATOR INTERFACE…………………………………………………………………………………………………………19 V. RADIO MODEM……………………………………………………………………………………………………………………………21 VI. ROBOT CONTROLLER………………………………………………………………………………………………………………23 VII. RELAY MODULES………………………………………………………………………………………………………………………24 VIII. SPEED CONTROLLERS……………………………………………………………………………………………………………26 IX. KIT MOTORS………………………………………………………………………………………………………………………………29 1. VALEO/Denso WIPER……………………………………………………………………………………………………30 2. KEYANG ……………………………………………………………………………………………………………………………31 Split-tapered bushings ……………………………………………………………………………32 3. BOSCH……………………………………………………………………………………………………………………………………33 4. ACTUATORS…………………………………………………………………………………………………………………………34 5. GM TRUCK……………………………………………………………………………………………………………………………35 X. PNEUMATICS………………………………………………………………………………………………………………………………35 1. INTRODUCTION…………………………………………………………………………………………………………………35 2. OVERVIEW……………………………………………………………………………………………………………………………36 3. THE COMPRESSOR……………………………………………………………………………………………………………37 4. THE ACCUMULATOR TANK……………………………………………………………………………………………39 5. THE PRESSURE SWITCH………………………………………………………………………………………………40 6. THE REGULATOR………………………………………………………………………………………………………………40 7. DIRECTIONAL CONTROL VALVES……………………………………………………………………………41 8. FLOW CONTROL VALVES………………………………………………………………………………………………42 9. PNEUMATIC LIMIT SWITCHES…………………………………………………………………………………43 10 PNEUMATIC ACTUATORS………………………………………………………………………………………………43 11.COMPRESSOR RELAY………………………………………………………………………………………………………44 XI. LIMIT SWITCHES…………………………………………………………………………………………………………………45 XII. POTENTIOMETERS……………………………………………………………………………………………………………………46 XIII. PROGRAMMING……………………………………………………………………………………………………………………………46 XIV. LIGHTS…………………………………………………………………………………………………………………………………………47 XV. CONCLUDING THOUGHTS………………………………………………………………………………………………………47 APPENDIX I. MOTOR COMPARISON GUIDE…………………………………………………………………49 1

Transcript of A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1....

Page 1: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

A GUIDE TO YOUR 2003OCCRA ROBOTICS KIT

TABLE OF CONTENTS

I. INTRODUCTION……………………………………………………………………………………………………………………………2II. THE SCIENTIFIC BASIS OF YOUR ROBOT…………………………………………………………………3

1. BACKGROUND ELECTRICAL TERMS AND CONCEPTS…………………………………………42. BACKGROUND PNEUMATIC TERMS AND CONCEPTS……………………………………………63. OVERCURRENT PROTECTION…………………………………………………………………………………………84. MOTORS…………………………………………………………………………………………………………………………………125. MECHANICAL ADVANTAGE……………………………………………………………………………………………15

III. CONTROL PANEL………………………………………………………………………………………………………………………17IV. OPERATOR INTERFACE…………………………………………………………………………………………………………19V. RADIO MODEM……………………………………………………………………………………………………………………………21VI. ROBOT CONTROLLER………………………………………………………………………………………………………………23VII. RELAY MODULES………………………………………………………………………………………………………………………24VIII. SPEED CONTROLLERS……………………………………………………………………………………………………………26IX. KIT MOTORS………………………………………………………………………………………………………………………………29

1. VALEO/Denso WIPER……………………………………………………………………………………………………302. KEYANG ……………………………………………………………………………………………………………………………31

Split-tapered bushings ……………………………………………………………………………323. BOSCH……………………………………………………………………………………………………………………………………334. ACTUATORS…………………………………………………………………………………………………………………………345. GM TRUCK……………………………………………………………………………………………………………………………35

X. PNEUMATICS………………………………………………………………………………………………………………………………351. INTRODUCTION…………………………………………………………………………………………………………………352. OVERVIEW……………………………………………………………………………………………………………………………363. THE COMPRESSOR……………………………………………………………………………………………………………374. THE ACCUMULATOR TANK……………………………………………………………………………………………395. THE PRESSURE SWITCH………………………………………………………………………………………………406. THE REGULATOR………………………………………………………………………………………………………………407. DIRECTIONAL CONTROL VALVES……………………………………………………………………………418. FLOW CONTROL VALVES………………………………………………………………………………………………429. PNEUMATIC LIMIT SWITCHES…………………………………………………………………………………4310 PNEUMATIC ACTUATORS………………………………………………………………………………………………4311.COMPRESSOR RELAY………………………………………………………………………………………………………44

XI. LIMIT SWITCHES…………………………………………………………………………………………………………………45XII. POTENTIOMETERS……………………………………………………………………………………………………………………46XIII. PROGRAMMING……………………………………………………………………………………………………………………………46XIV. LIGHTS…………………………………………………………………………………………………………………………………………47XV. CONCLUDING THOUGHTS………………………………………………………………………………………………………47

APPENDIX I. MOTOR COMPARISON GUIDE…………………………………………………………………49APPENDIX II. SAFETY PRECAUTIONS FOR OCCRA…………………………………………………50APPENDIX III. MISSION STATEMENT………………………………………………………………………………51APPENDIX IV. WIRE & PIN MAP FOR LIMIT SWITCHES……………………………………52APPENDIX V. DIGITAL INPUT PINOUT CHART………………………………………………………53APPENDIX VI. PROGRAMMING OVERVIEW………………………………………………………………………54

1

Page 2: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

A GUIDE TO YOUR 2002OCCRA ROBOTICS KIT

Written by Mike McIntyre, InstructorOakland Technical Center Northeast Campus1371 N Perry StreetPontiac, MI 48340

I. INTRODUCTION

Robots are machines that are automated, multitasking and programmable. The robot that you are building for the 2003 Oakland County Competitive Robotics tournaments could fit these criteria but, since we are going to continue using student drivers, your machine will be only “semi-autonomous” at best. Your robot has a "brain" (microprocessor) and is capable of learning (being programmed), receiving input information from sensors (limit switches and potentiometers), and running autonomously. We are going to allow programming of the robots again this year but there will not be a totally autonomous period as there was during this year’s FIRST competitions. Teams do not need to program their robots if they do not want to; there is a default program already loaded in your robot’s computer that automatically assigns the robot controller outputs to operator station inputs, so nobody needs to learn a new programming language (PBASIC) unless they really want to. In addition to inputting information to the robots from the joysticks at the operator station, inputs from limit switches and potentiometers will also be allowed for this fourth year of OCCRA. The students who drive your robot will use a set of 4 joysticks mounted on a control panel with a processor and a radio transmitter. Any student who has ever driven a remote-controlled car has already used the same basic system that will control the robots in this year's competition. Instructions for the "sanctioned" layout are included in the kit of materials; some

modifications to layout will be allowed this year, but do not attempt to modify the Innovation First system itself. Moving a joystick is essentially like turning a dimmer switch, while pushing one of the buttons is like flipping a switch: both send an electrical signal.

2

Page 3: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Figure 1a. The Operator InterfaceThe operator control box (Operator Interface) that sits on your control panel can detect which switch has been thrown [See Fig. 1a]. The Operator Interface then assigns and forwards that information through the unique routing or "channel" that had been assigned to that particular switch.

Next, the signal is sent to the transmitter (Radio Modem), which sends a radio signal to your robot. Your robot's receiver, listening to the frequency of its own transmitter, will carry the signal to the onboard computer (Robot Controller). Using some built-in instructions (the PBASIC program), the Robot Controller sends an electrical signal to the output terminal that the program has designated. This signal is sent to either an electric relay ("Spike") or speed controller ("Victor") which then activates one of the robot's motors or valves. Your 'bot then slam-dunks another ball!

Figure 1b. The Control Board

Throughout the building of your robot and all the competitions, please adhere closely to all safety rules and procedures. Hand tools can be dangerous if not used properly; make sure that tools are only used for their intended purpose and that all people using tools know the correct techniques and procedures. There is a standardized list of “legal” tools that teams may use this year. Teams that desire any of these tools but lack the resources to buy them should follow the instructions in the game manual for borrowing them. We request that all people in work areas wear safety goggles. (They will be required in the pit area of all league competitions.) The powerful motors, pneumatic cylinders, and high-energy batteries in this kit must be treated with a healthy respect. Remember: Always disconnect the power to your robot and release the stored up air pressure while working on it or transporting it.

3

Page 4: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Figure 2. Use a vice or clamp to hold your work securely and ALWAYS WEAR THOSE SAFETY GLASSES!

Never let wires from the positive and the negative terminals of your battery come into contact: the "short circuit" that results can deliver large currents of electricity. Fires and burns are possible if you are not careful. If anybody has strong nickel or latex allergies they must use extra caution as the OCCRA kit contains both materials. To make this a rewarding, exciting, SAFE experience for all involved we need everybody’s cooperation.

II. THE SCIENTIFIC BASIS OF YOUR ROBOT

1. BACKGROUND ELECTRICAL TERMS AND CONCEPTS

You have probably already learned in your science classes about the particle nature of matter and the existence of atoms. Any high school text on general science or physical science would give you a good introduction to the scientific principles relevant here. All matter contains atoms. Atoms contain even smaller (subatomic) particles. The particles we are most concerned with here are called "electrons". They are the tiny ones with the negative charge that are found in the outer layers of each atom. When these electrons begin to move in one direction, jumping from atom to atom, the flow is called "current". The amount of current flowing is measured in terms of a unit called an "ampere" or, more simply, an "amp". The battery in your kit is capable of delivering well over 80 amps (but we'll try not to let that happen!).

Electrons do not all start flowing in one direction unless something is pushing them. An Exide battery will supply the electrical "push" needed by your robot’s electrical system. The battery contains two strips of different metals called electrodes (your kit uses lead/lead oxide) that are immersed in chemicals (an acidic solution). These ingredients react together causing more electrons to build up on one (the negative) electrode than on the other (positive) electrode. This difference in electron concentration creates a pushing effect that is known as "electromotive force" or "emf".

The negative battery terminal will have a black wire attached to it. We will use this electrode as the reference or “ground” level for our electrical system. The terminal strip where all of the negative black wires attach will therefore be called the “ground terminal”, even though it does not actually connect to the earth. Electrons all have the same negative charge and do not want to be crammed in together on this negative terminal; given the opportunity, they repel each other until they have spread out evenly. A unit called "volt" measures the amount of emf.

4

Page 5: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Consequently, emf is commonly referred to as "voltage". The kit battery should produce a fairly steady emf of 12 to 13 volts. Batteries are constant voltage sources. This means that they will maintain nearly the same voltage across the terminals as long as the chemicals inside are still reacting. When the battery's chemicals are nearly used up, the voltage begins to drop dramatically.

Your kit comes with a recharger. Follow the directions that come with the recharger when hooking your battery up to it. It takes a few hours but the chemical reaction that went on inside the battery will be almost completely reversed. Your recharged battery will return to practically the same voltage that it had when it was new. Take care in organizing your battery management system throughout the year. Over the years many teams have lost

matches because they took the field with a battery that was not fully charged. You should have a team member assigned the task of charging up the used battery and installing a fresh battery after each match. Remember: the robot can drain a battery in 10 to 20 minutes, but it takes many hours to fully recharge a dead battery.

Figure 3. The sealed lead-acid batteries typically last for three matches, but don’t count on it: replace and recharge frequently!!

Many people confuse the terms “current” and “voltage”: they are two very different creatures. To help understand the difference, imagine 2 identical barrels of water along side each other, connected near the bottom by a single pipe. If the barrel on the right is filled to the top with water and the barrel on the left is only half full, what happens? Water begins to flow from the right barrel, through the pipe, into the left barrel. How long does the flow last? The flow continues until there is no longer a difference in the water levels. In this example, the drops of water represented the electrons in the battery. The full barrel represented the battery's negative electrode and the half-full barrel represented the battery's positive electrode. If the amount of water flowing through the pipe each second had been measured, we could tell how much current we had. What caused the current to flow? The pressure difference in the 2 barrels, created by the difference in water depth caused the current to flow. This "pressure difference" represented the emf, or voltage.

5

Page 6: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

(In fact, voltage is often expressed as "potential difference".) What would have happened if the pipe had been clogged shut? We still would have had the pressure difference but there would have been no flow. Likewise, it's possible to have voltage without current. Notice from the example that, to take a voltage reading, you have to compare two points. This explains why you hear people talk about measuring the voltage "across" the battery's electrodes or "across" the motor's terminals. If somebody says they measured how much voltage was “flowing through the wire”, you'll know they're a little confused.

Current must have a path or route to follow. The complete path followed by the current is called a "circuit". The circuits on your robot begin with the negative battery electrode (black is the color code for wires that connect toward this negative terminal). The current flows through the various circuits on the robot until it returns through the positive (red) wires and into the positive battery terminal. (While electricity can also be thought of as a flow of positive charges in the reverse direction, the so-called "Classic Current", I will be using the "Electron Flow" model in this paper.) Current can flow in a "closed" circuit but cannot flow in a circuit that has been cut, or "opened". A switch is a device that interrupts the current by breaking the circuit (or, in some types of switches, closing the switch completes the circuit and allows the current to flow). Fuses and circuit breakers can also stop the flow of current; you will hear more on them later.

The”output power" of a motor can be defined as the rate at which the motor does work. The rate at which energy gets used up is called "input power". The metric unit used to measure power is the "watt". Electric power can be calculated by multiplying emf times current (volts x amps). Look at Appendix I for a listing of all the motors in your kit and their power ratings. This chart should help you considerably when you allocate motors while planning your robot’s design. A perfect motor would have equal input and output power. The motors in your kit are pretty slick but, sadly, are not perfect. The output power will always be a fraction of the input power. This fraction can be written as a percent and is called the "efficiency rating" of the motor. A DC motor that uses 4 watts of electric power but only delivers 3 watts of output mechanical power has an efficiency of 3/4 = .75 = 75%. The same method for computing efficiencies can be used to analyze any machine, including gear trains and the sprocket drive systems used on your robot.

2. BACKGROUND PNEUMATIC TERMS AND CONCEPTS

You must understand certain basic scientific concepts before you can really understand how pneumatics works. In science, pushes and pulls are called forces. The pound is the unit of force that

6

Page 7: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

we use most often in OCCRA. Weight is an example of a force and can be measured in pounds (for example, your 2003 OCCRA robot may not weigh over 125 pounds). Area is the amount of space that a surface has and is measured in square units. In OCCRA, we generally size things in terms of inches, so our usual area unit is the square inch. A force being applied to an area causes pressure. Pressure can be calculated by dividing the applied force by the area on which it acts. The rules for OCCRA 2003 require that the pressure used on your robot be 60 psi or less (“psi” is short for “pounds per square inch”, the unit used in this booklet to measure air pressure). Anything that flows is a fluid, so liquids and gases are both fluids. Centuries ago, a young French scientist named Pascal discovered that anytime an enclosed fluid is subjected to a force, pressure is transmitted throughout the fluid equally in all directions. This very important discovery is called Pascal’s Law. The metric unit of pressure is named the “Pascal” in his honor. Fluid power systems have a lot in common with electrical systems and mechanical systems. Pneumatic systems are fluid power systems that use a gas (typically air) to transmit power through a circuit and do useful work. The term “circuit” refers to the complete path followed by the fluid as it flows from its source to the various output devices. Instead of electrical energy, pneumatics uses the energy of compressed (pressurized) air to transmit power. The amount of electricity moving through a wire is a characteristic called “current” while the rate of a moving fluid is referred to as the flow. The prime mover in electrical systems is called the “potential difference” (emf), while it is a pressure difference that causes fluids to flow. The following chart summarizes the comparisons between the three systems:

Characteristic Mechanical System Electrical System Fluid SystemPrime mover Forces Potential difference Pressure differenceRate Speed Current FlowResistance Friction Electrical resistance Fluid resistancePower Force x Distance Voltage x Current Pressure x Flow

Think of pneumatics as a method of storing and transferring energy to perform work using compressed air. I am sure that you have all seen pneumatics being used before: large rides at amusement parks, air brakes on buses and trucks, dental drills, the carrier at the bank drive up window, the animated figures at Disney World, power tools at auto service stations…etc.

The basic components of a pneumatic system are the air production system and the air consumption system. On your robot, the air production system includes the compressor, pressure switch, check valve, relief valve, and accumulator tank. Industrial systems would also include filters, coolers, auto drains, dryers…etc. The air consumption system is composed of the regulator, control valves, flow controls, and the cylinders. Since the output of the

7

Page 8: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

entire pneumatic system rests with the cylinders (actuators), it is worth our while to spend a little time on them.

Each of the five pneumatic cylinders in your kit contains a rod that attaches to a disk inside the cylinder to form a moveable piston. As this piston moves out from the cylinder (extends) and back into the cylinder (retracts) it exerts a push or a pull. The force of an extending cylinder depends on the area of the piston. You probably already know that the area of a rectangle is calculated by multiplying length times width. The shape of the end of the piston, however, is not a rectangle: it’s a circle. The distance across a circle is called the diameter. When measuring the round piston inside the cylinder the pneumatics industry uses the term bore, which means the same thing as the diameter of the circle. The amount of area and is measured in square units regardless of the area’s shape. The formula for the area of a circle is expressed by the equation: A = r2. The “r” is the symbol for the radius of the circle. The radius is always half of the diameter. Since the largest OCCRA cylinder has a bore of two inches, it has a radius of one inch. The symbol “” is the Greek letter “pi” and is has a constant value of approximately 3.14. This means that the two-inch bore OCCRA cylinders have pistons with an area of 3.14 square inches. The force of an extending pneumatic cylinder is calculated by multiplying the area of the piston times the pressure of the air. Can you see now why we limit the air pressure in OCCRA to 60psi? If we used a pressure of 120 psi, the large cylinders would each extend with around 375 pounds of force!

3. OVERCURRENT PROTECTION

The flow of electricity always heats up the material that carries the current. The motors, wires, relay...etc. in your kit can all tolerate a certain amount of warming. A point can be reached, however, where the current can cause a destructive level of heat. To prevent this from happening, several protective measures have been taken in your kit. To start with, a size or "gauge" of wire has been chosen that will safely handle the anticipated current. Notice that the wires connecting to the battery are much thicker than the other wires in the kit. In general, the bigger a wire's diameter, the more current it can safely handle. The battery wire is #6 (six gauge) wire that can handle up to 80 amps of current. Most of the wires in your kit are #14 stranded wire that should always carry less than 30 amps. You have probably noticed that #14 wire is smaller than #6 wire and you have probably thought: "What's up with that?" Wire gauges work on an inverse scale, just like shotgun gauges: the bigger the gauge, the smaller the diameter. Those little skinny wires running to the fans on the Victor speed controllers are only about a #22 gauge.

8

Page 9: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The second way we prevent excessive heating is by the use of over-current protection devices called "circuit-breakers". On the outside wall of your control box (where the battery cables enter) is an 80-amp circuit breaker. [See Fig.4] This device is like a sentry that stands guard over your robot's electrical system. Should the entire system suddenly begin to draw 80 or more amps of current, the circuit breaker will turn itself off and save your robot from becoming a 125-pound toaster. A little plastic lever will swing out from the side of the circuit breaker to let you know that the breaker has been tripped off. To reset the circuit breaker (once the problem that caused the breaker to trip off has been fixed!), all you need to do is click the little black lever back up into its original position. This circuit breaker can also be used as an on/off switch to power down your robot in a hurry (some call it a "kill switch"). Pushing in the little red button that sticks through the hole in the plastic will turn off all power to your robot instantly. You would be wise to design your robot with a protective structure around the kill switch so that other robots do not accidentally bump your kill switch and shut you down during a match. (If the referees think that some team is intentionally trying to make their robot hit your kill switch, the team will be warned and possibly disqualified.)

Figure 4. The 80-Amp Circuit Breaker attaches to the side of the robot control box: note that the red stop button has been pushed and the reset lever is extended.

Make sure you leave enough of an opening, however, that a person's arm and hand can easily reach the switch in an emergency. Engineers from General Motors Powertrain, who helped design most of the electrical control system in your kit, suggested this safety device. Make sure everybody on your team knows this way to shut off power in an emergency!

We are supplying 4 other circuit breakers to protect the 4 largest motors and their speed controllers: the drill motors and the Valeo wiper motors.

Figure 5. (From the left) Slow-Blow 30-Amp Circuit breaker, 20-Amp Fuse from

a Spike Relay, and 30-Amp Fuse from Power Block.9

Page 10: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

We had a lot of complaints from teams during the 2000 OCCRA season about the 30-amp fuses. The concern was that they blew out too easily during momentary rushes of current, leaving many robots dead on the field or spinning in circles. Drivers’ training can partially solve the overload problems that come from “stalling” motors, but we’ll get to that in a moment. The circuit breakers that we have added (See Fig.5) will trip off a little slower and will reset themselves in a few moments after they have had a chance to cool, so teams that overload a motor might still have some time to recover before the end of a match. Notice that the slow-blow circuit breakers have breakaway tabs so that their length can be adjusted: please do not break away any more of the tab: we already have them broken away to the length that fits best.

The third way we protect your electrical system is with fuses. Little plastic 30-amp fuses are positioned like sentries on the main power distribution block and 20-amp fuses guard the relays. (See Fig.5) These fuses stand guard over each of the output circuits on your robot, ready to give their lives to protect the motors they serve. Unlike the circuit breaker, there is no resetting a fuse: if too much current flows through a fuse, the little guy is destroyed and must be replaced.

Figure 6. Multimeter test of a blown fuse; when resistance is too high for a digital meter to read, it will typically display a “1”.

Pull out one of the fuses and take a close look at it. You should be able to see a little wire-like metal strip inside the plastic that runs between the two terminals. Now take a multimeter and set it to the "Resistance" or "Ohm" scale. (See Fig.6) A blown fuse, like the one pictured in Figure 6, will give an almost infinitely high resistance reading. Most digital multimeters show this with a “one” in the display.

10

Page 11: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

If you don't have a multimeter you should go out and get one, (They are very useful for troubleshooting problems and you can find them for under $10) but, in the meantime, just take the battery and bulb from a flashlight; connect their bottoms with a

strip of aluminum foil; now wrap a stripped wire or foil around the bulb's cylindrical base and attach a second wire or foil piece to the battery's positive terminal; the two loose pieces of wire or foil now form the leads of a basic meter that, when touched together, should cause the bulb to light. (See Figs.7a&7b)

Figure 7a. Homemade Tester

Touching the two wires of your ohmmeter/tester to the 2 terminals of the fuse should show that the fuse is intact by registering almost zero ohms of resistance. Your homemade tester will light up and many ohmmeters will buzz to show that there is continuity. A defective or "blown" fuse will register an infinitely high resistance on an ohmmeter and it will not light up the bulb on your homemade tester.

Figure 7b. You need some tape or three hands to make it work!

The final things to consider here are the reasons why excessive current might flow in your circuits. The first culprit is the dreaded "short-circuit" condition. Recall that electrons had to be pushed through the circuit since all elements in the circuit are going to be resisting the flow of electricity. What would happen if those resistances were suddenly removed? It is kind of like the time you were pushing real hard on a wrench to loosen a stubborn bolt and the bolt suddenly stopped resisting (came

11

Page 12: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

loose): what happened? You probably smashed your knuckles in the sudden surge that followed. Likewise, if the resistance of a circuit suddenly drops, a large increase in current results. Mathematically, Ohm’s Law describes this: Current equals Voltage divided by Resistance. If there are 12 volts divided by 6 ohms you get 2 amps of current. Look what happens if the same voltage applies but the resistance drops to one-tenth of an ohm: now we suddenly have 120 amps of current (12/.1 = 120)! What might cause this dramatic loss of resistance? Usually it happens when somebody accidentally lets a metal object form a bridge between one of the positive and negative wires on the robot. It can also easily happen if there is a worn spot on a wire or if too much insulation has been removed from some wires. These are all things to watch out for.

A less obvious cause of excessive current flow occurs in the motors themselves. When electricity flows through a motor it encounters resistance because of what's called "counter-emf". It is kind of like when you push on a door to open it: the door also pushes back on your hand. With motors (as you'll soon see), they must be free to spin. If you send current to a motor that is not free to spin (or spinning slowly below the "stall speed"), there is very little resistance inside the motor itself and a large increase in current results. We say that the motor is “stalled”. The high current level during a stall is referred to as “stall current”. You will see this situation frequently during OCCRA matches: your robot is attempting to lift its arm to score, but an evil opposing robot blocks the arm. Your driver gives your robot arm’s motor full power in an attempt to overcome the blocker, but nothing happens. Your motor is stalled and the current is surging in it. Welcome to the robotic version of Drivers’ Training 101: if you are lucky, the fuse or the circuit breaker stops the current in time. If not, the magic white smoke that lives inside your motor begins to escape and your motor begins its new career as a paperweight.

4. MOTORS

Your kit contains a variety of electric motors. All are capable of taking the electrical energy that you send to them and producing a rotational motion. The general principles are fairly straightforward:When electrons flow through a wire, they create a region around the wire called a "magnetic field". This magnetic field is pretty weak for a straight piece of wire. If, however, a wire carrying electric current is wound up into a coil, the magnetic field gets concentrated into a much smaller volume and the magnetic field therefore gets strengthened. The coil continues to produce this magnetism as long as the current continues to flow. If you reverse the direction of the current flow, the end of the coil that had created the north magnetic pole will now have a south pole

12

Page 13: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

instead! Likewise, the other end of the coil changes from being a south pole into being a north pole. The DC motors in your kit all contain coils of wire attached to a shaft forming an "armature"; the armature coils become magnetized when electricity gets sent through the motor. The motors are structured such that a stationary or "fixed" magnet's north pole faces the coil's magnetic north pole and the 2 poles want to push away from or "repel" each other. Since the fixed magnet can't move, the armature's north pole spins away instead. Through a simple (yet clever) device called a commutator, the direction of current flow in the armature gets reversed right before the armature's south pole reaches the fixed magnet's north pole. Once again, two north poles are suddenly facing each other and, once again, they repel each other causing the armature to continue spinning away. This process keeps repeating as long as there is current flowing through the armature coil.

The term that describes and measures a motor's ability to produce rotation is called “torque”. Think of torque as being like the "turning force" of a motor. [Torque is actually a little more complicated than this; it's the vector product of two measures: the radius vector from the axis of rotation to the point where the force gets applied, and the amount of the output force itself. This explains why torque measurements are always expressed in units like "foot-pounds" and "Newton-meters".] Internal electromagnetic forces acted on the armature coils to produce the torque that made the shaft spin. The output shaft of the motor likewise delivers a torque to objects it encounters. A motor spinning at a certain rate has a shaft that can deliver a fairly constant torque. If the motor shaft is attached to a sprocket, the sprocket will begin to rotate also. This torque can be transmitted by chain to other sprockets and devices. When you ride a bicycle, the force of your foot on the pedal causes a torque to be delivered to the front sprocket, making the sprocket rotate. A chain links the front and back bicycle sprockets so that the rotation of the front sprocket delivers a torque to the back sprocket to makes it rotate also. Your kit motors will produce the torques needed to produce motions of your robot.

The two most powerful motors in your kit are the two Bosch drill motors. (See Fig.8) Most teams will use these motors to drive their robot's wheels.

Figure 8. While it is not mandatory that you use the drill motors to drive your robot, we strongly recommend it.

13

Page 14: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Although your motor allocation depends upon the design strategy you are employing, none of the other motors are going to have enough power to move your robot around very fast. The drill motors and the Valeo motors must be hooked up to the Victor speed controllers, not the Spikes. These motors can potentially draw more current in normal operation than the 20 amps that the Spike relays can safely handle.

Motors can be built to run on alternating current (AC), like you would find in the wall outlets and lights of your house, or on direct current (DC). Batteries are the most common DC source. The motors in your kit are all DC motors since a 12V lead-acid battery is used as the electrical power source.

The shafts of all motors need to be supported so that there are no side loads that could cause excessive wear on the motor's internal bearings and overloading of the motor itself. Your kit contains 3/8-inch diameter brass bushings that fit nicely on the motor and sprocket shafts. If you mount one of the bushings into a piece of wood or angle aluminum (easy to do: just drill a ½” hole and jam the bushing in!) and then align the mounting material and the bushing so that the shaft goes right into the bushing's opening, you will support the shaft and protect the motor. Look at Figure 9: A vertical wood mount supports the motor shaft from side-

loading. Notice the brass bushing just to the right of the collar on the end of the shaft: the shaft spins inside of this bushing. A little grease or oil inside the bushing makes the shaft spin even easier. For heavier side-loads on a shaft (such as on your drive train) it is wise to mount supports with brass bushings on both sides of the load.

Figure 9. Supporting a Motor Shaft.

Refer to any text that deals with mechanical drive systems (such as The Robot Builder's Bonanza) and you will find suggestions for making axle and shaft hookups. A good text that shows you how to align sprockets, adjust chain tension...etc. will also enable you to mount your motors to perform more efficiently. The “How-To” video also covers this topic briefly. We cannot stress it enough: motors should only be supplying your shafts with torque, not any support. Support for motor shafts must come from somewhere else!

14

Page 15: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

5. MECHANICAL ADVANTAGE

There are several types of “simple machines” that you should study before you design your robot. Many books group the simple machines into six classifications: levers, inclined planes, wheel and axles, screws, pulleys, and wedges. If a machine enables you to lift a 30-pound weight while using only 15 pounds of lifting force, we say that the machine has a “mechanical advantage” of “2”. In other words, the machine made you twice as strong. If a different machine enabled you to lift the 30-pound weight using only 6 pounds of lifting force, this machine made you a lot stronger and we would say it had a mechanical advantage of “5”. While machines can make work easier, you do not get something for nothing. Whenever you use any kind of a simple machine you face a trade-off: the greater the mechanical advantage of the machine, the less movement the machine produces. This usually means that the stronger it makes you, the less speed you will have. Consider the effects of different gear ratios. Notice from Appendix I that the high gear gives you a lot more speed but the low gear ratio gives you a lot more torque. Is it more important for your robot to be strong or fast? This is the trade-off you always face when choosing gear ratios and sprocket ratios: the faster you design it, the weaker it will be! The lever is another simple machine that you will likely use on your robot. Imagine a stick that is 100 centimeters long and has a hook attached to each end. Now, imagine that there is a pivot point (fulcrum) attached 20

centimeters from the left end. The stick is free to rotate around the fulcrum, so this can be called a lever. If a 10-Newton weight is hung from the left hook, the lever lets us lift the weight using only 2.5 Newtons of effort force on the right hook. So, the lever made us four times stronger. Notice that the distance from the pivot to the weight is only 20cm while the distance from the pivot to the effort force is 80cm.

Figure 10. The Pliers is a Lever

Dividing 80cm by 20cm gives the mechanical advantage of “4” which we already found. Although the lever made us 4 times stronger, it is important to note that we “lost” something here: we had to pull the stick down for 4cm just to lift the weight up 1cm!

Figure 11. Roller Chain15

Page 16: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The plier in Fig.10 is a lever, too: the farther from the pivot that you grip the handle, the greater the crimping force on the other side of the pivot point.

Soon you will be running roller chain (See Fig.11) between sprockets of differing sizes. When a torque causes the first sprocket to rotate, the chain will transfer the energy to a second sprocket and the second sprocket will rotate also.

The first sprocket is called the “driver” sprocket and the second one is called the “driven” sprocket. There is a simple way to calculate the “ideal” mechanical advantage of any pair of sprockets: just compare the number of “teeth” on each sprocket.

Figure 12. Sprocket with Split-tapered Bushing

You do not have to actually count them: the number of teeth is stamped onto each sprocket. You have five different sizes of sprockets: 60-tooth, 45-tooth, 30-tooth, 15-tooth, and 12-tooth. To calculate the mechanical advantage of a pair of sprockets, simply divide the number of teeth on the driven sprocket by the number of teeth on the driver sprocket. This is called the “sprocket ratio”. For example, suppose a driven sprocket having 60 teeth is attached to your wheel, and the driver sprocket having 15 teeth is attached to a drill motor. This arrangement has a mechanical advantage of four. This means that the wheel’s shaft (the driven sprocket) has four times more torque than the drill shaft (the driver sprocket). This increase in strength comes at a price: the wheel’s driven sprocket only spins one-fourth as fast as the drill’s driver sprocket. You will need to choose the sprocket ratios for your robot based on what you need to accomplish.

It might seem from this explanation that you are limited to a maximum sprocket ratio of five. This is true if you are only using two sprockets at a time, but it is possible to use more than two sprockets and axles. For example, suppose Sprocket “A” is the driver for a Sprocket “B”. Now imagine that the axle that is holding “B” (the driven sprocket) has an additional Sprocket “C” on it. Finally, suppose that Sprocket C has its own separate

16

Page 17: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

chain that is driving Sprocket “D” (a fourth sprocket with its own axle). We now have a three-axle system where the sprocket ratio of “B to A” is multiplied by the sprocket ration of “D to C”! For example, suppose Sprockets A and C each has 15 teeth while Sprocket B has 60 teeth and D has 45 teeth. The sprocket ratio of B to A is 60/15 = 4 and the ratio of D to C is 45/15 = 3. Therefore, the ratio of the entire system is 4 x 3 = 12. Sprocket A has to rotate 12 times to get Sprocket D to rotate once, but Sprocket D’s axle has 12 times the torque that the axle of Sprocket A supplied. The 12-tooth sprocket is new to the kit in 2002. This sprocket is too small to be used with the split-tapered bushings that mount inside the other sprockets. (“G” bushings are used with the 15-tooth sprockets and “H” bushings are used with the 30, 45, and 60-tooth sprockets.) The 12-tooth sprockets will need to be mounted onto ¼” shafts using devices called “tran-torques.” An explanation of how tran-torques and bushings attach to shafts will come later in the section on kit motors.

III. CONTROL PANEL

Your drivers will control the actions of your robot from the control panel. Your control panel consists of a board (with convenient carrying handle), 4 joystick controllers, an Operator Interface, a Radio Modem (with silver-colored antenna), and a power supply. All teams will be supplied with a 48" by 16" by 1/2" piece of particleboard to serve as the mounting surface for your control panel. A handle for carrying the board is attached. The boards have only been rough-cut, so some trimming and finishing will probably be necessary. If your team decides to use a different material to mount the control panel on, it must be the same dimensions and the components should be in a similar layout as detailed in the rule book. [See Fig.1b]

Since your control panel mounting-surface is probably going to be made of unfinished particleboard, your team may decide to decorate it or paint it in your school colors. This is allowed as long as you remove all of the electronic components first and then return them to the layout arrangement later. You should spend no more than a week planning and designing before you start fabricating your robot’s chassis/drive system; this would be a good time to have a sub team working concurrently on your control panel so that it is finished by the time you need it for driving. Returning OCCRA teams are allowed to use the control panels from previous years (but the robots must be totally rebuilt!) Teams that are in OCCRA for the first time are at a slight disadvantage here, but they will not need to attend the first tournament so will pick up a few extra days of building to compensate. They will still be at a big disadvantage for other reasons, but we are trying to help them out!

17

Page 18: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The joysticks each plug into a port of the operator interface. [See Fig.13] The sequencing and arrangement of the joysticks is detailed in the template that comes with the game rules. Each joystick has a red trigger and a red top button. If you are using the default program, the trigger and button of each joystick control the Spike relay that corresponds to it. The trigger sends a signal to the relay providing “forward flowing” current to its motor, while the button sends the reverse signal, causing the motor it controls to spin in reverse. The joysticks provide a second input signal to the operator interface: moving the joystick forward or backward changes the signal to the Victor Speed Controllers which, like the Spike Relays, can send current to the motors for forward or reverse operation. Unlike the relays, the speed controllers can deliver varying amounts of current to the motors, depending upon how far the joystick has been pushed forward or pulled back (more on that later).

Figure 13. Joysticks and power line attached to the Operator Interface

There is a constant current source aboard the Operator Interface that routes current through the joysticks. Moving a joystick forward and backward (the "Y' axis) causes a variable resistor to change the voltage that is dropped across an internal resistance that gets read as that particular analog input. Moving the same joystick left and right (the "X" axis) causes a different variable resistor to change the amount of voltage read as a different analog input of the operator interface. In OCCRA, we now allow changes to the default program, so teams will have a way to use the inputs caused by sideways joystick motion. In the default program, moving your joysticks along the X-axis will not do anything. Pulling one of the triggers or pressing a red button on top of a joystick flips a switch to one of the digital inputs of the operator interface. This, too, provides an electrical signal that the operator interface interprets, converts, and sends along to the appropriate output/motor.

A movement of the joystick could send current flowing either forward or in reverse. When the joystick is released, it is suppose to return fully to a rest position and current to the motors should stop flowing. If you ever were to find that a motor, controlled by one of the joysticks, starts to hum or starts

18

Page 19: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

to move while the joystick is in the rest position, you need to adjust the “trim setting” of the joystick. There are dials on the top surface of the joystick’s base. These dials are each mapped to a specific output line. Turning one of these dials back and forth while the joystick is in the rest position should enable you to find the spot where the current completely stops flowing to the motor. Many teams put small pieces of duct tape over the trim dials once they have them set. This prevents the drivers from accidentally bumping the dials and disturbing the settings during the heat of competition. Motors have been known to overheat and shut down because of improperly set trim dials: a motor that is drawing some current might be getting enough current to heat up but not enough to generate the torque it needs actually start spinning. (Recall the earlier explanation about stalled motors.)

Make sure that there are no perpendicular forces acting on the computer cables that run from the operator interface (you may want to wedge a small piece of rubber or Styrofoam underneath the connection to make sure that the cable does not begin to move from its perpendicular alignment.) Even fairly small movement can make for a bad connection and a very quirky robot.

Plug the power supply's power cord into any convenient 120V outlet and insert the jack into the place marked on the operator interface. (See Fig. 13) The light emitting diodes (LED's) on the operator interface should light up and you are ready for action!

IV. OPERATOR INTERFACE

When driving your robot, each movement of the joystick causes a signal to be sent via the Operator Interface. This signal turns on one of the outputs leaving from the Robot Controller aboard the robot. These outputs go to various motors via the relays and speed controllers and cause the robot to move. There are four black cylindrical fuses on the operator interface labeled F1, F2…etc.; if a fuse blows, a light on the front panel will indicate the fuse that has failed. Before replacing the fuse, read what Innovation First has to say about them in their on-line Users Manual. InnovationFirst offers on-line help and resources including a “Quick Setup Guide". You might find it helpful to refer to this guide while reading this booklet. To get the manual, go to www.innovationfirst.com.

Each OCCRA team has a unique team number assigned to it. Team numbers are from 1 to 999 in standard decimal (base ten) notation. The Operator Interface and the Robot Controller have matching sets of DIPswitches [See Fig.14] and each team must set these switches to their team number.

19

Page 20: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Here is the catch: your team number must be converted to its binary (base-two) equivalent. Each switch represents a place value for the binary number. The switch that is farthest to the right represents the “ones” place. The next switch to the left represents the “twos” place, the next switch represents the “fours” place, then comes the “eights” place, the “sixteens” place…etc. The binary equivalent setting for Team #1 is 00000001. The setting for Team #2 is 00000010. The setting for Team #3 is 00000011. Each switch only has two possible settings: either it is “on” or it is “off”. These two states are represented by the values “1” and “0”, respectively. Team #47 would be converted to the following binary equivalent: 00101111. This was derived from the fact that there are no 128’s, no 64’s, one 32, no 16’s, one 8, one 4, one 2, and one 1. (32+8+4+2+1=47!) To set their DIPswitches, Team #47 must flip up (turn on) the five switches that are designated to be ones. The three DIPswitches that represent zeroes must be left down (off). Using the point of a ballpoint pen can easily do this flipping of switches.

Figure 14. Using a pen to set the team number in binary on the Operator Interface.

Remember to set the switches the same way on your Robot Controller. You know all that you need to know about the Operator Interface for now. What follows is a more in-depth explanation for those of you who are inquisitive.

The electrical message from the joysticks goes into the operator interface as a 0 to 5 volt signal which gets encoded into what is called an "RS422" signal (a 0 to 5 volt digital signal, similar to what computers use). This signal consists of bursts of data referred to as "packets" of information that get sent out at 19.2 "kilobaud" (the transmission rate expressed in terms of how many thousands of bits of information are sent per second). A bit is the most basic unit of information storage capacity that is used in computers; it represents either a binary 0 (the "LOW", or near-zero voltage) or a binary 1 (the "HIGH" voltage value of one) as I explained earlier. Every 25 milliseconds you get another packet that contains 26 bytes at a time with 10 bits per byte. Two of the bits are unused and just designate the start of each byte (the start bit is always a LOW) and the stop of each byte (the stop bit is always a HIGH). If you were to examine one of the bytes that

20

Page 21: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

are inside one of the packets, then, you would find that the first bit is a LOW. Then you would find that there are 8 data bits: these are where the data is stored that describes the joystick's position.

Only 24 of the 26 bytes in the packets actually contain any data. There are 2 that are set aside to identify the start of each packet. A movement of a joystick sends a signal reflected by a changed voltage. The location of the respective bytes within the packet lets the Operator Interface know which channel is doing the talking. It's almost like the packet's information is stored in a bunch of drawers. The computer knows that the contents of the first drawer are always the value for channel one, the contents of the second drawer is always the value of channel 2...etc. Inside of each packet, 12 of the bytes are assigned to the analog channels and 2 of the bytes are digital stuff (so there are 16 bits of digital information). Also, the team number, channel number and a lot of other miscellaneous information, including bi-directional information (the robot can also send information back to the Operator Interface!) are part of each packet. For example, analog sensor #1 is in the exact same location within the packet as analog output #1...etc. There is no stop signal for the packets: the processor simply sits and waits for the next "start" byte to arrive. After a certain amount of idle time, it knows that the packet has ended and it is time to prepare for the next packet. Although you are allowed to alter the default program this year, I suggest to programming teams that you design your robot so that it can, with only minor rewiring, still run using the default program. Do not expect OCCRA officials to hold up matches because you are having trouble with your program. Likewise, do not expect OCCRA staff to assist you with debugging your program.

For those of you who know something about how computer code and binary counting works, suppose that the joystick was at the full forward position at a certain instance. At that moment in time, the 8 data bits within the byte that's being encoded would all be at the binary "1" value. This is the equivalent of the decimal value 255 or "FF" in hexadecimal. This message will eventually reach the CPU inside the robot controller where, (assuming the STAMP is running the default program), it will be interpreted to mean: “tell the speed controllers to send maximum possible voltage to the motor."

V. RADIO MODEM

The Operator Interface sends the information from the drivers to the Radio Modem. [See Fig.15] This message gets encoded and sent

21

Page 22: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

out as a 900 MHz electromagnetic signal from the transmitter antenna. It travels through the air where it is received by the robot's antenna and is then decoded by the receiver modem. That same message that was sent to the Radio Modem on the control panel goes from the Radio Modem on the robot to the Robot Controller. You don't even have to use the Radio Modems to communicate between the Operator Interface and the Robot Controller: a direct tether connection using a computer serial cable can carry the message instead. The tether line that came with your kit is just a typical 9-pin computer cable that’s about six feet long. When you want the Operator Interface to control the robot without using the Radio Modems, simply hook the tether to the ports labeled “tether” on the Operator Interface and on the Robot Controller. When attached, the tether automatically overrides the Radio Modems. In fact, this is the preferred method of communicating with your robot when you are anywhere outside of the playing field. When in the pits, you must do all of your checking and testing with the tether, not the radios. Radio signals overlap and are likely to interfere with robots that are out on the field competing. Let me say it one more time: if you want to run your robot while you are at a competition, you must use the tether whenever you are not on

the field!Be careful not to confuse the two Radio Modems provided with your system. The Operator Interface must be connected to the Radio Modem that has a chrome antenna and is marked "Operator Interface". Don't laugh: I've seen people try to run the modems backward.

Figure 15. Radio Modem for the Operator Interface.

Note also that the chrome antenna on the "Operator Interface" Radio Modem does not extend. If you get it to extend then you just broke it! The cable that connects the Operator Interface to the RS-422 Radio Modem is a DB9 Male-Female Pin-to-Pin cable with a maximum length of 6 feet.

How the Radio Modems accomplish the encoding and decoding is outside the realm of this paper. The important thing to understand is that the signal sent from the Operator Interface to the Robot Controller can either go by direct cable connection (the tether line) or by radio waves. Make sure you hook up to the correct ports: controllers can be fatally injured by hooking these lines to the wrong ports!

22

Page 23: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

VI. ROBOT CONTROLLER

The Robot Controller takes in the information that was sent by the Operator Interface, decides what to do with each piece of information, then sends electrical signals to the speed controllers and relays so that motors can be controlled. The Robot Controller can also gather additional information from two limit switches (on-board sensors that can detect when the motion of something has reached a certain “limit”), and from two potentiometers (variable resistors). The controller then determines how the robot should interpret and use the information. [See Fig.16] The default program that comes with your onboard computer can run the controller and listen for two inputs that control two of the relay outputs. This program will enable your student drivers to send instructions to your robot and make your 'bot do some rather amazing maneuvers. If the default program was altered, these robots could even be programmed to be totally autonomous. For OCCRA 2003, you can customize the basic robot program to fit your robot’s needs, but I’ll get into that later.

The Robot Controller contains two CPUs (central processing units). One CPU acts as Master Processor and Output Processor to communicate with the inputs and outputs. The other CPU is the Basic Stamp II (BS2SX) that processes all of the data and, based

on the PBASIC program that it is running, tells the Output Processor what to do with all the information. The Output Processor then sends a PWM code signal to the Victors and a relay code signal to the Spikes. The Robot Controller has a lot do and it does it 40 times each second.

Figure 16a. A quick test of an input for the Robot Controller: if the limit switch is pressed, the Keyang motor stops its forward rotation but can still run in reverse.

For a complete list of the many capabilities you can consult the Users Manual as listed earlier in the Operator Interface section.

23

Page 24: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

VII. RELAY MODULES

The relay modules are small, square, electronic boxes that are found inside of the robot's control box, fastened to the walls with Velcro tape. [See Fig.16a and b] They have the name "SPIKE" written on them. You should have seven of these Spikes inside of your control box. The Spikes are relays, so they act like remote controlled electrical switches. They enable weak electrical signals from the Robot Controller to turn on or off a large current to the motors. The Spikes can drive your motors in forward, reverse, or off. The output terminals on the Spike that go to the motor are labeled "M+" and "M-". If you have a motor that runs the opposite direction from the way you want, one solution is to swap the wires connected to the M+ and M- terminals of the Spike.You can hook up any of your kit motors to the Spikes except the drill motors and the (Valeo or Denso) wiper motors. Do not attempt to run your drill motors or wiper motors with the Spikes. If you have a design feature on your robot that requires two motors to always run simultaneously, you can run those two motors off of the same Spike. This is possible since each Spike terminal has 2 prongs on it.

Figure 16b. A Spike Relay With Brass Splitters Attached to the Outputs.

When running wires from a motor to a Spike or to a Victor speed controller, make sure that you provide “strain relief”. This is done by taking the entire bundle of output and input wires before they enter the hole in the control box and forming them into a loop. Now, snuggly wrap a plastic tie-wrap around the base of the loop so that it keeps its shape. Finally, take a second plastic tie-wrap and secure the first tie-wrap (the one holding the loop the wires) to the strain relief bolt on the side of the control box. Now you can connect the wires to the Spikes and speed controllers. This strain relieving is very important: do not skip this step! This will save the Spike and speed controller connections from experiencing traumatic forces should there be a tug on one of the wires.

The Spikes get their input power from the 12-volt battery that hooks up to the terminals labeled "12V"(the positive terminal) and

24

Page 25: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

"GND" (the negative, or ground terminal). Your system has been pre-wired for you. However, if you do any work on the wiring, it is very important that you do not connect the 12V and GND backwards: it will destroy the Spike! There is a 20-amp fuse built into the Spike to help protect the relay from excess current flowing through it, but don't count on it. If there is a short circuit on the Spike's output, it is likely that the relay will be destroyed anyhow.

The Spikes are controlled by a three-wire interface that connects to the Robot Controller. These relay wires form a cable that is colored red, white, and black. The cable clips onto the Spike so that the black wire is on the "b" side and the white wire is on the side marked "w". When there is no signal coming from the Robot Controller, the motor will be off and in a self-braking mode (there will actually be +12V applied to both the M+ and M- outputs). The little LED indicator light will glow orange so you know that the Spike is getting power but is not getting any signal. If the Robot Controller sends both a forward and a reverse signal to the Spike at the same time, both motor outputs go to GND (ground), the motor is off, and the indicator LED turns off. This should never happen. If only the forward input signal is on, the green indicator lights up, and +12V is applied to the M+ terminal, making the motor spin forward. If only the reverse input signal is given, the red LED lights up, and +12V is applied to the M- terminal, making the motor rotate in the opposite direction.

To test the operational characteristics of Spikes, hook up one of your Keyang motors to the first Spike's M- and M+ terminals. The terminals are in the upper right corner of your #1 Spike (this is the Spike that is closest to the Robot Controller: just trace the tri-colored relay cable from the Robot Controller's relay output #1 to the first Spike to verify this). This is a good time to suggest that you have somebody on your team label the ends of each of the wires on your robot with a simple code so that you always know which wire goes with which terminals. You really don't want to be frantically tracing wire routes in the pits while trying to get ready for a match! You should slide the connector of the black wire lead under the M- terminal and tighten with a Phillips screwdriver, then connect the red wire to the M+ terminal. Cradle the motor so that it can't fall or contact anything when the shaft begins to turn. Power up your control panel and connect your battery; then try moving the joystick that controls the output to which you are connected. Notice how the direction of the motor can be controlled through the Spike but the speed is constant. This is not the same kind of control that is possible with the Victor.

There is a default PBASIC program that assigns all of the variables that the Robot Controller has to take into account,

25

Page 26: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

including the Spikes. You may change the program this year but, as I said earlier, we suggest that you design your robot so that it can still run with the default program should your customized program develop “issues” while at a competition. If you are anxious to do some programming or just want to see the source code, go to www.inovationfirst.com and look up "2000 Default Program.bsx".

VIII. SPEED CONTROLLERS

The four speed controllers are found inside the robot's control box, fastened to the walls with Velcro tape. They are rectangular, black devices with a fan on top and "VICTOR 883" written in blue. [See Fig.16c]

The Victors control the amount and polarity (positive-negative orientation) of the electricity that is sent to the motors. Unlike the Spike relays that are either full forward, full reverse, or off, the Victors can output a range of power values. The Victors adjust the amount of power they deliver to the motors based upon the signal they receive from the Robot Controller. When the driver moves the joystick to its end position, recall how the Operator Interface station sent the signal to the Robot Controller. The Robot Controller lets the Victor know that maximum power is needed by forwarding a coded signal. The Victor then opens up and allows maximum current to flow to the motor. The Victor, then, acts like a faucet regulating water flow through a garden hose. If the joystick is moved to a reverse position, the signal to the Victor has a reversed polarity. Unlike the water faucet, the Victor can reverse the direction of the current it sends. The Victor can make the motor spin in reverse.

Try hooking up one of your Keyang motors to the M- and M+ terminals in the upper right corner of one of your Victors. You should slide the connector of the black wire lead under the M- terminal and tighten with a Phillips screwdriver, then connect the red wire to the M+ terminal. Cradle the motor so that it can't fall or contact anything when the shaft begins to turn. Turn on the power as you did with the Spikes earlier and then try moving the joystick that controls the output to which you are connected. Notice how the speed and direction of the motor can be controlled through the Victor. Recall that this kind of control was not possible with the Spike. One additional reminder: remember to check the trim dials to make sure that you are not sending any current through your motors when the joysticks are in their rest positions.

I have already covered what you need to know about the Victor speed controllers, so what follows is only for those of you who crave detail:

26

Page 27: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Both the voltage and the current that the motors feel affect their performance. The level of continuous voltage, or "steady-state" voltage, across the motor's terminals determines the motor's rotational speed. Apply a certain voltage and the motors spin in a clockwise direction; reverse the direction, or "polarity," of the applied voltage and the same motor will now spin in the counterclockwise direction. The higher the voltage, the faster the motor will spin. To understand the effect of current you must first recall what is meant by "torque". The torque produced by a motor as it spins is determined by the amount of current that is flowing through the armature windings. Your kit motors will respond more or less linearly to both the voltage and the current. Each of the Victors have a tiny CPU (computer) inside, complete with an FET (field effect transistor) switching architecture and an integral cooling fan. Basically, the Victors translate the PWM (power width modulation) signal that they receive from the Robot Controller into a PWM signal that the motors can use. This signal runs at around 2,000 Hz (this signal is audible: you can actually hear the Victors humming if you listen closely!) The transistors in the Victor, which are processing the signal, are actually turning on and off very quickly but at a constant frequency. The Victors are sending out a signal that can be thought of as train of square wave pulses. Although the frequency is constant, the width of each "on" pulse changes to reflect the desired output. Current only flows during the "on" pulses but the frequency is high enough that the motor's mechanical inertia doesn't have time to react to the changing wave pulse. Instead, the motor responds as if it was receiving a direct current that's the DC average of the square wave. A small movement of a joystick, for example, results in narrow signal pulses being sent by the Victor to the

motor. This short "duty cycle" (the relative time spent in the "on" condition) means that the motor feels a small average voltage and therefore turns slowly. Greater movement of the joystick results in wider pulses and greater average voltages applied to the motor.

Figure 16c. A Victor Speed Controller With All the Hookups.

27

Page 28: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The directional control aspect of the Victors is due to its "H-bridge" circuitry. This name comes from the shape of the circuit when drawn schematically. The FET circuit acts kind of like a pair of DPDT (double-pole double throw) switches. Depending on the high-side/low-side conditions of the pair of switches, the motor can be given current flowing forward or in reverse direction.

28

Page 29: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

A GUIDE TO YOUR 2003OCCRA ROBOTICS KIT (Part 2)

Written by Mike McIntyre, InstructorOakland Technical Center Northeast Campus1371 N Perry StreetPontiac, MI 48340

IX. KIT MOTORS

There are six different types of motors in your kit this year. Take care when hooking them up that the power is turned off. They cover a wide range capabilities, so study the motor chart (in Appendix I) carefully when deciding which motor is right for the job you want done. With all motors and other electrical components, take care to cover them when sanding, sawing, or filing is being done nearby. Small particles can easily get inside most of the kit motors and can wreak havoc when the motor starts up.

The motors will all be connected to the speed controllers and relays that control them with a red and a black piece of #14 gauge wire. [See Fig.17 and 18] Connectors or terminals that fasten on to these wires have been provided for each motor. The “How-To” video demonstrates how these connections are to be made, but the explanation is fairly straightforward:

Figure 17. Terminal being crimped ontoa piece of #14 gauge motor wire.

First, strip a half-inch of the outer plastic insulation off the end of the wire you wish to attach, taking care not to damage any of the wire strands. Then, you take the terminal you wish to attach and you insert the bare end of the wire into the sleeve of that terminal. Finally, you use a tool to “crimp” or crush the terminal securely onto the wire. An electrician’s 6-in-1 tool (as pictured in Figure 17) does all of these jobs. Test your connection by giving a tug on the wire while holding the terminal: you have done it correctly if the wire is still holding on. There are several different wire terminals in your kit to match what the motors’ terminals require.

29

Page 30: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

All of the motors that you use must attach to either the Victor Speed Controllers or the Spike Relays inside the robot’s control box. In your final design, these wires need to be routed neatly along a protected route until they are looped and secured to the strain relief bolt and enter the control box. [See Fig. 18 for bolt location] The easiest way to do this is to bundle all of the wires as they are about to enter the control box and hold them between the thumb and index finger of your left hand. Next, using the thumb and index finger of your right hand, grab the same bundle of wires about 6 inches away from the control box where your left hand is holding the bundle. Now, while tightly holding the wires, move your right and left hands together causing the bundle of wires to bend into the shape of a loop. With your third hand (or the hand of a teammate), wrap a plastic tie-wrap (available at any hardware store) around the bundles of wire at the base of the loop and as close to your thumbs and index fingers as possible. Pull the tie-wrap tight and you can let go of the wires. Finally, take a second tie-wrap and loop it through the first tie-wrap, around the strain relief bolt, then pull it tightly shut. The bundle of wires are now tightly fastened on to the strain relief bolt and, if you have done it correctly, when there is a tug on the wires the bolt should feel the tug, not the connections inside of your control box.

Figure 18. The strain relief bolt beside the hole where the wires enter the control box.

Use the light blue female terminals to connect the motor wires to the Victors and Spikes. Now it is time to take a quick look at each of the kinds of motors you have in your kit.

1. VALEO/DENSO WIPER

The big Valeo or Denso motors with an arm attached are automotive wiper motors (for windshield wipers on cars); DaimlerChrysler arranged this donation by Valeo and Denso. [See Fig.19]

Figure 19. Valeo Wiper Motor.30

Page 31: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

You should have two in your kit. Due to their high current demands you must run these motors off of Victors, not Spikes. You will be able to attach a shaft for rotation purposes but it is not easy; the arm can be removed and different teams have found various clever ways to attach a shaft to the motor. Some teams have found that they can remove the arm that comes with the motor and force the motor’s shaft through a smaller diameter hole that they drill into an object they want rotated. Here’s a chance for you to be creative: you have a very powerful motor here that can be used as an actuator for all kinds of movement. If you don’t want to devise a way to attach a shaft to the motor, you can modify the arm to do all kinds of other neat things.

The Valeo/Denso motors were not designed to run in reverse when we got them but student volunteers at the Oakland Schools Technical Campus Northeast (OSTCNE) have opened all of them up and modified the printed circuit board inside so that they can now run in reverse. Just to be sure, I advise you all to hook your Valeo or Denso motors up and make sure they are bi-directional. The motor is grounded to the case and this results in some serious issues for robot builders: any metal that touches the casing or shaft on this motor becomes part of the motor’s circuit. This is not a problem if only one wiper motor is used at a time. However, if both wiper motors are ever run at the same time, a short circuit can develop across your robot’s chassis and the fuses watching the current to the wiper motors will blow. One solution is to electrically isolate one of the motors using nonmetals to mount it. This is very difficult but it can be done. Another solution would be to open the motor and attempt to isolate the motor from its own case. This, too, can work OK but is difficult and might cause damage to the motor. The easiest solution is to only use one motor at a time. They really are great motors though, so you might want to give serious thought to using at least one of them. A final caution: Do not try to turn the lever arm manually: an input load like that could damage the motor. 2. KEYANG

Your kit includes four (4) automotive power seat motors made by the Keyang Company that require a drive shaft with a squared-off end. [See Fig.20] 3-Dimensional Services generously supplied us with the shafts and had the ends squared off for us. These motors are very robust and are "thermally protected".

Figure 20. Two Keyang motors driving a single shaft.

31

Page 32: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

This means that if you attempt to drive a load that is too great and the motors begin to stall, they will turn themselves off before the internal heat builds to a destructive level. Simply put: you won't be frying these motors. There is a downside to this over-current protection, however. You may find someday that your robot is in the heat of competition, literally and figuratively, when one of your Keyang motors shuts down on you unexpectedly. This happens because the motor, although cool at the start of the match, has become too warm. If this happens it means you were probably overloading the motor and approaching the stall condition. The resulting rise in current causes the motor windings to heat up and the Keyang's internal sensor trips an integral circuit breaker, shutting off the motor. The motor will remain off a short while until the temperature in the motor has cooled down. Hopefully, your driver’s temper will have a chance to cool off also!

Each Keyang motor can directly run one or two shafts at a time. It is also possible to drive a single shaft with two motors: try it and see! You should recall that the sprockets in the kit are easily attached to the motor shafts by the "split-tapered bushings" [See Fig.12] that came with your kit. Use care when tightening the bushing's mounting screws that: 1) the screws are each run through the larger set of holes on the bushing before being tightened onto the holes on the sprocket, and 2) the screws are tightened in an alternating sequence (and just a little at a time) until the bushing seats snugly inside the sprocket's opening. Do not tighten one screw all the way and then move on to the next screw: this will put the bushing out of alignment and may cause damage. If you need to remove a bushing from a sprocket, you will find it difficult as the tapered hub was driven tightly into the sprocket when you tightened the mounting screws down. Fortunately, the designers thought of this and provided you with a way out: remove the mounting screws and thread them through the small bushing holes. You will find that the screws will push the sprocket away from the bushing with great force (after all, screws are a simple machine that can give you an increased mechanical advantage). Remember: only tighten each screw down a little at a time and alternate between them.

The trantorques in your kit attach to the 12-tooth sprockets a little differently. Each trantorque has a collar with hexagonal fitting that holds the assembly together; do not completely unscrew the collar or the whole assembly will come apart in your hands! To attach a 12-tooth sprocket to a ¼” shaft, first insert the trantorque mechanism into the hub of the 12-tooth sprocket while the collar is slightly loosened. Next, insert the ¼” shaft into the center hole of the trantorque and align the shaft so that it extends through the sprocket to the desired length. Finally, tighten the hexagonal collar on the trantorque by turning it clockwise. The collar will draw the trantorque into the hole,

32

Page 33: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

forcing a set of wedge-shaped pieces inside of it to pinch tightly against the shaft and the walls of the sprocket’s hub. Be careful not to over-tighten these guys: they do break and they are not cheap! It’s better to under-tighten them then check to see if the sprocket slips when you turn the shaft. If it slips, tighten a little more. If it does not slip, leave it alone.

There are two additional Keyang motors [See Fig.21] in your kit that are from automobile rear-gates. These motors are similar to

the other four Keyang motors except they are less powerful, spin slower, have more torque, and have a 3/8 inch smooth integral output shaft (this means that the shaft is built-in and is not meant to be removed). Refer to Appendix I to get the important stats; if your design calls for higher torques but lower speeds, these may be the motors you want.

Figure 21. Keyang motor with integral 3/8” shaft.

3. BOSCH

You have two Bosch drill motors in your kit. [See Fig.8] All teams, even the returning ones, get new drill motors in this year’s kit. You returning teams can keep and use your old drill motors as spares but you may not have more than two drill motors on your 2002 OCCRA robot. These are by far your most powerful motors. (Many people think that the Denso and Valeo wiper motors are more powerful than the drill motors because the wiper motors are bigger; this is definitely not true. Check Appendix I and see for yourself!) The drill motors have been modified by student volunteers at OSTCNE so that the motor can be rotated when the power to them is off (this is what is known as being "back-drivable"). If you do not want your motors to be back-drivable, see an OCCRA official and we will give you the pins to put back in them. Due to their high current demands you must run these motors off of Victors, not Spikes. The drill motor comes with a connector kit so that you can easily attach a shaft that can drive sprockets or anything else you might want. The drill shaft connector kit comes with its own hex wrench but take care not to over tighten the screws and, when attaching the connector, leave enough room for the connector to clear the screw heads that protrude from the end of the drill transmission: the connector and shaft must be able to spin freely! Be very careful with these

33

Page 34: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

motors: they can produce high forces with certain sprocket ratios. Never work on or around any of these motors unless the power has been turned off! I suggest that you leave the plastic drill housings on when mounting the drills to your chassis (or wherever you plan to mount them). You can use U-bolts, build a cradle, tie them with big plastic tie-wraps, or design some other creative way to mount the drills while the housings are on. I suggest this partly because the casings provide a little added protection, but mostly I just think it is a little easier to mount the drills with them on. If you are not going to use the plastic casings, make sure you use the little metric screws that come with the motors to secure the drill motor to the transmission. These screws are hard to find and probably will not be stocked at your local hardware store, so see us at OSTCNE if you have lost yours or need help.

There is a switch on the drill that will enable you to run the drill at two different gear ratios. Notice from Appendix I that the high gear gives you a lot more speed but the low gear ratio gives you a lot more torque. Is it more important for your robot to be strong or fast? This is the trade-off you always face when choosing gear ratios and sprocket ratios: the faster you design it, the weaker it will be! Make sure that the transmission switch is set to the gear ratio you want (high or low) and that this switch is protected from being accidentally hit during a match. We suggest that you tie it down in the position you want so that it can not accidentally pop out of gear during a match.

4. ACTUATORS

Daimler Chrysler also arranged the donation of the two lightweight, black, plastic actuators that are in your kit. [See Fig. 22] They are used in industry as automobile climate control actuators. The arms on these actuators, like the arms on the wiper motors, may be modified. You don't need to worry about stalling these motors. They run with a low RPM and a high torque.

Their low weight makes them well suited for situations where you need motion out on a light appendage of your robot. The wire connectors that were donated did not quite fit the actuator housing, so the small plastic flange had to be trimmed off to make it fit. If your connector does not fit, see an OCCRA official or return it to OSTCNE and we will modify it for you.

Figure 22. DaimlerChrysler Climate Control Actuator.34

Page 35: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

5. GM TRUCK

The two window lift motors in your kit were donated by the General Motors Truck Group. [See Fig.23] The motor comparison data can be found in Appendix I. You will need to experiment a little with this one; there is nothing to stop you from using either the motor or the window lift mechanism by itself.

Figure 23. GM window-lift motor

The mechanism that GM uses to interface this motor with the window that it lifts is pictured on the left [See Figure 24]. Notice that there is a rail attached to the mechanism: this rail controls the scissor-action that results from the turning of the gear teeth. A portion of the mechanism has the appearance of an axe: you must resist the temptation to use it as one!

Figure 24. GM Window Lift Mechanism

X. PNEUMATICS

1. INTRODUCTION

OCCRA 2003 has kept the same pneumatics package as past OCCRAs. We originally added pneumatics for several reasons:

First, it is much simpler to design and build with pneumatics than with motor/chain/sprocket systems. After watching the OCCRA “How-to” video, attending the workshop given by SMC Pneumatics, Inc., or reading this booklet, you will be able to quickly and easily set up a basic pneumatic circuit. There were many times in our first year where a simple linear actuator was needed on the chassis or out on a robot’s end-effector but the kit contained no parts that could easily do it.

Second, pneumatic systems are very robust. If an electric motor encounters a load that it does not have the torque to move, the motor is “stalled.” This causes the current to increase dramatically, resulting in blown fuses, tripped circuit breakers,

35

Page 36: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

and/or fried motors. This does not happen to a pneumatic cylinder: it can stall against a load for an indefinite period of time with no adverse consequences.

Third, the use of pneumatics gives you a system where you can have both speed and strength at the same time. With electric motors and sprockets, you generally have to decide whether you want speed or strength and choose a sprocket ratio accordingly. For example, if you need a high output torque on a lift mechanism using a given motor, you need to use a large sprocket ratio that will make for a very slow moving lift mechanism, regardless of whether your lift mechanism is lifting a light load or a heavy load. With pneumatics, however, the output force is dependent on the surface area of the chosen cylinder and the pressure in the system, both of which are constants. Up until the cylinder encounters the load it can extend very quickly. Under light load conditions, the speed at which the cylinder extends or retracts depends primarily upon the amount of airflow and the volume of the cylinder. The cylinder can extend very quickly and deliver large forces.

Finally, fluid power systems are extensively used in almost all industries; since we want OCCRA to be educational and meaningful, adding this new kind of system broadens the educational experience in a significant way. SMC Pneumatics, Inc. and the Fluid Power Education Association have been very supportive of OCCRA because they realize that OCCRA is providing a valuable introduction to this important field.

2. OVERVIEWPneumatic systems use a gas (typically air) to transmit power through a circuit and do useful work. When a force is applied to an area(“psi” is short for “pounds per square inch”, the unit used in this booklet to measure air pressure). The term “circuit” refers to the complete path followed by the fluid as it flows from its source to the various output devices. The only pneumatic output devices that you have in your kit this year are the air cylinders. The cylinders in your kit are capable of delivering some very large forces: always stay clear of any cylinder in motion! A hand that gets caught between a stationary object and an extending cylinder is in danger of painful and potentially serious injury.

Hydraulic systems are similar to pneumatic systems but they use liquids (usually oil) instead of air. Because of the weight and the mess, don’t expect to see hydraulics in the OCCRA kit anytime soon.

Your robot’s pneumatic circuits will all begin with a compressor that pumps the air. This pressurized air then flows through tubing until it gets to air cylinders that can be extended and retracted

36

Page 37: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

by the air’s power. Along the way, valves and regulators control the amount of air pressure and the amount and direction of airflow. In this booklet you will see how some of the pneumatic components functions within this power distribution system. You are advised to take these components out and hook them up as you are reading this; by the time we finish, you will have a working pneumatic circuit! (Note: the relief valve used in your kit will be longer than the one pictured in Figure 25 and it will be brass)

Figure 25. The Thomas compressor with attached relief valve.

3. THE COMPRESSOR

Thomas Industries makes the compressor in your kit. [See Fig.25] There is an electric motor inside the compressor housing that supplies mechanical power to the compressor. Your kit also comes with a brass relief valve threaded into one of the ports at the top of the compressor. This relief valve has a ring on the end of it. Pulling on the ring unseats a plug that normally blocks an opening inside the valve. It is difficult to pull the ring out because there is a spring inside the valve that pushes the plug into the opening with a lot of force. If there is ever more than 120 psi of compressed air pushing from the other side of the valve, the spring will be overpowered and the plug will automatically open up. These relief valves should never open up but be warned: they make a lot of racket when they do. The sound is a series of sharp popping noises that can really startle you when it happens. If your system is properly set up, the relief valve will stay quiet. The relief valve is a safety feature: it means that you will never have more than 120psi of pressure in your system. The relief valves have a synthetic coating on the threads to seal them from leaking. This coating should not be removed or added to. The threads themselves are National Pipe Thread (NPT) standard. They have a tapering, or wedge-like shape as seen from the side. Do not over-tighten the relief valve when attaching it to the compressor! In past years, teams have cracked the head of the compressor by over-tightening the relief valve. You should hand-

37

Page 38: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

tighten the relief valve, then give it another quarter turn clockwise with a wrench to securely snug it up. Any more than that and you risk damage to the compressor. The compressor weighs almost 5 pounds. This compressor is going to shake a lot when it is running: you will need to securely bolt it down onto a piece of plywood or an aluminum plate. The feet of the compressor have vibration isolation mounts that need to be left on when installing the compressor.

The compressor turns electric power into fluid power by compressing the air. Although fairly efficient, the compressor does waste some energy in the form of heat and sound. The head of the compressor, in particular, can get very hot while the compressor is running: use caution around the compressor if it has been recently running! To test your compressor, hold the compressor securely on a tabletop and quickly touch the red and black wire leads to the positive (red) and negative (black) terminals of your gray Exide battery. You should notice the sudden sound, vibration, and airflow created as the compressor begins to run. The air outlet at the top of the compressor, opposite the relief valve, should now have air blasting out of it. Disconnect the wire leads from the battery after a few seconds, before the compressor has time to overheat. To attach tubing to the compressor you must first attach a fitting to the output port. Screw one of the valve-to-tube “quick connect” fittings found in

your kit [See Fig.26]. Once this fitting is tight, simply push a length of 1/8th inch tube into the fitting. We suggest that you use lengths of tubing that are at least a couple feet long for testing and prototyping (later you can cut tubing to custom lengths to match the design needs of your machine.) Give a little tug on the tubing: it should not come loose from the fitting.

Figure 26. Check Valve with quick connect fitting.

Do not pull hard on the tubing or attempt to unfasten the tubing without first pushing the release button. The release button is the plastic ring that surrounds the tubing as it enters the fitting. (If you are really slick, you’ll get to where you can release the tubing with just one hand.) Later, when you are working on the pneumatic system, remember to release the pressure in the system before you attempt to undo any of the tubing from these quick connect fittings. There are two sizes of quick connect fittings in your kit because there are two sizes of internal thread used on the pneumatic kit components. One fitting

38

Page 39: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

has straight threads and a black ring gasket above the threads to seal for leaks. The other fitting has white synthetic material on the NPT threads. If the fitting you are attempting to fasten onto a device does not seem to fit, try the other one. Both are designed for the 1/8” blue tubing that is in your kit. (No other size or type of tubing is allowed on the OCCRA robots; this is a safety issue and we strictly enforce this rule).

The tube running from the compressor must connect first to a check valve [see Fig. 26] that keeps the pressurized air in your circuit and prevents it from returning through the compressor. From the check valve, your tubing run should go to a Y-fitting where the circuit splits: one line should run to your first accumulator tank and the other to a second Y-fitting. At the second Y-fitting, have one line go to your second accumulator tank (if you are using

one) and route the other line to the regulator. Remember: you are only allowed to use 60 psi of gage pressure.

Figure 27. Demonstration Board for OCCRA 2003 Kit Pneumatics.

When you build your pneumatic circuits on the robot, the power to the compressor will not come straight from the battery. Your compressor must get its power from the small black automotive relay found inside the plastic robot control box that houses the electrical control system onboard the robot. Later I will explain how the relay knows when to supply current to the compressor.

4. THE ACCUMULATOR TANK

Your kit contains two accumulator tanks to store the compressed air. Each tank serves as a reservoir for approximately 18 cubic

39

Page 40: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

inches of pressurized air. As explained earlier, you may use either one or both on your robot, depending on your machine’s

demands. If you only have one or two of the smaller actuators, one tank may be all you need. [See Fig.28] The tank(s) needs to be connected using the quick connect fittings. One of the tanks should have the pressure switch screwed into it.

Figure 28. Accumulator Tank

5. THE PRESSURE SWITCH

So that the compressor does not have to run continuously, a pressure switch is included in your kit. [See Fig.29] This switch is made by SMC and can be set to click off at anywhere from around 20 psig to 100psig. This setting can be changed (there is a shiny gray screw at on the top of the switch) and we recommend that you screw it all the way clockwise and leave it there. When the robot is powered up, the compressor will run until the 100psig value is reached. This pressure level closes the “normally open” pressure switch, causing the “normally closed” compressor relay to open up. The compressor will then shut off and stay off until the pressure drops because of normal usage or leaks in the circuit.

Figure 29. A Pressure Switch Controls the Compressor.

6. REGULATOR

The regulator in your kit has a black cap on top that must be pulled up and turned to set the pressure. Once the desired pressure is reached, the cap needs to be pushed back down so that it locks into place. The regulator should be downstream from the accumulator tanks so that the tanks can store more air. Look at the demonstration board in [Fig. 27] and you can see that the regulator is placed in the pneumatic circuit between the

40

Page 41: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

accumulator tanks and the control valves. If multiple valves are to be used, I suggest attaching a manifold to the line that exits the regulator. If you do not need to use all of the ports you can run tubing between the unused ports to seal them off. [See Fig. 30] The regulators must be set to 60 psi during all OCCRA competitions.

Figure 30. Regulator With Pressure Gage and Manifold.

7. DIRECTIONAL CONTROL VALVES Two types of valves in your kit are electrically operated. The single solenoid valve has only one set of wires running from it. [See Fig.31] Attach terminals to these wires and connect the wires to one of your Spike relays. There are five one-eighth inch ports on this valve and all are marked on the face of the valve. Connect valve-to-port fittings on the ports marked “A”, “B”, and “P”. The port marked “P” is where you connect the pressure supply line to the valve. If the valve’s solenoid does not receive a signal, the air will automatically flow out of the “B” port. If a control signal is sent from the Spike relay to the solenoid, the valve’s internal spool will shift over and air will automatically begin coming out of the “A” port: try it and see! If you connect the tubes from ports “A” and “B” to one of your double-acting cylinders, the rod of the cylinder should extend and retract as the Spike relay is operated from the driver station. You can also test the valve’s operation without hooking up the wires by pressing the orange “manual override” button on the valve. As long as there is pressure in the system, the cylinder should extend and retract.

The second type of electrical valve has two sets of wires coming from it. This valve is called a “double solenoid” valve. You hook this valve up much like you did the single solenoid valve. The difference is that pulsing one of the solenoids makes the cylinder extend but it does not retract until you pulse the other solenoid. Figure 31. Single-Acting and

Double-Acting Valves Solenoids with Directional Control Valves.

41

Page 42: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Always avoid pulsing both solenoids at the same time: although you will not hurt anything on the valves, you will not be able to predict which way the air will flow. You will probably want to hook one of the solenoids up to the trigger of a joystick and the other solenoid up to the button of the same joystick.

8. FLOW CONTROLS Four flow controls have been included in your kit. [See Fig.32] These flow controls are mounted directly to the ports of your cylinders and will serve to control the speed of your cylinders when they are extending or retracting. A flow control valve allows air to pass without restriction in one direction but limits the flow in the other direction. They do this by an internal architecture that functions like a check valve and a needle valve in parallel arrangement.

Figure 32. Flow Control attached to adapter bushing on 10-inch cylinder.

An arrow on the flow control shows the direction of the greatest air flow. Turning the thumbscrew clockwise on the flow control valve will cause the needle valve to seat itself and restrict the flow of air in the controlled direction. If this was done to a flow control valve on the line feeding into the cap end of a cylinder, you would have “meter-in flow control” of the cylinder and the cylinder would extend more slowly. The more you tighten down the flow control screw, the slower the cylinder extends. You could also control the speed of a cylinder by controlling the flow of air leaving the cylinder: this would be “meter-out” flow control and would work better in cases like when the load on the cylinder would tend to want to “run away” on you. Imagine you are taking a child for a ride in a toy wagon. Going uphill, you definitely have more control if you pull the wagon handle from the front of the wagon and you are uphill from the wagon. Try pulling from the front when the wagon is going downhill and you’ll quickly realize the control problem as the wagon is smashing into your heels. It is like that with pneumatics, too: there is sometimes a direction the load naturally wants to travel. This may influence which type of arrangement you give the flow control valve. For example: If a double-acting cylinder with the rod-end facing upward has a heavy load pushing downward on the rod, making it

42

Page 43: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

naturally want to retract, you are probably going to be better off using the flow control valve to control the air flowing out of the cap end (bottom) of the cylinder during the retraction.

9. PNEUMATIC LIMIT SWITCHES You have a set of pneumatic valves in your kit that were donated by SMC Pneumatics. These pneumatic limit switches are actually valves that operate like sensors. [See Fig.32] A “P” marks the port where you hook up your pressure line as explained earlier. Normally, air cannot flow through the valve and so your output port will have no air flowing out of it. If the switch comes into contact with something and the lever gets pushed in, the valve suddenly opens and air begins to flow out of the output port through whatever line you have attached there. Therefore, if you had a pneumatic device (such as a cylinder) and you did not want it to actuate until some contact was made somewhere, adding a pneumatic limit switch in series might solve your problem. Notice the schematic symbols on the side of the valves in your kit show you how the valves function. For the limit switch valve, there are two positions, indicated by the two boxes on the schematic. [See Figure 32] One box shows the air flow is unrestricted while the other box shows a blocked path.

Figure 32. Pneumatic limit switch

10. PNEUMATIC ACTUATORS

There are five pneumatic cylinders, or actuators, in the OCCRA kit. [See Fig.33] The ones with the 4-inch stroke have a single opening (port) and can be run with the single solenoid control

valves. [See Fig. 34] These cylinders have a spring inside that will automatically retract them when the signal from the Spike relay ends. The other three cylinders are double acting and will need to be extended and retracted by air power. Either type of control valve can be used to control them.

Figure 33. A double-acting cylinder from SMC

43

Page 44: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Notice that the large 10-inch cylinders have a 2-inch bore. The head of the piston inside the cylinder is circular, so the area of the piston head equals “pi” times the radius squared; since the radius of the largest cylinder is 1”, the area of the piston head must be 3.14 square inches. The OCCRA regulators are required to be set to 60 psi. Since the force of a cylinder is equal to the pressure multiplied by the area of the piston, this means that the large cylinders will each generate around 180 pounds of force while extending. With two of the large cylinders working together, you can generate well over 360 pounds of force!

Figure 34. Single-Acting Cylinder.

11. COMPRESSOR RELAY

The compressor on your robot must attach to the 12V automotive relay. The relay is secured with Velcro tape to the bottom of the control box. [See Fig.35] Four wires coming from the relay will need to be attached: 1) the white wire, numbered 86 on the schematic drawing found on the side of the relay, needs to be connected to the pressure switch (the other side of the pressure switch attaches to the positive fuse block). 2) the black wire, numbered 30, needs to connect directly to the positive fuse block; 3) the blue wire, numbered 85, needs to connect to ground, so attach it to the negative (ground) terminal strip inside the control box; and 4) the green wire, numbered 87a, needs to be connected to the red wire coming from the compressor (the black wire from the compressor attaches directly to ground).

Figure 35. The Bosch relay that is used to control current to the Thomas compressor; the pressure switch activates the relay.

44

Page 45: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

XI. LIMIT SWITCHES

Your kit contains two limit switches that connect to the 25-pin digital input terminal of your Robot Controller. These “normally open” switches can gather information and pass the information along to the Robot Controller where they trigger automatic responses by the control (default) program. The limit switches are on-board sensors that detect when the motion of something has reached a certain “limit”.

For example, suppose your robot’s arm kept getting smashed into the floor and your gripper was getting damaged. You could place a limit switch so that the lever of the switch was in the path of the arm and the switch got closed right before the gripper hit the floor. If wired properly, the Robot Controller would turn off the motor running the arm before the gripper hit the floor, thus preventing damage.

Figure 36. A limit switch wired as a digital input to the Robot Controller.

The first step in using limit switches is to decide which motor(s) you wish to control. Next, decide which Spike relay or Victor speed controller you are going to use to control that motor. Then, decide whether you want to stop the forward or the reverse motion of that motor. The chart in Appendix V should then be consulted to determine which signal pins need to be wired in order for the robot to interpret and use the information in the way you desire. Finally, consult the wire and pin map of the cable in Appendix IV. This mapping of the 25-pin digital-input computer cable tells you the colors of the two computer wires you need to strip and attach to the terminal screws of the “normally closed” limit switch.

For example, suppose the Spike relay #1 ran a motor and you wished to limit the forward motion of that motor. Looking at Appendix V tells you that signal pin number one is the required input pin; any ground pin can be used and number six is available, so you know that pins one and six need to be hooked to your switch to turn off relay #1 in the forward direction. You then look to the chart in Appendix IV and see that a brown and a green wire must be

45

Page 46: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

stripped and attached to the switch. [Figure 36 shows this arrangement.]

XII. POTENTIOMETERS

Your kit includes two 100K potentiometers (or “pots”: variable resistors used to control voltage) that you can use to provide analog input to your controller. The default program does not allow for such inputs, so changing the default program will be necessary if you want to “put these pots to work”. There are seven analog inputs available for your use. The PBASIC variable names for these inputs are: sensor1, sensor2…etc. See the Innovation First Users’ Manual on their website (www.innovationfirst.com ) for a more detailed explanation. Since we are only supplying two pots for the OCCRA 2002 kit, you will need to go buy your own if you need additional pots. Make sure that you only buy 100K pots; I suggest you get high quality ones like we did so that electronic “noise” does not cause you problems.

Analog inputs connect to the 25-pin analog input terminal of your Robot Controller using the cable supplied in your kit. One end of the cable needs to be split open so the colored wires inside are exposed. Consult the wire and pin map of the cable in Appendix IV. This mapping of the 25-pin computer cable tells you the colors of the three computer wires that you need to strip and attach to the terminals of your pot, based on which pins you are trying to connect.

There are 3 terminals on each pot. Attach wires to the terminals by either soldering or using the solder-less crimped connectors that were shown earlier. As the pot’s shaft rotates, the amount of resistance (and therefore the voltage) across the terminals varies. The end terminals are fixed; one should have its wire connect to one of the +5V pins (numbered 3, 6, 9, 12, 14, 17, 20, or 23). The fixed terminal should connect to one of the ground pins (numbered 4, 7, 10, 13, 15, 18, 21, or 24). The center terminal on the pot is the one that moves internally. The wire from the center terminal connects to the pin of the analog input for whatever sensor variable you wish it to be. Pins 2, 5, 8, 11, 16, 19, and 22 are the designated analog inputs. The analog information that gets fed into the robot controller will be a 0V to 5V signal: what your robot does with the information depends on how you program the robot.

XIII. PROGRAMMING

As stated earlier: you do not need to program your robot to play the game: program your robot controller at your own risk! The default program gives you a great deal of flexibility and many successful teams never change the default program. If you decide

46

Page 47: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

you want to have more advanced control of your robot, you must customize the default program and develop what is known as a “user” program. The programming utility and manuals can be obtained directly from the Internet at www.parrallaxinc.com. You can get the source code for the default program from www.innovationfirst.com. All programming must be done in the PBASIC language. There is a little black plastic “jumper” that is used to determine which program your controller is running: the default or the user program. When you received the controller from us, the jumper was in the default position; you will need to move the jumper up a notch to switch on your user program. The Innovation First manual says that: “Adding a user program will not erase the default program, so the Robot Controller can be easily changed back to use the default program in the event of problems with the user program.” Remember to always press the reset button on the Robot Controller whenever you change the jumper setting. Look to Appendix VI, Jim Zondag’s condensed guide to robot programming, for some valuable pointers; do not look to OCCRA officials to bail you out if your program develops bugs.

XIV. LIGHTS

A light has been added to the kit of materials and is required to be plainly visible on the OCCRA robots. This will assist the spectators, judges, and referees in identifying which alliance each robot is on. The lights must be run off of the relay #8 output. Since the light’s metal housing is the ground connection, the lights must be attached to the robots on a nonmetallic surface. The colored prisms can be switched by using a screwdriver to loosen the retaining ring-clamp on the base of the light. The black wire coming from the relay attaches to the grounded housing, the red power lead attaches to the red wire that leads into the base of the light.

XII. CONCLUDING THOUGHTS

This booklet is not an all-inclusive guide to robot building and is still not complete. I have attempted to hit the essential elements so that you can understand the kit of parts while learning a few scientific principles. The booklet will continue to grow and be updated as OCCRA progresses. With this booklet you should also have a helpful outline by Tom Rice. Mr. Rice's approach deals with some practical considerations for designing and fabricating to help you develop your ideas and make them happen. I will attempt to update this booklet with corrections, additional resources and points of interest before the first tournament. An OCCRA technical support web page is being set up which, for now, is reached through our host: www.chiefdelphi.com; eventually, this site will have links from an OCCRA home page. The web page will list questions that people have submitted along

47

Page 48: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

with the answers formulated by the game/kit committee: Justin Howard, Jim Zondag, Mike Martus, Rob Jenkins, Roosevelt Daniel, Marjory Stager, Chuck Gosdzinski, Cherry Drukas, Jeff Waeglin, and Mike McIntyre. This group has put together an incredible kit of materials for you. They have worked tirelessly to assemble the kits and devise an exciting game. Furthermore, they have the technical expertise to clear up any of your questions. I want to extend a special thanks to Joe Johnson and Jim Zondag for their patience in walking me through the workings of the Innovation First Control System, to Ken Patton and Norm Peralta for developing the control box and explaining powertrain design, and to Dave Johnson for his explanations of pneumatics. Their help was invaluable.

48

Page 49: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

APPENDIX IMOTOR COMPARISON CHART

2003 O C C R AMOTORS

(All data approximate at 12 VOLTS)

Gearbox Ratio

Gearbox Efficiency

StallTorque

StallCurrent

FreeSpeed

FreeCurrent

Peak OutputPower

Bosch, motor only - - 0.65 114 A 20,000 RPM 2.5 A 340 W

Bosch, motor/gearbox in high 20:1 80% 10 N-m 114 A 1,000 RPM 2.5 A 260 W

Bosch, motor/gearbox in low 64:1 70% 29 N-m 114 A 300 RPM 2.5 A 230 W

Delphi Seat Motor (Mfg: Keyang)With square hole output shaft

- - 2 N-m 20 A 600 RPM ? 31 W

Daimler Chrysler Wiper Motor (Mfg: Denso or Valeo)

- - 27 N-m 36 A 70 RPM 2 A 45 W

Keyang Motor from Delphi withIntegral round output shaft

- - 4 N-m Approx.20 A

Under 200 RPM

? Approx.24 W

Motor from GM Truck & Bus - - 12 N-m Approx.20 A

70 RPM ? Approx.22W

Daimler Chrysler ClimateControl Actuator

- - 3 N-M .3 A 7 RPM .05 A Approx.5W

APPENDIX IISAFETY PRECAUTIONS FOR THE

49

Page 50: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

OAKLAND COUNTY COMPETITIVE ROBOTICS ASSOCIATION

As in all high school athletic competition, OCCRA competition carries an element of risk to the participants. The physical risk to students in an OCCRA competition, however, is much less than in other types of high school athletic competitions since robots substitute for students as the play pieces and therefore receive the contact. Getting tackled by a 200lb. linebacker running full speed puts a student football player at a far greater risk than any robot would ever pose. When a baseball player is at bat and is facing an 80 mph fastball or, as a base runner, must try to get past the catcher at home plate, significant risks are involved. Sprained/broken ankles, concussions, torn ACL’s (in knees)…etc. are all common occurrences in even “non-contact” sports like basketball, track and soccer. We could make small, toy-sized robots for OCCRA, but the Mission of OCCRA dictates that it be a good spectator sport that generates enthusiasm and celebrity for our students. To put OCCRA on the same level of spectator excitement as sporting events, large play pieces (i.e. robots) are necessary.

The size of the robots (125 lb. max.) and the forces needed to move them lead to some inherent risks. Although these risks are small compared to what is currently accepted in high school sports, they still need to be minimized. An effort has been made to identify the primary risks and address them in OCCRA’s operating procedures. Furthermore, OCCRA volunteers at all tournaments work to remind people of these risks and the safety procedures outlined in the rules. The physical risks have been classified into 3 categories: electrical, mechanical, and chemical:

ELECTRICAL SAFETY12 V sealed lead-acid batteries power the robots. The operator controllers, although they

plug into 120VAC outlets, have transformers that drop the voltage to 12 VDC. This eliminates electric shock as a serious concern. Injury due to burns and electrical fires is still possible. The 12 V batteries are capable of delivering large amounts of current in the case of a short circuit. This current surge could turn normal wires into toaster coils. Even in normal operation, a stalled motor can become dangerously hot. To reduce this risk, fuses and circuit breakers have been added to all circuits on the robot as part of a pre-assembled robot control box that all teams are given; this way, the circuits are properly protected. Teams simply have to attach motor wires to the speed controllers and relays that are already protected properly. It is against the rules to do any modification to the control box. This rule is explained at Kickoff, is repeated several times in the rule book, is discussed at all workshops, and is mentioned on the “How-To” video tape. On the outside of the control box there is a “Master” kill switch (circuit breaker) which teams must leave easily accessible. This button shuts off all power to the robot the moment it is pushed. Robots must go through a safety inspection at all tournaments and these safety features are checked to insure compliance. Finally, the official control station at all tournaments can instantly shut off signals and power to any robot if a safety concern is raised during a match. During the building phase there will not be much control from the OCCRA volunteers. Teams need to enforce the safety rules within their own schools, but the OCCRA planning committees has attempted to give them all the procedures, advice and training they need to make it happen.

MECHANICAL SAFETYThe biggest safety concerns are with mechanical issues. Injury to the eye is possibly the

greatest single danger. All people in the pit areas are required to wear safety glasses, which OCCRA provides if needed. There are also some safety glasses included in the kit of materials and all mentors are urged to demand that students wear them while working on their machines. During competitions, OCCRA referees monitor that all student drivers and coaches are wearing their safety glasses.

50

Page 51: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Injury through the misuse of tools is also a very real threat to safety. Precise machining (welding, lathe, milling) is forbidden by OCCRA rules and this eliminates many of the more dangerous machining tools. Furthermore, a list of “legal” tools has been included in the rulebook. Still, a student could break the rule and use a table saw, for example. It is not possible for OCCRA to police such transgressions; the OCCRA planners emphasize the rules and rely on the adult team leader(s) to keep watch. The risk of hand tools and small power tools remains. Cuts, abrasions, and other traumas, while not as serious, are still going to happen. OCCRA planners continue to inform and warn student and adult participants through the rulebook, workshops, videos…etc. Remember that moving joints, whether on your robot’s arm or on a set of pliers, creates “pinch-points” that can cause painful and possibly serious injuries to hands and arms. All OCCRA participants must be aware of the potential dangers and be ever vigilant!

The pneumatic devices and the motors on a robot can develop dangerous forces. Make sure that all power is turned off and all air pressure is released before working on a robot or transporting it. Do not allow anybody to stand near a robot that has been powered up. I carelessly walked in front of a live robot at a tournament last year and had a toenail ripped off when the robot suddenly and unexpectedly backed up. I will never make that mistake again; if you understand the level of pain I experienced, you will never let it happen to you, either.

CHEMICAL SAFETYThe lead-acid batteries used in OCCRA are sealed, so there is virtually no risk of acid

burns. There are no chemicals in the kit that are dangerous to the general population. A few of the components contain nickel plating and there is some latex tubing in the kit. Teams should check with their members to see if any have severe nickel or latex allergies. The latex can be easily avoided. The nickel is a little harder to spot and, therefore, it is harder to avoid.

The main electrical connections in the kits have been soldered for the teams by OCCRA volunteers, and the organizers supply solderless terminals for the others. Some teams may still choose to make solder connections. These teams are warned that soldering wire connections creates fumes that can pose a health risk if the work site is not properly ventilated.

Questions or concerns regarding OCCRA and safety should be addressed to: [email protected]

APPENDIX IIIOakland County

Competitive Robotics Association

Mission:

The Oakland County Competitive Robotics Association (OCCRA) shall organize and administer a high school competitive robotics league in Oakland County for the purpose of:

1) Generating enthusiasm for technical and academic disciplines such as design, engineering, physics, mathematics, and electronics through student designed and built robots

2) Providing a format for integrating and applying diverse scientific, technical, and other areas of study within the high school curriculum

51

Page 52: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

3) Providing recognition and encouragement for students who devote their energies to these technical, scientific, and other areas of study

4) Promoting team/workplace skills and good sportsmanship

5) Raising awareness within high schools of the diverse technical career options available in our county and state

6) Creating partnerships with corporations and the educational community that will enrich the high school experience for our students by providing greater accessibility to people in scientific and technical careers.

APPENDIX IVWIRE & PIN MAP FOR LIMIT SWITCHES

The chart below and the one in Appendix V can be used to determine which wires you need to connect to your relays and limit switches in order to control motors.

PIN NUMBER WIRE COLOR PIN NUMBER WIRE COLOR1 brown 14 black/white2 red 15 light blue3 orange 16 yellow/black4 pink 17 orange/black5 yellow 18 red/white6 green 19 green/white7 aqua 20 green/white8 blue 21 green/white9 purple 22 green/white10 gray 23 green/white11 white 24 green/white12 black 25 green/white13 brown/white

Note: Where two colors are listed for a wire it means that the wire is striped with the two colors.

APPENDIX V

52

Page 53: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

This is chart is from the InnovationFirst website: you can download the entire control system manual for free if you would like to learn more about your control system.

APPENDIX VI.PROGRAMMING OVERVIEW

53

Page 54: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

P-Basic Overview, Command and Operator Reference for Innovation FIRST Robot ControllerSummarized by Jim Zondag, Team #33 OCCRA 2002

This document covers subject material needed to create most basic custom robot functions.All instructions listed below exist on the BSX2 version of the BASIC Stamp,Commands/Operators that are not useful in IFRC are not listed.

Variables and Constants:You may define up to 26 bytes of variables for use in your PBasic program. This space may be made up of any combination of variable sizes you wish. A variable should be given the smallest size that will hold the largest value that will ever be stored in it. If you need a variable to hold the on/off status (1 or 0) of switch, use a Bit. If you need a counter for a FOR…NEXT loop that will count from 1 to 100, use a Byte. And so on.The protocol for defining a PBasic variable is:

Name VAR Size Name can be whatever you choose, the Size argument has four choices:

1) BIT (1 bit) Ex: ITEM1 VAR Bit (Value of ITEM1 can be 0 or 1).

2) NIB (4 bits) Ex: ITEM2 VAR Nib (Value of ITEM2 can be 0 to 15).

3) BYTE (8 bits) Ex: ITEM3 VAR Byte (Value of ITEM3 can be 0 to 255).

4) WORD (16 bits). Ex: ITEM4 VAR Word (Value of ITEM4 can be 0 to 65535).

Variables can be given multiple names if desired using Aliasing. Aliasing allows you to call an existing variable by another name.

Ex: ITEM3 VAR Sensor1. In this case, the names Item3 and Sensor1 can be used interchangeably.

Sub-components of large variables may be aliased to have their own identity, Ex: SWITCH1 VAR ITEM4.bit0

In this case, variable SWITCH1 is defined to bit0 of the larger variable ITEM4. The default program uses this method to define the Operator and Robot Digital Inputs. You can assign names to constants in a similar fashion by using the CON directive.

Name CON Value Once created, named constants may be used in place of the numbers they represent. For example:

LIMIT CON 200 equates the name LIMIT to the value of 200 decimal anywhere it appears in you code. You may define as many constants as you like.

Numbers:PBASIC allows you to use several numbering systems.By default, it assumes that numbers are in decimal (base 10), our everyday system of numbers.You can also use binary and hexadecimal (hex) numbers by identifying them with prefixes.PBASIC will automatically convert quoted text into the corresponding ASCII code(s).

For example: 65 decimal%1000001 binary$41 hex“A” ASCII code for A (65)

54

Page 55: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Fractions and decimals components do not exist in PBasic, Only whole number integers. Remember this if you do any division math.

Labels:A label is simply a name you assign to a specific point in your code. This allows your program to branch to this point or address. The format is simply the name you want followed by a colon.

Label:Label can be any combination of letters and/or numbers up to 32 characters, but must begin with a letter.PBasic is not case sensitive so you can use upper case, lower case and mixed cases interchangeably.

LABEL = label = Label. Some names are off limits for labels, specifically; anything that is a PBasic instruction cannot be used as a label. For example, you can’t use GOTO as a label.

Timing:Doing any sort of time-based operation in a Robot is tricky. I recommend

that you avoid it wherever possible. Such operations include trying to create specific time delays, or trying to count fast-acting input events. Data packets are sent from Operator Interface every 25ms. Arrival of a data packet is what launches you code loop. The time it takes to run the main program loop is dependent on the complexity of your code. Your code will always run beginning on some multiple of 25mS, but its loop time can vary greatly depending upon what you are trying to do. If your code gets too long, you Robot will reset. If needed, absolute time measurements are possible using the packet_num and delta_t data from the Master Processor, see Innovation FIRST Control System manual for more detail.

Comments:If PBasic sees a single quote ‘ anywhere in a line, everything to the right of the quote is considered a comment.Comments allow you to add some description into your code to help you document how it works. Comments are also very useful for code editing. If you want to remove a function without deleting it, you can “comment it out”, making it non-functional but easily recoverable. You may add as many comments as you like, they take up no code space since they do not get loaded into the Robot Controller.

PBasic Command Reference:

BRANCHING COMMANDSIF...THEN Compare and conditionally branch.

Format: IF Condition THEN AddressEvaluate Condition and, if it is true, go to the point in the program marked by

Address.• Condition is a statement, such as “x = 7” that can be evaluated as true or false. The Condition can be a very simple or very complex relationship, as described below.• Address is a label that specifies where to go in the event that Condition is true.Comparison operators: =, <>, >, <, >=, <= =, <>, >, <, >=, <=Conditional Logic operators: AND, OR, XORFormat of Condition: Variable Comparison Value; where Value is a variable or constant

Value1 Comparison Value2; where Value1 and Value2 can be any of variable, constant or expression.

55

Page 56: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

IF...THEN is PBASIC’s decision-maker. It tests a condition and, if that condition is true, goes to a point in the program specified by an address label.

BRANCH Branch to address specified by offset.Format: BRANCH Offset, [Address0, Address1, ...AddressN ]Go to the address specified by offset (if in range).• Offset is a variable/constant/expression (0 – 255) that specifies the index of the address, in the list, to branch to (0 – N).• Addresses are labels that specify where to go. BRANCH will ignore any list entries beyond offset 255.The BRANCH instruction is useful when you want to write something like this:

IF value = 0 THEN case_0 ' value =0: go to label "case_0"IF value = 1 THEN case_1 ' value =1: go to label "case_1"IF value = 2 THEN case_2 ' value =2: go to label "case_2"

You can use BRANCH to organize this into a single statement:BRANCH value, [case_0, case_1, case_2]

This works exactly the same as the previous IF...THEN example. If the value isn’t in range (in this case if value is greater than 2), BRANCH does nothing and the program continues with the next instruction.

GOTO Branch to address.Format: GOTO AddressGo to the point in the program specified by Address.The GOTO command makes the BASIC Stamp execute the code that starts at the specified Address location. The GOTO command forces the BASIC Stamp to jump to another section ofcode. A common use for GOTO is to create endless loops; programs that repeat a group of instructions over and over.

GOSUB Branch to subroutine at address.Format: GOSUB AddressStore the address of the next instruction after GOSUB, then go to the point in the program specified by Address; with the intention of returning to the stored address.GOSUB is a close relative of GOTO, in fact, its name means, "GO to a SUBroutine". When a PBASIC program reaches a GOSUB, the program executes the code beginning at the specified address label. Unlike GOTO, GOSUB also stores the address of the instruction immediately following itself. When the program encounters a RETURN command, it interprets it to mean, “go to the instruction that follows the most recent GOSUB.”

RETURN Return from subroutine assuming there was a previous GOSUB executed.RETURN sends the program back to the address (instruction) immediately following the most recent GOSUB.

RUN Switch execution to another program page.Advanced Function: see Basic Stamp Manual

LOOPING COMMANDSFOR...NEXT Establish a FOR-NEXT loop.

Format: FOR Counter = StartValue TO EndValue {STEP StepValue} … NEXT

56

Page 57: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Create a repeating loop that executes the program lines between FOR and NEXT, incrementing or decrementing Counter according to StepValue until the value of the Counter variable passes the EndValue. This can be used for time delays or repetitive operations but is not particularly useful in Robot Controller: see Basic Stamp Manual for more detail.

NUMERIC COMMANDSLOOKUP Lookup data specified by offset and store in variable.

This instruction provides a means to make a lookup table.Advanced Function: see Basic Stamp Manual

LOOKDOWN Find target’s match number (0-N) and store in variable.Advanced Function: see Basic Stamp Manual

RAM ACCESSGET Read Scratch Pad RAM byte into variable.

Format: GET Location, VariableRead value from Scratch Pad RAM Location and store in Variable.• Location is a variable/constant/expression (0 – 63 BS2sx) that specifies the Scratch Pad RAM location to read from.• Variable is a variable (usually a byte) to store the value into.

PUT Write byte into Scratch Pad RAM.Format: PUT Location, ValuePut Value into Scratch Pad RAM Location.• Location is a variable/constant/expression (0 – 63 BS2sx) that specifies the Scratch Pad RAM location to write to.• Value is a variable/constant/expression (0 - 255) to store in RAM.

ASYNCHRONOUS SERIAL I/O SERIN Input data in an asynchronous serial stream. Only one occurrence of

this instruction occurs in robot program: see Basic Stamp Manual for more detail.

SEROUT Output data in an asynchronous serial stream. Only one occurrence of this instruction occurs in robot program: see Basic Stamp Manual for more detail.

EEPROM ACCESS DATA Store data in EEPROM before downloading PBASIC program.

Advanced Function: see Basic Stamp ManualREAD Read EEPROM byte into variable.

Advanced Function: see Basic Stamp ManualWRITE Write byte into EEPROM.

Advanced Function: see Basic Stamp Manual

PROGRAM DEBUGGINGDEBUG Send information to the PC for viewing.

57

Page 58: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

This instruction can be your best friend but can also wreak havoc. Use with care. Remember to always delete or comment out DEBUG instructions before competing with your robot. They slow down the operation of the Robot Controller and can cause your robot to reset on the field. Format: DEBUG OutputData OutputData is a variable/constant/expression (0 – 65535) that specifies the information to output. Valid data can be ASCII characters, decimal numbers, hexadecimal numbers, or binary numbers. Data can be modified with special formatters.Formatters you are likely to use:

DEC displays numeric value in decimalHEX displays numeric value in hexadecimalBIN displays numeric value in binary

Since individual DEBUG instructions can grow to be fairly complicated, and since a program can contain many DEBUGS, you’ll probably want to control the character positioning of the Debug Terminal screen. DEBUG supports a number of different control characters, some with pre-defined symbols. SPECIAL CONTROL CHARACTERS.Clear Screen CLS Clear the screen and place cursor at home position.Home HOME Place cursor at home in upper-left corner of the screen.Bell BELL Beep the PC speaker.Backspace BKSP Back up cursor to left one space.Tab TAB Tab to the next column.Carriage Return CR Move cursor to the first column of the next line

In your DEBUG commands, you can use identifying string symbols in quotes, for example: DEBUG "Hello", CR displays "Hello" followed by a carriage return. These can be used in combination with any of the above control characters. This can be very useful for identifying data on the PC screen when many debug statements are used at once. There are many additional Debug options, See Basic Stamp Manual for

more detail.

Operator Reference:

Math and Logical Binary (two-argument) Operators:

Operator Symbol Description+ Add

The Addition operator (+) adds variables and/or constants, returning a 16-bitresult. Works exactly as you would expect with unsigned integers from 0 to 65535. If the result of addition is larger than 65535, the carry bit will be lost.

- Subtract

58

Page 59: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The Subtraction operator (-) subtracts variables and/or constants, Returning a 16-bit result. Works exactly as you would expect with unsigned integers from 0 to 65535. If the result is negative, it will be correctly expressed as a signed 16-bit number.

* MultiplyThe Multiply operator (*) multiplies variables and/or constants, returning the low 16 bits of the result. Works exactly as you would expect with unsigned integers from 0 to 65535. If the result of multiplication is larger than 65535, the excess bits will be lost. Multiplication of signed variables will be correct in both number and sign, provided that the result is in the range -32767 to +32767.

/ DivideThe Divide operator (/) divides variables and/or constants, returning a 16-bit result. Works exactly as you would expect with unsigned integers from 0 to 65535. Use only with positive values; signed values do not provide correct results.

// Modulus (Remainder of division)Advanced Operator, see Basic Stamp Manual

MIN Limits a value to a specified lowThe Minimum operator (MIN) limits a value to a specified 16-bit positiveminimum. The syntax of MIN is: Value MIN Limit

MAX Limits a value to a specified highThe Maximum operator (MAX) limits a value to a specified 16-bit positivemaximum. The syntax of MAX is: Value MAX Limit

& Logical ANDThe AND operator ( & ) returns the bitwise AND of two values.0 AND 0 = 0, 0 AND 1 = 0,1 AND 0 = 0,1 AND 1 = 1

| Logical ORThe OR operator ( | ) returns the bitwise OR of two values.0 OR 0 = 0, 0 OR 1 = 1, 1 OR 0 = 1,1 OR 1 = 1

^ Logical XORThe Xor operator ( ^ ) returns the bitwise XOR of two values.0 XOR 0 = 0, 0 XOR 1 = 1, 1 XOR 0 = 1, 1 XOR 1 = 0

<< Shift LeftThe Shift Left operator (<<) shifts the bits of a value to the left a specified number of places. Bits shifted off the left end of a number are lost; bits shifted into the right end of the number are 0s.

>> Shift RightThe Shift Right operator (>>) shifts the bits of a variable to the right a specified number of places. Bits shifted off the right end of a number are lost; bits shifted into the left end of the number are 0s. Shifting the bits of a value right n number of times has the same effect as dividing that number by 2 to the nth power.

** High Multiplication (returns upper 16-bits)Advanced Operator, see Basic Stamp Manual

*/ Middle Multiply (returns middle 16-bits)Advanced Operator, see Basic Stamp Manual

DIG Returns specified digit of numberAdvanced Operator, see Basic Stamp Manual

REV Reverse specified number of bits Advanced Operator, see Basic Stamp Manual

Unary Operators (one-argument):

ABS Returns absolute value

59

Page 60: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

The Absolute Value operator (ABS) converts a signed (two’s complement) 16-bit number to its absolute value. The absolute value of a number is a positive number representing the difference between that number and 0.

SQR Returns square root of value

The Square Root operator (SQR) computes the integer square root of an unsigned 16-bit number. (The number must be unsigned since the square root of a negative number is an ‘imaginary’ number.) Remember that most square roots have a fractional part that the BASIC Stamp discards when doing its integer-only math.

~ InverseThe Inverse operator (~) complements (inverts) the bits of a number. Each bit that contains a 1 is changed to 0 and each bit containing 0 is changed to 1. This process is also known as a “bitwise NOT” or one's compliment.

- NegativeThe Negative operator (-) negates a 16-bit number (converts to its two’s

complement).COS Returns cosine in two's compliment binary radians

Advanced Operator, see Basic Stamp ManualSIN Returns sine in two's compliment binary radians

Advanced Operator, see Basic Stamp ManualNCD Priority encoder of a 16-bit value

Advanced Operator, see Basic Stamp ManualDCD 2n-power decoder

Advanced Operator, see Basic Stamp Manual

Important Comments about Math and Operators- 255 = Death

Always limit all numbers you pass to your SEROUT command to a max of 254. 255 is a special case for the RF radios will cause all kinds of problems if you try to send this number to the transmitter. Don't forget this, it will drive you insane if you do.

- > 65535 = DeathIf the results of any of your calculations exceed 65535 (216-1) you will overflow the processor's ALU and will not get the expected result. Example: 65536 = 0. Try to work with small numbers where possible.

- Negative Numbers = DeathNegative numbers are possible to manage in PBasic but in general will get you into trouble. Some of the operators will not return expected results if given negative numbers. I never use them; I can always find a way to make everything unsigned.

- Watch for divisional loss. Fractions do not exist in this environment, only whole integer numbers. Thus, when dividing numbers, the remainder is lost. Example: 3/2 is not 1.5 it is 1.

- Watch order of operations. When doing long strings of calculations in one line, if results of any of the operations in the sequence go negative, become less than one, exceed 65535, or have important fractional components, you will not get the expected results. I recommend several steps of simple calculations if you need to do anything complicated. This way you can insert DEBUG statements between operations.

60

Page 61: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

Innovation FIRST Robot Controller Default Code DescriptionA summary of the code sections in program Default.bsx Items in Bold are areas usually modified by a user writing custom code.

1. Stamp Directive *** NEVER CHANGE THIS! ***2. Declare Variables3. Define Aliases4. Define Constants for Initialization5. Define Constants for Communication *** NEVER CHANGE THIS! ***6. Main Program

A. I/O DeclarationsB. Initialize I/OC. Master CPU Initialization *** NEVER CHANGE THIS! ***D. MainLoop

1. SERIN Command2. Perform Operations – custom user code goes here.3. SEROUT Command4. Goto MainLoop

7. Stop

Notes:

Declare Variables: Any new variables you wish to use must be declared. You many have 26 bytes worth

total. While variables can be declared anywhere in your code, it is good practice to declare them all in one place at the top.

Define Constants for Initialization: This section controls which variables will be passed to you by the

Master Processor in the SERIN command line. SERIN Command: This is the instruction which receives all input data from the Master Processor. Make

sure that all of your variables are enabled above and are in the right order or you will not get what you expect. The input data is tied to the variable names here so if you mix up, you will be working with the wrong data in your code.

Perform Operations: You can add any number of custom functions and subroutines here. The bodies of

your subroutines may be placed at the bottom of you code below the STOP command.

SEROUT Command: This is the instruction which passes all output data to the Output Processor. Make

sure that you send all of your variables in the right order and that you don not delete any elements from the array.

Important Websites:www.parallax.com – Basic Stamp Manualwww.innovationfirst.com – Innovation FIRST Control System Manual

61

Page 62: A GUIDE TO YOUR 2001 - The Juggernauts Guide Parts 1 and 2.doc · Web viewGM TRUCK 35 1. INTRODUCTION 35 2. OVERVIEW 36 3. THE COMPRESSOR 37 4. THE ACCUMULATOR TANK 39 5. THE PRESSURE

62

VICTOR

SPIK

PWM Out

Relay O

ut

Motor

PWM Out

Motor

Radio

+12V

+12V

+12V

RS-422

3 Wire Jumper

3 Wire Jumper

9 Pin Cable

Robot Controller

Bi-directional Variable SpeedDrill MotorWiper Motor(any motor if needed)

Bi-directional On/OffWindow MotorSeat MotorActuatorLight

Potentiometer

Analog

Inputs

Basic Robot Electrical System SchematicFor Port Pinout Information, see Innovation FIRST Control System Manual

Digital Inputs

Limit Switch