MPU6050 Motion Detection

Hey fellas

As you know the GY-521 Module which contains a MPU6050 Sensor contains a DMP and an interrupt pin.

Basically what i want to achieve is to put Arduino on sleep and then wake it up by the interrupts from the module. The problem is even after i change module's sensitivity to 8g or 16g it still keeps waking up and sending interrupts literally constantly even tho i have not moved it at all. I Want the interrupt to only happen only on significant changes in the values measured. Is this even possible with this module? I've tried changing registers but had no luck so far.

I am using Rowberg I2CDev libraries.

Post links to the schematics of the hardware module you're using and post a wiring diagram of how you wired it in your setup!

pylon:
Post links to the schematics of the hardware module you're using and post a wiring diagram of how you wired it in your setup!

This is the schematic :

Setup :

Basically you just connect VCC and GND pins, SCL and SDL to the corresponding pin and INT to Pin2 on Arduino Uno and Pin0 on MKRFOX1200 (Yes i've tried both of them but i am getting same results, which is lots of interrupts per second)

And with that hardware setup and no sketch loaded you get a lot of interrupts? In that case your chip is damaged.

Otherwise post the code you're using. There are quite a lot of source for MPU6050 interrupts so it might be any other source than you expect. How do you check the interrupts? Using a scope?

pylon:
And with that hardware setup and no sketch loaded you get a lot of interrupts? In that case your chip is damaged.

Otherwise post the code you're using. There are quite a lot of source for MPU6050 interrupts so it might be any other source than you expect. How do you check the interrupts? Using a scope?

#include "I2Cdev.h"
#include "MPU6050.h"
#include "Wire.h"


MPU6050 Sensor;

volatile bool alarmOccured = false;

void setup() {
  Serial.begin(57600);
  Wire.begin();
  Sensor.initialize();

  pinMode(2, INPUT_PULLUP);
  attachInterrupt(2, alarmEvent, FALLING); 
}

void loop() {

  if (alarmOccured == false)
      return;

  Serial.println("Object Moved!!");
  delay(100);

  alarmOccured = false;
}


void alarmEvent() {
  alarmOccured = true;
}

Here is the code to check interrupts via serial port. basically i am getting lots of "Object Moved!" in the serial monitor as in the bool is always true (which it should not be?)

So i think the reason might be sensitivity of sensor for interrupt (not reading) since i haven't managed to find a way to change it.

Should i just give up and use other sensors or is there any way to make this work with MPU6050?

pinMode(2, INPUT_PULLUP);

According to the datasheet there should be no pullup on the interrupt signal from the MPU6050.
With the pullup to 5V you might have destroyed the interrupt line as the MPU6050 uses 3V3 levels.