IDG1215 gyroscope unstable

I was reading the outputs of my gyroscope, to check if everything was working correctly.
Wiring:
GND - Ground
Vin - 5V
Xout - Analog 1
Yout - Analog 2
Vref, PTATS and AZ are unconnected

This is what is receive in Volts:

x                   y
3.0303030014 1.3049852848
3.7829911708 1.3049852848
0.8748778343 1.2952101230
4.0078201293 1.3000977039
3.6412513256 1.3049852848
2.8250244140 1.2952101230
2.3460409641 1.3049852848
3.9051809310 1.3098728656
4.0175952911 1.3000977039
1.6080156326 1.3000977039
3.4213099479 1.3000977039
3.1573803424 1.3049852848
3.8074291229 1.3000977039
0.8748778343 1.3147605657
3.9540567398 1.3098728656
3.6363637447 1.3049852848
2.9716520309 1.3049852848
2.3264906406 1.3049852848
3.9149560928 1.3049852848
4.0469207763 1.3000977039
1.6471162796 1.3000977039
3.3675463199 1.3049852848
3.2062561511 1.3000977039
3.9002933502 1.3049852848
0.8944281578 1.3049852848
3.9051809310 1.3000977039
3.6656892299 1.3000977039
2.9716520309 1.3049852848

The y-values remains quite stable, but my x is fluctuating randomly.

When I check the datasheet, the static output is 1.35V. So why is my y-value at static conditions 1.3V?

Printing voltages measured with a 10 bit A/D to ten decimal places is little optimistic, don't you think?
Let me guess - you used "Serial.print (voltage, DEC);" ?

A 3V device, supplied with 5V?

AWOL:
Let me guess - you used "Serial.print (voltage, DEC);" ?

Ye. :slight_smile:

AWOL:
A 3V device, supplied with 5V?

In the features I read this: 3-7V single-supply operation. So a 5V supply voltage should be ok, not?
I wired the same way as this example: GyroIDG1215 \ Learning \ Wiring
Using the same code, this is my output:

rotational rates are x, y: 610 266
rotational rates are x, y: 511 266
rotational rates are x, y: 693 266
rotational rates are x, y: 726 266
rotational rates are x, y: 83 266
rotational rates are x, y: 706 267
rotational rates are x, y: 525 266
rotational rates are x, y: 715 266
rotational rates are x, y: 82 266
rotational rates are x, y: 617 267
rotational rates are x, y: 238 267
rotational rates are x, y: 712 266
rotational rates are x, y: 399 266
rotational rates are x, y: 219 267
rotational rates are x, y: 677 266
rotational rates are x, y: 580 267
rotational rates are x, y: 723 268
rotational rates are x, y: 86 267
rotational rates are x, y: 669 268
rotational rates are x, y: 323 266
rotational rates are x, y: 714 266
rotational rates are x, y: 291 266
rotational rates are x, y: 321 266
rotational rates are x, y: 629 266
rotational rates are x, y: 629 266
rotational rates are x, y: 719 266
rotational rates are x, y: 84 266
rotational rates are x, y: 694 266
rotational rates are x, y: 412 266

In the features I read this: 3-7V single-supply operation

I read the device datasheet - it said 3V operation.
Is the device you have on a board with its own regulator?

Have you measured the supply voltage on the Arduino?

Double-checked the wiring?

Can you post your code?

AWOL:
Is the device you have on a board with its own regulator?

Yes, I'm using this one: Gyro Breakout Board - IDG1215 Dual 67°/s - SEN-09093 - SparkFun Electronics

AWOL:
Have you measured the supply voltage on the Arduino?

Why is this necessary? Don't the 5V pin always supply 5V?

AWOL:
Double-checked the wiring?

Yes

AWOL:
Can you post your code?

#define gyropinx 0   // Analog pin on Arduino for gyroscope x-readings
#define gyropiny 1   // Analog pin on Arduino for gyroscope y-readings

float  gyrovalx; 
float  gyrovaly; 

float  gyrovoltx; 
float  gyrovolty;

const float gyrobias = 1.35; // Zero-rate output offset in V (bias)
const float gyroSens = 0.015; // Gyroscope sensitivity in V/°/s

void setup(){
  Serial.begin(9600); 
  gyrovalx = gyrovaly = 0;
}

void loop(){
  gyrovalx = analogRead(gyropinx);
  gyrovaly = analogRead(gyropiny);
  
  gyrovoltx = gyrovalx*5/1023;
  gyrovolty = gyrovaly*5/1023;
  
  Serial.print(gyrovoltx,DEC);
  
  Serial.print(" ");

  Serial.println(gyrovolty,DEC);
  
  delay(100);
}

Try:

#define gyropinx 0   // Analog pin on Arduino for gyroscope x-readings
#define gyropiny 1   // Analog pin on Arduino for gyroscope y-readings

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

void loop(){
  float gyrovalx = analogRead(gyropinx);
        gyrovalx = analogRead(gyropinx);
  float gyrovaly = analogRead(gyropiny);
        gyrovaly = analogRead(gyropiny);
  
  float gyrovoltx = gyrovalx*5/1023;
  float gyrovolty = gyrovaly*5/1023;
  
  Serial.print(gyrovoltx,3);
  
  Serial.print(" ");

  Serial.println(gyrovolty,3);
  
  delay(100);
}

I will try this tomorrow, but I don't see why a change in the print commando would fix this problem.

but I don't see why a change in the print commando would fix this problem

That's just to eliminate silly "precision".
The main change is the double read.

I tried the code, but still no improvement.

1.984 1.315
2.473 1.320
1.222 1.320
2.781 1.320
3.196 1.320
1.373 1.320
2.146 1.320
1.598 1.320
2.713 1.315
3.240 1.315
1.178 1.320
2.180 1.320
1.877 1.315
2.576 1.315
3.221 1.325
0.982 1.320
2.380 1.320
2.107 1.320
2.458 1.320
3.157 1.315
0.831 1.315

I'd say the Y looks good.
Time to replace the wiring for X, or move to another pin.

Ye, thought it would be a hardware problem. Is it possible there is something wrong with sensor and not with the wiring?

Try swapping the channels over

I don't get what you mean

Swap the connections for X and Y - then you'll know if the defect is on the breakout board (problem will move to 'Y') or on the Arduino (problem will stay with 'X'). I'd almost put some money on it being a bad connection.

I resoldered my connection of x, and the problem is still there..

Multimeter on the gyro output, measure resistance to ground with the unit powered down. Reverse leads on multimeter - at least one of these readings should be finite if the chip is connected to the breakout trace. Wondering if the surface mount soldering is defective or something?

I'am concentrating on the y-axis for now (using only 1 axis at the moment).

Now, the gyro itselfs works on an input supply voltage of 2.7-3.3V. Now thanks to the regulator on the breakout I can connect it to the 5V on the Arduino. My question:

When I want to calculate the voltage from the analogRead(), do I have to do: analogRead()*5/1023 or analogRead()*3.3/1023?

Is the problem on the Arduino or on the gyro board?

When I want to calculate the voltage from the analogRead(), do I have to do: analogRead()*5/1023 or analogRead()*3.3/1023?

Depends how you’ve got your analogue reference set.
Default is 5V.
If you haven’t done anything to change that, then 5V (or whatever your processor is running on) will be the reference.