Thread: KOP Gyro Lag
View Single Post
  #1   Spotlight this post!  
Unread 13-02-2008, 22:59
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
KOP Gyro Lag

My team is experiencing a problem with the gyro included in the KOP this year. It appears to have a lag of almost a second after any large turn. For example, if we make a 90 degree turn and print out the gyro value each 26ms loop, the gyro will think it's still turning for 30-40 loops after the turn has stopped and motors have been set to neutral. The gyro value will be around 75 (on a 0-255 scale) and gradually return to neutral, but it will not reach neutral until almost a second after the robot has stopped turning.

This is a big problem because we intend to use the gyro to allow the robot to maintain a straight heading during autonomous mode. Basically, we store a neutral rate before we start moving, then slow down either the left or right motors when the gyro value deviates from that rate to counteract any deviation from a 0 heading.

This works perfectly if we just tell the robot to go straight. But if we tell it to turn left and then go straight, it will make a large turn to the right. This is because, for about one second after the left turn, the gyro will still say we are turning left. The robot will then attempt to "correct" for this by slowing down the right motor, but since the robot isn't really turning left, it will actually turn right.

We are using IFI's default code right now, but we tried converting everything over to Kevin's latest code to see if that would help. Unfortunately, it didn't. For about one second after a fast turn, Kevin's gyro code reports a turn rate of over 1,000 tenths of degrees per second. Yes, I know, that's way over the 800 tenths of degrees per second limit of the gyro.

We're thinking our problem is that we are saturating the 80 dps gyro, and that is making it do weird things. So, our plan is to go buy the ADXRS300 and be done with it. We aren't 100% sure saturation is our problem, however, and we don't want to spend $70 just to find out that it still doesn't work.

So, here's our question: can anyone here who has the ADXRS300 confirm that it does not have the lag problems described above? (or recommend another gyro that doesn't have the problems described above)

Thanks,
Josh - Team 339 programmer

Last edited by FRC4ME : 14-02-2008 at 13:40.