Method to smooth ADC readings.
This filter has running averaging for raw values from ADC and exponential smoothing to averaged sum of raw values.
Few images to see how filter performs.
I have linear hall-effect A1324 with 4.7uF decoupling capacitor and arduino nano board for this test. New value is printed every 10ms (115200 baud rate). Blue line is highest value and red is lowest value got from arduino.
Remember, your results may vary.
Here filter is not being used. Value fluctuates around range of 2.
Value fluctuates around range of ~1 - 0.7.
Value fluctuates around range of ~0.6 - 0.45.
See the example file at ADCFilter\examples\FilterExample\FilterExample.ino


