View Single Post
  #29   Spotlight this post!  
Unread 23-01-2005, 13:36
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Example gyro code released.

Quote:
Originally Posted by BradAMiller
We used the code with the ADXRS300 as well and were seeing about 8 degrees of drift over 2-1/2 minutes on a motionless robot. We modified the code to average the bias over more than a single group of samples and increased the sample size to 16 to get the extra precision. That seemed to improve the results.

Can you tell us what you were seeing for drift over time? I just wasn't sure what to expect for results and so we tried these modifications.
Without actively tracking the bias, you're getting performance that is about what I would expect from a ADXRS300. I'd be pretty happy with a gyro that only drifted a degree over the entire autonomous period. For reference, I have a ADXRS150EB that drifts a degree over about a minute and I tested an old GyroChip that did even better.


Quote:
Originally Posted by BradAMiller
Also, I have a question. You're locking the A/D onto Channel 1 to presumably eliminate that acquisition time when switching channels. How much time does actually take (for teams that want more than one analog input)?
No, I take control of the ADC hardware because I'm trying to be pretty efficient and not use up a lot of CPU time. You'll notice that in response to the timer interrupt, I read the ADC result register and then immediatly start another conversion. If you used the ADC after my conversion was done, I'd have lost the conversion result the next time the timer interrupt fires off. One way around this is to increase the timer interrupt rate and interleave the ADC measurements.


Quote:
Originally Posted by BradAMiller
And do you know what the conversion time is once the channel is switched?
I'm sure it's considerably less time than the timer interrupt period, but I don't know the exact value. The data sheet would be a good document to consult for this information.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org