Hi,
It's because the reading you get from the ADC most likely won't be stable at 252 across several consecutive samples, it will probably "tip over" towards 253 a couple of times.
Let's say you get the following values:
252, 253, 252, 253, 253, 252, 252, 253, 251, 253, 252, 253, 253, 252, 252, 252
The sum is 4039. Averaging them across 16 samples results in 252.4375 but you'll only "see" 252 which is ~0.29% off. Averaging them across 4 instead gives you 1009.75, you'll only "see" 1009 which is ~0.19% off.
Had the result been 1040 instead, averaging them across 16 samples would give you the same result, ~0.29% off while the oversampling method would only be 0.009% off.
Try it out and make sure you read thru the page I linked to, also look up the term oversampling. Here's a quote from Wikipedia:/Henrik.In practice, oversampling is implemented in order to achieve cheaper higher-resolution A/D and D/A conversion. For instance, to implement a 24-bit converter, it is sufficient to use a 20-bit converter that can run at 256 times the target sampling rate. Averaging a group of 256 consecutive 20-bit samples adds 4 bits to the resolution of the average, producing a single sample with 24-bit resolution.




Bookmarks