cancel
Showing results for 
Search instead for 
Did you mean: 

Filterning ADC results

ezanen9
Associate II
Posted on October 18, 2006 at 08:59

Filterning ADC results

6 REPLIES 6
ezanen9
Associate II
Posted on October 02, 2006 at 11:37

Hi all,

I am working on a instument that is indicating the analog value that is read in via the 12 bits ADC. The indicator is an analog pointer like an old voltmeter.

I am looking for a filter to filter out small fast changes in the analoge input signal. The small slow changes must not be stopped by this filter. Also this filter may not generate a delay bigger than 0.5 sec.

I tried avaraging multiple samples and I also implemented a first order filter. But or this filters delayed the input signal to much or they outputted results that let the analog pointer look like an digital one.

Does someone have an effective filter(or idea's/tip's) or a good idea for me?

Thanks Jimmey

jgoril
Associate II
Posted on October 02, 2006 at 13:48

Hello.

And what analog RC filter? Did you really need sw solution?

So... what is your sample rate? And what does it mean ''small fast change''? And how many instruction cycles do you have available for cumputing?

kleshov
Associate II
Posted on October 02, 2006 at 13:57

Here is an extremely simple filter I use all the time:

#define FILTER_DEPTH 4

int filtered;

void adc_conversion_done()

{

filtered += ADC_DATA - (filtered >> FILTER_DEPTH);

}

int adc_get_filtered_data()

{

return filtered >> FILTER_DEPTH;

}

It works similarly to an RC network with a time constant of (1 << FILTER_DEPTH) ADC sample times. Do the math and you will see why.

Regards,

- mike

[ This message was edited by: volius on 02-10-2006 17:29 ]

ezanen9
Associate II
Posted on October 04, 2006 at 12:57

Hi mike,

Thanks, I had to increase the filter depth but it works fine now!

Regards,

Jimmey

sany_as
Associate II
Posted on October 18, 2006 at 06:33

HELLO THERE...

CAN SOMEBODY PLEASE TELL ME THE ACCURACY OF THE ADC OF STR710FZ26.OR HOW TO CALCULATE IT..

KINDLY HELP

REGARDS

SANY

hichem2
Associate II
Posted on October 18, 2006 at 08:59

Hi,

For the STR710 ADC12 converter, 1lsb = 3.3v/4095 = 2.5v/3103.

With regards,

Hich