Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Gyro problem (http://www.chiefdelphi.com/forums/showthread.php?t=73407)

Ushio 01-02-2009 15:56

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?

Ushio 01-02-2009 15:57

Re: Gyro problem
 
And we made sure the pwm cables were attached correctly.

martin417 01-02-2009 15:58

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.

Ushio 01-02-2009 16:04

Re: Gyro problem
 
the wiring on it is right, though. we've checked it already. Which is why we're at a loss.

rwood359 01-02-2009 16:12

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.

EricVanWyk 01-02-2009 16:12

Re: Gyro problem
 
Quote:

Originally Posted by Ushio (Post 812323)
the wiring on it is right, though. we've checked it already. Which is why we're at a loss.

Check it against the manual. A few mislabled ones escaped into the wild. Your result is typical of wiring into the temperature output.

Rate _should_ be on the outside, temp on the inside.

EricWilliams 04-02-2009 15:28

Re: Gyro problem
 
Quote:

Originally Posted by EricVanWyk (Post 812327)
Check it against the manual. A few mislabled ones escaped into the wild. Your result is typical of wiring into the temperature output.

Rate _should_ be on the outside, temp on the inside.

This continuous accumulation also occurred to our gyro, however, mislabeling was not the cause. We desoldered the wires and then resoldered them, and magically the gyro worked. Try that.

kevin.li.rit 04-02-2009 15:30

Re: Gyro problem
 
Keeping the wires short will also help the drift(lower capacitance).

EricVanWyk 04-02-2009 15:40

Re: Gyro problem
 
Quote:

Originally Posted by Coffeeism (Post 814101)
Keeping the wires short will also help the drift(lower capacitance).

I do not believe you, yet. Can you please explain your reasoning?

kevin.li.rit 04-02-2009 21:11

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.

EricVanWyk 05-02-2009 09:06

Re: Gyro problem
 
Quote:

Originally Posted by Coffeeism (Post 814328)
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.

What you are describing is phase delay. Drift is where the null value (zero turn) drifts away from nominal, which is interpreted as a constant steady spin.

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.

DtD 10-02-2009 23:29

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

Travis Hoffman 23-03-2009 13:06

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,

Team 135 23-03-2009 14:08

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.

Bongle 23-03-2009 15:35

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