IXZ500 Gyro Output

Hello all!

I'm currently working on reading some values from a IXZ500 gyro Gyro Breakout Board - IXZ500 Dual 500°/s - SEN-09410 - SparkFun Electronics, data-sheet: http://invensense.com/mems/gyro/documents/PS-IXZ-0500B-00-04.pdf. What I want to do is take these angular rotation rates that this gyro outputs and use them to move some servos. I know that gyros drift over time, but the outputs I get from this gyro seem to be changing way to much.

My code and outputs are listed below, during the time that this data was taken the gyro was not moved.

Code:

int x, z;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  z = analogRead(0);
  x = analogRead(1);
  //Serial.print("Roations = ");
  Serial.print(x, DEC);
  Serial.print(" ");
  Serial.println(z, DEC);
  delay(100);
}
331 358
283 281
371 366
201 188
470 500
116 73
772 865
131 80
802 876
170 109
775 859
206 134
794 881
198 128
827 895
194 129
830 906
196 131
792 875
216 147
693 752
238 167
502 542
260 190
364 390
338 305
258 254
264 227
257 282
200 189
169 158
312 307
82 49
759 857
122 75
776 875
167 114
762 840
212 141
636 684
238 176
466 501
264 240
329 366
197 139
367 396
173 119
262 269
258 199
155 133
338 340
68 35
767 859
131 81
782 877
175 114
750 841
209 144
609 657
208 140
665 725
215 142
757 837
221 151
572 607

The data sheet mentioned that the values it outputs are not dependent on the input voltage and that I do not need to scale them when I use the analogRead function. Did I read the data sheet right?

Can anyone explain why my readings are so weird? Any assistance would be greatly appreciated. Thank you!!

Thanks for the reply Richard!!

  1. I am powering my Seeeduino with the my computer and using the 3.3v pin to power the gyro.
  2. I am using the 110 degree/s setting (x4.5 and z4.5 out), or the amplified outputs.
  3. The wires are about an inch long, they are jumper wires.

Interesting that you should mention the fluorescent lamp noise because the room I was in had fluorescent lights. So how would I go about isolating the gyro so that the noise does not interfere with the readings? Thanks for all of your help!!!