MPU6050 returning a null set after working previously

Hey everyone, I recently purchased an MPU5060 and have been working on integrating it with my Uno. This morning, I was able to hook it up and return the raw values using the code available at http://playground.arduino.cc/Main/MPU-6050. I was working on calibrating the thing and was getting some unexpected results. Low and behold, I went back to the original code and realized that I'm now reading a constant 0 raw input for all accelerometer and gyro fields. The temperature reads a fixed 36.506, but if you back that out of the manipulation already done in the code, that indicates a 0 input.The program also indicates a 0 error code. I double checked all my connections and everything seems to be alright.

InvenSense MPU-6050
June 2012
WHO_AM_I : 68, error = 0
PWR_MGMT_2 : 0, error = 0

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 0, 0, 0
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 0, 0, 

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 0, 0, 0
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 0, 0, 

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 0, 0, 0
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 0, 0,

I also ran the i2c scanner (http://playground.arduino.cc/Main/I2cScanner) and it indicates "I2C device found at address 0x68".

I2C Scanner
Scanning...
I2C device found at address 0x68  !
done

So as far as I can tell, the everything seems to be communicating correctly but the chip is just reporting a null set. Any ideas on what caused this after the everything seemed to be working fine beforehand? Any potential solutions?

The chip is detected, so its I2C interface is working. Everything in its registers is zero.

That is the situation at power up. All registers are zero (not the "WHO_AM_I"), and the chip has to be turned 'on' byte writing to the power register. Are you sure the line that writes the power management register is still in the sketch ?

Yes, my guess would be that you are not initializing all the registers you need to, it may be that some are starting up in a random state perhaps.

Also is the chip getting a proper reset cycle? Check the datasheet for whether it needs an explicit reset after power-up.

Erdin: That is the situation at power up. All registers are zero (not the "WHO_AM_I"), and the chip has to be turned 'on' byte writing to the power register. Are you sure the line that writes the power management register is still in the sketch ?

Pretty sure, the code was a direct copy and paste from the source. The section of the code that I believe deals with the power management is below.

// According to the datasheet, the 'sleep' bit
  // should read a '1'. But I read a '0'.
  // That bit has to be cleared, since the sensor
  // is in sleep mode at power-up. Even if the
  // bit reads '0'.
  error = MPU6050_read (MPU6050_PWR_MGMT_2, &c, 1);
  Serial.print(F("PWR_MGMT_2 : "));
  Serial.print(c,HEX);
  Serial.print(F(", error = "));
  Serial.println(error,DEC);


  // Clear the 'sleep' bit to start the sensor.
  MPU6050_write_reg (MPU6050_PWR_MGMT_1, 0);

I'll try to page through the datasheet and see if I can find anything, but it concerns me that the chip was working fine before with this exact same chunk of code. Is it even possible that something changed within the chip that is not addressed anywhere in the code? To a novice's eye, it appears to rather comprehensive.

The chip has a (large) number of undocumented registers. But as far as I know, not a register that could do this.

You might have to buy another one to compare.

Haven't been able to make any progress on this issue. Is the consensus that this is fixable with some sort of software, or is my problem deeper than that?

Erdin: You might have to buy another one to compare.

Haha, poor college student here, trying to save money where I can :)

Less than 4 dollars, inclusive shipping. http://www.ebay.com/sch/i.html?_sop=15&_from=R40&_sacat=0&_nkw=mpu-6050+%28module%2Carduino%29&LH_PrefLoc=2&LH_BIN=1

With such a module from Ebay the VCC of the sensor board should be connected to the 5V pin of the Arduino. They have an onboard voltage regulator.

You could check the board with a magnifier for bad soldering.

Erdin: Less than 4 dollars, inclusive shipping.

Well played my friend, well played.

Did you ever find out what was wrong? I'm having the same error.

One of mine failed like that, too. I assume I fried it somehow.

I`m having the same problem.

The only difference I have noticed is that soft-resetting of Arduino board forces mpu6050 to update zeroes with some values.. can`t say if these "angles" are correct, but the temperature looks correct and is changing up/down when trying to heat/cool it (values are always constant till the next soft-reset).

So something is preventing mpu6050 from updating registers automatically...

If anybody can suggest how this can be solved?