ADXL345 false interrupt

I have an ADXL345 accelerometer integrated into a PCB, but it's triggering false activity interrupts approximately 4/5 times per hour.

I placed the PCB on a table for 24 hours, during which there was absolutely no movement, but I received 100+ interrupts within that time frame. Any suggestions or insights into what might be causing this issue would be greatly appreciated.

datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adxl345.pdf

//TURN ADXL ON 
    Wire.beginTransmission(ADXL345_ADDRESS);
    Wire.write(0x2D);
    Wire.write(0x08);  // Set to normal operation mode    00001000 (0x08)
    Wire.endTransmission();
 



//adxl settup
  Wire.beginTransmission(ADXL345_ADDRESS);
  Wire.write(0x2C);  // SET power mode + data rate HZ
  Wire.write(0x04);  // Set data rate to 0.78 Hz.      (0000 0100) normal power + data rateHZ
  Wire.endTransmission();
 
  //ENABLE ACTIVITY detection
  Wire.beginTransmission(ADXL345_ADDRESS);
  Wire.write(0x27);  // enable control for activity detection 
  Wire.write(0xF0);  //  0xF0 = 11110000   //ENABLE ACTIVITY: ac,x,y,z  disable inactivity: ac/dc,x,y,z
  Wire.endTransmission();

  //  INT_1 / INT_2
  Wire.beginTransmission(ADXL345_ADDRESS);
  Wire.write(0x2F);  //  Interrupt mapping control INT1 or INT2  EF=INT1:activity  
  Wire.write(0x00);
  Wire.endTransmission();

  // Interrupt enable for ACTIVITY
  Wire.beginTransmission(ADXL345_ADDRESS);  // 0x10= activity ON (00010000) all other off(OFF: freefall,inactivity,tap...)
  Wire.write(0x2E);
  Wire.write(0x10);  // Enable just activity
  Wire.endTransmission();

  //Activity threshold
  Wire.beginTransmission(ADXL345_ADDRESS);
  Wire.write(0x24);
  Wire.write(0x08);  //  0-255 deimal  00000000-11111111     62.5mg * 255 =15,937mg(16g)  0x07=every_6min_false   0x09=1hr_no_false
  Wire.endTransmission();

then i use this code to get interrupts

attachInterrupt(digitalPinToInterrupt(GPIO_adxl345), adxl345_new_motionISR, RISING);

Check up the power supply as well as the electrical environment and other devices connected to the controller.

Snippets of code is not advised in the link: How to get the best out of this forum - Using Arduino / IDE 1.x - Arduino Forum

Too little information provided. Specify MCU, post all the code, a complete wiring diagram, etc.

Especially with I2C, avoid long, loose wires, as they pick up electrical noise leading to read errors.

interrupt has nothing to do with i2c here. from adxl345 interrupt pin it goes directly to esp32 pin , and when interrupt pin gets high , esp32 digital read it and report that there is moovement

No such connection was suggested or implied. However, avoid long, loose wires.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.