|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
We do our averaging to get the bias in the pit where we can be sure
that the robot is not disturbed while the data is being taken. The resulting number is then hard coded. I will be heading to SanJose this evening, but I can post snippets of the code I use from there and will be happy to do so. [quote=Chris Hibner;717147] One of the best thing that you can do to help reduce the drift is use a very large average during disabled mode to get the sensor bias, and don't throw out resolution when you're done with the average. [\QUOTE] |
|
#17
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ? ADXRS300?
re sparkfun's ADXRS300.
In light of the lack of time and my inexperience, I need to ask a dumb question. Is it as simple as hooking up VCC, GRD and RateOut as per the FIRST one, change the def in gyro.h and go ? (or is there any other hardware etc needed ? |
|
#18
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Thanks everyone.
Dr Brooks: - would greatly appreciate your code spinnets. - what gyro chip is your team using ? - given you calculate the bias in the pits and hard code it, am I correct that the bias is individual chip by chip specific and is temperature specific but once in a stable temperature, it can be calced and hardcoded for the duration of the regional ? Kevin, thanks for the clear coverage on the deadband. I can see why you do it. We are looking closely at the Sparkfun unit. We are just waiting for clarification as to whether using it is as simple as connecting the 5v, grd and rate to AI 1. Unfortunately due to our location, it will cost us over $60 in shipping alone ![]() |
|
#19
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
Quote:
).-Kevin Last edited by Kevin Watson : 12-03-2008 at 17:07. Reason: Spelling error |
|
#20
|
||||||
|
||||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
The code is more or less: Code:
static char runBais = 1;
if (disabled_mode && runBias)
{
// run moving-average bias code
}
else
{
// the bias has now been captured and is held
// don't let the bias run again if the robot is disabled for a short period of time
runBias = 0;
// run integral code
}
|
|
#21
|
|||||
|
|||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
The ADXRS300EB is essentially equivalent to the SparkFun card. We placed ours in a standard 20-pin IC socket in order to avoid soldering directly to the board. Disclaimer: I have no association whatsoever with Digikey, other than having ordered an ADXRS300EB earlier this week so that we'd have two -- one to use on both of Team 1519's two robot configurations. It arrived in a couple days as expected. Best regards, --ken PS: For what it's worth, the 2.25 laps (9 lines) of autonomous in 15 seconds that we do with Speed Racer uses Kevin's gryo code with an ADXRS150, used "as a compass." There are three completely separate runs in the video. We're not sure how much of our error is due to using only a 150-degree/second gyro; we think that most of the trouble we have with driving a straight line is due to the "steering lag" in the closed loop control. For bias calibration, we use Kevin's routine while the robot is disabled as he describes above. Last edited by Ken Streeter : 12-03-2008 at 17:54. |
|
#22
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ? ADXRS300?
Quote:
BTW, we are sampling at 1600Hz and taking a result every 32 updates for a total of 50 updates/sec using the ADXRS300. (These are set in the adc.h file)We are getting excellent results. |
|
#23
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Not a bad way to go, but we average for about 15 seconds at 150hz.
We do check the drift of the integrated gyro in the pit and redo the average whenever it starts drifting too much. Eugene Quote:
|
|
#24
|
|||||
|
|||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
The 2006 KoP gyro was on a dark green PCB. There were two mounting holes in the center of the board, with the silkscreened lines "YRG" and "RevNC" on it. The most distinguishing characteristic of this board, however, was that the silkscreen for the connections for J21 and J22 were INCORRECT. J21 read "G 5 T" and "B W R". (It should have said "B R W".) Similarly, J22 read "G 5 R" and "B W R" but should have said "B R W". The actual gyro chip used in 2006 was an AD22304, which is an 80-degree/second gyro, with the "T" output varying by 12.5 mV per degree per second of rotation. The 2007 KoP gyro was on a light green PCB. It has a similar pair of mounting holes in the center, but the silkscreen between the mounting holes said "YRG" "BD". The silkscreen for the output connections (J9 and J10) for this board contain the correct "G 5 T" "B R W" and "G 5 R" "B R W". The actual chip used in 2007 is an ADXRS150 which is a 150-degree/second gyro, with the "T" output varying by 12.5 mV per degree per second of rotation. The 2008 KoP gyro (as you probably already know) is on a red PCB. Which of the older gyros are you actually using? NOTE: Since the 2006 KoP AD22304 gyro has the same "sensitivity" as the 2007 KoP ADXRS150 gyro, they will both work with the same #define in Kevin's code (#define ADXRS150) although the 2006 gyro will saturate more easily on high rate turns. Last edited by Ken Streeter : 12-03-2008 at 18:24. Reason: Added explanation of 2006 and 2007 KoP gyros having equivalent sensitivity, thus both work as "ADXRS150" in Kevin's code. |
|
#25
|
|||||
|
|||||
|
Re: Gyro Repeatability, Expected Drift ? ADXRS300?
Interesting. In adc.h, we are using ADC_SAMPLE_RATE_800HZ and ADC_SAMPLES_PER_UPDATE_1. I presume that since we call "Process_Gyro_Data()" in our "Spin" loop that we are getting 800 updates/sec in our integration of the gyro angle. (At least we think we're getting that many updates per second; we haven't actually instrumented the code to see if our "spin" loop is keeping up.) Now I wonder if our lack of averaging is hurting us. (However, we needed to turn off the ADC averaging in order to get more predictable results from the absolute magnetic encoders we are using. Strictly speaking, however, I wonder if that's the correct thing to do...)
|
|
#26
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
-Kevin |
|
#27
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ? ADXRS300?
Quote:
-Kevin |
|
#28
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Quote:
-Kevin |
|
#29
|
|||
|
|||
|
Re: Gyro Repeatability, Expected Drift ?
Kevin,
Our gyro is set for a 40hz bandwidth, as I recall, and it is working absolutey great. If I had a problem I would borrow a scope and sort it out. The first thing I would do to improve things would be to add temperature compensation, and then power supply voltage compensation, but these improvements do not appear to be required for our use. Eugene Quote:
|
|
#30
|
||||
|
||||
|
Re: Gyro Repeatability, Expected Drift ?
Our gyro works great... and never ceases to amaze me that it functions at all.
I mean... think about it for a minute. It's a little teeny piece of silicon, and who knows what else, and it knows its spinning. Amazing! Gotta hand it to those Analog Devices guys... And thanks to Kevin for speeding all of our development schedules along! ... Hope you guys like the new and improved 1024 hybrid mode this week. Should be quite a show. That, and... I think we've finally got enough complicated (messy) homebrew circuitry to make the display stop blanking out all the time now... If any of you are at BMR and would like to discuss Hybrid mode, I'll be happy to discuss ideas/concepts with you. Just ask anyone on 1024 for "Q" and I'm sure they'll direct you. -q |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pic: Not what you expected | VanMan | Extra Discussion | 17 | 05-03-2007 19:34 |
| Preventing drift | Salik Syed | Programming | 4 | 21-02-2006 00:08 |
| Yaw Rate Sensor Drift? | phrontist | Control System | 13 | 19-08-2004 10:55 |
| More flipping then expected | cyberknights195 | General Forum | 6 | 07-03-2004 15:52 |