ADXL367
Recommended for New Designs
The ADXL367 is an ultralow power, 3-axis microelectromechanical systems (MEMS) accelerometer that consumes only 0.89 μA at a 100 Hz output data rate and...
Datasheet
ADXL367 on Analog.com
ADXL362
Recommended for New Designs
The ADXL362 is an ultralow power, 3-axis MEMS accelerometer that consumes less than 2 µA at a 100 Hz output data rate and 270 nA when in motion triggered...
Datasheet
ADXL362 on Analog.com
I've used the adxll362 in loop mode for several years -- typically with active/inactive thresholds of 0.35g in reference mode. I have been unable to duplicate this setup with the adxl367. In particular, I am unable to reduce the inactive threshold below ~1.25g and have the part ever sleep. There are some cryptic comments in the datasheet --
When using the referenced configuration, it is important to note that the device still uses the absolute thresholds when it first enters measurement mode. This becomes important if an inactivity threshold < 1g is desired. In this case the device must enter measurement mode with a threshold greater than 1g. The inactivity threshold can then be lowered to the desired level (while still in measurement mode).
Sounds simple right? It doesn't work. Or more specifically, I haven't found the magic incantation that works. I've tried waiting after the other setup before making a change, but that does not work.
Here's how I'm initializing things (no attempt to lower the threshold here) which works, but doesn't meet my inactivity threshold goals. Any advice? -- another unrelated gripe -- why switch from little endian to big endian from adxl362 to adxl367 ? Just super annoying!
Nobody has an answer or a working example?
Sadly the example code provided doesn't fully work. It took a while to figure things out since it lacked any comments and no symbolic constants. There is at least one bug -- your code sets the inactive threshold below 1g. But ultimately, the problem is that in reference mode, inactivity isn't reliably detected -- I can put the adxl at an angle and it stays awake. Also, the inactivity timer doesn't work correctly -- I can set it to more than one second and inactivity detection will be significantly less than 1 second.
The code works, but maybe not for your specific use case. The objective of the example code was to give you guidance for the implementation on your end.
Anyway, please look at the datasheet page 21 for details on when the reference is updated based on the ODR and timer setting.
My use case is simple -- and works well with the adxl362, but not with the adxl367:
1) Loop/reference mode
2) Inact threshold 350mg
3) Act threshold 250mg
4) Inact timer 0.5 seconds
Here's what I see
1) inact timer isn't respected
2) Inact threshold in reference mode below 1g leads to instances where the adxl367 gets "stuck" awake -- this is easy to demonstrate by rotating the test board vertically and leaving it propped up.
I don't believe the code you sent has been tested in any serious manner.
The datasheet explains your observations in page 21, as I mentioned before.
That explains why it gets "stuck" but not why the inactivity timer doesn't appear to work correctly -- times out too quickly.
I do not see the issue you describe (the inactivity timer doesn't appear to work correctly -- times out too quickly) with the configurations you share:
1) Loop/reference mode
2) Inact threshold 350mg
3) Act threshold 250mg
4) Inact timer 0.5 seconds
Below are my settings on the sensor to reproduce your confutation:
To "wake up" the system I quickly lifted and dropped the ADXL367 board. When awake I am checking on the oscilloscope the time the sensor is awake and the number of samples before it goes to sleep by monitoring DATA_READY (INT1). I count 18 samples which seems reasonable to me, and it is higher than the 15 set on the inactivity timer.
Can you please provide an example that shows the inactivity "times out too quickly"?
There are two significant differences -- I don't need the data and therefore don't read it and I monitor the awake signal.
My results show that the inactivity timer behaves correctly.
Reading the acceleration data or not does not change the response.
My results show that the inactivity timer behaves correctly.
Reading the acceleration data or not does not change the response.