PDA

View Full Version : Gyro Warning


Ryan O
01-28-2008, 10:04 PM
This is just a warning to teams who have experienced the same problems we have been having with this year's gyro:

To start out, we read to manual, ect and wired up the left pins (The side with the white cable connected to the pin labeled "R" where the other were ground or 5 volts) and plugged it into analog port 1 on our RC. We proceeded to code up a simple test and print program using WPILib.

What we got for output was one of two things:

Consistent zeros

OR

A constantly increasing value

These are not the results we expected. All information indicated that the values should increase when the gyro was rotated right, decrease when rotated left, and stay the same when the gyro wasn't being moved.

So I went to the WPILib forums and described the problem. Being new to analog sensors in general and WPILib in specific this year, I firgured I messed up the code somehow. I went back and forth with Brad Miller, who was very helpful and even ran the code I posted for him on a VEX to check it, and everything seemed in order to him, except the fact that it would behave for me.

So I left it for awhile and helped with other stuff on the robot, tinkering once and awhile.

So today, I was working on it, and asked another team member to take another look at the electrical part. i had already checked it with a multimeter, and didn't have much hope for that option. I went and did something he needed me for, and he took a look at it.

I get back and he says "You know, there are more paths to this other set of pins than the one we're hooked up to. I've seen boards mislabeled before."

So, hoping he was right, I plugged a cable into the other set of pins. then I rant he same program I had been running. Low and behold, it worked. It started behaving like it should.

So, basically, what I'm saying is that this year's gyro, which IS a different model than last year's, is either labeled using different conventions (T no longer stands for temp but twist or something) or some of the boards were just plain mislabeled. If you are having the same problems we did, give it a try, the worst you can do is output a weird number to the terminal.

billbo911
01-28-2008, 10:18 PM
(The side with the white cable connected to the pin labeled "R" where the other were ground or 5 volts) and plugged it into analog port 1 on our RC.....
So, hoping he was right, I plugged a cable into the other set of pins. then I rant he same program I had been running. Low and behold, it worked. It started behaving like it should.

So, basically, what I'm saying is that this year's gyro, which IS a different model than last year's, is either labeled using different conventions (T no longer stands for temp but twist or something) or some of the boards were just plain mislabeled. .



From the Sensors manual
"The Yaw Rate gyro receives 5V from the RC and connects to two of the robot
controller’s analog inputs. Please note that the output labeled “T” is for “Twist” or
rotational velocity. The output labeled “R” is “Relative Temperature”."

Somewhat confusing, but specifically called out.
Twist is what you are looking for.

jgannon
01-28-2008, 10:26 PM
T definitely stood for Twist last year, too. Understandably irritating, but at least consistently so.

wt200999
01-28-2008, 10:56 PM
I just went through this today too :mad:

You figure "R" would be for rotation and "T" would be for Temp :rolleyes:

The Lucas
01-29-2008, 12:45 AM
I'll admit I was confused by this too :o I've been using Analog Devices eval board gyros since before the PCB kit gyros were in existence, so I never wired a kit gyro before this year. Another team asked a question about the kit gyro so we wired it up to test its behavior ourselves. When I looked at the gyro, my first instinct was "R" was for "Rate" (it is a yaw Rate sensor) but I asked someone to check the sensor manual. He said "T" was for "Temperature". It made sense so a student wired the "R". We tested it, it didnt work.

The meeting ended and I couldn't figure out what was wrong. I was thinking "some help I am, I don't know how to wire the kit gyro". By chance, I looked at the WPILab doc that night and noticed the "T" was wired. Of course then I realized what was wrong. The next day, we fixed it and all had a good laugh about "Relative Temperature" and "Twist". :rolleyes: We all agreed that the gyro labeling is counter intuitive.

CardcaptorRLH85
01-29-2008, 02:32 PM
This is the first year that our team is using gyros at all (I just seem to be good at dead reckoning...). So, I thought that T was Temperature and R was Rotation...apparently I was wrong but when I got nothing for an output I just read the sensor manual and was set straight.

Just remember, 'Reading is Fundamental' ^_^

de_
01-30-2008, 12:23 PM
Dumb question. Kevin Watsons code appears to not require the "R" (Relative Temperature) connection to the RC at all. Am I reading this correctly ?

Kevin Watson
01-30-2008, 12:35 PM
Dumb question. Kevin Watsons code appears to not require the "R" (Relative Temperature) connection to the RC at all. Am I reading this correctly ?Correct, you don't need it.

-Kevin

The Lucas
01-30-2008, 12:43 PM
Dumb question. Kevin Watsons code appears to not require the "R" (Relative Temperature) connection to the RC at all. Am I reading this correctly ?

Correct. The "R" Relative Temperature is most often not used (do any teams actually use it?). Temperature does affect the rate output on the gyro but not significantly in the context of a FIRST match (IMHO). You could write code to correct for temperature effects (has anyone?), but I dont think it is worth the time during build season.

Qbranch
01-30-2008, 12:47 PM
Correct, you don't need it.

-Kevin

Kevin, call me curious george here, but is the reason you don't need it because you find the mean value before starting to use the gyro? Is this what changes with temperature?

Thanks,

q

p.s. Unfortunately no camera this year, so for the first time in two years the code doesn't compile as camera.hex. :D Thanks for sorting through the camera specs and writing a driver those couple years ago, it was a beast!