??? 05/17/08 04:40 Modified: 05/17/08 04:47 Read: times |
#154832 - Integrate and Decimate Responding to: ???'s previous message |
I use this theory
http://www.atmel.com/dyn/resou...oc8003.pdf Increase the overall resolution by oversampling and then you have an improved reading. It does take more reads for each effective bit of resolution, but the result is worth it. Say you have an 8bit ADC, with integration and decimiation you can get 12 bits out of this, then drop the bottom two bits if you are having "flicker issues" and you have a nice smooth reading with 10bits effective resolution from your 8bit ADC. Anyway read the appnote, it explains it better than me. Heres the summary from the appnote -------APPNOTE SUMMARY FOLLOWS---------------- When the ADC samples a signal, it quantizes the signal in discrete steps. This introduces some error, often referred to as quantization error. Normal averaging will only even out signal fluctuations, while Decimation will increase the resolution. In a 4-times-oversampled signal, four adjacent data points are averaged to produce a new data point. Which frequency to oversample the signal with, can be calculated by equation 3-1. Adding these extra samples and right-shifting the result by a factor n,yields a result with resolution increased by n bits. Averaging four ADC results to get a new ADC result is the same as if the ADC sampled at ¼ of the rate, but also has the effect of averaging the quantization noise, which improves SNR. This will increase the ENOB and reduce the quantization error. With the availability of faster ADCs and with low memory cost, the advantages of oversampling are cost effective and desirable. • Some noise has to be present in the signal, at least 1 LSB. • If the noise amplitude is not sufficient, add noise to the signal. • Accumulate 4n 10-bit samples, where n is the desired extra number of bits in the resolution. • Scale the accumulated result, by right shifting it n times. • Compensate for errors, according to Application Note AVR120. Regards Marshall |