SLAAEF6 September 2023 MSPM0L1105 , MSPM0L1106 , MSPM0L1306 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346
To detect if there has been motion, the software sends the latest sample to a signal analysis function after it has been run through the filtering functions. This function uses previous samples in an exponential moving average filter. This filter is used to output a reference level. There are a few more functions that then compare the sample to this reference output from the moving average filter. If the delta between these two samples becomes large enough and faster enough, then it decides that motion has been detected. This is the main place in software where the overall behavior and sensitivity of the solution can be tuned.