Sunteți pe pagina 1din 32

FRC Team 340 Electrical Manual

By: Eric Sakshaug (Previous FRC Team 340 Student, current FRC Team 340 mentor)

Table of Contents: 0: PREFACE 1. CRIO-FRC, CRIO-FRC2, AND CRIO MODULES/BREAKOUTS 1.1: About 1.2: Modules 1.3: Wiring 1.3.1: Wiring Of Power 1.3.2: Wiring Of Modules 1.3.3: Wiring Of Breakout Boards 1.4: Status LEDs 1.4.1: Power LED 1.4.2: FPGA LED 1.4.3: Status LED 1.4.4: User1 LED 2. DIGITAL SIDECAR 2.1: About 2.2: Wiring 2.2.1: Power 2.2.2: Robot Signal Light 2.2.3: PWM Speed Controllers 2.2.4: Servos 2.2.5: Relays 2.3: LEDs 2.3.1: Relay LEDs 2.3.2: RSL LED 2.3.3: Power LEDs 3. POWER DISTRIBUTION BOARD, MAIN ROBOT BREAKER, AND BATTERY 3.1: About 3.2: Wiring 3.3: LEDs 4. JAGUARS 4.1: About 4.2: Wiring 4.2.1: CAN Wiring For DB9 To RJ11 (From cRIO FRC To Black Jaguar) 4.3: Difference Between CAN And PWM 4.4: Calibration 4.5: Status LED 4.6: Limit Switches 4.7: Encoders 5. VICTORS 5.1: About 5.2: Wiring 4.3: Calibration

4.4: Status LED 6: SPIKE RELAYS: 6.1: About 6.2: Wiring 6.3: Status LED 7: SOLENOIDS TODO 7.1: About 7.2: Wiring 7.2.1: Wiring of FESTO Solenoids 7.2.1: Tubing 7.3: LEDs 8: D-LINK WIRELESS ROUTER TODO 7.1: About 7.2: Wiring 7.3: LEDs 7.4: Bridge/Auto/AP switch 9: POTENTIOMETERS TODO 9.1: About 9.2: Wiring 9.2.1: Wiring To The Analog Breakout 9.2.2: Wiring To A Jaguar 9.3: Physical Mounting 9.4: When To Use 10: ENCODERS 10.1: About 10.2: Wiring 10.2.1: Wiring To The DSC 10.2.2: Wiring To A Jaguar 10.3: Physical Mounting 10.3.1: Mounting In The Case Of A Super Shifter Or Toughbox 10.4: When To Use 10.4.1: Quadrature 10.4.2: Rotary 10.4.3: Absolute 11: SWITCHES 11.1: About 11.2: Wiring 11.2.1: Wiring The Switch To The Robot 11.2.2: Wiring The Switch To The Drivers Station (Via Cypress) 11.3: Physical Mounting 11.3.1: Mounting On The Robot 11.3.1.1: Mounting A Limit Switch 11.3.1.2: Mounting A Reed Switch 11.3.1.3: Mechanical Stop

11.3.2: Mounting On The Drivers Station 11.4: When to use 12: ULTRASONIC SENSORS TODO 12.1: About 12.2: Wiring 12.3: Physical Mounting 12.4: When to Use 13: LINE TRACKING SENSORS TODO 13.1: About 13.2: Wiring 13.3: Physical Mounting 13.4: When to use 14: BANNER SENSORS TODO 14.1: About 14.2: Wiring 14.3: Physical Mounting 14.4: When To Use 15: CLASSMATE PC 15.1: About 15.2: How To Use 15.3: Wiring 15.3.1: Wireless And Tethered Communications To/From Robot 15.3.2: Joystick And Cypress Wiring 15.3.3: Stop Button 15.3.3.1: Disabling The Stop Button 16: CYPRESS TODO 16.1: About 16.2: Wiring 16.2.1: Multiplexing 16.2.2: Co-processors 16.3: Cypress vs. Joystick 17: JUST A QUICK THING TO REMEMBER 0:PREFACE: This electrical manual is designed to assist the members of FRC team 340, and anyone who we choose to help, with the electrical system on their FRC robot. This manual details the wiring, and uses of each FRC electrical part, as well as several sensors, and a brief description of several components. While this project may have taken a long time to come to this point, the author has not had nearly enough time to document and detail every possible electrical component that can, and indeed may be used on the robot. However, this project will be continually updated, and the author would very much like to hear your feedback, whether it be criticism, compliments, or ideas. If you are a member of FRC Team 340, there is a forum post related to this document, if you are not, feel free to email the author, at:

Eric.Sakshaug11@gmail.com, make sure you include something in the title that the author can easily relate this document to. For further information for any electrical component, whether it be documented in this document or not, please refer to the components owners manual, or the manufacturers website for more details. 1. CRIO-FRC, CRIO-FRC2, AND CRIO MODULES/BREAKOUTS 1.1: About The cRIO-FRC and cRIO-FRC 2 are the brains of the recent robots (2009-present) the cRIO-FRC contains slots for eight modules, and can be used for pneumatic, analog, or digital breakouts, whereas the cRIO-FRC 2 only has four slots for the same applications. All cRIOs MUST contain at least one analog breakout module and one digital module to be FRC legal. The cRIO has RJ-45 ports (in the case of cRIO-FRC 2, one, or the cRIO-FRC, only one) that connect the cRIO to the wireless bridge on the robot to allow for communications. The cRIOs also contain a DB9 port for communications to the black Jaguar of a CAN system (via an RJ-11 6P6C adapter). Twenty-four volts are required for the cRIOs to run (although the CRIO-FRC 2 can run between 9 and 30 volts, it is not legal to run this device through a normal 12 volt port). Both the cRIO-FRC and cRIO-FRC 2 are manufactured by National Instruments. 1.2: Modules: There are currently three different modules used in FRC, the analog module (NI 9201), the digital I/O module (NI 9403), and the solenoid module (NI 9472). Of these three modules, two have associated breakout boards that adapt the input/output ports of the modules to easy to use two- and three pin connectors (the solenoid and analog breakouts respectively). The Digital I/O module features a DB37 connector, and no associated breakout board. This is because the DB37 connector on this module is to be connected to the DB37 connector on the Digital Sidecar (the Digital Sidecar is a breakout board in its own right, however, it is too large and cumbersome to fit in the area that would have normally been planned for a digital breakout board (note: this reason is pure speculation on the authors part)) 1.3: Wiring:

(Image adapted from figure 1 http://www.bu.edu/bufirst/files/2011/01/cRIO_Manual.pdf) Pictured above is the wiring panel of the cRIO-FRC, the cRIO-FRC 2 only has one RJ45 jack, rotated 90 degrees CCW and located at roughly where arrow 4 is pointing, has no DIP switches, and only has a 2 pin power input (as opposed to the cRIO-FRCs four pins).

(Image adapted from figure 1 http://www.ni.com/pdf/manuals/375770a.pdf ) Pictured above is the wiring panel of the cRIO-FRC 2, here you can notice the difference between the two computers. 1.3.1: Wiring Of Power: Wiring of the power for the cRIO-FRC will be done through its 4-pin power input, and, assuming that the uppermost power in on the cRIO is pin 1 (as shown in the picture above) then the positive line must go to pin 1, and the negative line must go to pin 3. For the cRIO-FRC 2, if we take the same method, the positive line again goes to pin 1, and the negative line must go to pin 2. The wiring of the cRIO-FRCs power inputs, as per FIRST rules, must be accomplished by the use of a Sauro CTF040V8 connector (Andy Mark part number AM-0295) insert the connector (it is keyed, so it cannot be inserted backwards, note: if you are using much force, it is likely to be backwards), once the connector is inserted, there are two small flat head screws on (as viewed in the above image) the top and bottom of the connector, screw these in using your WAGO tool, once these are screwed in, you may insert the power leads, again, following the listed power inputs above, and screw down the associated screws for each wire on the connector (the screws are, again, flat head, and should be tightened with your WAGO tool) the screws are, as being viewed from the above image, on the left side of the connector. The wiring

of the cRIO-FRC 2s power input line is very similar, using the COMBICON power connector that is shipped with the cRIO-FRC 2 (AndyMark replacement part number am-2076), again, insert the connector to the cRIO, screw the terminal down, insert the wires into the terminal, and screw the wires tightly in place. 1.3.2: Wiring Of Modules: (Note: all values are updated for post kickoff 2012) The modules each have an associated port number on the cRIO-FRC which they are to be plugged into. The analog module is to be plugged into port 1(primary), or port 5(secondary) for the cRIO-FRC, and port 1 on the cRIO-FRC 2. The digital I/O module is to be plugged into port 2 (primary) and port 6 (secondary) on the cRIO-FRC, and port 2 on the cRIO-FRC 2. The solenoid module is to be plugged into port 3 (primary) and port 7(secondary) on the cRIO-FRC, and port 3 on the cRIO-FRC 2. The fourth slot of the cRIO-FRC2 is a wildcard slot, and can be used with any module, this is not the case with the two unused slots on the cRIO-FRC (4 and 8), and they will not accept any modules. To remove the modules, simply squeeze the upper part of the silver holding clips, and lift the module straight out of the cRIO. 1.3.3: Wiring Of Breakout Boards: Each breakout board must be screwed into its corresponding module, and must have the appropriate power input (20 amp protected, 12 volts for analog and solenoid (if the solenoids that the robot is using are 12 volt solenoids) and 24 volts for solenoid (if the solenoids that the robot is using are 24 volts)). You muse consult the blue plastic cover on each breakout for direction of the data wires. 1.4: Status LEDs: The cRIO-FRC and cRIO-FRC 2 both have a small bank of status LEDs (four, to be exact)

(Image adapted from figure 13 http://www.bu.edu/bufirst/files/2011/01/cRIO_Manual.pdf) 1.4.1: Power LED: The power LED is lit whenever the cRIO is powered up. 1.4.2: FPGA LED:

This is a programmer-defined LED, set in the LabView FPGA. The FPGA is locked for FRC competitions. 1.4.3: Status LED: The status LED is off during normal operation. The cRIO-FRC indicates specific error conditions by flashing the status LED a certain number of times as shown in the following table: NUMBER OF FLASHES: 1 2 INDICATION: The chassis is unconfigured. Use MAX to configure the chassis. The chassis has detected an error in its software. This usually occurs when an attempt to upgrade the software is interrupted. Reinstall software on the chassis The chassis is in safe mode because the SAFE MODE DIP switch is in the ON position. The software has crashed twice without rebooting or cycling power between crashes. This usually occurs when the chassis runs out of memory. The device may be configured for DHCP but unable to get an IP address because of a problem with the DHCP server.

Continuous blink

(Table adapted from table 3, http://www.bu.edu/bufirst/files/2011/01/cRIO_Manual.pdf ) The cRIO-FRC 2 also has a Status LED, which can convey its error messages in much the same way as the cRIO-FRC. Again, the status LED is off during normal operation, and the cRIO-FRC 2 has slightly different status LED configurations; these configurations are listed below:

NUMBER OF FLASHES: 2

INDICATION: The chassis has detected an error in its software. This usually occurs when an attempt to upgrade the software is interrupted. Reinstall software on the chassis. The chassis is in safe mode. The software has crashed twice without

3 4

rebooting or cycling power between crashes. This usually occurs when the chassis runs out of memory. Constantly flashing, or solid. The cRIO-FRC 2 has detected an unrecoverable fatal error. Contact National Instruments.

(Table adapted from table 3 http://www.ni.com/pdf/manuals/375770a.pdf ) 1.4.4: User1 LED: This is a programmer-defined LED. 1.4.5: Solenoid module LEDs The solenoid module has a bank of eight LEDs, each LED corresponds with a Solenoid port, if the LED is on, the port should be receiving power. 2. DIGITAL SIDECAR: 2.1: About: The Digital Sidecar (DSC) is, in essence, a digital breakout board for the cRIO. It converts the Digital I/O modules DB25 port to 10 PWM signals (or servos, if the 6V jumper is in place), 8 relay signals, 1 I2C signal, and 14 GPI/O signals. The DSC also manages the Robot Signal Light (RSL), and at least one is required for every FRC legal robot. 2.2: Wiring:

10

(Image adapted from page 17 http://www.usfirst.org/uploadedFiles/Community/ FRC/Game_and_Season__Info/2010_Assets/32010FRCControlSystemComponent%20DatasheetsRev1_enc.pdf) 2.2.1: Power: The Digital Sidecar requires a 20 amp protected 12 volt main power input from any 20 amp port on the Power distribution board. The power must be input into the DSC using a WAGO 734-102 connector (Andy Mark part number am-0296)To connect the power leads to the DSC using the connector, first, place the connector into the DSC, the connector is keyed in such a way that it will only fit into the DSCs power port one way. Mark, with a sharpie, the positive side of the DSCs power input on the WAGO connector (shown as the upper pin on the above image), remove the connector from the DSC, and carefully insert the wires into the connector, using your WAGO tool , inserted into the smaller of the two sockets that share a side, carefully work your WAGO tool down into the connector, and with the WAGO acting as a lever, and the connector as a fulcrum, push the WAGO away from the larger of the two sockets, and insert the wire into this, now open, larger socket. Remove your WAGO tool from the connector and repeat the above process on the other power wire. 2.2.2: Robot Signal Light: The Robot Signal Light (RSL) must be attached to the two-pin connector by the main power input on the DSC, the RSL will mimic the blinking of the nearby smaller, green RSL on the DSC. The RSL requires the power input to go to the center input of the RSL, and a jumper between the two outer ports on the RSL, connected to the DSCs ground.

11

2.2.3: PWM Speed Controllers:

2.2.4: Servos: The DSC provides the ability to power servos through no external power source. Simply use the normal PWM outputs to the servo in question, and place a jumper across the two pins directly next to the PWM output in question (across the two pins that are visible above the DSC as pictured above). 2.3: LEDs: The DSC has several LEDs onboard, twenty in total. These LEDs are perhaps the most useful LEDs on the entire robot for troubleshooting (excepting speed controllers). 2.3.1: Relay LEDs: The DSCs relay section has a bank of sixteen LEDs, if a relay is active, its corresponding LED should be lit. if the LED is not lit, then it is a programming error, if it is lit, and the relay is not active, then the issue is an electrical issue. 2.3.2: RSL LED: The RSL LED corresponds to the signal that is being sent to the RSL. The blink codes are as follows: BLINK: Solid On Long On, Short Off Long On, Long Off Short On, Short Off MEANING: Robot is autonomous enabled. Robot is teleoperated enabled Robot has communications, is disabled. System error, bad cRIO image, no comms, bad team ID, extensive communications errors. Low battery AND system disabled Robot has no power, or DSC/RSL/cRIO is not properly wired, or cRIO is still in boot phase.

Short On, Long Off Solid Off

2.3.3: Power LEDs:

12

The DSC contains three power LEDs (5v, 6v, and main) if either or all of these LEDs are out, it means that there is a short somewhere in the system, and the DCS has shut off power to the specified area. 3. POWER DISTRIBUTION BOARD, MAIN ROBOT BREAKER, AND BATTERY: 3.1: About: The power distribution board (PD) splits the batterys main output into several different branches, and three different voltages (12, 5, and 24) the PD also protects its branches from overloading by allowing breakers to be placed in its sockets (40 A MAXI breakers, and 20 or 30 A VB3 breakers) most motors should be run off of 40 A ports, and the few sensors that do require 12 volt power should be run off of 20 A ports. The main breaker on the robot is rated at 150 A, and acts as an on/off switch for the robot. The battery is a 12 Volt 17 AH (actual readings indicate that it is closer to 12 AH) battery, and is connected to the main breaker(on the positive end) and the PD (on the negative end) via 6 AWG wire, and an Anderson connector. 3.2: Wiring:

(Image adapted from page 3, http://www.usfirst.org/uploadedFiles/Community/ FRC/Game_and_Season__Info/2010_Assets/32010FRCControlSystemComponent%20DatasheetsRev1_enc.pdf) Wiring the PD is extremely simple, all you need to do is p[lace the correct fuse in the correct slot. In the case of the 40A fuses, the positive end of the output is pointing to is corresponding fuse slot with a lightning bolt shape. The 20/30A slots are close to their two

13

corresponding output ports. To open the ports, use a WAGO tool in the rectangular slot directly above the circular port in the desired location. Hold it so the metal end of the WAGO is pressing down on the metal tab on the inside of the port, and then slide your wire into the circular port. The main power shanks on the PD are M6, DO NOT TRY TO USE ANY OTHER TYPE OF NUT! This will strip the shank, and make the board worthless. The negative end of the main power shank should go to the robots battery connectors negative end, whereas the positive connector should go to the main breaker. The main breakers shanks are -28, DO NOT TRY TO USE ANY OTHER TYPE OF NUT! 3.3: LEDs: The PD has several LEDs, most of them are hidden. At the bottom are three voltage monitoring LEDs, 5, 12, and 24 volt. If any of these are not on, there is an issue with the PD. Under each positive output, there is a small red LED, if the LED is on, then the breaker has popped, meaning that there is a short downstream. 4. JAGUARS: 4.1: About: A Jaguar is the newest speed controller allowed in FRC (as of 2011), introduced to the competition in 2009, there are two types of Jaguars, the black Jaguar (by Texas Instruments) and the tan Jaguar (by Luminary Micro) both Jaguars can take CAN and PWM signals for control, however, only the black Jaguar can accept a serial signal (adapted from the cRIOFRCs serial port (DB9) to the Jaguars CAN port (RJ11 6P6C)). 4.2: Wiring:

14

(Image adapted from figure 2-1 http://www.ti.com/lit/ug/spmu131a/spmu131a.pdf) Pictured above is a black Jaguar, however, the black and tan Jaguars are identical in wiring methods (excepting for the style of CAN input) the CAN signal must be input from the left side of the Jaguar (pictured above as RS232/CAN Port), and output from the right side of the Jaguar. A PWM signal may be used in place of CAN, however, the encoder and analog inputs should not be used if this is the case. If limit switches are not to be used, in either case, then the jumpers MUST be installed into the limit switch inputs vertically as pictured above, the limit switch feature can be used in both PWM and CAN interfaces, and switches are to be wired in normally closed configuration. The coast/break jumper may either be set in code by connecting a single wire to the center pin on the motor coast/break jumper to a signal port on GPIO port on the Digital Sidecar, likewise, it may be set physically by using a jumper (note: the coast/brake jumper setting can be overwritten when using the CAN/RS232 interface) (note: Jaguars support the simultaneous use of CAN for monitoring and the PWM-style input for speed).

4.2.1: CAN Wiring For DB9 To RJ11 (From cRIO-FRC To Black Jaguar): DB9 PIN NUMBER: 3 6P6C PIN NUMBER: 1

15

N/A N/A N/A 5 2

2 3* 4* 5 6

* Denotes that a 100 ohm resistor must be placed between these two pins. These are also the two pins that are to be used on the opposite end of the CAN network, for a terminating resistor, also of 100 ohms. (also, if someone could find the source for this table, that would be great) 4.3: Difference Between CAN And PWM:

(Image adapted from table 2-4 http://www.ti.com/lit/ug/spmu131a/spmu131a.pdf) 4.4: Calibration: To calibrate the PWM input for a specific range, connect a PWM source, then: 1. Hold down the USER switch with a straightened paperclip. 2. After 5 seconds, the LED flashes Red and Green quickly to indicate Calibration mode. 3. Instruct the controller to send a full-forward signal. 4. Instruct the controller to send a full-reverse signal. 5. Instruct the controller to return to a neutral signal. 6. The LED flashes Green and Yellow quickly to indicate a successful calibration. 7. Release the USER switch

16

To reset the PWM input to the default factory range: 1. Disconnect the power to the Jaguar. 2. Hold down the USER switch with a straightened paperclip. 3. Reconnect power to the Jaguar. 4. After 5 seconds, the LED flashes Red and Green slowly to indicate a successful calibration reset to factory settings. 5. Release the USER switch 4.5: Status LEDs: The Jaguars status LED is very informative about what its fault condition is, and can provide quick diagnostic information to the user. Below is a table providing quick information, detailing what each blink code is. LED STATE: NORMAL OPERATING CONDITIONS Solid Yellow Fast Flashing Green Fast Flashing Red Solid Green Solid Red FAULT CONDITIONS Slow Flashing Yellow Fast Flashing Yellow Slow Flashing Red MODULE STATUS: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Neutral (speed set to 0) Forward Reverse Full Forward Full Reverse XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Loss of communications Invalid CAN ID Power supply under-voltage (low battery) Over temperature Over current (short) Limit switch activated in the current direction of motion Complete loss of power Dead module XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Calibration mode active Calibration error Calibration success

No LED CALIBRATION CONDITIONS Fast Flashing Red And Green Fast Flashing Red And Yellow Fast Flashing Green And Yellow

17

Slow Flashing Red And Green

Successfully reset to factory default

(Table adapted from Table 2-2 http://www.ti.com/lit/ug/spmu131a/spmu131a.pdf) 4.6: Limit Switches: (See section 11.2.1.1) 4.7: Encoders (See section 11.2.2) 5. VICTORS: 5.1: About: Victors are somewhat older, and less smart speed controllers than Jaguars, however, many older teams still prefer them to Jaguars, due to their size, durability, and simplicity. A Victor can only accept a PWM signal for controlling speed, and has a brake/coast jumper, as well as a descriptive (although not as descriptive as a Jaguars) status LED. Currently, only the Victor 884 is legal in FRC competition, however, Victor 883s are still in use by older teams for demo robots. Victors have about half the footprint of a Jaguar, and are more resistant to overcurrent failures. The disadvantage of the Victor is the lack of control that is provided by a Jaguar under CAN. Victors are manufactured by IFI Robotics. 5.2: Wiring:

(Image adapted from page 1 http://content.vexrobotics.com/docs/ifi-v884-users-manual-9-2506.pdf) The wiring of a Victor is simple, but easy to get incorrect. The Victor must have 12 volts of power from the PD, and can be under any FRC legal breaker. The negative ends of the power wire for both input and output are to be in the top (as pictured) of the Victor. The victor also requires that its fans leads be connected in parallel to the main power input of the Victor, or risk the Victor getting burned out, the color code on the leads are such that the blue wire is

18

negative, and the red wire is positive. The PWM input on the victor must come from one of the 10 PWM outputs on the DSC, and this is the only signal that the Victor may receive, and must have the ground (black) side of the PWM cable facing inwards. The break/coast jumper (located directly under the PWM input, as pictured above) must be installed in either break or coast configuration (coast being the inner two pins, and break being the outer two) the Victor defaults to coast, if no jumper is found. 5.3: Calibration: User Calibration: 1. Power on the speed controller. 2. Press and hold the Cal button. After a moment, the LED indicator on the Victor will begin alternating between red and green to indicate a cal mode 3. While continuing to hold the Cal button, move the joystick to the maximum and minimum positions. This can be done in any order and as many times as desired. 4. While continuing to hold the Cal button, return the joystick to center (neutral position). 5. Release the Cal button. 6. A flashing green indicator confirms a successful calibration. 7. A flashing red indicator denotes an unsuccessful calibration. An unsuccessful calibration occurs when either: a) Insufficient joystick travel was detected in forward and/or reverse. b) The trim tab is too far from center. Resetting Calibration to Factory Pre-calibration: 1. Power off the speed controller. 2. Press and hold the Cal button. 3. While continuing to hold the Cal button, Power on the speed controller. 4. A flashing green indicator denotes calibration is reset. 5. Release the Cal button 5.4: Status LED: Although the Victor does feature a status LED, it does not provide quite as much data as the status LED of the Jaguar, for the Victors LED states, refer to the following:

LED Status: No LED

Module Status: No power (check fan!) Victor is transmitting power, but not full power in either direction (e.g. only 50% forward)

19

Solid Green Solid Yellow Solid Red Blinking Green Blinking Yellow Blinking Red Red/Green Alternating 6: SPIKE RELAY 6.1: About:

Full forward Coast/Break (depending on jumper) Full reverse Successful calibration No signal Calibration failed Calibration mode

A relay essentially takes a small amount of power (e.g. the 5 volts output from the DSCs Relay output) and uses that to control a much larger amount of power (e.g. a compressor). Relays are used in many cars for automatic windows, transmissions, etc. An FRC robot will usually have at least one Spike for a compressor for their pneumatic system, and possibly more, to control smaller motors and additional solenoids. The Spike is one of the oldest electrical components in FRC that is still in use on competition robots. Spikes, like Victors, are manufactured by IFI Robotics. 6.2: Wiring:

(Image adapted from Page 1: http://content.vexrobotics.com/docs/spike-blue-guide-sep05.pdf) The Spike requires, as most other electrical components on the robot do, twelve volts of power, and it must come from a 20 A port on the PD. As shown in the picture above, the negative (black, ground) wire must be on the top power pole, and must be connected through female F1 terminals, the positive wire must be connected in the same fashion, only on the bottom power pole. The PWM-style wire that carries the signal must come from a relay output on the DSC, and must be wired so that the black (ground) wire is pointing inwards on the Spike. The Spike must also have a 20A fuse/breaker installed into it, it is recommended that you

20

replace the default fuse with an auto-resetting breaker (20 A as well), the likes of which are in use on the PD, please note: this is only FRC legal in the case of a compressor being attached to the output of the Spike. 6.2.1: Wiring Solenoids: You may wire multiple single-acting solenoids to the same Spike, or one double acting solenoid to a single Spike. This can me accomplished in the manner depicted in the image below:

Image adapted from figure 2: http://www.team358.org/files/programming/ControlSystem2009-/ spike-blue-guide-sep05_PLUS.pdf 6.3: Status LED: As with every other component detailed so far, the Spike has a Status LED. The color codes are as follows: LED State: Orange Red Green Off Module State: No signal / No motion Motor rotates forward Motor rotates reverse No power / Both M+ and M- are outputting 12V

7: SOLENOIDS: 7.1: About:

21

Solenoids convert an electrical signal into a change in air flow in the robots pneumatic system. It accomplishes this through a change in electromagnetic direction in an electrical solenoid to shift an iron bar to open airflow in one of two directions. 7.2: Wiring: As there are several different solenoid types (team 340 in 2011, for instance, used three completely different types of solenoids on the same robot). However, some things are similar, as they all use either one, or two inputs, from either the cRIOs solenoid module (hence the name) or from a Spike relay. 7.2.1: Wiring of FESTO solenoids:

Pictured above: a normal double action FESTO solenoid, there are two different types of FESTO solenoids in use by FRC team 340, they are functionally identical, however, they look different. The one pictured above is a new model as of 2010.

8: D-LINK WIRELESS ROUTER: 8.1: About: The D-Link Wireless Router is the robots main radio, and uses Wireless-N 802.11 standard to communicate with the human driver and the drivers station. The router features four

22

Ethernet (RJ-45) ports, one of which connects to the cRio, either directly, or through a 2CAN controller. 8.2: 9: POTENTIOMETERS: 9.1: About: Potentiometers (otherwise referred to as pots, or varisistors) measure the distance traveled in a certain span, due to varying resistance (e.g. turning one way will increase the resistance from 0 to 5k ohms, and turning the other will will decrease the resistance from 5k to 0 ohms). Potentiometers are cheaper, and not as accurate as absolute encoders, however, they perform (roughly) the same job. Potentiometers are one of only a few sensors that go into the cRIOs analog port. Potentiometers can also be used in a Jaguar. Potentiometers work by running a small piece of metal (known as a wiper) over a specific distance of resistive material, thus shortening (or lengthening, depending on the direction of the turning) the distance that the electricity has to travel, and therefore lowering (or raising) the resistance, using the formula R = ( r * l ) / a, where R is the resistance, r is the resistivity of the material, l is the length of the material, and a is the area that the current can travel through. Seeing as the r and a values are both constants (roughly constant, close enough for our purposes), by just modifying the l, we can see how a simple linear relationship can be derived from a potentiometer. 9.2: Wiring:

(Image adapted from figure 5 http://sound.westhost.com/pots.htm)

23

A potentiometer normally comes shipped without leads, meaning that you need to solder on the leads. To find which lead is which, you need to use a standard multimeter, and find the one terminal that, when grouped with either of the other two terminals will produce a pattern of varying resistance; this terminal is connected to the wiper that was mentioned in the About section. The wiper must be connected to the signal (white) wire of a PWM-style cable, the other two pins are nonpolar, and therefore can be wired in any order to a red and a black (+5VDC and GND) of a PWM-style cable. This cable must then plug into a port on an analog breakout board of the cRIO-FRC. 9.2.1: Wiring To The Analog Breakout: The PWM-style cable that you created plugs into any port on the cRIO-FRCs (and cRIOFRC 2s) Analog Breakout Board. 9.2.2: Wiring To A Jaguar: Wiring a potentiometer to a Jaguar is slightly more difficult than to the cRIO-FRC, the reason being that the Jaguar does not mimic the cRIO-FRC in the fact that its analog input does not follow the standard PWM-style wiring (GND, +5VDC, Signal) rather, its wiring is in this order: +3VDC, Signal, GND (from left to right on the Jaguar), although this does provide prevention from putting the potentiometer in backwards (remember, its nonpolar!) it does provide a little bit more of a hassle, simply swap the +5VDC (now a +3VDC) and signal pins on the housing that will be input into the Jaguar (or create an extension cable that provides this functionality, for quickly being able to switch back to cRIO-FRC control). 9.3: Physical Mounting: Potentiometers are physically mounted to the robot using (normally) a nut over the threaded part of the shaft, and holding the potentiometer to a piece of aluminum or polycarbonate, with a hole in it to accommodate the shaft.. There is usually a nub on the housing of the potentiometer 9.4: When To Use: 10: ENCODERS: 10.1: About: Encoders either measure the distance traveled from a certain zero point, or they measure the rate of motion of the robot, or both. Encoders accomplish this by having a small ring, attached to a shaft that spins with the motors spinning, as the ring spins, small slits in the ring pass over an LED, and are read by one of two light sensors. There are three types of encoders that are normally used on FRC robots; quadrature rotary encoders (gives direction, and rate, but not distance (distance can be calculated in code)), rotary encoders (gives rate only), and absolute encoders(distance, rate, and direction are all given, however, this encoder is limited to only one revolution).

24

10.2: Wiring: Encoders output their data through four pins, however, the GPI/O port on the DSC can only take a three pin input. A Jaguar will take a five pin input, however, the pins do not line up to allow for a four pin connector. 10.2.1: Wiring To The DSC: To wire an encoder to the DSC, one must find two 3-pin PWM cables, or two 3-pin PWM housings, in both cases, with corresponding female pins. The two data wires (usually referred to A and B on data sheets) must go to signal (white) ports in the DSC, while the +5VDC and GND pins must go to a +5VDC and GND pin on a single GPI/O output on the DSC (multiple may be used, however, this will run the risk of damage to the encoder, as the DSC will send double the current before breaking its internal breaker). Plug these two cables into two DSC GPI/O ports. 10.2.2: Wiring To A Jaguar:

(Image adapted from figure 7-1 http://www.ti.com/lit/ug/spmu131a/spmu131a.pdf) To wire an encoder to a Jaguar, one must use either one 5-pin connector, one 3-pin and one two-pin connector, or one 3-pin and one 1-pin connector. Wire this in such a way that the A and B signals can get to the middle and left-of-center (as viewed in the picture) pin in the encoder input port on the Jaguar, while still allowing the power to get to the encoder from pin 1, and ground must get to pin 5. Pin four can have a limit switch that can be positioned at the upper or lower end of the system, wired normally closed and attached to a +5VDC signal, however, this is not required, and may cause some issues. The programming interface can easily account for this, however, make sure you know where you want to put the switch before you put it anywhere! 10.3: Physical Mounting:

25

Encoders must be mounted so that the shaft can rotate freely, but the housing must remain as static as possible. Some encoders have housings that can bolt onto the robot (such as those that are shipped with Toughboxes, or Super Shifters), however, many encoders do not, these encoders, rather, have threads along the base of the shaft. Simply drill a hole into a thin plate of metal or plastic that is directly across from the motors shaft, and tightly bolt the encoder down to this plate, while connecting the shaft to the motor through either a shaft coupler, or a small length of thick surgical tubing. 10.3.1: Mounting In The Case Of A Super Shifter Or Toughbox: This mounting is far more simple than the mounting of a normal encoder, these encoders are equipped with a plastic housing that can easily bolt into the transmission. First, mount the larger part of the encoder onto the transmission (the one that can bolt in) making sure that you include the PCB along with it. next, slide the metal encoder ring onto the shaft (CAREFUL: The encoder ring is a precision instrument, do not bend, or get fingerprints on the ring, as this will cause it to not work as well, if at all!) followed by snapping on the final piece of plastic. 10.4: When To Use: Encoders are extremely useful, perhaps one of the more useful sensors on the robot, however, their relative complexity has dissuaded teams from using them before. 10.4.1: Quadrature Use these encoders in applications where the robot can go through an infinite (or, at the least, more than one) number of revolutions in any direction, and the direction must be known (e.g. transmissions). 10.4.2: Rotary Use these encoders, only when a quadrature encoder in unavailable to you, and the direction is not exceedingly important, or can be inferred in code (e.g. an arm). If you have the option, however, use a quadrature encoder instead of a rotary encoder. 10.4.3: Absolute Use these encoders in applications in which the motor will only move a small distance, or an object that the encoder is measuring will only move a small distance, not greater than one revolution, e.g. a turret (note: although the turret, or other mechanism in question may only revolve once, the encoder may revolve several times, you must mount it in such a way in which the encoder will only revolve once!) 11: SWITCHES:

26

11.1: About: Switches are a fairly primitive, and extremely common sensor, with one or more sets of electrical contacts. Each set of contacts can be in one of two states: either "closed" meaning the contacts are touching and electricity can flow between them, or "open", meaning the contacts are separated and the switch is nonconducting. There are three types of switches commonly used on an FRC robot, a limit switch, which measures position directly, a reed switch, which measures position based on a magnet, and a pressure switch, which measures the pressure of a system, and is required on every FRC robot that has a pneumatic system. On an FRC control board, the number of switches can change to SPST (Single Pole, Single Throw(two way)), SPDT(Single Pole, Double Throw(three way)), rocker switches (both two and three way), multiposition switches, and push buttons are not uncommon in most FRC control systems. 11.2: Wiring: The wiring of a switch is fairly simple, most switches have three contacts (SPST: input, normally open output, normally closed output, SPDT: input, output one, output two) or two contacts (it is important to note in this case whether the switch is normally open or normally closed, this can be checked with a standard multimeter) the switch usually has either two, or all three connected. It is important to note which terminal on the switch is which before attaching the wires. The terminals either require soldering, are an F1 male terminal, or are screws; in the event of screws, it is advised that you use ring terminals as opposed to simply wrapping the wire around the terminal and tightening, or using forked terminals. 11.2.1: Wiring The Switch To The Robot: To wire the switch to the robot, it is advised that you make a note first whether the switch is to be normally open, or normally closed (hint: ask the programmers!). Wire on a standard 3pin PWM cable onto the switch, making sure that the input is the white (signal) cable, the output type desired is the red (+5VDC) wire, and, if a third lead exists, the black (ground) wire is to go there (the ground wire helps with the signal, as you will make absolutely certain that there will be no signal getting through the switch to the DSC, avoiding a source of error). The other end of the switchs leads are then to be plugged into a GPI/O port on the DSC. 11.2.1.1: Wiring The Switch To A Jaguar:

27

(Image adapted from figure 7-1 http://www.ti.com/lit/ug/spmu131a/spmu131a.pdf) A Jaguar can take a limit switch as an input in one of its ports. Simply find which direction corresponds to your motors direction (the forward (green) switch is the inner port, and the reverse (red) switch is the outer port) wire these in the normally closed position. If the motor moves, and passes over the limit switch without stopping, try manually activating the other switch, and try to move the motor again, if the motor doesnt move, and the Jaguar blinks slow red while attempting to move the mechanism to the switch that you have activated, then the switches are in the incorrect ports. Please refer to the above image for proper port location and wiring diagram. 11.2.2: Wiring The Switch To The Drivers Station (via Cypress): Wiring through the Cypress board is only slightly different from wiring through the DSC, instead of using three wires that are in the same cable, you may end up using three or more wires that are separate from one another, also, the Cypress is much more limited (comparatively) to the DSC in its ports, however, the lack of ports may be overcome through the application of multiplexing or co-processors. (see section 15.2.1 and 15.3.2 respectively). Otherwise, the switches are to be wired in exactly the same manner as on the DSC (input going to one of the Cypress inputs, and power and ground going to their respective outputs). 11.3.1: Mounting To The Robot: Mounting switches to the robot depends on the type of switch, for instance, reed switches may never come in contact with the surface that they are monitoring, whereas, limit switches MUST come in contact with what they are measuring. 11.3.1.1: Mounting A Limit Switch: To mount a limit switch to the robot, move the position of the mechanism that you are trying to measure to where you want to measure it (e.g. moving an arm all the way to the ground) and then position the switch on the robot, so that the switch will be depressed when the mechanism is in that position, and not depressed when the mechanism is in other positions, and

28

that the switch will not impede normal operations of the mechanism. (Make sure that the mechanism that you are monitoring will not hit the body of the switch, only the lever arm of the switch!) Mark the position of the mounting holes of the limit switch on the robot, remove the switch, and drill the holes. Mount the switch, and test if it still works. 11.3.1.2: Mounting A Reed Switch: To mount a reed switch to the robot, you must first mount the magnet to whatever it is that you are attempting to monitor, in such a way that it will not hinder normal operation of the mechanism. From here, move the mechanism to the point at which you want to measure it (e.g. rotating a drum all the way to the right). Using a multimeter, find a location near the magnet that will change the switchs position (going from closed to open, or vice-versa). Mount it in this location, making sure that the switch is out of the way of the mechanism, and will not interfere with the normal running of the robot. Mark the position of the mounting holes of the reed switch on the robot, remove the switch, and drill the holes. Mount the switch, and test if it still works. 11.3.1.3: Mechanical Stop: THIS SECTION IS IMPORTANT, DO NOT GLOSS OVER THIS IF YOU WANT TO MOUNT ANY SORT OF SWITCHES TO THE ROBOT! Reed and limit switches are NOT designed to be mechanical stops, and can be broken very easily if they are treated as such. Even if they are not in the direct path of the mechanism (excepting the lever arm or button on the limit switch) the switches, as well as the whole robot, can still be at risk if no mechanical stop is present. 11.3.2: Mounting Switches To The Driver Station: To mount a switch to the driver station, simply locate an area in which the switch can be mounted without crowding the drivers station, or wiring. then, drill a hole big enough for the switch to fit in (note, if the switch has threads on it, the threaded area is the area that you want to fit through the drivers station), slide the switch through the hole, and if any nuts are present, put on and tighten down the nuts. 11.4: When To Use Switches can only measure if an object is in one position, or if its not in that position, so, only use the switches at the maximum and minimum locations of an object (the limits, if you will (and you wondered how limit switches got their name)), in the case of the robot. In the case of the drivers station, however, use these in the event of a digital operation (pneumatics, or if it could be done with a Spike, as opposed to a Victor/Jaguar)

12: ULTRASONIC SENSORS:

29

12.1: About: Ultrasonic sensors measure the distance between the current point and the closest point to the sensor that would allow the sound to be reflected back enough to trip the sensor. An ultrasonic sensor measures its distance based off of the time it takes a sound wave to bounce back to the sensor. Ultrasonic sensors are plugged into an analog port on the cRio, or, in rare cases, into the analog port on a Jaguar. 12.2: Wiring: Ultrasonic sensors usually have two pairs of three-pin wires, one is a digital input, and the other is an analog output. The digital input is hardly used on the newer systems, but would be connected to a standard GPI/O on the DSC, this controls the ping on the sensor, which keeps multiple sensors from interfering with each other. The analog output is a standard analog, and should therefore either be plugged into one of the analog inputs on the cRios analog breakout board, or a Jaguars analog port. 13: LINE TRACKING SENSORS: 14: BANNER SENSORS: 15: CLASSMATE PC: 15.1: About: The Classmate PC is the main computer of the drivers station, and converts signals from human interface devices (game console controllers, joysticks, etc.) to a wireless signal that the robot can pick up (or, if the robot is using the older black wireless bridge, or the robot is connected to the FMS, it converts the controls to a network signal, and is then transmitted to the robot via an external router). 15.2: How To Use: The Classmate comes standard with Windows Vista pre-installed, and with two accounts ready to go. The two accounts are: Driver, which only has access to the drivers station functionality of the Classmate, and Developer, which has admin privileges on the Classmate, and can access the robot for code distribution and driving (driving in the developer account is not recommended, as it is more difficult to see, and should be used for testing purposes only). To enable (and drive) the robot, while under the main driver screen at the bottom, click on Enable, the hotkey for this operation is F1, to disable the robot, click on Disable, the hotkey for this operation is the spacebar. 15.3: Wiring:

30

The Classmate is perhaps the simplest thing to wire, it has a few USB ports, a network cable (RJ-45) port, and a power port. 15.3.1: Wireless And Tethered Communications To/From Robot: If you are connecting the Classmate to the robot via a tether, then you must connect the RJ-45 port from the Classmate, to an RJ-45 port on the robot (either in the cRIO or in the router, in the case of the D-Link wireless bridge). If you are connecting to the robot wirelessly, you may either use just the Classmate, connected to the robot is the Classmates wireless access point, or to an external wireless router, with the Classmate under port 1 of the router (any port will work, so long as its not the main network (Internet) port), and the robot configured with its access point as the external router. 15.3.2: Joystick And Cypress Wiring: Joysticks and the Cypress board are both connected to the Classmate via a standard USB cable. There are times when an external USB hub must be used (for instance, if the Classmate is the version with only two USB ports, and you have two joysticks and a Cypress). 15.3.3: Stop Button: The stop button is required for normal operation of the robot, and the robot cannot move without a stop button attached (exception: see section 15.3.3.1), and the robot cannot be entered into an FRC competition without a stop button. The stop button is connected to the Classmate through a standard USB port, and should be positioned on the drivers station where it is easily accessible. 15.3.3.1: Disabling The Stop Button: DISCLAIMER: The stop button may be disabled, however, it is not recommended at all that you do this, as the only way that you can now stop the robot is to disable it, which can be difficult to do, even with the hotkey. Only drive the robot without a stop button if the driver can be trusted, and there are no innocent bystanders around. To disable the stop button, go under the I/O tab in the drivers station, double-click Stop Button, and select Yes, Ill be careful wait a few seconds, and you should be set. 16: CYPRESS: 16.1: About: The Cypress board is, more or less, a micro controller (much like the more common Arduino micro controller) that FRC teams use to monitor switches, and other controls on the drivers station, the Cypress board requires a USB connection to the Classmate.

31

17: JUST A QUICK THING TO REMEMBER:

32

S-ar putea să vă placă și