Does static have a big effect on the gyro?

We are having some serious static issues on our practice field and it seems to be having an effect on the gyro readings.

Somtimes, when stationary, the gyro reading climbs at a massive rate (4 or 5 degrees a second somtimes).
Rotating it still adds or subtracts but when you return to stationary, it just climbs again. But not always!

Did a test program which just makes the robot move in a square using the gyro for 90 degree turns and it will do this fine for ages and ages.
It seems to get most confused after a strafe (on mecanums) so wondered if the strafe creates more static.

Anyone with any ideas?

Any sort of “noise” will cause gyro drift, so theoretically static could do that, never seen it though. Mechanical vibration can also cause issues, I posted somewhere showing the effect of mounting the gyro on an isolated mount, this gave some significant improvement.

And a nice post it is…

https://vexforum.com/t/gyro-drift-mechanical-improvements/25343/1

Spraying your field with a little Static Guard or Static Cling can help reduce the static, at least for a while. Also, find some way to increase the humidity in the room if you can.

Very interesting, thanks.
I don’t think vibration is the issue here as it climbs at such a fast (and steady) rate when the robot is not moving at all and no motors are running.

The room we use is air conditioned so I guess humidity is pretty low but not much we can do about that. I am going to look into anti-static sprays to see how well these work.

Is it called an accelerometer int he sensor set up?

Is it mounted flat or vertical? The Z axis is detecting gravity and should be around 1.0 all the time. Is it upside down?

Vex uses a chip LIS344ALH from ST Microelectronics. Going to their site for documentation is sometimes a good thing but it can confuse you with all the minute details they give you. You also don’t know what computing Vex or Robot C is doing to give you sensor values versus voltage differences the chip gives the Cortex. Since this is an analog circuit, it is probably just mapping the voltage drop.

See section 4.2. If the chip is installed upside down, you should be getting -1 versus 1. Ever increasing seems like it is speeding up out of control.

There are other documents at ST that are interesting too:
[http://www.st.com/web/catalog/sense_power/FM89/SC444/PF207281?sc=internet/analog/product/207281.jsp#

It’s winter here in PA and static discharge is an issue with us. Tried the spray with little success. We’re going to try and steer clear of those I2C sensors this year and see if that makes a difference but can;t say for sure it is the cause. It helps that this year’s game does not encourage big plexiglass pieces dragging on the foam tiles (which are not grounded) resulting in a nice static discharge when you touch the sides (which are grounded). All of this in the nice forced-air pretty darn dry heating system.](http://www.st.com/web/catalog/sense_power/FM89/SC444/PF207281?sc=internet/analog/product/207281.jsp#)

Is the OP talking about the accelerometer or the gyro?

http://www.vexrobotics.com/276-2333.html

Facepalm! My bad!

Gyro keeping going up is due to not initializing it properly to let it settle for a second or two in pre-auton().

The gyro really sends a voltage that corresponds to the angular rate the sensor is moving. The cortex is taking that and integrating it to an angle every time slice it gets. That is then the angle it gives you from the Sensor Value.

Keeping the gyro still when you turn on the root and some code in pre_auton helps settle the gyro down to know what is “0”.