cRIO FRC II

Briefing on new cRIO
In 2012 a new version of the cRIO is introduced, the cRIO FRC II. On introductory sale to veteran teams in the Fall of 2011, a bare chassis will cost ~$300, while the chassis with three modules (Analog, Digital, and Solenoid) will cost ~$550.
Based on the NI cRIO-9076, this smaller, lighter model has only 4-slots, one each for analog/digital/solenoid modules, plus an additional slot that will be hardcoded for a second module of FIRST's choice.
The cRIO FRC II has twice as much memory and RAM as the original FRC cRIO, with a newer Freescale 5125 processor running at 400MHz, but with a bigger cache and higher memory bandwidth. In comparison, it will probably appear to otherwise deliver similar performance as the original FRC cRIO. The mounting holes through the base are smaller than the original.
It will continue to run even if the voltage drops as low as 9v. It's still intended to be powered through the protected regulation of the 24v Power Distribution Panel source in competition, but can be powered by something else for bench testing.
FRC Live @ Championship

Holding down the reset button long enough will reboot the cRIO into safe mode. Other settings that used to be done by DIP switches are set through software.
Screw-terminal wiring - use 24 to 12 AWG copper conductor wire with 0.39 in. of insulation stripped from the end.

cRIO FRC I

(2009-2011) legal for use in 2012 as well
Briefing on original cRIO
The original FRC cRIO consists of a metal chassis with integrated controller and 8 slots for plug-in modules-(2) analog input modules, (2) digital I/O modules, (2) solenoid modules.
By FRC rules there must be an analog module in slot 1 to provide robot battery voltage feedback, and a Digital module in slot 4 for the robot status light.
Additional modules are optional, but all modules must go in these specific positions if they are used at all (slot 1 is closest to the cRIO panel of lights, DIP switches, Ethernet and serial connectors, and 24v power connector):

Slot 1 - Analog module (required)

Slot 2 - Digital module (required)

Slot 3 - Solenoid module

Slot 4 - unused

Slot 5 - Analog module

Slot 6 - Digital module

Slot 7 - Solenoid module

Slot 8 - unused

NI recommends mounting this on it's side to better protect the modules and breakouts and so condensation doesn't pool on the circuit board behind the module connectors.

Analog Breakout

This breakout board is connected directly to the cRIO Analog Input Module (NI 9201)
, or extended with a ribbon cable and placed in a more protected spot.
There is a 2009 (red PCB) and a 2010 (blue PCB) version of this board with slightly different characteristics.

~0.4 lb, 3.5" x 5.5" x1"

(8) Eight channel analog input

+/- 10V input range

12-bit resolution

500 kHz aggregate sampling rate

Plugs into Analog Input Module (NI 9201) or can be extended by 25-pin cable and housed in a protective enclosure

12V input via WAGO connector

1A 5V switching power supply

Input #8 can be jumpered to monitor battery voltage if desired

2010 improvements (can be identified by the red PCB):

Significantly improves on the accuracy and the noise of the 2009AB, except in two corner cases not found in FRC. Noise is now well below a single-count on the ADC

Solenoid Breakout

This breakout board is connected directly to the cRIO Solenoid Module (NI 9472)
, or extended with a ribbon cable and placed in a more protected spot.
It is similar in appearance to the Analog Breakout above.

Speed Controller-Jaguar

This Jaguar H-bridge speed controller from Texas Instruments (formerly Luminary Micro) comes in two types that can be told apart by their covers: grey/tan or black.
The original 2009 release was gray/tan and had a few issues with static electricity, as well as back EMF from the motor that caused their destruction.
The replacement in 2010 was black and redesigned using Texas Instruments components (after TI acquired the company that made the Jags - Luminary Micro).
There are some minor electrical differences, but the major difference is the grey has two CAN connectors for daisy chaining, but the black has one RS232 and one CAN to act as a communications
bridge between the cRIO and a chain of Jaguars.
Details 2011 CAN Getting Started.pdf

The Jaguar provides smoother control and is especially valuable at fine-tuned low speed control and it self-protects against over-current/temp. The Victor can handle some higher current stress
for longer periods of time, but in a severe over-current case it would fail catastrophically. There are also reports of the Jaguar not working well with the Denso window motors. In any case
new applications should be throughly tested to see which speed controller is more appropriate.

Fault Conditions

A slow flashing Red LED indicates that the MDL-BDC detected one of the following fault conditions:

Power supply under-voltage

Over temperature

Over current

Limit switch activated in the current direction of motion

When a fault condition occurs, the motor shuts down and the LED indicates a fault state during the
fault condition and for 3 seconds after the fault cause is cleared (except for the limit switch fault,
which is cleared instantly). A slow flashing Yellow LED indicates that the MDL-BDC is not receiving a
valid control signal.

CALIBRATION PROCEDURE

To calibrate the servo-style 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. (Red & yellow means failure to calibrate)

7. Release the USER switch.

The MDL-BDC samples these signals and centers the speed
range and neutral position between these limits. A calibration
failure will be signaled if an out-of-range signal is detected.
To reset the servo-style PWM input to the default factory range:

1. Disconnect the power to the MDL-BDC.

2. Hold down the USER switch with a straightened paperclip.

3. Reconnect power to the MDL-BDC

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.

Source: Digikey usually has a special FRC price during the season (~$85) or AndyMark

Speed Controller-Victor

Victor 884 Users Manual (, 60 KB)
This has been around longer than the Jaguar and has different characteristics. Both speed controllers can be used. The Victor allows high current for longer than the Jaguar, while the Jaguar permits finer control. The Jaguar also does not seem to work well with the Window motors under certain circumstances, causing the Window motors to heat up unusually and be shutdown by the Window motor's thermal overload protection.

Source: VexPro (usually offers a special discount to FRC teams during the season)

Speed Controller-Talon

Brushed DC motor speed control featuring a sealed design with passive cooling and a footprint slightly smaller than a Victor. Without the optional fan it is also much shorter.
From
Cross the road electronics

HiTec Servo

The HiTec servo is a small motor that can be commanded to rotate to a particular position in a range of ~270 degrees.
It has a varied of "horns" or the white part in the accompanying photo that are interchangeable, and are often used with homegrown mechanical linkages to increase their effectiveness.
This attaches to the Digital Sidecar PWM outputs, BUT also requires the use of a jumper beside the PWM output, because it runs on the 6v power from the PWM connection,

Driver Station (DS) (2012/2013/2014 version)

Any laptop is now legal with only the Driver station application a requirement.
Rookies are still provided with a newer model Classmate (E12). FIRST provides new (optional) Classmate images to update older Classmates to Windows 7 (if necessary) and pre-install the current year's
programming environment(s). Especially important with the oldest E09 because the very limited disk space does not leave enough room to perform the normal installation process.
The 2012 Classmate power adaptor produces 2.1 amps @ 19v with center positive on the barrel connector.
Classmate E12 Specs

Driver Station (DS) (2011 version)

Any laptop is now legal with only the Driver station application a requirement.

Come cautions:
Run the Driver Station application as administrator, so it can adjust network settings.

Triple check that your IP settings are exactly what is required by the playing field:

Ethernet port IP - 10.te.am.5, netmask - 255.0.0.0

Disable wireless and all other unused network cards.

Turn off firewalls and anti-virus, because they can block or otherwise interfere with field network traffic.

Keep your laptop charged at ALL times. Many failures are due to a lack of laptop battery power - USB ports brown-out, laptops slow down or sleep to conserve power or shutdown altogether while a match is in progress.

Laptop USB is notorious for cutting power to USB ports while the laptop is on battery or after hibernating/sleeping.

Check your power saver settings to avoid power cutbacks when the battery is low.

Open the Device Manager. Win 8, hold the Windows key and press the 'x' key to open a menu in the lower-left and select "Device Manager." Using Win 7, open the Start Menu, type "Device Manager" in the search field, and click it.

Expand "Universal Serial Bus controllers"

Right-click each entry titled "USB Root Hub" and select "Properties"

Change to the "Power Management" tab

Uncheck the check box next to "Allow the computer to turn off this device to save power"

Press "OK"

Repeat this for each "USB Root Hub" entry

Reboot the computer

If using more than one USB device, i.e., multiple joysticks, distribute the USB load across all the laptop USB ports that you have. Keep critical joysticks on their own USB port.

Avoid ganging multiple USB devices up on a single USB hub. Bigger hubs are worse, because larger hubs and more devices require more power and USB has a 500mA limit. If used, small hubs are best.

Avoid complicated joysticks that draw an excess of USB power. Power hungry fancy sticks or ones with glittery LEDs require more power and won't fare as well as plain vanilla generic joysticks when a brown-out occurs.

Joysticks

To control the robot the Kit of Parts includes a pair of the classic Attack3 Joysticks.
Any USB wired game controller can be used, such as Xbox 360 or Playstation 3 compatible game controllers.
It just has to be recognizable by the Windows OS with an appropriate hardware driver on the Driver Station laptop as a game controller.
Non-game controllers such as keypads are not recognized by the Driver station application.

Note: Some game controllers have mode buttons and switches that change how the buttons and axes are mapped.
This can inadvertently lead to a mysterious loss of control if the driver hits the button/switch accidentally.
Controllers without such a switch are more foolproof to use.

Warning: power hungry controllers may brown out during competition. Basic controllers connected directly to the laptop USB ports are safest.
When the driver station laptop battery gets low it begins to cut power to USB ports starting with the ports with the highest power drain.
Usually, that means starting with ports connected to bigger drain USB hubs that have several devices hanging off them.
Changing Windows USB Power Settings

Source: Game console retailers like Best Buy, GameStop, Target, Walmart

Texas Instruments Stellaris Launchpad Evaluation Kit LM4F120 (2014)

The Stellaris requires custom firmware provided by TI to set it up to behave like a standard HID joystick (or two joysticks), making buttons and dials available for user custom designed control board extensions. The unit is stackable with other breakout boards to add capability or simplify screw terminal connections.

The Stellaris is powered by and communicates through a USB connection to the laptop/netbook running the Driver Station application.
User Manual

First Touch DS I/O Breakout

The Cypress First Touch requires special FRC-specific firmware to be used with and recognized by the Driver Station. NOTE: there have been three versions of the Cypress board released over the years.
There are two FRC Cypress firmware versions that match changes in the board FRC_IO.2009.v3.hex & FRC_IO.2012.v3.hex come with the FRC river Station Update and after installation is located on your PC at: C:\Users\Public\Documents\FRC\
Boards manufactured between 2009-2011 use the 2009 version of the firmware, later boards use the 2012 version. If you are unsure you can just try each and the PSoC software will simply tell you if
the firmware doesn't match the board.

If you see Cypress FirstTouch firmware update error:
ERROR!---> | The hex file was built for silicon revision ES3, but the acquired device is revision **
then PSoC version 3.17 must be used to apply new firmware.

The Cypress board is powered by and communicates through a USB connection to the laptop/netbook running the Driver Station application. The 9v battery is not used in our application.
How_To_Configure_Your_I-O_Module.pdf

Wireless

2013 Version

In 2013 the D-Link DAP-1522 Rev B AP/bridge is used. It replaces the previously used Rev A.
12v-5v Power Converter_CLL.pdfWARNING: This is a 5 volt device and requires the use of a 12v-to-5v power converter for use on the robot.

2011 Version

Rockwell Robot Status Light

Wired one way it will flash forever, but wired correctly it will repeat exactly what the RSL LED on the Digital Sidecar does.
Ground, Power and most importantly-a jumper MUST be used.
RSL Wiring (, 101 KB)

The RSL blink pattern tells what state the robot is in. The patterns can be changed year-to-year but in 2011 they were:

Fast Blink = cRIO not communicating with Driver Station

Slow Blink = disabled

Short on/long-off Blink = either low battery or no code & disabled

Long on/short off blink = Teleop mode

Solid on = Autonomous mode

Main Breaker/Robot Power Switch

The battery connects through Anderson connectors to this 120 amp breaker used as the main robot power switch.
It is very unlikely that this will ever trip under normal conditions as it withstands amperage much greater than 120a for some period of time before tripping.
If it does trip you have a serious electrical problem, or ill designed overloaded power draws.

Snap Action Breakers

These mount in the Power Distribution Panel and are self-resetting 40/30/20 amp breakers for individual circuit protection. It's important to remember that these only safeguard the wiring, and it's critical that they each be used with the properly rated wire gauge (or better). They do not protect devices like the speed controllers.
Snap-Action 30/20a Breaker Spec. Snap-Action 40a Breaker Spec.

EnerSys NP18-12 or MK ES17-12 Batteries

FRC robots are restricted to a specific 12v battery. One or two batteries are provided in the Kit and if they are the same past years batteries can be used as spares.
It's a good idea to have several (4-5) batteries (and chargers) for competition.

Sensors

Axis 206/M1011 Webcam

This optional network camera is connected either to the cRIO via port 2 (the 206 requires a crossover Ethernet cable to work, the M1011 does not), or to the DLink network bridge (any cable/camera model). For the default camera code to work with it there must be a special user account - username: FRC/password: FRC

Camera Gimbal (aka, Pan & Tilt Assembly)

KOP US Digital Encoders

The KOP encoders are 360 CPR (Counts Per Revolution), with 4X quadrature decoding, you get 1440 positions per revolution.
Which gives you a unique position every 1/4 degree.
10,000 maximum RPM for these encoders.
This encoder can be used directly with a Jaguar speed controller if you are using the alternate CAN bus.
For use directly by your cRIO code this connects to several of the Digital Sidecar digital inputs:

Photosensor

This is an Allen-Bradley RightSight, model 42EF-D1MNAK-A2.
There is an adjustment screw on the top that increases/decreases the sensitivity, but be careful not to over-turn it or it will break and it's not fixable.
In the 2011 rules had an exception for wiring the power for this particular sensor.
It does not work below 11v, so the normal Power Distribution supply would not work as soon as the robot moved and the voltage dipped.
The power for this was allowed to be taken from the Solenoid Breakout in turn wired to the 24v regulated port on the Power Distribution Panel.
The signal wire still connects to a Digital Sidecar digital input. This avoids power dips even as the battery voltage drops.

The alternate I2C output (J2):
wire to the pins on the Digital Sidecar found directly behind the NXT connector.
By default, the I2C address is 0x3A. The address can be changed to 0xA6 by shorting J1 with a blob of solder.

Rotary Magnetic Encoder

austriamicrosystems AS5030
Measures absolute angle (8 bits over 360 degrees) and angular rate (up to 30,000 RPM).
There are six ways possible to receive input from this device. See the
FRC 2011_Sensor_Manual.pdf
for the wiring of other input methods.

Here's one method that connects to the Analog Breakout (Filtered PWM):

Connect the Ana pin (JP2.3) to an input pin on the Analog Breakout

5v to power

GND to ground (-)

The voltage received is proportional to the angle.
NOTE: There is a 4.8 Hz filter on this output, so it is only useable for very low bandwidth (slowly moving) angular position measurements and is not appropriate in angular rate applications. This output can be sampled at 10Hz.
FRC Magnetic Rotary Encoder User Manual

Linear Encoder

This connects as a quadrature encoder to a Digital sidecar digital input:

Pneumatic Pressure Sensor

The pressure switch sensor is used as part of the pneumatic sub-system. It tells the controller when to turn the compressor on as the air pressure drops, and when to turn it off as pressure reaches maximum.
It connects to a Digital Sidecar digital input. The terminals are interchangable.

Potentometer

Potentiometers (or "pots") in robotics are most frequently coupled to a mechanism to measure the angle of rotation or a distance of mechanism travel.
It is a simple analog device that's a little noisy, so doesn't return an exact value and has a certain amount of flicker in it's readings.
Think of a volume control knob (avoid "audio tapers" for robotics use though) or a light dimmer.
Pots come in several useful varieties:

Linear - limited travel, typically used as faders on sound or lighting boards.

String - the most expensive type has a spring loaded wire reel that measures how far it is pulled out.

They have three terminals:

ground (-)

signal

power (+)

with two wiring options: 1) voltage divider, or 2) variable resistor
The voltage divider (used when connected as a cRIO Analog input) uses all three terminals.
The variable resistor only requires the ground and signal terminals.

Limit Switch

Limit switches are intended to be pressed by some mechanical mechanism to signal a stop or limit of movement.
The switch connects to a Digital Sidecar digital input and is marked on the side with a simple wiring diagram.

NC stands for "Normally Closed" and means the switch will read as closed until it is activated

NO stands for "Normally Open" meaning the switch will read as open until it is activated

There are design reasons that you may want one over the other, but often it doesn't matter which is chosen.
Normally Closed is desirable when you want to know if the switch is broken as a safety measure. This might be helpful if you have a mechanism that destroys itself if you cannot detect the limit.
If the switch gets ripped off or otherwise becomes disconnected, then it will read as if the mechanical limit has been reached and your code can prevent the mechanism from moving in the direction of the limit switch.
Normally Open is how most people typically think of switches operating.
There are two wiring options. The switch only requires two connections:

The 2009 Driver Station came with a ready-made disable/enable switch to plug into the Competition port. By default the DS is Disabled if this switch is not connected.
You can make your own by connecting pins 8 & 9 to a switch.
The competition port enable/disable switch included sticks out 2 1/8" in all from the case.