Post Go back to editing

Output Data Rate vs Sampling Rate

Category: Software
Product Number: ADXL313

Hello -

I need to sample data at a specific rate according to the Nyquist frequency, in my case, about 250Hz. I'm also sampling using an ADXL327 analog device. Once the buffer is filled I trigger a measurement analysis. I want the ADXL313 at highest sensitivity, 0.5g. Today I have a couple of questions.

In order to do this I am using a timer interrupt at exactly 250Hz, where I sample the ADC, fill the 3 axis buffer. Similarly, I want to do the same with the ADXL313 into it's own 3 axis buffer. If I am sampling at 250Hz, what should my ODR be set at when I perform a read: ADXL313_ReadXYZ(&x, &y, &);  of the 16 bit values? I assume the ODR is the maximum rate that it can be read with updated values.

And one other question. Using an ADXL313 eval board, it's connected to a L476 Nucleo, and the eval board is sitting pretty much flat. When I run it, I'm getting X values around 0, Y values around 0, and Z values around 511. Is this normal, considering the 0.5g is 10 bits? When the board is upside down Z is then -511. As well, the Z axis sensitivity is almost non-existent in this range! That is - when I tap the desk in close proximity to the board the Z doesn't change, however I see X,Y bouncing around. If I change the range to +/-1g, the static Z value is around 730, and has somewhat better response to a tap on the desk. I have tried setting the DATA_FORMAT register to these values 0x08 and 0x28 (full res bit set) and there's no difference in range 0.5g, it's still at 511

Can someone shed some light on these questions?

Thanks!

Gary