View Single Post
  #2   Spotlight this post!  
Unread 29-01-2015, 21:09
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Drift on ADXRS453 Gyro

Quote:
Originally Posted by alopex_rex View Post
Our team has been trying to use the ADXRS453 gyro (datasheet), with this board (http://www.digikey.com/product-detai...53Z-ND/2700448.

We got SPI communication working pretty well, we think. We're getting data from the gyro, in the format we expect. But while at rest, the sensor returns apparently random values between ~0.3 and ~0.8, averaging around 0.6. We tried using a calibration routine, which samples the rate while at rest to find an average drift, but the amount of the drift seems to vary depending on how fast the gyro is rotating, with the result that even with the calibration the gyro results are not usable.

We're displaying the raw 1's and 0's from the gyro on the SmartDashboard, and they show the drift, so we can be pretty certain the issue doesn't have to do with how we process the data. The status bits always indicate "valid sensor data." Our code on github (relevant files ADXRS450Gyro.h and ADXRS450Gyro.cpp) if you want to look at that.

Does anyone have any idea how either to fix this, or to compensate for it? As it is we can't really use the gyro for anything. The ADXRS453 is supposed to be a fairly precise gyro, so I assume that there's a way to get useful data from it. Any ideas?
We are using the same gyro. We use periodic tasks and run a fast loop to sample it 600 times and average the samples. I believe we're running it at 500 microsecond loop times.

You then need to take that and subtract the value you get from every reading that the gyro supplies - we currently drift at around 1 degree per minute (or so).