This video demonstrates how to use MATLAB to detect whether a 3-axis accelerometer signal crosses a threshold. Using the 3-case approach described in this video, one can use detect threshold crossing for any sensor signal. One can use raw or filtered sensor signal. The accelerometer is connected to Matlab using the Arduino UNO board.
Both Exponential Moving Average (EMA, low pass, Infinite Impulse Response - IIR) and Simple Moving Average (SMA, Finite Impulse Response - FIR) filters are shown in Tutorial
آی-ویدئو