![]() |
ADW22307 KOP Gyro
Team 4203 is having issues with the KOP gyro. We have it connected to the RoboRio and are using JAVA. When we observe the behavior of the gyro on our dashboard, there is not a stable reading. We went through our regional last year by having one of the drivers continuously reset the gyro but would rather not have to do that. Any ideas welcome. By the way, we have three of these gyros and have swapped them all in with exact same results. Could it be code? Could it be there is a specific port we need to plug it into...
|
Re: ADW22307 KOP Gyro
Could you elaborate a bit? When you say you're not getting a stable reading, do you mean that your reading is jumping all over the place (lots of noise in the signal) or that it's changing constantly in one direction even though the robot is standing still (drifting)?
|
Re: ADW22307 KOP Gyro
Quote:
Something that would probably help troubleshooting is the hardware setup: where the gyro was mounted and plugged in. As well as the requested info on what kind of "bad reading" you were getting. |
Re: ADW22307 KOP Gyro
This sounds like an improperly initialized gyro. Assuming you're using the WPILib Gyro class here. Call the Gyro constructor or initGyro method when you're sure the robot is not moving to make sure it is properly initialized.
The gyro senses turning rate, so the code needs to know not only a zero heading reference (established when the constructor is called and when the reset method is called), it also needs to know a reference signal for "not moving." It does this by averaging the gyro for a few samples, calling that rate zero, and subtracting it from all future signals for a turning rate to feed to the integrator. This average happens when the constructor is called, and when you call the initGyro method. Make sure to do this when the robot is not moving (either don't move it while the code is booting, or call initGyro later, by a button press or something, while the robot is not moving). http://team2168.org/javadoc/edu/wpi/...tml#initGyro-- |
Re: ADW22307 KOP Gyro
Quote:
Another option is to use a digital sensor, like the NavX-MXP. This sensor also has accelerometers and magnetometers, and exhibits lower drift than the KOP gyro, and is used by many FRC teams to implement Field-centric drive and other features. As a bonus, it has expansion io, and plugs directly into the RoboRIO making it very easy to mount. |
Re: ADW22307 KOP Gyro
Thank all of you who have responded. Last night our group met and read through the literature. We believe we discovered one thing. We had the gyro plugged into a digital port on the RoboRio. We bench tested the gyro using 5V power supply and slowly rotated it in both directions. We got good readings, moving away from zero in each direction indicating that we probably have a functioning gyro.
However, when mounted back on the robot using an analog port, and viewing the dashboard, our driver reported that we still had drifting as he drove the robot. We now believe we either have a programming mistake or a bad Roborio. Fortunately we have a back up Rio so that test can be made either this evening or tomorrow. We have someone working on a software fix, but if anyone has an idea or a quick copy paste from the WPI Library that might work, feel free to post or email to any/all of the following. Again we are programming in JAVA: pagoglia@stny.rr.com khahans@corning.com |
Re: ADW22307 KOP Gyro
Quote:
|
Re: ADW22307 KOP Gyro
The drift was enough so he had to manually reset the gyro while driving, continuously.
|
Re: ADW22307 KOP Gyro
Quote:
|
| All times are GMT -5. The time now is 16:20. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi