In reading through the datasheet and application note AN4071, the only description of the high pass filter built into the MMA8451Q is that it is 16 Hz with an 800 Hz sample rate.
What is the mathematical filter description of the high pass filter? I've got a Python script to take my raw data and convert it to filtered data, but the behavior doesn't match my predictions from the model.
Hello Joel,
Unfortunately I do not have the mathematical description of this filter. However, the cut-off frequencies can be set in the HP_FILTER_CUTOFF register using SEL[1:0] bits. The cut-off values change depending on the selected ODR. Please review the Table 23 in the datasheet to verify the options at each data rate. The lower cut-off frequency will show that slower motions will start to track. If only very quick motions are desired set the cut- off to the highest possible value.
Do not forget that the HPF_OUT bit in the XYZ_DATA_CFG register must be set for the high-pass filter to be enabled for the data.
Best regards,
Tomas