I am using mma8451 to detection earthquakes,But,there are too many noise in result . and the frequency of the earthquake is the infrasound.So,I want to use LOW-PASS FILTER to remove noise,but the data sheet have a little message about ,please tell me how to set it,there are data sheet about LOW-PASS.
Hello Kaner,
The low-pass filtered data is done internally to the device. The data is basically averaged.
Registers 0x01 through 0x06 are used to read the X, Y, Z data. The device can be configured to produce high-pass filtered data or low-pass filtered data by setting or clearing the HPF_Out bit in the XYZ_Data_Cfg Register 0x0E.
Please let me know if this information helps.
Regards,
David
Hello Davidm,
Thank you very much for your reply,and I want to know how to set the cutoff frequency of the low pass filter.
Thanks,
Kaner
Hello Kaner,
My apologies for the delayed response.
In this case, there is no other control of the LPF than to switch it on or off. As a side note, this LPF is always enabled for all the other functions (landscape/portrait, transient, free fall/motion).
The low pass filter in question is a simple 1st order decimation filter, i.e. a moving average filter followed by a down-sampling. Its cut-off frequency depends on ODR and MODS settings.
If you look at the Table 67 of the datasheet, following the CTRL_REG2 description, "MODS Oversampling Modes Current Consumption and Averaging Values for each ODR", you'll find a column "OS Ratio" for all possible ODR/MODS combinations. This table allows you to calculate the ADC frequency, following the formula:
ADC freq = OS Ratio * ODR
The low pass filter in question does a decimation by either 2 or 4, according to the following rule, and the cut-off frequency depends on the decimation rate:
OS Ratio = 2: decimation by 2, cut-off freq = 0.25 * ADC freq
OS Ratio >= 4: decimation by 4, cut-off freq = 0.114 * ADC freq
I hope this information helps.
Regards,
David