Analog read smoothing with Arduino


This is a bit more technical and I will update the article if in the future there is a mistake/misconception in applying the correct algorithm which I believe is already sufficient for the smoothing of analogue value reading from Arduino.

There are many methods of value smoothing, categorized in software based high pass filter, low pass filter, Butterworth filter, etc. But this does not mean that it will increase accuracy of a value generated by a probe. It will only increase the reproducibility within the accuracy range. For example, a typical k-type thermocouple has accuracy of ±12 LSB (equal to ±3.00°C) when connected via Maxim 6675 amplifier and 5v DC. To increase the accuracy, a careful calibration (i.e. 4/5 degree polynomial equation, or a lookup table) may be needed.  For a greater accuracy, it is recommended to use different probe as discussed here

Methods of averaging

To acquire a reproducible average, mode and median filters are commonly implemented. There are, however, many sophisticated low pass filter that can be use in addition to the previous two. Savitzky-Golay and Moving Average are applied to smoothen values from sensors.  Obtaining trend in trading, Fibonacci Moving Average is also a common algorithm.

{I am so sleepy now, this article will be improved later}

From all the theories, I tried to extract only some of the most convenient methods to implement. You may grab the code here.


Popular posts from this blog

Xeon LGA 771 di mobo LGA 775

Writing and reading float using Arduino EEPROM

LM35 Incubator with LCD 16x2 on Arduino