MPU6050 Strange acceleration Values. Damaged Sensor?

Hi,

I've tried different libraries and code however I've been reading this values for the sensor:

AcX = -7728 | AcY = 32528 | AcZ = 9014 | Tmp = 26.24 | GyX = -296 | GyY = 116 | GyZ = -69
AcX = -7738 | AcY = 32518 | AcZ = 9030 | Tmp = 26.24 | GyX = -296 | GyY = 119 | GyZ = -68
AcX = -7718 | AcY = 32502 | AcZ = 9016 | Tmp = 26.23 | GyX = -298 | GyY = 117 | GyZ = -69
AcX = -7720 | AcY = 32492 | AcZ = 9034 | Tmp = 26.24 | GyX = -297 | GyY = 120 | GyZ = -68
AcX = -7706 | AcY = 32498 | AcZ = 9016 | Tmp = 26.25 | GyX = -300 | GyY = 115 | GyZ = -67
AcX = -7716 | AcY = 32498 | AcZ = 9042 | Tmp = 26.23 | GyX = -296 | GyY = 116 | GyZ = -73
AcX = -7716 | AcY = 32500 | AcZ = 9034 | Tmp = 26.24 | GyX = -295 | GyY = 117 | GyZ = -68
AcX = -7706 | AcY = 32528 | AcZ = 9020 | Tmp = 26.24 | GyX = -296 | GyY = 114 | GyZ = -68
AcX = -7722 | AcY = 32510 | AcZ = 9062 | Tmp = 26.23 | GyX = -297 | GyY = 118 | GyZ = -67
AcX = -7708 | AcY = 32482 | AcZ = 9004 | Tmp = 26.24 | GyX = -296 | GyY = 114 | GyZ = -64

Those last samples were taken using the short example sketch availabe at playground.arduino

// MPU-6050 Short Example Sketch
// By Arduino User JohnChi
// August 17, 2014
// Public Domain
#include<Wire.h>
const int MPU=0x68;  // I2C address of the MPU-6050
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
void setup(){
  Wire.begin();
  Wire.beginTransmission(MPU);
  Wire.write(0x6B);  // PWR_MGMT_1 register
  Wire.write(0);     // set to zero (wakes up the MPU-6050)
  Wire.endTransmission(true);
  Serial.begin(115200);
}
void loop(){
  Wire.beginTransmission(MPU);
  Wire.write(0x3B);  // starting with register 0x3B (ACCEL_XOUT_H)
  Wire.endTransmission(false);
  Wire.requestFrom(MPU,14,true);  // request a total of 14 registers
  AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)    
  AcY=Wire.read()<<8|Wire.read();  // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
  AcZ=Wire.read()<<8|Wire.read();  // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)
  Tmp=Wire.read()<<8|Wire.read();  // 0x41 (TEMP_OUT_H) & 0x42 (TEMP_OUT_L)
  GyX=Wire.read()<<8|Wire.read();  // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)
  GyY=Wire.read()<<8|Wire.read();  // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)
  GyZ=Wire.read()<<8|Wire.read();  // 0x47 (GYRO_ZOUT_H) & 0x48 (GYRO_ZOUT_L)
  Serial.print("AcX = "); Serial.print(AcX);
  Serial.print(" | AcY = "); Serial.print(AcY);
  Serial.print(" | AcZ = "); Serial.print(AcZ);
  Serial.print(" | Tmp = "); Serial.print(Tmp/340.00+36.53);  //equation for temperature in degrees C from datasheet
  Serial.print(" | GyX = "); Serial.print(GyX);
  Serial.print(" | GyY = "); Serial.print(GyY);
  Serial.print(" | GyZ = "); Serial.println(GyZ);
  delay(333);
}

Could the Y axis accelerometer be damaged?

That is strange indeed. Perhaps it is damaged.

I noticed that the noise on the Y-axis is about the same as the noise on the X-axis. It could be working. Do the values change when you rotate the sensor ?

The MPU-6050 has undocumented registers that could damage it. Did you write to undocumented registers ?

Or is it simply measuring the acceleration due to gravity in the y axis?

What happens if you invert it?
or change it's orientation so that the x or z axis responds to the 1g provided free of charge by gravity?

Peter_n:
That is strange indeed. Perhaps it is damaged.

I noticed that the noise on the Y-axis is about the same as the noise on the X-axis. It could be working. Do the values change when you rotate the sensor ?

The MPU-6050 has undocumented registers that could damage it. Did you write to undocumented registers ?

I was using this methods:

mpu.setIntEnabled(1);
mpu.setIntDataReadyEnabled(1);

But yesterday I saw this one:

mpu.resetSensors();

And I thought it could fix the problem. Now all meassurements are -1 except for the temperature :o .

AcX = -1 | AcY = -1 | AcZ = -1 | Tmp = 36.53 | GyX = -1 | GyY = -1 | GyZ = -1
AcX = -1 | AcY = -1 | AcZ = -1 | Tmp = 36.53 | GyX = -1 | GyY = -1 | GyZ = -1
AcX = -1 | AcY = -1 | AcZ = -1 | Tmp = 36.53 | GyX = -1 | GyY = -1 | GyZ = -1
AcX = -1 | AcY = -1 | AcZ = -1 | Tmp = 36.53 | GyX = -1 | GyY = -1 | GyZ = -1
AcX = -1 | AcY = -1 | AcZ = -1 | Tmp = 36.53 | GyX = -1 | GyY = -1 | GyZ = -1

EDIT: Temperature values comes from the code:

Serial.print(" | Tmp = "); Serial.print(Tmp/340.00+36.53);

JohnLincoln:
Or is it simply measuring the acceleration due to gravity in the y axis?

What happens if you invert it?
or change it's orientation so that the x or z axis responds to the 1g provided free of charge by gravity?

Right Now I can't test it, not until I solve the mess I've created.

EDIT 2:

Those 0 were result of a bad wiring, here I've got some values while moving the sensor:

AcX = 1078 | AcY = 32767 | AcZ = 6756 | Tmp = 25.67 | GyX = -422 | GyY = -10355 | GyZ = -1768
AcX = 5696 | AcY = 32767 | AcZ = 1710 | Tmp = 25.66 | GyX = 3057 | GyY = -10694 | GyZ = 433
AcX = 9144 | AcY = 32767 | AcZ = -4738 | Tmp = 25.66 | GyX = 3528 | GyY = -6986 | GyZ = -4597
AcX = 7792 | AcY = 32767 | AcZ = -12394 | Tmp = 25.68 | GyX = 4837 | GyY = -5793 | GyZ = -4101
AcX = 3408 | AcY = 32767 | AcZ = -18374 | Tmp = 25.70 | GyX = 6321 | GyY = -2243 | GyZ = -650
AcX = 3780 | AcY = 32767 | AcZ = -17370 | Tmp = 25.68 | GyX = -12443 | GyY = 6394 | GyZ = 49
AcX = 5106 | AcY = 32767 | AcZ = -8380 | Tmp = 25.67 | GyX = -9930 | GyY = 9643 | GyZ = 2832
AcX = 7006 | AcY = 32767 | AcZ = -1512 | Tmp = 25.69 | GyX = -10587 | GyY = 4402 | GyZ = 3810
AcX = 6134 | AcY = 32767 | AcZ = 2054 | Tmp = 25.69 | GyX = -8504 | GyY = -105 | GyZ = 5528
AcX = 7524 | AcY = 32767 | AcZ = 4732 | Tmp = 25.70 | GyX = -10712 | GyY = -663 | GyZ = 6092
AcX = 3674 | AcY = 26756 | AcZ = -11116 | Tmp = 25.69 | GyX = -32768 | GyY = 4230 | GyZ = 15639
AcX = 724 | AcY = 32342 | AcZ = -19062 | Tmp = 25.70 | GyX = -27995 | GyY = 14149 | GyZ = 6695
AcX = 3450 | AcY = 32767 | AcZ = -20810 | Tmp = 25.70 | GyX = -7191 | GyY = 1982 | GyZ = -857
AcX = 1446 | AcY = 32767 | AcZ = -21694 | Tmp = 25.71 | GyX = 3082 | GyY = -1417 | GyZ = -434
AcX = 1044 | AcY = 31408 | AcZ = -16752 | Tmp = 25.72 | GyX = 32767 | GyY = -10058 | GyZ = 69

The values correspond with the movements I was doing.

The value of 32767 seems to be stuck for the first 10 samples. That's not good. You should buy another MPU-6050.

Is there a re-calibration command in the registers ?

Peter_n:
The value of 32767 seems to be stuck for the first 10 samples. That's not good. You should buy another MPU-6050.

Is there a re-calibration command in the registers ?

The closest could be activate the self-test:

/** Get self-test enabled value for accelerometer Y axis.
 * @param enabled Self-test enabled value
 * @see MPU6050_RA_ACCEL_CONFIG
 */
void MPU6050::setAccelYSelfTest(bool enabled) {
    I2Cdev::writeBit(devAddr, MPU6050_RA_ACCEL_CONFIG, MPU6050_ACONFIG_YA_ST_BIT, enabled);

However I can't find where to read the test results.