This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy91: Problem with motion detection using ADXL362

Hello everyone,

I am currently using the Nordic-Thingy-91 to test the nRF9160 and other components on the board.
Now I am trying to implement a simple motion detection with the low power accelerometer ADXL362.
The goal is a simple state information, if the board is moving or not.

The strange thing is, it works in all cases, except when the Thingy91 lies flat (= -1g on Z axis).
In all other maximal positions (1g on X, -1g on X, 1g on Y, -1g on Y, 1g on Z) it detects the lack of motion correctly.
In the case of -1g on Z it does not detect inactivity.

I have implemented the motion detection according to the ADXL362 datasheet. Here is my configuration:

  • Range: +-2g
  • Absolute activity/inactivity detection in Loop-Mode
  • Active threshold set to 1200
  • Inactive threshold set to 1100
  • Inactive time set to 24 (~4sec)
  • ADXL362 operating in Wakeup mode
  • Mapped AWAKE bit to INT1, which I monitor with the controller

I have read back all the registers to make sure the values are written correctly and they are.

I have also tried "Referenced" activity/inactivity detection as it is described in the datasheet (Application examples, page 36),
but I could not make it work. It just didn't detect inactivity.

As I said before, it works nicely in all cases, except when Z = -1g, then it doesn't detect inactivity.

Has anyone encountered this problem before?
Or has anyone implemented a stable and working motion detection?

ADXL362 Silicon revision id: 3

Thank you!

Parents Reply
  • Was able to build and successfully flash a Thingy91(v1.4.0) with your code and your code seems to work perfectly fine, when not connected to a USB to see what comes out on the terminal everything seems to work as you described. The device turns green when i move it and once placed regardless of orientation it turns blue within some seconds.  If i do have it connected via USB  it seems to be a bit finicky and does not seem as reliable,  it takes a couple of tries but it turns blue when left alone eventually. 

    You can check the version of your Thingy91 by looking at the sticker, underneath the PCA number. 

    Regards,
    Jonathan

Children
Related