![]() |
Gyro problem
My teammate didn't even spin the gyro all the way around, but the numbers just kept going up, even when she stopped.
help? |
Re: Gyro problem
And we made sure the pwm cables were attached correctly.
|
Re: Gyro problem
There are two outputs on the gyro, one for temperature. and one for turn rate. if you use the wrong outputs, you will get the behavior you described. Check your wiring.
|
Re: Gyro problem
the wiring on it is right, though. we've checked it already. Which is why we're at a loss.
|
Re: Gyro problem
The gyro has to be completely still during calibration (done during open I believe) or you will get the kind of response that you are seeing.
|
Re: Gyro problem
Quote:
Rate _should_ be on the outside, temp on the inside. |
Re: Gyro problem
Quote:
|
Re: Gyro problem
Keeping the wires short will also help the drift(lower capacitance).
|
Re: Gyro problem
Quote:
|
Re: Gyro problem
The gyro produces a voltage that will charge the capacitance in the wire. The longer the wire, the larger the capacitance, longer discharge time, longer change in voltage after gyro stops accelerating. It will also catch more noise if the wires are longer.
|
Re: Gyro problem
Quote:
Your comment on phase delay is technically true, but not on a scale that is detectable. A cable that long will contribute a couple dozen picofarads. With a sampling frequency of 62,500Hz and an output impedence of 100 Ohms, you would need to add a couple hundred thousand picofarads to start to change things. Since the gyro signal is only in the 0-200Hz(ish) range, I'd wager that phase delay will continue to be imperceptible. However, the noise comment is very valid. |
Re: Gyro problem
(If you're using C++, not sure about LabView) Are you trying to read the values using printf or cout? If you output too much it all builts up in the cRIO's memory and slowly comes out the console, so you might just be seeing old data in your terminal.
~DtD |
Re: Gyro problem
OK, I am trying to implement an ADXRS300 gyro on our 2009 bot using WindRiver.
I'm starting with a known-good unit from 2008. Using our bench setup, upon outputting printf's, with the gyro completely stationary, I'm getting a steady increase in gyro angle values that (from memory) is around a degree every five seconds or so. The gyro was stationary throughout the cRIO power-up process, and it is connected to Analog Input #1 on the first input module. Last year, I used Kevin Watson's code, with much success. Kevin's code implemented a rejection deadband (ours was set to the default of 8) to help filter out junk and eliminate drift. Other than SetSensitivity (which I currently have set to 0.005 but will adjust to .00393 now that I've found the specific tuning values we used in last year's code), what other gyro setup/tuning adjustments are possible with WPILib's C++ gyro code, and how would we implement this tuning? Thanks in advance, |
Re: Gyro problem
We had the same problem. We found it to be our code by running the sample gyro code. Also check that the wires are not reversed, I know that this has been said before, but it plagued us early in the 6 weeks.
|
Re: Gyro problem
If the gyro is constantly returning the exact same high angular velocity, then the problem is your wiring. Take a multimeter and check the voltage between one of the red/black wires and the signal wire. It should be about 2.5 volts in correct operation. To confirm if this is the case, set up your gyro class so it uses an incorrect PWM input that nothing is plugged into, and see if the behavior changes.
Also, double check that your using both the correct SLOT and correct channel. If you only specify the channel, it might be attempting to read the gyro off of the incorrect cRio slot. If the gyro is constantly returning a varying low angular velocity (1 degree every 5 seconds as posted above is about right), then everything is fine and that is expected. |
| All times are GMT -5. The time now is 11:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi