AnsweredAssumed Answered

ADXL355 ODR and LPF

Question asked by FilippoAmbroglini on Feb 21, 2018

Dear all,

sorry for my stupid question but I'm new to this word and I have just start to use for an application the ADXL355 (EVAL-ADXL355Z board)  used in combination with ADICUP360 board and I have tried to adapt the example available here (ADXL355 Accelerometer PMOD Demo [Analog Devices Wiki] ) for my needs.

 

I'm using the SPI communication mode and I have realized this setup

 

ADXL355Z         ADICUP_SPI_PMOD

P1.1 (VDDIO)             6

P1.2 (INT1)                 N.C.

P1.3 (VDD)                 12

P1.4 (INT2)                 N.C.

P1.5 (GND)                 5   

P1.6 (DRDY)               9

P2.1 (V18ANA)           N.C.

P2.2 (CS)                    1

P2.3 (V18DIG)            N.C.

P2.4 (SCLK)               4

P2.5 (MISO)               3

P2.6 (MOSI)               2

 

I have modified the main program adding this code on the while loop

 

ui8awake = 0;
sampleToAcquire = 5000;
firstRead=1;
// Infinite loop
while (1)
{
if(uart_cmd == UART_TRUE){
uint32_t acquiredSample = 0;
while(sampleToAcquire>acquiredSample){
if (DioRd(INT2ACC_PORT) & INT2ACC_PIN) {
if (ui8awake == 0) {
ui8awake = 1;
}
}else{
if(ui8awake == 1) {
ui8awake = 0;
}
}
if(ui8awake == 1) {
acquiredSample++;
if(firstRead){
ADXL355_Data_Scan();
firstRead=0;
}
ADXL355_Data_Scan();
f32temp = ((((float)ui32SensorT - ADXL355_TEMP_BIAS)) / ADXL355_TEMP_SLOPE) + 25.0;
UART_Printf("\r\n %.6f,%.6f,%.6f,%.2f", (float)i32SensorX / adxl355Scale,(float)i32SensorY / adxl355Scale,(float)i32SensorZ / adxl355Scale,f32temp);
}
}
UART_Printf("\r\n");
UART_Printf("\r\n Press the <ENTER> key for acceleration and temperature data.");
UART_Printf("\r\n");
uart_cmd = UART_FALSE;
}

 

The idea is to use the DRDY signal that I have connect to the P9 configured as INT2 to read a fixed number of sample at a give frequency.

 

Before the call to start sensor function I have also add this line in order to configure the ODR and LPF 

SPI_Write(FILTER,0x04,0x00,SPI_WRITE_ONE_REG); 

 

That correspond to ODR of 250 Hz wih a LPF at 62.5Hz.

 

I will excite the ADXL with a shaker and when I'm going the read back the data  and reconstruct the excitation the frequecy of the Data Output is 250 Hz and not 62.5 Hz. So my question is which is exactly the effect of the LPF?

I have made some mistake on the acquisition program and/or configuring the accelerometer?

 

Thanks in advances for the help.

 

Best regards,

Filippo

 

P.S.

I think that in the wiki page of the example there is an error on the section "Setting up the hardware" and precisely the configuration of USB multiplxer seems to me wrong. In the picture the selector S1 is put to 1 but I think it should be put to 0 correct? 

Outcomes