Filtering Sensor Values

Getting raw data readings from different sensors is usually pretty straightforward. However, before the aqcuired sensor data can be interpreted, it is usally advisable to remove any unwanted noise (caused by bad power supplies, radio frequency interference or similar).

A digital low-pass filter is a simple and flexible way to clean up and smooth sensor data, here is an example:

For a more detailed technical explanation and other digital filtering options, see page 18-29 from the application note below:

http://ww1.microchip.com/downloads/en/AppNotes/00001334B.pdf