Inconsistent Gyro

Hi,

Sometomes our gyro stops reading values and just randomly counts up. We have changed cortexes, changed gyros, changed three wire cables, changed ports, and changed code, and nothing helps the gyro consistently read values for more than a few meetings.

Any help is appreciated

Does it start doing it while driving? I only noticed this happen when the cortex was plugged into a computer via USB cable. To get the gyro to stop counting, turn off the cortex and unplug all the batteries including the 9v and power expander then turn it back on.

We use the wireless programming. Would that still have the same effect on the gyro readings?

Here are some questions that will help zero in on potential problems and solutions:

  1. What do you mean by “counting up?” Do subsequent reads of the gyroscope indicate a greater positive turn? If so, does it ever “count down?”
  2. How quickly does the “counting” go? Is it 5 tenths of a degree higher each time you read it? How quickly do you read it? How regularly?
  3. Is the robot moving at all when the gyro begins the erroneous reporting?
  4. Between the time when the gyro works and when it starts reporting erroneous data, has the robot moved? If so, how much? Did it bump in to anything?
  5. How is the gyro mounted? Directly to the metal chassis, or on some sort of vibration isolation?
  6. Where is the gyro mounted? Low on the chassis, high on the lift tower, etc.
  7. Are there other wires routed near the gyro? Is it mounted near motors or electronics?

I have had this happen on two different occasions. 1 time, our gyro was not plugged in, so I figure it isnt that one. However, if you move the bot while the gyro is “calibrating” then it will believe that turning at that exact speed is standing still, so that it will report a turning value when not moving

It normally counts up i haven’t noticed it count down but it could be. “Counting up” means the gyro will read values like: 200, 2480, 6932, it counts very fast (around 50 degrees a second) and with no noticeable pattern.

It normally starts the counting while the robot is turning.

We will be testing autos running it over and over and then all of a sudden when it turns it wont stop and when i display the gyro values it shows it counting.

We have tested the gyro screwed in, on rubber bands, and just hanging from a cable all count at some point.

gyro has been high and low on the bot. no wires near gyro.

It starts counting somtimes without the robot having moved and after we re download or update firmware.

Have you been working with the same gyro? You may want to just try replacing it and also changing what port you are using. This will guarantee that there is no underlying electrical issue causing this

Stupid question but is the light on it green? We (by we I mean ME) had the same issue (somewhat) where it would only count up. If it’s not then flip the wire. A good troubleshooting technique to test if I did it right was to just spin the bot; not too fast but enough so that you would know that the values should count up or down (obviously while secured well).

We have used 3 different gyros in different ports in different cortexes

It’s counting up crazy fast and light is green

Maybe try a firmware refresh/download? That’s usually my last resort for coding errors like this.