Accelerometer ADXL362 Testing

Part 1: Simple Read

The Setup:

Simple Read

The Output (Viewed from the Arduino Serial Monitor):

simple read sample

Resources/References: The setup and code used follow this tutorial: http://ez.analog.com/docs/DOC-2222. The code library can be found here: http://annem.github.io/ADXL362/.

Notes: The tutorial uses a 3.3V logic arduino. The arduino nano used here uses 5V logic. A simple logic level shifter was created to shift down the 5V to 3.3V by making voltage dividers using 2k ohm and 1k ohm resistors. The voltage dividers were used for the MOSI, SCK, and CS lines.

     Also important to note is the difference in the Reg 2C value here from the one in the tutorial. The value here is 13 while the value in the tutorial is 3. The cause of the difference has not been determined. A search of the ADXL362 datasheet reveals that register 2C is the FILTER_CTL register which controls the output data rate (ODR). A value of 13 sets the bandwidth of the antialiasing filters to 1/4 the ODR, and the ODR to 100 Hz.

     The values read from the sensor on the serial monitor are not as stable in this test as they are in the tutorial. This can be seen most easily is the XData. The snapshot of the data above shows the XData varying from -10 to 28.

Part 2: Motion-Activated Sleep

The Setup:

accel sleep int1

The Output (Viewed from the Arduino Serial Monitor):

accel sleep sample 1

accel sleep sample 2

Resources/References: The setup and code used follow this tutorial: http://ez.analog.com/docs/DOC-2261. The code library can be found here: http://annem.github.io/ADXL362/ and https://github.com/rocketscream/Low-Power.

Notes: The setup is the same as the Simple Read setup, except for the addition of a connection for Int1 of the accelerometer to d2 on the arduino. The data read on the serial monitor is once again more erratic than the data seen in the tutorial, but the functionality of the device entering a sleep mode after sitting still for a few seconds and waking upon movement works.

Leave a Reply

Your email address will not be published. Required fields are marked *