Upcoming Events:
Error 406 - Not Acceptable
Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.
Full event list
Error 406 - Not Acceptable
Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.
FIRST® Robotics Competition (FRC®)
Control System 2004-2008
The FIRST Robotics Competition (FRC) control system has a pair of smaller, mini-robot cousins designed and manufacturered by Innovation First, Inc. (IFI). These can be used to develop software that ports quite easily to the full-sized robot controller and to prototype simple mechanical design concepts. The Vex system is the basis for a robotics competition all it's own.
Edu-Vex Robotic Systems
Most the basic principles and example code in these pages was developed and demonstrated on Edu and Vex platforms.
Control System Components
Most years the electrical system followed this general power diagram. Differences included the use of a smart centralized power distribution panel made by IFI for a few of the years, a screw terminal power block a couple of years, the use of a grounding stud was sometimes encouraged and at other times not encouraged.
Robot Controller (RC) Specifications
- (6) Interrupt Inputs
- (16) Digital I/O, Each can be Input or Output, 7mA max
- (16) Analog Inputs (10-bit resolution)
- +5V Power Pin The total combined current supplied from all 16 Analog and 18 Digital +5V Power header pins is 1 Amp. The 1 Amp max can come from a single +5V Power pin.
- Digital Input Frequency 50 KHz (typical)
- Analog Input Access 10 ?Sec
- (16) Relay Outputs (8 Fwd, 8 Rev)
- (12) PWM Outputs Standard, refreshed every 17mSec
- (4) PWM Outputs Fast, refreshed up to every 2mSec (requires Kevin Watson s/w)
- TTL Serial port (115Kb)
- RS232 Program port (115Kb)
- (4) Team Color LED Outputs
- Reset Pins Allows a remote Reset switch/button
- Program Pins Allows a remote Program switch/button
- User Programmable Micro-Controller
- User Microcontroller Microchip PICmicro® PIC18F8520 for 2004-2005, PIC18F8722 for 2006-2008
- User Processor Speed 10 MIPS (Million Instructions Per Second)
- Variable Space
- (2004-2005) PIC18F8520 2048 bytes + 1024 bytes EEPROM
- (2006-2008) PIC18F8722 3936 bytes + 1024 bytes EEPROM
- Program Space
- (2004-2005) PIC18F8520 32K
- (2006-2008) PIC18F8722 128K
- Programming PIC C
- Programming Tools Microchip MPLAB IDE
- Erase/Write Cycles 100,000
- Data Retention > 40 years
- Main Battery 12V Robot battery
- Battery Backup 7.2V Backup battery for RC and Radio ensures "Always On" radio communication
- Size (W x L x H) 6" x 7" x 0.9"
- Weight 0.67 lbs.
Operator Interface (OI) Specifications
Note: To be able to use the FIRST field modes of: Disabled, Autonomous, and Tele-operated
you need to construct a switch for the OI Competition Port per this competition-port-pinout-guide.pdf.
Radio Modem
The OI and RC communicate via tether cable or by a pair of radio modems such as these. There are two (incompatible) basic types of radio modems. The same type of radio modem pairs are compatable across years and with work equally well with the 2001-2003 control systems as with the 2004-2008 control systems. One modem was only for use on the RC and the other only on the OI.
The first model (an Ewave SCREAMER422) was used for the years 2001-2006 and had both blue and red lettering.
Packets:
Whenever two consecutive 0xFF bytes are received it is considered a packet header, and any prior bytes that were being assembled into a packet are discarded. The receiving modem then starts assembling the latest 26 byte packet. Only when a complete packet has been fully received is it sent out the receiving modem's RS-422 connection. The OI/RC software makes sure no packet has consecutive 0xFF's in the 24 byte data portion of the packet, otherwise, no complete packet will ever get through. This is why you'll never see a joystick or PWM output value of 255. Any 255's set by the user code or detected on an OI analog input are converted into 254's by the RC master processor and the OI processor instead. For Robot Control & Telemetry (FIRST), the modems are set for "RM2000" or fixed-length, 26-byte packets with no retries, therefore, no CRC check is performed on the transmitted data packets.
The Radio Packet size is fixed at 26 bytes long. The packet format is:
- 0xFF, 0xFF (always a packet header)
- data bytes 1 through 24
For more information see the Ewave Modem Technical Manual
- Frequency Band 902-928MHz
- Data 9600 bps Full Duplex. Burst data rate 38.4 K baud
- Range 300 ft. typical (line of sight)
- 40 Channels. 6 channels are user selectable. 34 channels are Reserved for Competition Use Only.
The second model had a different appearance and was used in 2007 & 2008.
- Frequency Band 902-928MHz
- Data Rate 19200 bps Full Duplex (N81)
- Range 100 ft. typical (line of sight)
- 40 Channels. 6 channels are user selectable. 34 channels are Reserved for Competition Use Only.
FIRST Documentation
Here are the FIRST released documents, code, and support programs for the 2004-2008 robot controller (RC). The hardware for 2004-2005 is the PIC18F8520, but a Microchip PIC upgrade to the PIC18F8722 in 2006 gave us additional memory and a lovely memory bug for 2006-2008. Most documents remain valid for all the years of this controller. Some software changed when the CMU camera was added to the kit. The bug in the 2006-2008 hardware (which manifests itself by displaying the battery level as 8.2volts) required software updates to fix (see revised-frc-libraries_2-24-06 and memory_problem_8722 links below).Hardware
- control-system-overview-2004-01-07.pdf
- fr-2004-oi-ref-guide-2004-2-17.pdf
- fr-2004-rc-ref-guide-2004-feb-19.pdf
- rc-ref-guide-6-13-2006.pdf
- frc_system_quick_start_2004-1-14.pdf
- rc-install-info.pdf
- analog-digital--i-o-rc.pdf
- program-port-4-7-05.pdf
- program-port-y-cable.pdf
- first-backup-charger.pdf
- Ewave Modem Technical Manual
Programming
- Environment
- MPLAB/C18 - search for C18 free academic version of the compiler. MPLAB the IDE is free.
- FRC PIC18F8520 Library - IFI controller 2004-2005 - matches mcc 18 version 3.x of the compiler
- FRC PIC18F8722 Library - IFI controller 2006-2008 - matches mcc 18 version 3.x of the compiler
- ifi-loader-v1-1-0.zip
- Kevin Watson FRC Code Repository
- 2004-programming-reference-guide-12-apr-2004.pdf
- frc-rc-default-software-ref-guide-2004-1-7.pdf
- frc-code-1-12-2005v2.2.zip
- frc-code-1-12-2005v2.4.zip
- frc-code-2-28-2006.zip
- frc-code-2004-02-26.zip
- frc-code-2007-8722.zip
- master-software-ver15.zip
- memory_problem_8722.pdf
- revised-frc-libraries_2-24-06.zip - only for MCC 18 v2.x of the compiler
- frc-code-ddt.zip
- device-reader.zip
CMU Camera
- cmucam2-documents-and-software1.zip
- camera-board-markings.zip
- cmu-cam2-troubleshooting-2005-01-18.pdf
CMUCam Pan & Tilt Assembly
CMUCam Pan & Tilt Assembly Instructions
EDU mini-robot
Teams received one EDU version of the 2004 controller to practice with.
- edu-rc-2004_ref_guide_2004-mar-1.pdf
- edu-default-software-guide_10-15-2003.pdf
- edu-default-02-16-04.zip
Common FIRST Serial Ports
Here are pin-outs of some of the more common serial ports used in FIRST. This information has simply been cut-and-pasted from various FIRST documents and sources into one diagram. We kept referencing the wiring for these so we decided to collect it all in one place for convenience. There are two basic types of serial connections that cannot be directly mixed - TTL and RS232. They are both used for serial communication, however, the TTL ports use 0 to 5 volts while RS232 uses -15 to +15v. They can be connected together only by way of a TTL-RS232 converter, one of which has been supplied as part of the annual Kit-of-Parts for a few years, and another comes as an essential part of the Vex programming kit.Here's internal documentation of the IFI TTL-RS232 (, 16 KB) Converter for you EE's.
Default Code & Examples
Here is the FIRST released default code for this controller, as well as, default and example code released by mentor Kevin Watson.IFI Legacy Default Code & Documentation
IFI 2008 RC Programming
Kevin Watson Code Repository
Playing Field
At the field alliance stations each Team Operator Interface plugs into an Arena Controller, one is dedicated to each team. The Arena Controllers connected to the FMS control and the robot field radios (6 are grouped in a radio tree at one side of the field, one field radio per team, each given a different radio channel.Programming Workshops
SBPLI Beginner Programming Workshop (October 4, 2008)
- Beginner Programming Concepts Workshop Presentation (, 123 KB)
- Handouts (, 69 KB)
- EasyC Test Program (, 22KB)
EasyC Workshop (January 2008)
This introduction to EasyC was just the beginning. EasyC comes complete with a tutorial series under "Help" that provides more insight into the operation and use of EasyC.
- EasyC Programming Workshop (, 1 MB)
- FRC EasyC IR Sensor-- Basic EasyC code interfacing with the 2008 IR Sensor. It just lights controller LEDs as IR remote buttons are pushed. (, 17KB)
- FRC EasyC IR Hybrid-- demonstrates using the IR for more advanced hybrid mode (, 17KB)
IR Hybrid Receiver Workshop (January 2008)
On the first Saturday after Kickoff we knew what was in the Kit-of-Parts so we reviewed new sensors/electronics, ideas for use, technical details. We covered the setup, integration, and use of the infrared remote control receiver FIRST released to us in December. The IR sensor was demonstrated on an EDU mini-robot, and we wired up and tested all the boards brought by teams.Here is the presentation and the sample basic code from the mini-EDU robot and more efficient sample code for the full-sized Robot Controller:
- 2008 IR Sensor Workshop (, 1.4 MB)
- EDU mini-robot IR Sensor-- EDU mini-robot code demo'ed at the Workshop (, 88KB)
- FRC IR Sensor-- Full-robot FRC Default code with more efficient IR Sensor added (, 176KB)
- FRC EasyC IR Sensor-- Basic EasyC code interfacing with the 2008 IR Sensor. It just lights controller LEDs as IR remote buttons are pushed. (, 17KB)
- FRC EasyC IR Hybrid-- demonstrates using the IR for more advanced hybrid mode (, 17KB)
Programming Workshop (2007)
- EDU robot w/front bumper switch & gyroscope
- Vex squarebot w/ IR rangefinder, Maxbotix & Vex ultrasonic rangefinders, line follower
- Vex squarebot w/ CMUCam2 targeting the green light
- Vex squarebot w/ encoder and turret w/pot feedback
- Vex squarebot w/ 2-jointed arm w/pot feedback
- Vex w/ swerve drive (4-wheel drive, independently controlled wheel steering)
- Programming Hands-on Workshop (, 1.9 MB)
- Edu Robot Code-- Autotonmous / Bumper switch / gyroscope (, 60KB)
- Vex Robot1 Code-- Autotonmous / IR & Sonic rangefinders (, 61KB)
- Vex Robot2 Code-- Autotonmous / CmuCam2 (, 126KB)
- Vex Robot3 Code-- Autotonmous / Encoder / pot feedback turret (, 61KB)
- Vex Robot4 Code-- Autotonmous / two-jointed arm w/pot feedback (, 63KB)
- Vex Robot5 Code-- Autotonmous / Swerve drive (, 66KB)
Programming Workshop Series (2006)
It was basically a survey-style lecture with some demos interspersed. Not enough people brought team laptops to run a real workshop.
Beginner (MPLAB-based)
Covered the fundamentals of FIRST robotics C programming. We covered MPLAB, basic C, FRC default code, specifics on basic robot control, debugging, common problems (it's the mechanical guy's fault), and simple loop-based autonomous dead reckoning. This is targeted for the robotics beginner who has seen C, but never used it for much.- Beginner Programming Workshop
(, 2 MB)
- Simple Vex Autonomous Example Code
(, 50KB)
- 2006 FRC Default Code
(, 117KB)
- Programming Quick Start
(, 87KB)
- Operator Interface Reference Guide
(, 889KB)
- Robot Controller Reference Guide
(, 361KB)
- Additional Help: Chiefdelphi Programming Forum
Intermediate
Taking a step beyond the basics we talked about and demonstrated timers, timer-based autonomous dead-reckoning, simple sensors, driving control, fixed-point math, debugging techniques.- Intermediate Programming Workshop
(, 720KB)
- Vex Potentiometer Demo Code
(, 50KB)
- Vex-Edu Timer Parameter Calculator Code
(, 59KB)
- Vex LCD Demo Code
(, 187KB)
- EDU Sample Auto Styles Demo Code (, 46KB)
Advanced
Similar to the previous year's workshop, but covering more sensors, autonomous (sensor-driven/scripting), interrupts, PID. Vex demos - encoders, ultrasonic, IR, gyroscope, CMUcam2. Anyone who wanted to stayed after the lecture and played with the demo robots.Check out the PID Control Theory (, 38.6 KB) whitepaper our programmer Matt Krass wrote.
Matt also has a whitepaper on gyroscopes (, 55KB). It never got past the draft stage, but is a good background for the gyroscope portion of the workshop, just ignore the markups.
- Advanced Programming Workshop
(, 720KB)
- Vex Encoder Demo Code
(, 40KB)
- Vex Camera Demo Code
(, 91KB)
- Vex Ultrasonic Demo Code
(, 454KB)
- Sample Autonomous Styles Demo Code (, 46KB)
Autonomous Sensors Workshop (2006)
- Autonomous Sensors Workshop (, 1 MB)
- Vex Ultrasonic Sensor Demo Code (.zip, 52KB)
Infra-red Beacon/Tracker Workshop (2004)
- IR Workshop (, 1.16 MB)
- Edu IR Beacon-Tracker Code (, 48KB)
- FRC IR Beacon-Tracker Code (, 68KB)
CMUCAM2 Notes
- FIRST CMUCam schematic (, 203 KB)
- FIRST CMUCam Control Board drawing (, 203 KB)
- FIRST CMUCam Documents & Software (, 4.65MB)
- FIRST CMUCam Troubleshooting (, 203 KB)
FIRST Programming Quick Start
- 2006 Quick Start to Programming (, 91.4 KB)
- 2005 Quick Start to Programming (, 91.4 KB)
Guide to FIRST Default Programs
IFI_Loader HEX File Format
- IFI_Loader HEX File Format (, 28 KB)
Get Microsoft Excel Viewer
Get Microsoft PowerPoint Viewer
Get WinZip