Wiki

This version is outdated by a newer approved version.DiffThis version (24 Oct 2018 18:03) was approved by Kristen Chong.The Previously approved version (22 Oct 2018 01:13) is available.Diff

This is an old revision of the document!


ADXRS450 Gyro Board for FIRST Robotics

The ADXRS450 gyro board is a single-axis industrial sensor, designed to get teams up and running quickly without having to load 3rd-party libraries. This gyro is readily accessible through multiple sources and is recommended for all teams, including those with no gyro experience. It plugs directly into the SPI port on the RoboRIO and libraries are already included in WPILib - all you have to do is declare it in your robot code and use it!

Supporting code for the ADXRS450 only exists in the three main programming languages supported by FIRST. If your team wants to use this board with other programming languages, please refer to the ADXRS450 product datasheet for more information on how to communicate with this gyro via SPI.

If you're looking for information on other ADI donation resources, click here to go back to the main page.

Getting Started

There are currently three versions of the FRC Gyro board. The libraries detailed on this page apply to all of these versions, however there are some considerations to take into account for each one.

FRC Accelerometer & Gyroscope (REV1)

This version was made available to FRC teams through 2016. It includes both the ADXRS450 and the ADXL362 accelerometer. This board continues to be supported by WPILib and you can even use the WPI Accelerometer library to connect to it if you want. Just note that the accelerometer component is no longer supported, so there's a chance that new RoboRIO firmware released each year may not work with this sensor.


FRC Gyro with Chip Select Jumper (REV2)

This version of the gyro board was available for the 2017 and 2018 seasons. The accelerometer was removed in favor of a jumper that allows you to configure the “chip select” pin used to communicate with the sensor in case you want to have other devices on the same SPI bus. To use the libraries built-in to WPILib, the default configuration should be to connect the jumper between the CS0 pin and the unlabeled center pin. If you want to use a different setting, you will need to change the “chip select” pin address when initializing the sensor in your robot code. The sections below detail how to do this for each of the three supported languages.

FRC Gyro With Solderable Jumpers (REV3)

This is the lower-cost, more reliable version of the sensor board made available to teams starting with the 2019 season. To make using the sensor even easier for teams, we removed the chip select pin jumpers and added a solderable jumper. This change improves reliability as there is no risk of the jumper accidentally getting lost or removed, but still allows teams the flexibility of adding additional sensors to the SPI bus.

A Note on Gyro Calibration

To help the robot identify a starting angle position more accurately and remove gyro drift, it is recommended that you allow the robot to perform what is called an offset calibration first. It will do this by taking several readings from the sensor and averaging them together to obtain a value which will be subtracted from every subsequent reading after the calibration is complete. Calibration typically takes about 30 seconds.

Remember, the ADXRS450 is a rate sensor, not a raw angle sensor, so any movement during this calibration routine will cause the robot to add the measurements of that movement to the value that is subtracted from all readings. This will cause a large amount of apparent “drift” in your subsequent sensor readings. Because of this, it is imperative that the robot is left completely stationary during this calibration period!



Calibration should be performed as soon as the robot is powered on, to prevent the calibration routine from interfering with any autonomous code execution. You can usually tell that your robot was bumped during calibration if you notice that your gyro angle readings are drifting off into space very rapidly. In LabVIEW, this calibration is done as part of the initialization. But in other languages, you must explicitly call the calibrate routine. You can read more info on your team's specific language at the links below.

Using the Gyro on Your Robot

For more information on how to add gyro functionality to your robot code, select your team's preferred programming language from the list below.

Using the Gyro in LabVIEW
Using the Gyro C++
Using the Gyro in Java

first/adxrs450_gyro_board_frc.1540396993.txt.gz · Last modified: 24 Oct 2018 18:03 by Kristen Chong