Post Go back to editing

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 board 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 and could share their configuration?

ADXL362 Silicon revision id: 3

Thank you!

Parents
  • I have struggled with the ADXL362 just to get static g force readings.  +-4g, 400Hz ODR, No wake up.  No FIFO.  No interrupts.  No external clock.  Simple.  I saw some really weird stuff.  mfg id and chip id read back wrong.  stream readback is different data than byte readback.  There is data there and it's close, and it's dead on consistent but wrong.  Never sets the ready bit.  G force readings instantly fade to zero in the plus direction but fine in the negative direction.  Wierd stuff.  I'm running a DIY SPI bus with eight slaves (including the one ADXL) where the 16F690 harvests data via the DIY bus, then makes that available via the Microchip SPI bus.  Everybody is happy except the ADXL is a mess.  Figured it was a knockoff chip.  It's marked 362B, #001, 8703.  I was using the scope to watch the action on my homemade (DIY) spi bus and watching the ADXL perform badly.  Then I disconnected the scope and went over to the real SPI bus and watched from there.  Bingo! the ADXL started working perfectly.  It's the DIY SPI clock.  Connect that and the ADXL flakes out.  No grounding changes, just connect the probe!  I'm making bus signals with assembly code so setup and holds are ample.  Voltages are in spec.  Plenty of decoupling and the PCB distances are short, straight and fat.  Signal edges are square with no ringing.  How does the load of a scope probe trash the spi clock for the ADXL and how does that bring down the whole inner workings of the chip (g force fades?? in only one direction of the axis??, data with no data ready??).  Did I say this is weird stuff?  How close to the edge am I when the scope isn't connected?  This is a mysterious chip with a very poor datasheet.  eg figure 47.  Must discharge PS fully, or what?  No spec on PS rise or fall time.  No signal edge speed specs.

  • Ok.  Here's the deal.  The ADXL362 is a very PS sensitive chip.  The chip is specified at 2v but can run up to 3.6.  I was using 3.3v and I tried changing to 3.0v.  No help.   In my case the ADXL is on a SparkFun carrier and the carrier combines Vs and Vdd to one v+ pin with one .1uF cap.  The ADXL362 datasheet talks about this and recommends separate supplies or 'more' filtering.  So I changed my external .22 cap to a 10uF tantalum and put 100 ohms in the supply trace, as per the ADXL datasheet.  Things got a little better.  My power and ground btw the PIC and the ADXL (~1.5”, no shared loads and two bypass caps) were 25mil 1oz copper (.022 squ mm).  Not great but far better than the SparkFun carrier and good enough for everybody else.  I supplement this with a 1.5” length 24awg copper wire (.205 squ mm) btw the GND pin on the carrier board and the PIC’s bypass cap (the ADXL datasheet recommend a low impedance ground path), and things got perfect.

Reply
  • Ok.  Here's the deal.  The ADXL362 is a very PS sensitive chip.  The chip is specified at 2v but can run up to 3.6.  I was using 3.3v and I tried changing to 3.0v.  No help.   In my case the ADXL is on a SparkFun carrier and the carrier combines Vs and Vdd to one v+ pin with one .1uF cap.  The ADXL362 datasheet talks about this and recommends separate supplies or 'more' filtering.  So I changed my external .22 cap to a 10uF tantalum and put 100 ohms in the supply trace, as per the ADXL datasheet.  Things got a little better.  My power and ground btw the PIC and the ADXL (~1.5”, no shared loads and two bypass caps) were 25mil 1oz copper (.022 squ mm).  Not great but far better than the SparkFun carrier and good enough for everybody else.  I supplement this with a 1.5” length 24awg copper wire (.205 squ mm) btw the GND pin on the carrier board and the PIC’s bypass cap (the ADXL datasheet recommend a low impedance ground path), and things got perfect.

Children
No Data