![]() |
Gyro Oddities
My team finally got out Gyro hooked up and working, but we have a problem with the outputs we are getting. After turning the gyro through 90 degrees, it reads just over 45 degrees.
Is there a better way to solve this problem other than multiplying it by a constant? Does anyone know why this is happening? |
Re: Gyro Oddities
Quote:
|
Re: Gyro Oddities
If you are using the KOP gyro the gain is 7mV/deg/sec.
If you were using the default Labview gain a rotation of 90 degrees should have come out to ~50.4 degrees. |
Re: Gyro Oddities
(I'm on Rafael's Team)
so, we are in fact using the default gain on the gyro, however I do not know how to change it. |
Re: Gyro Oddities
If you are using Labview, there is a setGain vi available in the WPI library.
|
Re: Gyro Oddities
What programming language are you using?
I remember my team--we used C++--had the same problem last year, we just changed part of the Gyro class so it worked for the KoP gyro. |
Re: Gyro Oddities
We came up with a very simple solution, Rotate the robot 360 while taking a reading from the gyro, lets say the gyro read 200 degrees.
In your code, whenever you use GetAngle(); just multiply by 360 and divide by your reading, in our case, 200. so your code would look like float fAngle = gyro.GetAngle()*360/200; - Bochek |
Re: Gyro Oddities
Quote:
But it's a lot easier and cleaner to use the Set Gain vi in the gyro palette. |
Re: Gyro Oddities
C++ way:
gyro.SetSensitivity(0.007); |
Re: Gyro Oddities
On this same topic ... we have the Gyro wired properly and sensitivty set properly via the C++ method and are getting readouts via the GetAngle method. The problem is that the readouts are all over the map.
1. One time while the Gyro is at rest, it's returning a steadily increasing value well into the thousands if we let it keep going. 2. Another time while at rest, the reading is as expected, a few degrees positive and negative when twisting slowly about the z-axis. 3. Sometimes when reading the voltage return on the PWM, we get the standard 2.5v at rest, but then for no reason, the voltage jumps to 4.6+ and seems to get stuck there until we "jostle" the gyro. Not sure if this is a bad Gyro and we don't have a 2nd one to test if this is the case. Any ideas? |
Re: Gyro Oddities
Quote:
also, check the wiring |
| All times are GMT -5. The time now is 01:55. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi