# How to filter uniform noise in a microcontroller?

By uniform noise I mean a band of a fixed width, no spikes, etc. This has to be one of the simplest examples. I'm looking for the appropriate theoretical approach as much as something relatively computationally efficient.

The true signal changes slowly (slower than 1Hz, a battery voltage). The noise band remains fairly constant (~50mV noise on a ~4V signal).

Initial ideas:

I'd love to learn more about what I think is a geometric average. I'm not sure I can quantify the time-to-settle/time-to-seed for these options either.

If there are more standard approaches, I'd love to learn about those as well.

• I think you meant arithmetic average: $y_m=\frac{y_1+y_2}{2}$, because geometric is defined as: $y_m=\sqrt[n]{y_1y_2 \cdots y_n} \rightarrow \sqrt{y_1 y_2}$. – jojek Jun 12 '14 at 8:14
• A moving average is a type of low-pass filter. Most practical low-pass filters can be thought of as moving average with the samples closest to the latest sample weighted more than those further back in time. In a simple moving average they are weighted the same. Hope this concept helps. – geometrikal Jun 12 '14 at 13:21
• What microcontroller are you implementing it on, what sample rate, how much memory can you spare? – geometrikal Jun 12 '14 at 13:21
• Can you put some sample data up, showing your noisy signal? – Tarin Ziyaee Jun 12 '14 at 16:13