Implementing digital filter for removing noise

Thread Starter

embedded.world

Joined Feb 27, 2014
38
I am sampling analog channel which measure voltage across resistance by passing constant dc current across it.

Now I have 250 samples at one time.

Now I want to apply filter to remove/minimize noise as much as I can.

Now I am taking average for all the sample which makes a simple low pass filter.

How to make use of filter so that I can remove most of noise or 50Hz noise in it as circuit is powered from main.

I want to learn which filter will be best here FIR/IIR.
 

MrChips

Joined Oct 2, 2009
30,706
Taking 250 samples is one thing. You also need to specify your sampling rate or the sampling period or the total sampling duration.

Take as many samples as you wish at whatever rate but make sure that the total sampling time is a multiple of 20ms.

Then take the average.
 

t06afre

Joined May 11, 2009
5,934
One thing is sample-rate. But another thing is how often you need to update your measurement results. It would help if you told us more about your measurement setup. How many bits, sample-rate, which AD converter and so on.
 

MrChips

Joined Oct 2, 2009
30,706
Your sampling rate is 2ksps. Sampling period is 0.5ms.
Total sampling time is 250 x 0.5ms = 125ms

x7 channels = 875 ms

How did you get 1.5s?

At sampling period of 0.5ms you want 40 samples per channel or multiples of 40 samples per channel.
 
Top