Gyro Frequently-Asked-Questions

Q1: What is a gyro?
A1: A gyro is a sensor that gives you information about your angular rate or how fast you're turning.

Q2: How do I use a gyro to determine my heading?
A2: Because the gyro's output tells you how fast you're turning, you need to integrate or add up it's output signal over time. Integration is actually pretty easy because all you have to do is periodically sample the gyro with the analog to digital converter, multiply the resulting number by the number of seconds between samples and add it to a static variable that keeps track of your angle. In C this looks like: angle += angular_rate * sample_period, where angular_rate is the ADCs output and sample_period is a fixed number.

Q3: What kind of gyro do you recommend?
A3: The Analog Devices' ADXRS150 and ADXRS300 gyros work pretty well. I haven't tried it yet, but the new ADXRS401 looks good too. The only difference is the sensitivity and the maximum angular rate they can handle. They all come in a package that's too small to work with, so it's best to purchase the evaluation board version of the gyro. The part numbers are ADXRS401EB, ADXRS150EB and ADXRS300EB.

Q4: Where can I purchase the gyros mentioned above?
A4: Digi-Key carries the ADXRS150EB and ADXRS300EB. Search on part numbers ADXRS150EB-ND and ADXRS300EB-ND. SparkFun Electronics is another great source for ADXRS series gyros.

Q5: What kind of gyro did you use in the 2005 DemoBot?
A5: We used a Silicon Sensing Systems CRS03-02. This gyro costs around $300, so you can't use it on your FIRST robot. We used this gyro because we didn't have another gyro to work with and didn't have time to have one shipped to us. Just use one of the Analog Devices gyros and you'll be happy.

Q6: Okay, the UPS dude just dropped-off our nifty ADXRS150EB gyro. How do we hook it up?
A6: Wiring-up the ADXRS401EB, ADXRS150EB and ADXRS300EB gyro evaluation boards is straightforward. Grab a PWM cable and cut off the male end and strip the three wires back a centimeter or so. With a low wattage soldering iron, solder the white wire to the RATEOUT pin, solder the black wire to the AGND pin, the red wire to the AVCC pin, and finally connect a jumper wire between the AVCC and PDD pins. Plug the female end into the robot controller's analog input 1.

Q7: What is gyro "bias offset"
A7: Gyro bias offset, also known as the null voltage, is the measured voltage when the gyro is not rotating about its sensitive axis. The gyros mentioned above typically have a bias offset of about 2.5 volts. Gyro output voltage measurements above the bias offset indicate rotation in one direction (e.g., clockwise), while voltage measurements below the bias offset indicate rotation in the opposite direction (e.g., counter-clockwise).

Q8: What is gyro "scale factor"
A8: Gyro scale factor, also known as sensitivity, is the constant of proportionality between the actual gyro rotation rate about its sensitive axis and the gyro's output voltage. This constant is usually expressed in volts per unit angular rate (e.g., volts / (degree/second)).

Q9: Our gyro is working fine during regular operation, but during autonmous mode Get_Gyro_Angle( ) always returns 0. What's the deal?
A9: Because Process_Data_From_Local_IO( ) is not called during autonomous period, Process_Gyro_Data( ) isn't getting called. If you plan to use the gyro in autonomous period you'll also need to call Process_Gyro_Data( ) in the User_Autonomous_Code( ) function just as you do in
Process_Data_From_Local_IO( ).

Last Update: 2/10/2006 at 9:22 PM PST
Copyright 2005-2006 R. Kevin Watson