PDA

View Full Version : ADC Averaging



Sach_1979
- 20th September 2009, 00:47
Hi,

Can anyone let me know how is the ADC averaging is done?

How many values I need to read before averaging? Will this act as filter?

The I am reading a thermistor sensor value.

Please let me know.



Thanks
Sach

mackrackit
- 20th September 2009, 03:47
The amount of data you collect before averaging is pretty much a personal prference. If the value does not swing much then more is a waist of time. Large swings withe the most being mid range then you need to collectet enough to cover it all.

To do he averaging. Set up a loop reading the ADC for the amount you want to collect. Keep adding the VAR to it's self then divide when finished.

Jerson
- 20th September 2009, 10:19
Covered here

http://www.picbasic.co.uk/forum/showthread.php?t=7229&highlight=running+average

Sach_1979
- 21st September 2009, 06:14
The amount of data you collect before averaging is pretty much a personal prference. If the value does not swing much then more is a waist of time. Large swings withe the most being mid range then you need to collectet enough to cover it all.

To do he averaging. Set up a loop reading the ADC for the amount you want to collect. Keep adding the VAR to it's self then divide when finished.

Hey,

for 10 bit ADC, if the value is not ranging much, what should be the number of samples to be taken?


Thanks for the reply.

Melanie
- 21st September 2009, 06:53
Take a couple of dozen samples...

Sort them...

Discard the top six values...

Discard the Bottom six values...

Sum and average the middle twelve.