IFI
IFIROBOTICS
Control System Users Manual Miniature Mini Robot Controller (ERC/MRC)
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 2
Table of Contents 1.0 Introduction ...........................................................................Page 3 2.0 Quick Setup Guide................................................................Page 7 3.0 Operator Interface Overview................................................Page 9 4.0 Operator Interface Connections ..........................................Page 10 5.0 Operator Interface Usage .....................................................Page 19 6.0 Mini Robot Controller Overview ..........................................Page 24 7.0 Mini Robot Controller Connections.....................................Page 25 8.0 Mini Robot Controller Usage ...............................................Page 29 9.0 Programming the Robot Controller.....................................Page 30 10.0 Contacting IFIrobotics..........................................................Page 33
4.5 COMPETITION (p.17)
4.4 TETHER (p.17)
4.1 - POWER (p.10)
5.8 Fuses (p.23)
4.6 DASHBOARD (p.18)
5.8 Fuses (p.23)
4.2 - RS-422 RADIO (p.10)
4.3 - PORT 1 (p.11)
4.3 - PORT 3 (p.11)
4.3 PORT 2 (p.11)
4.3 - PORT 4 (p.11)
5.5 DISABLE (p.21)
5.7 CHANNEL (p.21)
5.3 - SELECT (p.20)
5.1 TEAM NUMBER (p.19)
5.7 ROBOT RESET (p.22)
5.6 - OI RESET (p.22)
5.2 LEDs and Display (p.20)
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 3
1. Introduction WARNING: Please read the following sections carefully. Failure to configure your control system properly could result in personal injury, damage to the control system, or damage to your robot. IFIrobotics will not provide free replacement of control system components damaged due to misuse or miswiring. In this manual you will find: o System functional descriptions o Quick setup guide o Operator Interface detailed description o Mini Robot Controller detailed description o Default code functions o Basic wiring information Before proceeding with a discussion of the individual components that make up the control system, it is helpful to understand the overall function of the control system. If, after reading these sections, you have problems configuring the control system, please contact IFIrobotics at 903-454-1978. We will be happy to answer any questions you have. The heart of the IFIrobotics control system is the Operator Interface and the Robot Controller. The Operator Interface takes input from the robot operators and passes it to the Robot Controller. The Mini Robot Controller takes this information, gathers additional information from sensors on-board the robot, determines how the robot should function, and instructs the robot to perform the functions. The Mini Robot Controller also sends data back to the Operator Interface, giving the robot operators feedback of critical information. Figure 1.1 shows a block diagram illustrating this concept. The IFIrobotics control system uses a unique "Team Number" identification to ensure safe and reliable human to robot communication. Users enter their team number via dipswitches on both the Operator Interface and the Robot Controller. Both units use this number as a unique identifier, ensuring that all communications received are actually "theirs". Figures 1.2 and 1.3 show a block diagram of the Team Number concept. The Operator Interface has a "Competition" connector designed specifically for connecting the system to the playing field at competitions. This connection sets the radio to one of 35 competition only channels, provides power, and even starts and stops the robot during matches. Good luck! We hope you enjoy the new control system!
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 4
Operator Interface
Processor
Joysticks, Buttons, Pots, etc. 1. Read Port 1 Port 4 2. Send data to Radio 3. Receive data from Radio 4. Update LEDs and display 5. Update Port 1,3 LEDs 7. Repeat RS-422 Radio
Computer RS-232 Port
DASHBOARD Port
1. Converts data to RS-232
Pots, Gyros, 0-5V sensors
Robot Controller
Master Processor
1. Receive data from Radio 2. Read Analog Inputs 3. Read Digital Inputs 4. Send data to BS2SX 5. Send data to Radio 6. Repeat RS-422 Radio
Switches
BS2SX (PBASIC processor)
1. Input serial data 2. Process data 3. Output dashboard bits 4. Output serial data 5. Repeat Any motor, Servos
Output Processor
1. Input serial data 2. Output PWM signals 3. Output Relay signals 4. Repeat
Small motors, Solenoids, Lights
FIGURE 1.1: CONTROL SYSTEM OPERATION DIAGRAM
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 5
Operator Interface
1. Read TEAM NUMBER dipswitch 2. Display Team Number 3. Read COMPETITION Port 4. Read CHANNEL dipswitch 5. Set Radio channel 6. Send data to Radio 7. Receive data from Radio 8. Wait until data contains the correct Team number and correct channel
RS-422 Radio
1. Display Channel 2. Begin normal operation
Robot Controller
1. Read TEAM NUMBER dipswitch 2. Check for Tether connection 3. Check for Radio Connection 4. Wait until Tether or Radio connection exists.
1. Handshake with BS2SX 2. Set Radio to last used channel 3. Receive data from Radio 4. Until data contains the correct Team Number and channel, set to the next channel and repeat (scan)
RS-422 Radio
1. Lock to Channel. Channel remains locked until reset or power-up 2. Radio transmit enabled 3. Begin normal operation
BS2SX (PBASIC processor)
1. Handshake with Master processor 2. Send Master processor commands defining PBASIC data types 3. Begin normal operation
FIGURE 1.2: CONTROL SYSTEM RADIO STARTUP DIAGRAM
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 6
Operator Interface
1. Read TEAM NUMBER dipswitch 2. Display Team Number 3. Read COMPETITION port 4. Read CHANNEL dipswitch 5. Detect Tether connection 6. Send data to Tether 7. Receive data from Tether 8. Wait until data contains the correct Team number and correct channel
1. Display Channel 2. Begin normal operation
Robot Controller
1. Read TEAM NUMBER dipswitch 2. Check for Tether connection 3. Check for Radio Connection 4. Wait until Tether or Radio connection exists.
1. Handshake with BS2SX 2. Receive data from Tether 3. Until data contains the correct Team Number and channel, set to the next channel and repeat (scan)
1. Lock to Channel. Channel remains locked until reset or power-up 3. Begin normal operation
BS2SX (PBASIC processor)
1. Wait for Master processor 2. Send Master processor commands defining PBASIC data types 3. Begin normal operation
FIGURE 1.3: CONTROL SYSTEM TETHER STARTUP DIAGRAM Note: Channel scan and lock is performed during tether startup to support radio operation after tether is removed.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 7
2. Quick Setup Guide This Quick Setup Guide describes the basic cable and switch settings required to begin using the control system. This guide consists of four sections: o A list of components required for the Quick Setup. o A pictorial of the basic cabling. o A brief description of setting the TEAM NUMBER dipswitches. o An overview of the basic features.
Using the components listed below, make the connections shown in Figure 2. Robot Control System pieces: (1) Mini Robot Controller with Motherboard (1) 7.2V to 12V Power Source Operator Control System pieces: (1) Operator Interface (1) Wall transformer (1) RS-422 Radio (OI) (1) DB9 M-F Cable (2) Joysticks
Battery (7.2V 12V)
Wall Transformer
DB9 Cable
Joystick #1
Joystick #2
Set Team Number Set Team Number
FIGURE 2: CONTROL SYSTEM QUICK SETUP
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 8
Team Number Setup To finish the setup, complete the following instructions. 1. Disconnect power to the Robot Controller. 2. Connect the AC Adaptor to 115V 60Hz power. Plug the AC Adaptor cable into the POWER connector on the Operator Interface (turning it ON). 3. Set Team Number:
4. 5. 6.
7.
a. Set each of the twelve TEAM NUMBER switches to the Up position. The Operator Interface display should show "000" b. Set switch 3 Down and look at the display. If the number displayed is greater than your team number, return the switch to Up. If the number displayed is less than your team number, leave the switch Down. If the number displayed is your team number, go to step 4. c. Repeat step b. using the next switch (4, 5, 6 . . .) Copy the "Team Number" switch settings from the Operator Interface to the Robot Controller. Power ON the Robot Controller. After a few seconds, the "Search/TX" and "Valid RX" lights should be flashing on both units, indicating each is transmitting and receiving valid data with the correct team number. The display on the Operator Interface will change to the channel number (c40).
System Feature Overview The system should be working correctly now. Try the following to see how it works. 1. Pressing the SELECT button on the Operator Interface will change the display between Team Number, Channel, and Robot Voltage. 2. Pressing the ROBOT RESET button on the Operator Interface should cause the "Basic Init Err" light on the Mini Robot Controller to flash, indicating the PBASIC processor is resetting. 3. When the PORT 1 joystick is all the way forward, the "PWM1 Green" light on the Operator interface should be ON, indicating full forward. 4. When the PORT 1 joystick is all the way back, the "PWM1 Red" light on the Operator interface should be ON, indicating full reverse. 5. Pressing the trigger and thumb buttons on either joystick should light the RELAY 1 and RELAY 2 lights on the Operator Interface.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 9
3. Operator Interface Basics The Operator Interface' basic function is to collect data from joysticks, buttons, and other input s devices controlled by human operator(s). The data is transmitted through a Radio Modem or Tether cable to the Robot Controller. The Operator Interface also receives data transmitted from the Robot Controller, displays the data, and transmits the data out the DASHBOARD port. Refer to Figure 1.1 on page 4 for an overview of the Control System operation. The Operator Interface inputs data via PORT 1, PORT 2, PORT 3, and PORT 4. These ports are CH Products FlightStick compatible. The ports can also be used with custom control boxes of your own design. The four input ports have a total of 16 digital inputs for switches, 16 analog inputs for potentiometers and sensors, and 8 LED drivers for controlling external indicators.
Three ways to Power the Operator Interface There are three ways to power the Operator Interface. o AC Adaptor o Tether connection to the Robot Controller o Competition port connection on the competition field The AC Adaptor power can be used in conjunction with Tether power. Do not use Tether power at the same time as Competition power. The most common method to power an Operator Interface is with an AC Adaptor. This adaptor converts standard 115V 60Hz wall power to the correct voltage and provides the necessary current. Only use the AC adaptor provided with the system. When the Operator Interface and the Mini Robot Controller are connected via TETHER ports, the Operator Interface will be powered from the robot' 12V battery. Tether power provides a means to power the Operator s Interface when 115V 60Hz power is not available. Tether power is useful before or after competition rounds to check your system or collapse your robot. The Operator Interface can also be powered via the COMPETITION port. Competition power will be used at regional and national events, eliminating the need for an AC adaptor on stage.
Reference Documents (available at www.ifiRobotics.com) Size, weight, and mounting information..............Operator Interface Installation Info.pdf Frequently asked questions ..................................Control System FAQ.pdf Dashboard port data specification........................Dashboard Port Interface Guide.pdf
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 10
4. Operator Interface Connections 4.1. POWER
The POWER connection on the Operator Interface is intended to accept DC power from an AC Adaptor. For information on other ways to power the Operator Interface, refer to Section 3.3, Page 9. Warning: Only use the AC Adaptor AD48-0901500DU provided with the system. The use of any other AC Adaptor may damage the Operator Interface and will void the warranty. Additional AC Adaptors are available from IFIrobotics at www.ifiRobotics.com.
4.2.
RS-422 Radio
The RS-422 RADIO port is intended to connect to the IFIrobotics RS-422 Radio Modem only. This port uses RS-422, instead of RS-232, to minimize noise interference in the communication link. Caution: Do not connect any other equipment to this port. There are two different Radio Modems provided with the system. Be sure to connect the Operator Interface to the Radio Modem that has a chrome antenna and is marked "Operator Interface." Use a DB9 Male-Female Pin-to-Pin cable (maximum length 6 ft.) to connect the Operator Interface to a RS-422 Radio. The chrome antenna on the "Operator Interface" Radio Modem does not extend.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 11
4.3.
Operator Interface Ports 1, 2, 3, and 4
The Operator Interface Port' 1, 2, 3, and 4 are intended to provide user input. All four ports are designed s to be joystick compatible. Each port can be split with a Y-Cable, allowing two joysticks to be connected to one port. Custom user input boxes can also be connected to one or more of these ports. Figure 4.3.1 is an example of a four joystick configuration............................................................. Page 12 Figure 4.3.2 is an example of a two joysticks configuration and a user box.................................... Page 12 Figure 4.3.3 is an example of a two y-cable joysticks configuration and a user box ....................... Page 12 Table 4.3.1 contains PORT 1 pinouts and PBASIC software variables........................................... Page 13 Table 4.3.2 contains PORT 2 pinouts and PBASIC software variables........................................... Page 14 Table 4.3.3 contains PORT 3 pinouts and PBASIC software variables........................................... Page 15 Table 4.3.4 contains PORT 4 pinouts and PBASIC software variables........................................... Page 16 Joysticks These ports are 100% CH Products FlightStick compatible. Other joysticks may be used (except during FIRST competitions), however, the joystick pinouts must be checked to ensure compatibility. The DISABLE dipswitch on the Operator Interface allows the joystick buttons to be disabled on PORT 1 and PORT 3. Joystick Y-Cables Y-Cables may be used to connect two joysticks to one port. This allows more functions on a custom user input box (see Figure 4.3.3). Refer to our web site (www.ifiRobotics.com) for details on making a Joystick Y-Cable. Analog Inputs (see pinouts on pages 13-16) Each port provides four analog inputs. These inputs are typically connected to joysticks and potentiometers, providing an analog input ranging from 0 to 254 that is transmitted to the Robot Controller. In the event that an analog input is less than 0.05V, a value of 127 will be generated. This ensures that when a joystick is unplugged, the output will not go full reverse. Each port provides +5V Aux, used for wiring to potentiometers or other sensors. The wiring diagram for a potentiometer is shown below. Always use 100k? potentiometers.
+5V Aux Analog Input No connect
Digital Inputs (see pinouts on pages 13-16) Each port provides four unique digital inputs. PORT 2 provides access to the same digital inputs as PORT 3, allowing access to 8 digital inputs from PORT 2. PORT 4 provides access to the same digital inputs as PORT 1, allowing access to 8 digital inputs from PORT 4. To utilize these inputs, wire buttons or switches between the desired digital signal pin and any ground pin. Do not connect switches to 5V. Do not use lighted switches. LED Drivers (see pinouts on pages 13-16) PORT 1 and PORT 3 each provide four LED output drivers. These LED drivers allow the connection of external LEDs that duplicate the function of the top eight Robot Feedback LEDs on the Operator Interface. The LED drivers provide 5V that is current limited to 10mA. Connect the LED' anode to the s desired LED drive pin. Connect the LED' cathode to any ground pins. s
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 12
Joystick #1
Joystick #3
Joystick #2
Joystick #4
Figure 4.3.1: Operator Interface with Four Joysticks
Joystick #1
Joystick #2
Custom Interface Box ? 12 digital inputs ? 8 analog inputs ? 4 LED outputs
Figure 4.3.2: Operator Interface with Two Joysticks and a User Box
Joystick #1
Y-Cable
Custom Interface Box ? 16 digital inputs ? 12 analog inputs ? 8 LED outputs
Joystick #2
Figure 4.3.3: Operator Interface with Two Y-Cable Joysticks and a User Box
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 13
Table 4.3.1: Port 1 Pinout and Software Function
Pin Function 3 6 X-Axis Y-Axis Default PBASIC Code Information [1] Variable type Variable Name Code Function Analog (byte) Analog (byte) Analog (byte) Analog (byte) Digital (bit) Digital (bit) Digital (bit) Digital (bit) p1_X p1_Y p1_wheel p1_aux p1_sw_trig p1_sw_top p1_sw_aux1 p1_sw_aux2 out8 out9 out10 out11 RC Relay 1 Forward RC Relay 1 Reverse Relay 5 Forward Relay 5 Reverse OI Feedback LED - PWM1 Green OI Feedback LED - PWM1 Red OI Feedback LED - PWM2 Green OI Feedback LED - PWM2 Red SW01 [5] SW02 [5] SW03 [5] SW04 [5] RC PWM5 RC PWM1 RC PWM9 Disable Dipswitch
13 Wheel 11 Aux Analog 2 7 Joystick Trigger Switch Joystick Thumb Switch
10 Aux Switch1 14 Aux Switch2
15 Robot Feedback LED driver [2] Output (bit) 8 9 5 1 4 Robot Feedback LED driver [2] Output (bit) Robot Feedback LED driver [2] Output (bit) Robot Feedback LED driver [2] Output (bit) +5V Aux (Fuse F2) [3,4] Ground
12 Ground
Notes: RC refers to the Robot Controller OI refers to the Operator Interface [1] [2] [3] [4] [5] Software functions listed are for Default Code only. These functions and variable names may be changed for user programs. LED drivers provide 5V at 10mA +5V Aux is to be used for potentiometers in Joysticks and custom I/O boxes. Do not use +5V Aux for lamps or LEDs. The DISABLE dipswitch on the Operator Interface
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 14
Table 4.3.2: Port 2 Pinout and Software Function
Pin Function Default PBASIC Code Information [1] Variable type Variable Name Code Function
3 6 13 11 2 7 10 14 5 8 9 15
X-Axis Y-Axis Wheel Aux Analog Joystick Trigger Switch Joystick Thumb Switch Aux Switch1 Aux Switch2 same as OI Port 3 Joystick Trigger Switch same as OI Port 3 Joystick Thumb Switch same as OI Port 3 Aux Switch1 same as OI Port 3 Aux Switch2
Analog (byte) Analog (byte) Analog (byte) Analog (byte) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit)
p2_X p2_Y p2_wheel p2_aux p2_sw_trig p2_sw_top p2_sw_aux1 p2_sw_aux2 p3_sw_trig p3_sw_top p3_sw_aux1 p3_sw_aux2
RC PWM6 RC PWM2 RC PWM10
RC Relay 2 Forward RC Relay 2 Reverse
RC Relay 3 Forward RC Relay 3 Reverse RC Relay 6 Forward RC Relay 6 Reverse
1 +5V Aux (Fuse F2) [2,3] 4 Ground 12 Ground
Notes: RC refers to the Robot Controller OI refers to the Operator Interface [1] [2] [3] Software functions listed are for Default Code only. These functions and variable names may be changed for user programs. +5V Aux is to be used for potentiometers in Joysticks and custom I/O boxes. Do not use +5V Aux for lamps or LEDs.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 15
Table 4.3.3: Port 3 Pinout and Software Function
Pin Function 3 6 X-Axis Y-Axis Default PBASIC Code Information [1] Variable type Variable Name Code Function Analog (byte) Analog (byte) Analog (byte) Analog (byte) Digital (bit) Digital (bit) Digital (bit) Digital (bit) p3_X p3_Y p3_wheel p3_aux p3_sw_trig p3_sw_top p3_sw_aux1 p3_sw_aux2 out13 out12 out15 out14 Relay 3 Forward Relay 3 Reverse Relay 6 Forward Relay 6 Reverse OI Feedback LED - Relay1 Green OI Feedback LED - Relay1 Red OI Feedback LED - Relay2 Green OI Feedback LED - Relay2 Red SW05 [5] SW06 [5] SW07 [5] SW08 [5] RC PWM7 RC PWM3 RC PWM11 Disable Dipswitch
13 Wheel 11 Aux Analog 2 7 Joystick Trigger Switch Joystick Thumb Switch
10 Aux Switch1 14 Aux Switch2
15 Robot Feedback LED driver [2] Output (bit) 8 9 5 1 4 Robot Feedback LED driver [2] Output (bit) Robot Feedback LED driver [2] Output (bit) Robot Feedback LED driver [2] Output (bit) +5V Aux (Fuse F2) [3,4] Ground
12 Ground
Notes: RC refers to the Robot Controller OI refers to the Operator Interface [1] [2] [3] [4] [5] Software functions listed are for Default Code only. These functions and variable names may be changed for user programs. LED drivers provide 5V at 10mA +5V Aux is to be used for potentiometers in Joysticks and custom I/O boxes. Do not use +5V Aux for lamps or LEDs. The DISABLE dipswitch on the Operator Interface
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 16
Table 4.3.4: Port 4 Pinout and Software Function
Pin Function Default PBASIC Code Information [1] Variable type Variable Name Code Function
3 6 13 11 2 7 10 14 5 8 9 15
X-Axis Y-Axis Wheel Aux Analog Joystick Trigger Switch Joystick Thumb Switch Aux Switch1 Aux Switch2 same as OI Port 1 Joystick Trigger Switch same as OI Port 1 Joystick Thumb Switch same as OI Port 1 Aux Switch1 same as OI Port 1 Aux Switch2
Analog (byte) Analog (byte) Analog (byte) Analog (byte) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit) Digital (bit)
p4_X p4_Y p4_wheel p4_aux p4_sw_trig p4_sw_top p4_sw_aux1 p4_sw_aux2 p1_sw_trig p1_sw_top p1_sw_aux1 p1_sw_aux2
RC PWM8 RC PWM4 RC PWM12
Relay 4 Forward Relay 4 Reverse Relay 7 Forward Relay 7 Reverse RC Relay 1 Forward RC Relay 1 Reverse Relay 5 Forward Relay 5 Reverse
1 +5V Aux (Fuse F2) [2,3] 4 Ground 12 Ground
Notes: RC refers to the Robot Controller OI refers to the Operator Interface [1] [2] [3] Software functions listed are for Default Code only. These functions and variable names may be changed for user programs. +5V Aux is to be used for potentiometers in Joysticks and custom I/O boxes. Do not use +5V Aux for lamps or LEDs.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 17
4.4.
Tether
The TETHER port is intended to connect the Operator Interface to the Robot Controller. The TETHER port passes the same data as the radios, allowing full functionality without the use of radios. A tether connection can be made with or without Radio Modems connected. The system will always use tether if it is available, however you will see no change in the status indicators on the Radio Modems. Both the Operator Interface and the Mini Robot Controller will automatically detect a tether connection and switch to tether without requiring power OFF or a reset. A tether connection also provides power to the Operator Interface from the Robot Controllers 12V battery. Tether power provides a means to power the Operator Interface when 115V 60Hz power is not available. Tether power is useful before or after competition rounds to check your system or collapse your robot. Caution: This port is not intended to interface with a computer. Use a DB9 Male-Female Pin-to-Pin cable (maximum length 25 ft.) to connect the Operator Interface to the Robot Controller. 4.5. Competition
The COMPETITION port is intended to allow control of your Operator Interface by competition organizers. Competition organizers can use the Competition port to access additional channels, provide power, and disable robot control for starting and stopping matches. An adaptor cable can be connected to the Competition port allowing the ` disable robot'feature to be used anytime. This adaptor connector is not provided with the system. Details on making a disable adaptor cable are provided later in this section. The COMPETITION port is also used to provide teams access to four additional radio channels. All Operator Interfaces default to channel 40. Access to channels 4, 13, 22, and 31 can be achieved by connecting an adapter connector to the COMPETITION port. The adaptor connector is not provided with the system. Details on making a channel access adaptor connector are provided later in this section. Refer to Section 5.4 on page 21 for information on selecting additional channels once the channel access adaptor is installed. Access to channels other than 40 will be restricted at events. Do not make the channel access jumper internal to the Operator Interface. This jumper connection is intended to be externally visible. Internal channel access jumper will be detected when you connect to the stage. WARNING: The COMPETITION port has pins that connect directly to the Operator Interface microprocessor. Incorrect wiring may damage the unit and will void the warranty. This damage may not be apparent until connecting to the stage at competition. Use caution and double check you' wiring prior to making a connection. Always use a re backshell to protect the connector' pins from ESD discharge. s
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 18
Competition Port Adapter A Competition port adaptor can provide access to four additional channels and/or provide access to the Disable feature. To build this adaptor, you will need wire and the following: (1) DB15 Male solder pot connector (1) DB15 backshell (1) ON/OFF switch Connect pin 12 to pin 15 to provide additional channel access. Connect pins 6 and pin 8 to the appropriate pins of an ON/OFF switch. Be sure that no other pins are shorted.
Table 4.5: COMPETITION Port Pinout
Pin Function
12 15 6 8
Channel access Ground Disable Ground
WARNING: The COMPETITION port has pins that connect directly to the Operator Interface microprocessor. Incorrect wiring may damage the unit and will void the warranty. This damage may not be apparent until connecting to the stage at competition. Use caution and double check your wiring prior to making a connection. Always use a backshell to protect the connector' pins from ESD discharge. s
4.6.
Dashboard
The DASHBOARD port is intended to allow the Operator Interface to transfer data to a computer for enhanced robot feedback. The DASHBOARD port is a transmit only interface. The data transmitted out the DASHBOARD port is the same data that is received by the Operator Interface from the Robot Controller. IFIrobotics provides a Windows? compatible Dashboard Viewer program for viewing this data on a PC. IFIrobotics does not provide support for the Dashboard Viewer software or release the source code. Custom programs may be written to make use of this data. Connect the DASHBOARD port to the RS-232 serial port of a computer using a DB9 MaleFemale Pin-to-Pin cable (maximum length 6 ft.). Refer to the Dashboard Port Data Specification available at www.ifiRobotics.com.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 19
5. Using the Operator Interface 5.1. Setting the Team Number
A quick method of setting the Team Number without using binary is described in the Quick Setup Guide on page 38. Setting the Team Number on the Operator Interface requires changing the TEAM NUMBER dipswitch settings. The Team Number is set by changing the switches to match the binary equivalent of your Team Number. The Operator Interface will update the Team Number on the 3-digit display while you change the TEAM NUMBER dipswitch. You may have to press the SELECT button several times until the Team Number is shown. The Team Number is displayed as three numbers only, no decimal place or letters. Any Team Number greater than 999 will be displayed as "---". The diagram below shows the location of the Most Significant Bit (MSB) and the Least Significant Bit (LSB).
The following diagram is an example of setting the Team Number to 34.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 20
5.2.
Operator Interface Indicators
Table 5.2.1: Operator Interface LEDs - Operator Interface Section
Power ON Search/TX Valid RX No Data/Radio No Data/Radio F1 Main F2 Aux F3 Radio F4 Logic Solid Blink Blink Blink Solid Solid Solid Solid Solid Input power is ON from AC Adaptor, Tether, or Competition port. Transmitting data packets to Radio Modem. Receiving data packets with correct Team Number and Channel Number. No data packets received or bad data packets received. Radio Modem not found. Check modem and cables. Fuse F1 blown. Replace with correct value (see Section 5.9 on page 23). Fuse F2 blown. Replace with correct value (see Section 5.9 on page 23). Fuse F3 blown. Replace with correct value (see Section 5.9 on page 23). Fuse F4 blown. Replace with correct value (see Section 5.9 on page 23).
Table 5.2.2: Operator Interface LEDs Mini Robot Controller Section
Indicator Valid RX No Data Low Battery Status Blink Blink/Solid Blink The Mini Robot Controller is receiving good data packets. The Mini Robot Controller is receiving bad data/no data. Low battery voltage detected. Replace or recharge battery soon. Low Battery will remain blinking if the voltage ever drops below 9.0V. The Low Battery Blink threshold is user definable in the PBASIC code. Low battery voltage detected. Replace or recharge battery now. Low Battery will remain solid if the voltage ever drops below 8V. The Mini Robot Controller has either a PBASIC Initialization error or a PBASIC run error. The Aux fuse on the Mini Robot Controller is blown. Replace with correct value (see Section 8.4 on page 29).
Low Battery Basic Error Aux Fuse
Solid Solid Solid
The COMPETITION CONTROL Disabled light on the Operator Interface indicates that the entire Control System has been disabled via the Competition port (see Section 4.5 on page 17). When the Disabled light is ON, the Robot Controller' PWM and RELAY outputs are disabled. s The following functions are still active when the Control System is disabled: o Operator Interface inputs (joystick, buttons, etc.) are transmitted to the Robot Controller. o PBASIC code is executing. o PBASIC input, including Operator Interface inputs and local inputs (switches, pots, etc) are read in. o PBASIC output commands are still sent, but ignored by the output processor. o Mini Robot Controller feedback is transmitted to the Operator Interface. The ROBOT FEEDBACK lights on the Operator Interface represent data transmitted from the Mini Robot Controller to the Operator Interface. The upper eight lights (PWM1, PWM2, Relay 1, and Relay 2) are user definable in the PBASIC code (see Section 9 on page 30). The Default PBASIC Code provided with the Mini Robot Controller utilizes these lights to display the status of PWM 1, PWM 2, Relay 1, and Relay 2 respectfully. The Switch 1, 2, and 3 indicators represent the status of the Robot Controller' digital inputs 1, 2, s and 3. These are not PBASIC software programmable.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 21
5.3.
SELECT Button and the 3-Digit Display
The SELECT button is used to change the 3-digit display. Pressing SELECT will cycle the display between Team Number, Channel, and Robot Voltage. The data displayed can be distinguished by the format used. Team Number display Channel display Robot Voltage display 000 c40 12.0
The display of team number will show "---" if the team number selected with the TEAM NUMBER dipswitch is greater than 999.
5.4.
CHANNEL Dipswitch
The CHANNEL dipswitch located on the Operator Interface is used to select a channel for both the Operator Interface and the Robot Controller. The Operator Interface reads the CHANNEL dipswitch on power-up or after pressing the OI RESET button. Access to channels 4, 13, 22, and 31 can be achieved by connecting an adapter connector (see Section 4.5 on page 17) to the COMPETITION port and setting the CHANNEL dipswitch according to Table 5.4. The Operator Interface will default to channel 40 independent of the dipswitch setting if a competition port adapter is not detected. The Mini Robot Controller sets channels by scanning for the Operator Interface with the same Team Number (see Figure 1.2 on page 5). The Mini Robot Controller will only scan channels on power-up or after pressing the RESET button located on the Robot Controller. Table 5.4: CHANNEL Dipswitch Settings 2 3 4 Channel ON ON ON 04 ON ON OFF 13 ON OFF ON 22 ON OFF OFF 31 OFF OFF OFF 40 Steps for changing channels: 1. Make sure a COMPETITION port adapter is installed. 2. Make sure both units are set to the same Team Number. 3. Set the CHANNEL dipswitch to the desired channel. 4. Press OI RESET on the Operator Interface. 5. Press RESET on the Robot Controller. Note: ROBOT RESET on the Operator Interface will not work for this. 6. After a few seconds, the "Search/TX" and "Valid RX" lights should be flashing on both units, indicating each is transmitting and receiving good data with the correct team number and channel.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 22
5.5.
DISABLE dipswitch
The DISABLE dipswitch is used to disable buttons on joysticks connected to PORT 1 and PORT 3. Only PORT 1 and PORT 3 have joystick digital inputs that are available on another port. This disable feature is useful when a custom button box uses the same digital input as a joystick. A button on a joystick can be disabled so only the button on the box is functional. The tables below list the buttons that can be disabled.
Table 5.5.1: Disable Switches for Port 1
Pin 2 7 10 14 Port 1 Button Joystick Trigger Switch Joystick Thumb Switch Aux Switch1 Aux Switch2 DISABLE switches for Port 1 Pin Port 4 Button
SW01 SW02 SW03 SW04
5 8 9 15
same input as OI Port 1 Joystick Trigger Switch same input as OI Port 1 Joystick Thumb Switch same input as OI Port 1 Aux Switch1 same input as OI Port 1 Aux Switch2
Table 5.5.2: Disable Switches for Port 3
Pin 2 7 10 14 Port 3 Button Joystick Trigger Switch Joystick Thumb Switch Aux Switch1 Aux Switch2 DISABLE switches for Port 3 Pin Port 2 Button
SW05 SW06 SW07 SW08
5 8 9 15
same input as OI Port 1 Joystick Trigger Switch same input as OI Port 1 Joystick Thumb Switch same input as OI Port 1 Aux Switch1 same input as OI Port 1 Aux Switch2
5.6.
OI Reset
The OI RESET button performs a complete hardware reset of the Operator Interface. The following are the most common uses for the OI RESET button: o Pressing OI RESET after the CHANNEL dipswitch is changed will initiate a radio channel change. o Pressing OI RESET is required after connecting a radio to initialize the radio. When in doubt, pressing OI RESET won' hurt. t
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 23
5.7.
Robot Reset
The ROBOT RESET button is intended to allow remote reset of the Robot Controller' BS2SX s PBASIC processor. The most common use for the ROBOT RESET button is to restart the BS2SX processor in case of a programming error. The ROBOT RESET button can also be used to reset the BS2SX after a new program has been downloaded. The ROBOT RESET button on the Operator Interface only resets the BS2SX and not the entire Robot Controller. Pressing RESET (if present) on the Mini Robot Controller or power cycling the Mini Robot Controller are the only ways to reset the entire Robot Controller.
5.8.
Fuses F1, F2, F3, F4
The four fuses on the Operator Interface are intended to protect the circuitry from a short circuit. In the unlikely event that a fuse blows, a light on the front panel will indicate the fuse that failed. The most likely cause of a blown fuse is improper wiring. Prior to replacing the fuse, check your wiring for shorts or incorrect pin connections. Be sure to only replace the fuse with the appropriate value, slow blow, TR-5 style fuse. Replacement fuses are available at the IFIrobotics website or from electronics vendors. If the replacement fuses continue to blow and you have thoroughly checked your wiring, contact IFIrobotics for further assistance (see Section 10 on page 33). Fuse F1 F2 F3 F4 Protects Main Aux Radio Logic Value 2.0 3.0 Amps 1.0 1.5 Amps .50 - .75 Amps .50 - .75 Amps Type Slow Blow Slow Blow Slow Blow Slow Blow
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 24
6. Mini Robot Controller Basics The Mini Robot Controller receives information from the Operator Interface, gathers additional information from sensors on-board the robot, determines how the robot should function, and instructs the robot perform the functions. The Mini Robot Controller also sends data back to the Operator Interface, giving the robot operators feedback of critical information. Figure 1.1 shows a block diagram illustrating this concept. The Mini Robot Controller gathers on-board sensor data via the ANALOG INPUTS and DIGITAL INPUTS connectors. There are 8 digital inputs and 4 analog inputs. Switches of various types may be connected to the digital inputs. Sensors that provide a 0-5V output, such as potentiometers and gyros (yaw rate sensors) may be connected to the analog inputs. The Mini Robot Controller takes the collected data from both the Operator Interface and the onboard sensors and then forwards it to the PBASIC program processor. The program takes the data, determines what to do with the outputs to make the robot behave as desired, and sets the PWM and Relay outputs to the appropriate states. The Mini Robot Controller comes with a default program that will handle most robot control needs. If more sophisticated control of the robot is desired, then a custom program can be written. PBASIC default source code is available at www.ifiRobotics.com. Programming tools and manuals are available at www.parallaxinc.com. The Mini Robot Controller has 8 PWM outputs and 4 RELAY outputs. The PWM outputs are used to drive Victor 883 speed controllers and servos. The most common use of these outputs is to control a variable speed motor. The PWM outputs will also control most industry standard servos. The Relay outputs are used to drive Spike bi-directional relay modules. The most common use of these outputs, when connected to a Spike, is to drive small motors in Forward, Reverse or Off. The Relay outputs, in conjunction with a Spike, can also be use to turn On or Off solenoids, pumps, and lights.
Reference Documents (available at www.ifiRobotics.com) Size and mounting information............................Mini Robot Controller Installation Info.pdf Frequently asked questions ..................................Control System FAQ.pdf 2000 Default Code listing ....................................2000 Default Code.pdf
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 25
7. Mini Robot Controller Connections 7.1. Power
The Mini Robot Controller accepts power from a 7.2V to 12V battery. The current draw for the Mini Robot Controller is typically between 0.75A to 1.5A. The maximum voltage allowable input is 15.0V. Exceeding the 15.0V limit will damage internal voltage regulators and will void the warranty. The minimum required voltage is 6.2V. The Mini Robot Controller is internally protected from reverse polarity. Refer to the appropriate Motherboard Users Manual for power wiring information. 7.2. Radio
The Mini Robot Controller uses a custom 900MHz internal radio designed to communicate with the Operator Interface radio modem. 7.3. Tether
Refer to the TETHER port section for the Operator Interface on page 17 for tether instructions. Refer to the appropriate Motherboard Users Manual for TETHER connection information. 7.4. Program
The PROGRAM port on the Mini Robot Controller' Motherboard is used to change the s PBASIC program. This port is intended to connect to a PC' serial port. Use a DB9 Males Female Pin-to-Pin cable (maximum length 25 ft.) to connect the PROGRAM port to a PC serial port. Refer to Section 9 on page 30 for programming details. Refer to the appropriate Motherboard Users Manual for PROGRAM connection information.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 26
7.5.
PWM Outputs
The PWM outputs are used to drive Victor 883 speed controllers and servos. The most common use of these outputs is to control a variable speed motor from a joystick axis connected to the Operator Interface. The PWM outputs will control most industry standard servos and speed controllers. Each of the eight outputs generates a unique Pulse Width Modulated (PWM) signal corresponding to a specific output of the PBASIC program. Custom PBASIC software can be used to control the PWM outputs as desired (see Section 9 on page 30). Use a PWM/Relay extension cable to connect a speed controller or servo to one of the PWM output ports. Be sure to connect the cable so the black wire is on the indicated side. A Y-cable can be used on any PWM output to drive two like devices at the same time. You can connect up to three Victor 883 speed controllers to one PWM port. Do not use a PWM Signal Driver in conjunction with the Robot Controller. Refer to the appropriate Motherboard Users Manual for PWM connection information. Table 7.5 below shows which of the PWM outputs are controlled by joysticks on the Operator Interface. This table is only valid for default code. These functions and variable names may be changed for user programs. Table 7.5: PWM Output Map (Default Code Only)
PWM Output PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 PWM8 PBASIC Variable p1_y p2_y p3_y p4_y p1_x p2_x p3_x p4_x Output Controlled by Port 1 joystick Y-axis Port 2 joystick Y-axis Port 3 joystick Y-axis Port 4 joystick Y-axis Port 1 joystick X-axis Port 2 joystick X-axis Port 3 joystick X-axis Port 4 joystick X-axis
Note: The Mini Robot Controller digital inputs are configured by the default code to act as limit switches for PWMs 3, 4, 9-12. Refer to Section 7.8 on page 28 for more details.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 27
7.6.
Relay Outputs
The Relay outputs are used to drive Spike bi-directional relay modules. The most common use of these outputs, when connected to a Spike, is to drive small motors in Forward, Reverse or Off. The Relay outputs, in conjunction with a Spike, can also be use to turn On or Off solenoids, pumps, and lights from a joystick button on the Operator Interface. Each of the four ports generates two binary signals corresponding to a specific output of the PBASIC program. Custom PBASIC software can be used to control the Relay outputs as desired (see Section 9 on page 30). Refer to the Spike Users Manual (available at www.ifiRobotics.com) for detailed instructions on wiring to motors, solenoids, pumps, and lights. Use a PWM/Relay extension cable to connect a Spike to one of the Relay outputs. Be sure to connect the cable so the black wire is on the indicated side. Each Relay output can be used with a Y-cable to drive two Spikes from the same output.
Refer to the appropriate Motherboard Users Manual for Relay connection information. Table 7.6 below shows which of the Relay outputs are controlled by joysticks connected to the Operator Interface. This table is only valid for default code. These functions and variable names may be changed for user programs. Refer to the 2000 User Default code available at www.ifiRobotics.com. Table 7.6: Relay Output Map (Default Code Only)
Relay Relay 1 Forward Relay 1 Reverse Relay 2 Forward Relay 2 Reverse Relay 3 Forward Relay 3 Reverse Relay 4 Forward Relay 4 Reverse Operator Interface Connector OI Port 1 OI Port 1 OI Port 2 OI Port 2 OI Port 3 OI Port 3 OI Port 4 OI Port 4 Operator Interface Control Switch Joystick Trigger Switch Joystick Thumb Switch Joystick Trigger Switch Joystick Thumb Switch Joystick Trigger Switch Joystick Thumb Switch Joystick Trigger Switch Joystick Thumb Switch Pin 2 7 2 7 2 7 2 7 PBASIC Variable p1_sw_trig p1_sw_top p2_sw_trig p2_sw_top p3_sw_trig p3_sw_top p4_sw_trig p4_sw_top
Note: The Mini Robot Controller digital inputs are configured by the default code to act as limit switches for Relay 1 and Relay 2. Refer to Section 7.8 on page 28 for more details.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 28
7.7.
Analog Inputs
The analog inputs on the Mini Robot Controller can be used to measure various conditions on the robot and trigger automatic responses by the control program. There are four analog inputs available on the ANALOG INPUT port. Potentiometers and gyros (yaw rate sensors) may be connected to the analog inputs. For wiring 0-5V sensors, refer to the sensor manufacturer' data s sheet. Potentiometers should be wired per the diagram below. Always use 100k? potentiometers.
+5V Output Analog Input Ground
Refer to the appropriate Motherboard Users Manual for ANALOG connection information. Table 7.7: Analog Inputs and Software Function
Pin AN1 AN2 AN3 AN4 Function Analog 1 Analog 2 Analog 3 Analog 4 PBASIC Variable sensor1 sensor2 sensor3 sensor4
7.8.
Digital Inputs
The digital inputs on the Mini Robot Controller can be used to monitor various conditions on the robot and trigger automatic responses by the control program. There are eight digital inputs available on the Motherboard. Various switches may be connected to the digital inputs. Wire switches between the desired digital signal pin and the ground pin. Switches may be wired individually, in parallel or in series. Refer to the appropriate Motherboard Users Manual for DIGITAL connection information. Table 7.8: Digital Inputs and Software Function
Switch SW1 SW2 SW3 SW4 SW5 SW6 SW7 SW8 Function Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 Switch 6 Switch 7 Switch 8 PBASIC Variable rc_sw1 rc_sw2 rc_sw3 rc_sw4 rc_sw5 rc_sw6 rc_sw7 rc_sw8 PBASIC Default Code Function Relay 1 won' go Forward if rc_sw1 is ON t Relay 1 won' go Reverse if rc_sw2 is ON t Relay 2 won' go Forward if rc_sw3 is ON t Relay 2 won' go Reverse if rc_sw4 is ON t PWM 3 won' go Forward if rc_sw5 is ON t PWM 3 won' go Reverse if rc_sw6 is ON t PWM 4 won' go Forward if rc_sw7 is ON t PWM 4 won' go Reverse if rc_sw8 is ON t
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com Users Manual / Page 29
8. Using the Robot Controller 8.1. Setting the TEAM NUMBER
A quick method of setting the Team Number without using binary is described in the Quick Setup Guide on page 7. Setting the Team Number on the Mini Robot Controller Motherboard is best accomplished by first setting the Team Number on the Operator Interface (see Section 5.1 on page 19), then copying the switch setting to the Robot Controllers TEAM NUMBER dipswitch.
8.2.
Mini Robot Controller Indicators
Refer to the appropriate Motherboard Users Manual for Indicator information.
8.3.
Power Cycle or Reset
Power Cycling involves removing power from the Mini Robot Controller and then re-connecting power after a few seconds. Some Mini Robot Controller Motherboards will have a reset button. Some Mini Robot Controller Motherboards have a power switch. Power cycling the Mini Robot Controller and pressing the RESET button both have the same result. Power Cycling or Resetting performs a complete hardware reset of the Robot Controller, including the Master, Slave, and BS2SX PBASIC processors. The following are the most common uses for Power Cycling or pressing RESET: o Restart the BS2SX processor in case of a PBASIC programming error. o Restart the Mini Robot Controller after a new program has been downloaded to the BS2SX. o Restart the Mini Robot Controller after the CHANNEL dipswitch on the Operator Interface is changed, to initiate a radio channel scan. Note: The ROBOT RESET button on the Operator Interface does not perform the same function as Power Cycling or pressing RESET on the Robot Controller. ROBOT RESET on the Operator Interface only resets the BS2SX and not the entire Robot Controller. When in doubt, Power Cycling or pressing RESET won' hurt. t
8.4.
Fuse
Refer to the Motherboard Users Manual for information on the fuse.
IFIROBOTICS
July 2001
Robot Control System / Mini RC
www.IFIrobotics.com User